From adfa9ccb102131de9739d5d79f320f07cea196ab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C4=99drzej=20Nowacki?= <jedrzej.nowacki@nokia.com>
Date: Fri, 11 May 2012 09:28:22 +0200
Subject: [PATCH] Build fix.

QVariant doesn't have QKeySequence constructor in Qt5 (effect of
the modularization project), therefore it can not be default
constructed.

Change-Id: Ia78b060d2e9c8fae8d60a3a17de75a390746749d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
---
 src/designer/src/lib/shared/qdesigner_propertysheet.cpp | 2 +-
 src/shared/qtpropertybrowser/qtvariantproperty.cpp      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/designer/src/lib/shared/qdesigner_propertysheet.cpp b/src/designer/src/lib/shared/qdesigner_propertysheet.cpp
index 10d1eecf3..c69105588 100644
--- a/src/designer/src/lib/shared/qdesigner_propertysheet.cpp
+++ b/src/designer/src/lib/shared/qdesigner_propertysheet.cpp
@@ -1117,7 +1117,7 @@ QVariant QDesignerPropertySheet::resolvePropertyValue(int index, const QVariant
         return qvariant_cast<qdesigner_internal::PropertySheetStringListValue>(value).value();
 
     if (value.canConvert<qdesigner_internal::PropertySheetKeySequenceValue>())
-        return qvariant_cast<qdesigner_internal::PropertySheetKeySequenceValue>(value).value();
+        return QVariant::fromValue(qvariant_cast<qdesigner_internal::PropertySheetKeySequenceValue>(value).value());
 
     if (value.canConvert<qdesigner_internal::PropertySheetPixmapValue>()) {
         const QString path = qvariant_cast<qdesigner_internal::PropertySheetPixmapValue>(value).path();
diff --git a/src/shared/qtpropertybrowser/qtvariantproperty.cpp b/src/shared/qtpropertybrowser/qtvariantproperty.cpp
index 43043f352..bdc0b0c41 100644
--- a/src/shared/qtpropertybrowser/qtvariantproperty.cpp
+++ b/src/shared/qtpropertybrowser/qtvariantproperty.cpp
@@ -1324,7 +1324,7 @@ 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)) {
-        return keySequenceManager->value(internProp);
+        return QVariant::fromValue(keySequenceManager->value(internProp));
     } else if (QtCharPropertyManager *charManager = qobject_cast<QtCharPropertyManager *>(manager)) {
         return charManager->value(internProp);
     } else if (QtLocalePropertyManager *localeManager = qobject_cast<QtLocalePropertyManager *>(manager)) {
-- 
GitLab