mirror of
https://invent.kde.org/graphics/okular
synced 2024-11-05 18:34:53 +00:00
Don't attach to another instance if we're going to exit
It's rude to exit someone else we just attached to BUGS: 419982
This commit is contained in:
parent
98570d3633
commit
eee401946b
1 changed files with 5 additions and 0 deletions
|
@ -47,6 +47,11 @@ static bool attachExistingInstance(const QStringList &paths, const QString &seri
|
|||
if ( paths.count() < 1 )
|
||||
return false;
|
||||
|
||||
// Don't try to attach to an existing instance with --print-and-exit because that would mean
|
||||
// we're going to exit that other instance and that's just rude
|
||||
if ( ShellUtils::showPrintDialogAndExit(serializedOptions) )
|
||||
return false;
|
||||
|
||||
const QStringList services = QDBusConnection::sessionBus().interface()->registeredServiceNames().value();
|
||||
|
||||
// Don't match the service without trailing "-" (unique instance)
|
||||
|
|
Loading…
Reference in a new issue