From 34a6045e57a117b9035a12cfe107048e700fe8fd Mon Sep 17 00:00:00 2001 From: Louie S Date: Wed, 28 Feb 2024 17:02:33 -0500 Subject: Fix issues building with qt5 --- src/backend/db_sqlite.cpp | 1 + src/rule.cpp | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'src') 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 +#include #include #include #include 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); -- cgit