From ab1b9633d0e88e6a888bb4541115fcdcdac00ef5 Mon Sep 17 00:00:00 2001 From: Magnus Gille Date: Sun, 4 Jan 2026 05:07:50 -0800 Subject: [PATCH] Fixes so that lupdate doesn't throw warnings (#4788) src/Gui/CalendarItemDelegates.h: ColumnDelegatingItemDelegate - uses tr() so should call Q_OBJECT CalendarDetailedDayDelegate - uses tr() so should call Q_OBJECT Moved Q_OBJECT to the top of the class for consistency and this also guarantees it's private (which it has to be). src/Gui/ColorButton.h: - Moved the comment from Colors.h here. src/Gui/Colors.h: - Removed #if 0 code that confused lupdate since it doesn't understand preprocessor macros. --- src/Gui/CalendarItemDelegates.h | 4 ++++ src/Gui/ColorButton.h | 3 +++ src/Gui/Colors.h | 11 ----------- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/Gui/CalendarItemDelegates.h b/src/Gui/CalendarItemDelegates.h index edf474c34..2df0f7ecd 100644 --- a/src/Gui/CalendarItemDelegates.h +++ b/src/Gui/CalendarItemDelegates.h @@ -115,6 +115,7 @@ private: class CalendarHeadlineDelegate : public QStyledItemDelegate { + Q_OBJECT public: enum Roles { DayRole = Qt::UserRole + 1 // [CalendarDay] Calendar day @@ -153,6 +154,7 @@ private: class CalendarCompactDayDelegate : public QStyledItemDelegate { + Q_OBJECT public: enum Roles { DayRole = Qt::UserRole + 1, // [CalendarDay] Calendar day @@ -191,6 +193,7 @@ private: class AgendaMultiDelegate : public QStyledItemDelegate { + Q_OBJECT public: enum Roles { // Qt::DisplayRole // [QString] The default text to display @@ -229,6 +232,7 @@ private: class AgendaEntryDelegate : public QStyledItemDelegate { + Q_OBJECT public: enum Roles { EntryRole = Qt::UserRole, // [CalendarEntry] Entry to be displayed diff --git a/src/Gui/ColorButton.h b/src/Gui/ColorButton.h index 195d73d45..77d49193e 100644 --- a/src/Gui/ColorButton.h +++ b/src/Gui/ColorButton.h @@ -25,6 +25,9 @@ #include #include +// color chooser that also supports the standard colors (CPLOTMARKER, CPOWER) +// and returns them as a QColor(1,1,1,) where is the color number +// .e.g CPOWER is 18, see below for full list class ColorButton : public QPushButton { Q_OBJECT diff --git a/src/Gui/Colors.h b/src/Gui/Colors.h index 0236bd55d..cfad686fa 100644 --- a/src/Gui/Colors.h +++ b/src/Gui/Colors.h @@ -162,17 +162,6 @@ class GCColor : public QObject static QStringList getConfigKeys(); }; -// color chooser that also supports the standard colors (CPLOTMARKER, CPOWER) -// and returns them as a QColor(1,1,1,) where is the color number -// .e.g CPOWER is 18, see below for full list -#if 0 -class GColorDialog : public QDialog -{ - GColorDialog(QWidget *parent); - -}; -#endif - // return a color for a ride file class GlobalContext; class ColorEngine : public QObject