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/rule.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/rule.cpp') 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