diff options
-rw-r--r-- | src/backend/db_sqlite.cpp | 1 | ||||
-rw-r--r-- | src/rule.cpp | 11 |
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); |