Commit 5712da0b authored by Martin Flöser's avatar Martin Flöser
Browse files

Support arrays in callDBus method of KWin Scripting

Thanks to Jan Palus for providing the patch.

BUG: 311896
FIXED-IN: 4.10
parent b18288c6
......@@ -182,7 +182,12 @@ QScriptValue kwinCallDBus(QScriptContext *context, QScriptEngine *engine)
QDBusMessage msg = QDBusMessage::createMethodCall(service, path, interface, method);
QVariantList arguments;
for (int i=4; i<argumentsCount; ++i) {
arguments << context->argument(i).toVariant();
if (context->argument(i).isArray()) {
QStringList stringArray = engine->fromScriptValue<QStringList>(context->argument(i));
arguments << qVariantFromValue(stringArray);
} else {
arguments << context->argument(i).toVariant();
}
}
if (!arguments.isEmpty()) {
msg.setArguments(arguments);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment