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

REVIEW: 128424
frameworks
Olivier CHURLAUD 10 years ago
parent c8e3c0eb01
commit e3e2b7c6e3
  1. 5
      shell/shell.cpp
  2. 2
      shell/shellutils.cpp

@ -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…
Cancel
Save