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/kernel | |
parent | 81d8319276f26d399bdff47b49bd69b19bd86c5a (diff) | |
parent | 73e7eb785fbf984e2b964be8c3acad788479dfa6 (diff) |
Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: Id1e4664d3c942226b76e2c3b338df3116ff89297
Diffstat (limited to 'src/corelib/kernel')
-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 |
3 files changed, 11 insertions, 4 deletions
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; |