summaryrefslogtreecommitdiffstats
path: root/src/corelib/time
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2019-10-21 14:36:25 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2019-10-21 22:39:33 +0200
commit6e3b5801d26dc186066155202847342782bf653b (patch)
tree7d7662abbb71721be47dc206ca5cec05e15a89dd /src/corelib/time
parent399f8151438408894f323927296b458f4fc0b27c (diff)
QDateTimeParser: always use locale for AM/PM texts
The default implementation used the locale, the reimplementation supported translating the texts. This mixing of l10n and i18n concepts resulted in bugs and inconsistencies. Using the texts for AM/PM from the locale that is set on the date/time control is sufficient. [ChangeLog][QtWidgets][QDateTimeParser] AM/PM strings in QDateTimeEdit and other classes using QDateTimeParser are provided by the locale, and are no longer translatable. Change-Id: I83a5dab470ae5ba35b3ce4040ad1877908f462c7 Fixes: QTBUG-75866 Task-number: QTBUG-72833 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/corelib/time')
-rw-r--r--src/corelib/time/qdatetimeparser_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/time/qdatetimeparser_p.h b/src/corelib/time/qdatetimeparser_p.h
index e9f1455380..d128e35ddc 100644
--- a/src/corelib/time/qdatetimeparser_p.h
+++ b/src/corelib/time/qdatetimeparser_p.h
@@ -77,7 +77,6 @@ QT_BEGIN_NAMESPACE
class Q_CORE_EXPORT QDateTimeParser
{
- Q_DECLARE_TR_FUNCTIONS(QDateTimeParser)
public:
enum Context {
FromString,
@@ -267,10 +266,11 @@ protected: // for the benefit of QDateTimeEditPrivate
return skipToNextSection(section, current, QStringRef(&sectionText));
}
QString stateName(State s) const;
+ QString getAmPmText(AmPm ap, Case cs) const;
+
virtual QDateTime getMinimum() const;
virtual QDateTime getMaximum() const;
virtual int cursorPosition() const { return -1; }
- virtual QString getAmPmText(AmPm ap, Case cs) const;
virtual QLocale locale() const { return defaultLocale; }
mutable int currentSectionIndex;