Commit abd6475b authored by Fabian Vogt's avatar Fabian Vogt
Browse files

Fix multiple top-level definitions of enum Roles breaking ODR

src/multidayincidencemodel.cpp:11:6: warning: type 'Roles' violates the C++ One Definition Rule [-Wodr]
src/hourlyincidencemodel.cpp:8:6: note: an enum with different value name is defined in another translation unit

Just move the enums into class scope in the header files.
parent ef83b482
Pipeline #89170 passed with stage
in 2 minutes
......@@ -5,11 +5,6 @@
#include <QBitArray>
#include <QTimeZone>
enum Roles {
Incidences = IncidenceOccurrenceModel::LastRole,
PeriodStartDateTime,
};
HourlyIncidenceModel::HourlyIncidenceModel(QObject *parent)
: QAbstractItemModel(parent)
{
......
......@@ -38,6 +38,11 @@ public:
Q_FLAGS(Filters)
Q_ENUM(Filter)
enum Roles {
Incidences = IncidenceOccurrenceModel::LastRole,
PeriodStartDateTime,
};
HourlyIncidenceModel(QObject *parent = nullptr);
~HourlyIncidenceModel() = default;
......
......@@ -8,11 +8,6 @@
#include "multidayincidencemodel.h"
#include <QBitArray>
enum Roles {
Incidences = IncidenceOccurrenceModel::LastRole,
PeriodStartDate,
};
MultiDayIncidenceModel::MultiDayIncidenceModel(QObject *parent)
: QAbstractItemModel(parent)
{
......
......@@ -44,6 +44,11 @@ public:
Q_FLAGS(Filters)
Q_ENUM(Filter)
enum Roles {
Incidences = IncidenceOccurrenceModel::LastRole,
PeriodStartDate,
};
MultiDayIncidenceModel(QObject *parent = nullptr);
~MultiDayIncidenceModel() = default;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment