QmlDesigner: Refactor enumeration handling

Change-Id: I0e163147a0303741af52127ece6f6afd0d2aa658
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
Marco Bubke
2013-12-16 12:50:32 +01:00
parent b2353c01f8
commit 07222ba46a
23 changed files with 281 additions and 11 deletions
@@ -29,7 +29,7 @@
#include "objectnodeinstance.h"
#include <enumeration.h>
#include <QEvent>
#include <QQmlContext>
@@ -472,6 +472,9 @@ void ObjectNodeInstance::setPropertyVariant(const PropertyName &name, const QVar
QVariant fixedValue = fixResourcePaths(value);
if (value.canConvert<Enumeration>())
fixedValue = QVariant::fromValue(value.value<Enumeration>().nameToString());
QVariant oldValue = property.read();
if (oldValue.type() == QVariant::Url) {
QUrl url = oldValue.toUrl();