diff options
author | Robert Griebl <robert.griebl@qt.io> | 2020-11-20 23:56:08 +0100 |
---|---|---|
committer | Robert Griebl <robert.griebl@qt.io> | 2020-11-28 17:47:47 +0100 |
commit | f4762958325130c9ec37ccb4b191368ef1412add (patch) | |
tree | 2c2977eb14dfe9466366c24c166ca956403662a7 /src/common-lib/utilities.cpp | |
parent | 911ee1f92017f22f9aa1fd430b414ff28c7e0cbe (diff) | |
download | qtapplicationmanager-f4762958325130c9ec37ccb4b191368ef1412add.tar.gz |
Qt6 port, part 2 .. compiling with cmake
Change-Id: I0b3b0bd420fc2b5a5d263439ef263a8214bbdb4b
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
Diffstat (limited to 'src/common-lib/utilities.cpp')
-rw-r--r-- | src/common-lib/utilities.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common-lib/utilities.cpp b/src/common-lib/utilities.cpp index 8a7061f1..708cb5fb 100644 --- a/src/common-lib/utilities.cpp +++ b/src/common-lib/utilities.cpp @@ -335,12 +335,12 @@ void recursiveMergeVariantMap(QVariantMap &into, const QVariantMap &from) QVariant fromValue = it.value(); QVariant &toValue = (*into)[it.key()]; - bool needsMerge = (toValue.type() == fromValue.type()); + bool needsMerge = (toValue.metaType() == fromValue.metaType()); // we're trying not to detach, so we're using v_cast to avoid copies - if (needsMerge && (toValue.type() == QVariant::Map)) + if (needsMerge && (toValue.metaType() == QMetaType::fromType<QVariantMap>())) recursiveMergeMap(qt6_v_cast<QVariantMap>(&toValue.data_ptr()), fromValue.toMap()); - else if (needsMerge && (toValue.type() == QVariant::List)) + else if (needsMerge && (toValue.metaType() == QMetaType::fromType<QVariantList>())) into->insert(it.key(), toValue.toList() + fromValue.toList()); else into->insert(it.key(), fromValue); |