Support arrays in callDBus method of KWin Scripting
Thanks to Jan Palus for providing the patch. BUG: 311896 FIXED-IN: 4.10
This commit is contained in:
parent
3cddfdecff
commit
debb71285f
1 changed files with 6 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue