From 8310d636be068bb814418e2e6044c6dbd7df253a Mon Sep 17 00:00:00 2001 From: Joni Poikelin Date: Mon, 14 Oct 2019 12:31:40 +0300 Subject: Fix serializing QUuid with QDataStream with Qt 4 stream versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: QTBUG-76103 Change-Id: Iac92c33539940f5f67d014db5240c6dc14bfb772 Reviewed-by: Volker Hilsheimer Reviewed-by: MÃ¥rten Nordheim --- src/corelib/kernel/qvariant.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index 43a3fb1db0..84ad555f34 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -2577,8 +2577,8 @@ void QVariant::save(QDataStream &s) const } else if (typeId >= QMetaType::QKeySequence && typeId <= QMetaType::QQuaternion) { // and as a result these types received lower ids too typeId +=1; - } else if (typeId == QMetaType::QPolygonF) { - // This existed in Qt 4 only as a custom type + } else if (typeId == QMetaType::QPolygonF || typeId == QMetaType::QUuid) { + // These existed in Qt 4 only as a custom type typeId = 127; fakeUserType = true; } -- cgit v1.2.3