From 4f2d5fdcc0fc7743206463995ffe3f1872019ebf Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Sun, 5 Oct 2014 12:02:02 -0400 Subject: [PATCH] added logic to parse QVariantLists --- openbr/openbr_plugin.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/openbr/openbr_plugin.cpp b/openbr/openbr_plugin.cpp index 7430fa8..91cecc6 100644 --- a/openbr/openbr_plugin.cpp +++ b/openbr/openbr_plugin.cpp @@ -804,7 +804,7 @@ void Object::setProperty(const QString &name, QVariant value) int v = value.toInt(&ok); if (ok) value = v; - } else if ((type.startsWith("QList<") && type.endsWith(">")) || (type == "QStringList")) { + } else if ((type.startsWith("QList<") && type.endsWith(">")) || (type == "QStringList") || (type == "QVariantList")) { QVariantList elements; if (value.canConvert()) { elements = value.value(); @@ -821,7 +821,9 @@ void Object::setProperty(const QString &name, QVariant value) qFatal("Expected a list."); } - if ((type == "QList") || (type == "QStringList")) { + if ((type == "QList") || (type == "QVariantList")) { + value.setValue(elements); + } else if ((type == "QList") || (type == "QStringList")) { QStringList parsedValues; foreach (const QVariant &element, elements) parsedValues.append(element.toString()); -- libgit2 0.21.4