summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLouie S <louie@example.com>2024-02-28 17:02:33 -0500
committerLouie S <louie@example.com>2024-02-28 17:02:33 -0500
commit34a6045e57a117b9035a12cfe107048e700fe8fd (patch)
treec503230c6e3ea0d4d6514cd128c098a59ce00686 /src
parent2473da03572c3b9d8e29ae6120e5177156699f2a (diff)
Fix issues building with qt5
Diffstat (limited to 'src')
-rw-r--r--src/backend/db_sqlite.cpp1
-rw-r--r--src/rule.cpp11
2 files changed, 8 insertions, 4 deletions
diff --git a/src/backend/db_sqlite.cpp b/src/backend/db_sqlite.cpp
index 9e4a6e7..9cd73f5 100644
--- a/src/backend/db_sqlite.cpp
+++ b/src/backend/db_sqlite.cpp
@@ -1,4 +1,5 @@
#include <QCoreApplication>
+#include <QDebug>
#include <QDir>
#include <QFile>
#include <QFileInfo>
diff --git a/src/rule.cpp b/src/rule.cpp
index 93c33d6..7cfcff2 100644
--- a/src/rule.cpp
+++ b/src/rule.cpp
@@ -13,12 +13,15 @@ Rule::Rule(int id, int entry_id, When when, QDateTime date, QString color, QStri
color(color),
highlight(highlight)
{
- QComboBox *when_widget;
+ QComboBox *when_widget = new QComboBox;
QDateTimeEdit *date_widget = new QDateTimeEdit(QDate::currentDate());
- QLineEdit *color_widget; // TODO consider making this a color selector widget
- QLineEdit *highlight_widget; // TODO consider making this a color selector widget
+ QLineEdit *color_widget = new QLineEdit; // TODO consider making this a color selector widget
+ QLineEdit *highlight_widget = new QLineEdit; // TODO consider making this a color selector widget
- when_widget->addItems(QStringList("Before", "After"));
+ QStringList when_options;
+ when_options.append("Before");
+ when_options.append("After");
+ when_widget->addItems(when_options);
when_widget->setCurrentIndex(this->when);
this->addWidget(when_widget);