mirror of
https://invent.kde.org/graphics/okular
synced 2024-07-17 02:37:04 +00:00
Register Okular to DBus to get back the "open in new tab" feature.
REVIEW: 128424
This commit is contained in:
parent
c8e3c0eb01
commit
e3e2b7c6e3
|
@ -127,6 +127,11 @@ Shell::Shell( const QString &serializedOptions )
|
|||
if (!m_unique)
|
||||
KMessageBox::information(this, i18n("There is already a unique Okular instance running. This instance won't be the unique one."));
|
||||
}
|
||||
else
|
||||
{
|
||||
QString serviceName = QStringLiteral("org.kde.okular-") + QString::number(qApp->applicationPid());
|
||||
QDBusConnection::sessionBus().registerService(serviceName);
|
||||
}
|
||||
if (ShellUtils::noRaise(serializedOptions))
|
||||
{
|
||||
setAttribute(Qt::WA_ShowWithoutActivating);
|
||||
|
|
|
@ -82,7 +82,7 @@ QString serializeOptions(const QCommandLineParser &args)
|
|||
const bool startInPresentation = args.isSet( QStringLiteral("presentation") );
|
||||
const bool showPrintDialog = args.isSet( QStringLiteral("print") );
|
||||
const bool unique = args.isSet(QStringLiteral("unique")) && args.positionalArguments().count() <= 1;
|
||||
const bool noRaise = !args.isSet(QStringLiteral("raise"));
|
||||
const bool noRaise = args.isSet(QStringLiteral("noraise"));
|
||||
const QString page = args.value(QStringLiteral("page"));
|
||||
|
||||
return serializeOptions(startInPresentation, showPrintDialog, unique, noRaise, page);
|
||||
|
|
Loading…
Reference in a new issue