From 6722dbdd97585c435cfeff6b9aef235cac103344 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Mon, 1 Mar 2010 18:39:03 +0000 Subject: [PATCH] need to return a QIcon otherwise the poor little binding's head gets confused svn path=/trunk/KDE/kdebase/runtime/; revision=1097598 --- scriptengines/javascript/simplebindings/icon.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scriptengines/javascript/simplebindings/icon.cpp b/scriptengines/javascript/simplebindings/icon.cpp index 49feaade6..6c3c2c1be 100644 --- a/scriptengines/javascript/simplebindings/icon.cpp +++ b/scriptengines/javascript/simplebindings/icon.cpp @@ -34,7 +34,8 @@ static QScriptValue ctor(QScriptContext *ctx, QScriptEngine *eng) if (ctx->argumentCount() > 0) { QScriptValue v = ctx->argument(0); if (v.isString()) { - return qScriptValueFromValue(eng, KIcon(v.toString())); + QIcon icon = KIcon(v.toString()); + return qScriptValueFromValue(eng, icon); } else if (v.isVariant()) { QVariant variant = v.toVariant(); QPixmap p = variant.value();