Commit e3e2b7c6 authored by Olivier Churlaud's avatar Olivier Churlaud
Browse files

Register Okular to DBus to get back the "open in new tab" feature.

REVIEW: 128424
parent c8e3c0eb
......@@ -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);
......
Supports Markdown
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