diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-05-22 17:16:04 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-06-12 15:50:36 +0200 |
commit | d6b74761342bd3cc317ba5cfbca138be087fea2e (patch) | |
tree | 748669d73872e126197079adb975f29bbe168517 /src/corelib/time/qdatetimeparser_p.h | |
parent | 4d31ddf5730ad3eed59331811218b26284438cef (diff) |
Port qdatetime away from QStringRef
Task-number: QTBUG-84319
Change-Id: Ieeb25933a8062bdf0d2835f4d78e86daac1e8720
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/time/qdatetimeparser_p.h')
-rw-r--r-- | src/corelib/time/qdatetimeparser_p.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/corelib/time/qdatetimeparser_p.h b/src/corelib/time/qdatetimeparser_p.h index 535069b7b2..9a8bb7d5d9 100644 --- a/src/corelib/time/qdatetimeparser_p.h +++ b/src/corelib/time/qdatetimeparser_p.h @@ -220,12 +220,12 @@ private: int year, QString *monthName = nullptr, int *used = nullptr) const; int findDay(const QString &str1, int intDaystart, int sectionIndex, QString *dayName = nullptr, int *used = nullptr) const; - ParsedSection findUtcOffset(QStringRef str) const; - ParsedSection findTimeZoneName(QStringRef str, const QDateTime &when) const; - ParsedSection findTimeZone(QStringRef str, const QDateTime &when, + ParsedSection findUtcOffset(QStringView str) const; + ParsedSection findTimeZoneName(QStringView str, const QDateTime &when) const; + ParsedSection findTimeZone(QStringView str, const QDateTime &when, int maxVal, int minVal) const; // Implemented in qdatetime.cpp: - static int startsWithLocalTimeZone(const QStringRef name); + static int startsWithLocalTimeZone(const QStringView name); enum AmPmFinder { Neither = -1, @@ -238,12 +238,12 @@ private: AmPmFinder findAmPm(QString &str, int index, int *used = nullptr) const; #endif // datestring - bool potentialValue(const QStringRef &str, int min, int max, int index, + bool potentialValue(QStringView str, int min, int max, int index, const QDateTime ¤tValue, int insert) const; bool potentialValue(const QString &str, int min, int max, int index, const QDateTime ¤tValue, int insert) const { - return potentialValue(QStringRef(&str), min, max, index, currentValue, insert); + return potentialValue(QStringView(str), min, max, index, currentValue, insert); } protected: // for the benefit of QDateTimeEditPrivate @@ -261,10 +261,10 @@ protected: // for the benefit of QDateTimeEditPrivate int absoluteMax(int index, const QDateTime &value = QDateTime()) const; int absoluteMin(int index) const; - bool skipToNextSection(int section, const QDateTime ¤t, const QStringRef §ionText) const; + bool skipToNextSection(int section, const QDateTime ¤t, QStringView sectionText) const; bool skipToNextSection(int section, const QDateTime ¤t, const QString §ionText) const { - return skipToNextSection(section, current, QStringRef(§ionText)); + return skipToNextSection(section, current, QStringView(sectionText)); } QString stateName(State s) const; QString getAmPmText(AmPm ap, Case cs) const; |