mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
manage arguments in activateRequested
This commit is contained in:
parent
c267e6e689
commit
356c504183
1 changed files with 7 additions and 1 deletions
|
|
@ -95,10 +95,16 @@ int main(int argc, char **argv)
|
|||
QWindow *window = qobject_cast<QWindow *>(obj->rootObject());
|
||||
if (window) {
|
||||
QObject::connect(&service, &KDBusService::activateRequested, [=](const QStringList &arguments, const QString &workingDirectory) {
|
||||
Q_UNUSED(arguments)
|
||||
Q_UNUSED(workingDirectory);
|
||||
window->show();
|
||||
window->requestActivate();
|
||||
if (arguments.length() > 0) {
|
||||
QString numberArg = arguments[1];
|
||||
if (numberArg.startsWith("call://")) {
|
||||
numberArg = numberArg.mid(7);
|
||||
}
|
||||
obj->rootObject()->metaObject()->invokeMethod(obj->rootObject(), "call", Q_ARG(QVariant, numberArg));
|
||||
}
|
||||
});
|
||||
if (!parser.isSet(daemonOption)) {
|
||||
window->show();
|
||||
|
|
|
|||
Loading…
Reference in a new issue