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.
This commit is contained in:
Magnus Gille
2026-01-04 05:07:50 -08:00
committed by GitHub
parent 1b21c6a4fc
commit ab1b9633d0
3 changed files with 7 additions and 11 deletions

View File

@@ -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

View File

@@ -25,6 +25,9 @@
#include <QDialog>
#include <QColor>
// color chooser that also supports the standard colors (CPLOTMARKER, CPOWER)
// and returns them as a QColor(1,1,1,<int>) where <int> is the color number
// .e.g CPOWER is 18, see below for full list
class ColorButton : public QPushButton
{
Q_OBJECT

View File

@@ -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,<int>) where <int> 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