summaryrefslogtreecommitdiffstats
path: root/Source/QtDialog/QCMake.cxx
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2021-05-08 06:19:21 (GMT)
committerCraig Scott <craig.scott@crascit.com>2021-05-08 06:19:21 (GMT)
commit6c657173d806aa81d1508830c10a16236b5358b9 (patch)
treef9c9a834e840ee0678472ce7e12abaa9856d7153 /Source/QtDialog/QCMake.cxx
parent8146fcddc013d7b395f9c4eb9ca48c7de4618e84 (diff)
downloadCMake-6c657173d806aa81d1508830c10a16236b5358b9.zip
CMake-6c657173d806aa81d1508830c10a16236b5358b9.tar.gz
CMake-6c657173d806aa81d1508830c10a16236b5358b9.tar.bz2
cmake-gui: Address deprecation warnings with Qt6
Diffstat (limited to 'Source/QtDialog/QCMake.cxx')
-rw-r--r--Source/QtDialog/QCMake.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx
index 6796e25..a83622a 100644
--- a/Source/QtDialog/QCMake.cxx
+++ b/Source/QtDialog/QCMake.cxx
@@ -334,7 +334,12 @@ void QCMake::setProperties(const QCMakePropertyList& newProps)
toremove.append(QString::fromLocal8Bit(key.c_str()));
} else {
prop = props[idx];
- if (prop.Value.type() == QVariant::Bool) {
+#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
+ const bool isBool = prop.Value.type() == QVariant::Bool;
+#else
+ const bool isBool = prop.Value.metaType() == QMetaType::fromType<bool>();
+#endif
+ if (isBool) {
state->SetCacheEntryValue(key, prop.Value.toBool() ? "ON" : "OFF");
} else {
state->SetCacheEntryValue(key,