diff options
Diffstat (limited to 'src/widgets/widgets/qdatetimeedit.cpp')
-rw-r--r-- | src/widgets/widgets/qdatetimeedit.cpp | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/widgets/widgets/qdatetimeedit.cpp b/src/widgets/widgets/qdatetimeedit.cpp index e26993fb23..f348bbed0e 100644 --- a/src/widgets/widgets/qdatetimeedit.cpp +++ b/src/widgets/widgets/qdatetimeedit.cpp @@ -2308,33 +2308,6 @@ void QDateTimeEdit::paintEvent(QPaintEvent *event) style()->drawComplexControl(QStyle::CC_ComboBox, &optCombo, &p, this); } -/* - Returns the string for AM and PM markers. - - If a translation for "AM" and "PM" is installed, then use that. - Otherwise, use the default implementation, which uses the locale. -*/ -QString QDateTimeEditPrivate::getAmPmText(AmPm ap, Case cs) const -{ - QString original; - QString translated; - if (ap == AmText) { - original = QLatin1String(cs == UpperCase ? "AM" : "am"); - translated = (cs == UpperCase ? QDateTimeParser::tr("AM") : QDateTimeParser::tr("am")); - } else { - original = QLatin1String(cs == UpperCase ? "PM" : "pm"); - translated = (cs == UpperCase ? QDateTimeParser::tr("PM") : QDateTimeParser::tr("pm")); - } - - // This logic fails if a translation exists but doesn't change the string, - // which we can accept as a corner-case for which a locale-derived answer - // will be acceptable. - if (original != translated) - return translated; - - return QDateTimeParser::getAmPmText(ap, cs); -} - int QDateTimeEditPrivate::absoluteIndex(QDateTimeEdit::Section s, int index) const { for (int i=0; i<sectionNodes.size(); ++i) { |