From f432d6401938aa3a326b4ea205f310d2559f9961 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Mon, 18 Jan 2016 18:26:17 +0100 Subject: Make findAmPm actually return the relevant enum, instead of int. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The enum needed a name to make that possible, of course. The one overt int return -1 needed to be made explicitly Neither, too. Change-Id: I3930bf03a7ee5e1619a1c74f9ca54faf6a6c5b2f Reviewed-by: JÄ™drzej Nowacki --- src/corelib/tools/qdatetimeparser_p.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/corelib/tools/qdatetimeparser_p.h') diff --git a/src/corelib/tools/qdatetimeparser_p.h b/src/corelib/tools/qdatetimeparser_p.h index fe6bfa9c3c..257cb6e2cc 100644 --- a/src/corelib/tools/qdatetimeparser_p.h +++ b/src/corelib/tools/qdatetimeparser_p.h @@ -97,7 +97,7 @@ public: none.zeroesAdded = 0; } virtual ~QDateTimeParser() {} - enum { + enum AmPmFinder { Neither = -1, AM = 0, PM = 1, @@ -201,7 +201,7 @@ public: int findDay(const QString &str1, int intDaystart, int sectionIndex, QString *dayName = 0, int *used = 0) const; #endif - int findAmPm(QString &str1, int index, int *used = 0) const; + AmPmFinder findAmPm(QString &str, int index, int *used = 0) const; bool potentialValue(const QString &str, int min, int max, int index, const QDateTime ¤tValue, int insert) const; bool skipToNextSection(int section, const QDateTime ¤t, const QString §ionText) const; -- cgit v1.2.3