diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-11-06 01:00:56 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-11-06 01:00:56 +0100 |
commit | 290aac23a756522385b3200c84fd6118dc94d132 (patch) | |
tree | 081958c1b8792d90db6ecc105b57dbd0d1e70ab5 /src/corelib | |
parent | 81d8319276f26d399bdff47b49bd69b19bd86c5a (diff) | |
parent | 73e7eb785fbf984e2b964be8c3acad788479dfa6 (diff) |
Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: Id1e4664d3c942226b76e2c3b338df3116ff89297
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/codecs/qt_attribution.json | 7 | ||||
-rw-r--r-- | src/corelib/kernel/qcoreapplication_win.cpp | 2 | ||||
-rw-r--r-- | src/corelib/kernel/qt_attribution.json | 1 | ||||
-rw-r--r-- | src/corelib/kernel/qvariant.cpp | 12 | ||||
-rw-r--r-- | src/corelib/mimetypes/qmimeprovider.cpp | 2 | ||||
-rw-r--r-- | src/corelib/mimetypes/qmimetype.cpp | 1 | ||||
-rw-r--r-- | src/corelib/mimetypes/qmimetypeparser.cpp | 4 |
7 files changed, 22 insertions, 7 deletions
diff --git a/src/corelib/codecs/qt_attribution.json b/src/corelib/codecs/qt_attribution.json index 41f644a030..0815074675 100644 --- a/src/corelib/codecs/qt_attribution.json +++ b/src/corelib/codecs/qt_attribution.json @@ -6,6 +6,7 @@ "QtUsage": "Used in Qt Core if ICU is not used. Configure with -icu to avoid.", "Path": "qbig5codec.cpp", + "Description": "Treat as final version; no upstream known", "Description": "The Big5 codecs (QBig5Codec, QBig5hkscsCodec) provide conversion to and from the Big5 encodings.", "License": "BSD 2-clause \"Simplified\" License", @@ -23,6 +24,7 @@ Copyright (C) 2001, 2002 Anthony Fok, ThizLinux Laboratory Ltd." "QtUsage": "Used in Qt Core if ICU is not used. Configure with -icu to avoid.", "Path": "qeucjpcodec.cpp", + "Description": "Treat as final version; no upstream known", "Description": "The EUC-JP text codec provides conversion to and from EUC-JP, the main legacy encoding for Unix machines in Japan.", "License": "BSD 2-clause \"Simplified\" License", @@ -37,6 +39,7 @@ the main legacy encoding for Unix machines in Japan.", "QtUsage": "Used in Qt Core if ICU is not used. Configure with -icu to avoid.", "Path": "qeuckrcodec.cpp", + "Description": "Treat as final version; no upstream known", "Description": "The EUC-KR text codec provides conversion to and from EUC-KR, KR, the main legacy encoding for Unix machines in Korea.", "License": "BSD 2-clause \"Simplified\" License", @@ -51,6 +54,7 @@ the main legacy encoding for Unix machines in Korea.", "QtUsage": "Used in Qt Core if ICU is not used. Configure with -icu to avoid.", "Path": "qjiscodec.cpp", + "Description": "Treat as final version; no upstream known", "Description": "The ISO 2022-JP (JIS) text codec provides conversion to and from ISO 2022-JP.", "License": "BSD 2-clause \"Simplified\" License", "LicenseId": "BSD-2-Clause", @@ -64,6 +68,7 @@ the main legacy encoding for Unix machines in Korea.", "QtUsage": "Used in Qt Core if ICU is not used. Configure with -icu to avoid.", "Path": "qsjiscodec.cpp", + "Description": "Treat as final version; no upstream known", "Description": "The Shift-JIS text codec provides conversion to and from Shift-JIS.", "License": "BSD 2-clause \"Simplified\" License", "LicenseId": "BSD-2-Clause", @@ -77,6 +82,7 @@ the main legacy encoding for Unix machines in Korea.", "QtUsage": "Used in Qt Core.", "Path": "qtsciicodec.cpp", + "Description": "Treat as final version; no upstream known", "Description": "The TSCII text codec provides conversion to and from the Tamil TSCII encoding.", "License": "BSD 2-clause \"Simplified\" License", @@ -91,6 +97,7 @@ encoding.", "QtUsage": "Used in Qt Core if ICU is not used. Configure with -icu to avoid.", "Path": "qgb18030codec.cpp", + "Description": "Treat as final version; no upstream known", "Description": "The GBK codec provides conversion to and from the Chinese GB18030/GBK/GB2312 encoding.", "License": "BSD 2-clause \"Simplified\" License", diff --git a/src/corelib/kernel/qcoreapplication_win.cpp b/src/corelib/kernel/qcoreapplication_win.cpp index 0c57ad34b9..b373267fcb 100644 --- a/src/corelib/kernel/qcoreapplication_win.cpp +++ b/src/corelib/kernel/qcoreapplication_win.cpp @@ -717,7 +717,7 @@ QString decodeMSG(const MSG& msg) else if (const char *wmmsgC = findWMstr(msg.message)) message = QString::fromLatin1(wmmsgC); else - message = QString::fromLatin1("WM_(%1)").arg(msg.message); // Unknown WM_, so use number + message = QString::fromLatin1("WM_(0x%1)").arg(msg.message, 0, 16); // Unknown WM_, so use number // Yes, we want to give the WM_ names 20 chars of space before showing the // decoded message, since some of the common messages are quite long, and diff --git a/src/corelib/kernel/qt_attribution.json b/src/corelib/kernel/qt_attribution.json index 37764a5330..6d8f4f2abc 100644 --- a/src/corelib/kernel/qt_attribution.json +++ b/src/corelib/kernel/qt_attribution.json @@ -5,6 +5,7 @@ "QtUsage": "Used in Qt Core on macOS.", "Path": "qeventdispatcher_cf_p.h", + "Description": "Treat as final version; no upstream known", "Description": "Implementation of QAbstractEventDispatcher for macOS.", "License": "BSD 3-clause \"New\" or \"Revised\" License", "LicenseId": "BSD-3-Clause", diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index 0b4c3f387f..6541b97595 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -3523,13 +3523,19 @@ bool QVariant::canConvert(int targetTypeId) const } // TODO Reimplement this function, currently it works but it is a historical mess. - uint currentType = ((d.type == QMetaType::Float) ? QVariant::Double : d.type); + uint currentType = d.type; if (currentType == QMetaType::SChar || currentType == QMetaType::Char) currentType = QMetaType::UInt; if (targetTypeId == QMetaType::SChar || currentType == QMetaType::Char) targetTypeId = QMetaType::UInt; - if (uint(targetTypeId) == uint(QMetaType::Float)) targetTypeId = QVariant::Double; - + if (currentType == QMetaType::Short || currentType == QMetaType::UShort) + currentType = QMetaType::Int; + if (targetTypeId == QMetaType::Short || currentType == QMetaType::UShort) + targetTypeId = QMetaType::Int; + if (currentType == QMetaType::Float) + currentType = QMetaType::Double; + if (targetTypeId == QMetaType::Float) + targetTypeId = QMetaType::Double; if (currentType == uint(targetTypeId)) return true; diff --git a/src/corelib/mimetypes/qmimeprovider.cpp b/src/corelib/mimetypes/qmimeprovider.cpp index c4a8458243..aac51184a4 100644 --- a/src/corelib/mimetypes/qmimeprovider.cpp +++ b/src/corelib/mimetypes/qmimeprovider.cpp @@ -502,7 +502,7 @@ void QMimeBinaryProvider::loadMimeTypePrivate(QMimeTypePrivate &data) QString lang = xml.attributes().value(QLatin1String("xml:lang")).toString(); const QString text = xml.readElementText(); if (lang.isEmpty()) { - lang = QLatin1String("en_US"); + lang = QLatin1String("default"); // no locale attribute provided, treat it as default. } data.localeComments.insert(lang, text); continue; // we called readElementText, so we're at the EndElement already. diff --git a/src/corelib/mimetypes/qmimetype.cpp b/src/corelib/mimetypes/qmimetype.cpp index 50b8eae5c3..55c7de0c87 100644 --- a/src/corelib/mimetypes/qmimetype.cpp +++ b/src/corelib/mimetypes/qmimetype.cpp @@ -258,6 +258,7 @@ QString QMimeType::comment() const QStringList languageList; languageList << QLocale().name(); languageList << QLocale().uiLanguages(); + languageList << QLatin1String("default"); // use the default locale if possible. for (const QString &language : qAsConst(languageList)) { const QString lang = language == QLatin1String("C") ? QLatin1String("en_US") : language; const QString comm = d->localeComments.value(lang); diff --git a/src/corelib/mimetypes/qmimetypeparser.cpp b/src/corelib/mimetypes/qmimetypeparser.cpp index 7ff695bbc3..d10575cfe9 100644 --- a/src/corelib/mimetypes/qmimetypeparser.cpp +++ b/src/corelib/mimetypes/qmimetypeparser.cpp @@ -248,11 +248,11 @@ bool QMimeTypeParserBase::parse(QIODevice *dev, const QString &fileName, QString } break; case ParseComment: { - // comments have locale attributes. We want the default, English one + // comments have locale attributes. QString locale = atts.value(QLatin1String(localeAttributeC)).toString(); const QString comment = reader.readElementText(); if (locale.isEmpty()) - locale = QString::fromLatin1("en_US"); + locale = QString::fromLatin1("default"); data.localeComments.insert(locale, comment); } break; |