diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/tools/qdatetime.cpp | 7 | ||||
-rw-r--r-- | src/corelib/tools/qdatetime_p.h | 14 |
2 files changed, 13 insertions, 8 deletions
diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp index 09cc47f..7dd9060 100644 --- a/src/corelib/tools/qdatetime.cpp +++ b/src/corelib/tools/qdatetime.cpp @@ -4398,6 +4398,13 @@ int QDateTimeParser::sectionMaxSize(Section s, int count) const case DateSectionMask: qWarning("QDateTimeParser::sectionMaxSize: Invalid section %s", sectionName(s).toLatin1().constData()); + + case NoSectionIndex: + case FirstSectionIndex: + case LastSectionIndex: + case CalendarPopupIndex: + // these cases can't happen + break; } return -1; } diff --git a/src/corelib/tools/qdatetime_p.h b/src/corelib/tools/qdatetime_p.h index ec931d3..3201958 100644 --- a/src/corelib/tools/qdatetime_p.h +++ b/src/corelib/tools/qdatetime_p.h @@ -138,13 +138,6 @@ public: PossibleBoth = 4 }; - enum { - NoSectionIndex = -1, - FirstSectionIndex = -2, - LastSectionIndex = -3, - CalendarPopupIndex = -4 - }; - enum Section { NoSection = 0x00000, AmPmSection = 0x00001, @@ -163,7 +156,12 @@ public: DateSectionMask = (DaySection|MonthSection|YearSection|YearSection2Digits|DayOfWeekSection), FirstSection = 0x02000|Internal, LastSection = 0x04000|Internal, - CalendarPopupSection = 0x08000|Internal + CalendarPopupSection = 0x08000|Internal, + + NoSectionIndex = -1, + FirstSectionIndex = -2, + LastSectionIndex = -3, + CalendarPopupIndex = -4 }; // duplicated from qdatetimeedit.h Q_DECLARE_FLAGS(Sections, Section) |