summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Liu <net147@gmail.com>2012-12-28 20:15:36 +1100
committerFriedemann Kleint <Friedemann.Kleint@digia.com>2012-12-29 20:17:09 +0100
commit8bfaddd78969ce95ea67978c8e096f9f2500d6f0 (patch)
tree61360767fe1d4ad1165b584811fe68a1ae0dc368
parent8bcd2f6d2a86815b9e8f959d65546c46a89ff9f9 (diff)
Fix type conversion to QVariant with Qt 5
QVariant doesn't have QKeySequence constructor in Qt 5 (effect of the modularization project), therefore it can't be default constructed. Based on qttools/adfa9ccb102131de9739d5d79f320f07cea196ab. Change-Id: Ia4e69bf37bd94d2c2647128019e6d524c99a88e9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
-rw-r--r--qtpropertybrowser/src/qtvariantproperty.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/qtpropertybrowser/src/qtvariantproperty.cpp b/qtpropertybrowser/src/qtvariantproperty.cpp
index 919200e..d84e422 100644
--- a/qtpropertybrowser/src/qtvariantproperty.cpp
+++ b/qtpropertybrowser/src/qtvariantproperty.cpp
@@ -1351,7 +1351,11 @@ QVariant QtVariantPropertyManager::value(const QtProperty *property) const
} else if (QtDateTimePropertyManager *dateTimeManager = qobject_cast<QtDateTimePropertyManager *>(manager)) {
return dateTimeManager->value(internProp);
} else if (QtKeySequencePropertyManager *keySequenceManager = qobject_cast<QtKeySequencePropertyManager *>(manager)) {
+#if QT_VERSION < 0x050000
return keySequenceManager->value(internProp);
+#else
+ return QVariant::fromValue(keySequenceManager->value(internProp));
+#endif
} else if (QtCharPropertyManager *charManager = qobject_cast<QtCharPropertyManager *>(manager)) {
return charManager->value(internProp);
} else if (QtLocalePropertyManager *localeManager = qobject_cast<QtLocalePropertyManager *>(manager)) {