Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit b1152329 authored by Jaydeep Solanki's avatar Jaydeep Solanki Committed by Albert Astals Cid

D-Bus access to non-first Okular::Part

REVIEW: 106531
BUGS: 306313
FIXED-IN: 4.10.0
parent ed02ecfb
......@@ -277,6 +277,8 @@ static bool keepFileOpen()
}
#endif
int Okular::Part::numberOfParts = 0;
namespace Okular
{
......@@ -302,8 +304,13 @@ m_cliPresentation(false), m_embedMode(detectEmbedMode(parentWidget, parent, args
}
}
Okular::Settings::instance( configFileName );
QDBusConnection::sessionBus().registerObject("/okular", this, QDBusConnection::ExportScriptableSlots);
numberOfParts++;
if (numberOfParts == 1) {
QDBusConnection::sessionBus().registerObject("/okular", this, QDBusConnection::ExportScriptableSlots);
} else {
QDBusConnection::sessionBus().registerObject(QString("/okular%1").arg(numberOfParts), this, QDBusConnection::ExportScriptableSlots);
}
// connect the started signal to tell the job the mimetypes we like,
// and get some more information from it
......
......@@ -231,6 +231,8 @@ class Part : public KParts::ReadWritePart, public Okular::DocumentObserver, publ
void updateAboutBackendAction();
void unsetDummyMode();
void slotRenameBookmark( const DocumentViewport &viewport );
static int numberOfParts;
KTemporaryFile *m_tempfile;
......
Markdown is supported
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