summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools')
-rw-r--r--src/corelib/tools/qdatetime.cpp5
-rw-r--r--src/corelib/tools/qlinkedlist.h4
-rw-r--r--src/corelib/tools/qlocale_tools.cpp2
-rw-r--r--src/corelib/tools/qlocale_win.cpp5
4 files changed, 7 insertions, 9 deletions
diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp
index a2c92835fe..e4b28178e8 100644
--- a/src/corelib/tools/qdatetime.cpp
+++ b/src/corelib/tools/qdatetime.cpp
@@ -2997,9 +2997,8 @@ inline qint64 QDateTimePrivate::zoneMSecsToEpochMSecs(qint64 zoneMSecs, const QT
QDateTime takes into account the system's time zone information
when dealing with DST. On modern Unix systems, this means it
applies the correct historical DST data whenever possible. On
- Windows and Windows CE, where the system doesn't support
- historical DST data, historical accuracy is not maintained with
- respect to DST.
+ Windows, where the system doesn't support historical DST data,
+ historical accuracy is not maintained with respect to DST.
The range of valid dates taking DST into account is 1970-01-01 to
the present, and rules are in place for handling DST correctly
diff --git a/src/corelib/tools/qlinkedlist.h b/src/corelib/tools/qlinkedlist.h
index 62cb17c053..249f76dafd 100644
--- a/src/corelib/tools/qlinkedlist.h
+++ b/src/corelib/tools/qlinkedlist.h
@@ -134,7 +134,7 @@ public:
typedef T *pointer;
typedef T &reference;
Node *i;
- inline iterator() : i(0) {}
+ inline iterator() : i(Q_NULLPTR) {}
inline iterator(Node *n) : i(n) {}
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
iterator(const iterator &other) Q_DECL_NOTHROW : i(other.i) {}
@@ -171,7 +171,7 @@ public:
typedef const T *pointer;
typedef const T &reference;
Node *i;
- inline const_iterator() : i(0) {}
+ inline const_iterator() : i(Q_NULLPTR) {}
inline const_iterator(Node *n) : i(n) {}
inline const_iterator(iterator ci) : i(ci.i){}
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
diff --git a/src/corelib/tools/qlocale_tools.cpp b/src/corelib/tools/qlocale_tools.cpp
index 5fd2aa0c59..762f4f36dc 100644
--- a/src/corelib/tools/qlocale_tools.cpp
+++ b/src/corelib/tools/qlocale_tools.cpp
@@ -224,7 +224,7 @@ void doubleToAscii(double d, QLocaleData::DoubleForm form, int precision, char *
const char *endptr;
decpt = qstrtoll(target.data() + eSign + 1, &endptr, 10, &ok) + 1;
Q_ASSERT(ok);
- Q_ASSERT(endptr - target.data() <= length - eSign -1);
+ Q_ASSERT(endptr - target.data() <= length);
} else {
// No 'e' found, so it's the 'f' form. Variants of snprintf generate numbers with
// potentially multiple digits before the '.', but without decimal exponent then. So we
diff --git a/src/corelib/tools/qlocale_win.cpp b/src/corelib/tools/qlocale_win.cpp
index f8b9f86ac6..42ac888e47 100644
--- a/src/corelib/tools/qlocale_win.cpp
+++ b/src/corelib/tools/qlocale_win.cpp
@@ -826,7 +826,6 @@ QVariant QSystemLocale::query(QueryType type, QVariant in = QVariant()) const
case ZeroDigit:
return d->zeroDigit();
case LanguageId:
- case ScriptId:
case CountryId: {
QString locale = QString::fromLatin1(getWinLocaleName());
QLocale::Language lang;
@@ -835,12 +834,12 @@ QVariant QSystemLocale::query(QueryType type, QVariant in = QVariant()) const
QLocalePrivate::getLangAndCountry(locale, lang, script, cntry);
if (type == LanguageId)
return lang;
- if (type == ScriptId)
- return script == QLocale::AnyScript ? fallbackUiLocale().script() : script;
if (cntry == QLocale::AnyCountry)
return fallbackUiLocale().country();
return cntry;
}
+ case ScriptId:
+ return QVariant(QLocale::AnyScript);
case MeasurementSystem:
return d->measurementSystem();
case AMText: