Commit 5495508b authored by Scott Wheeler's avatar Scott Wheeler

Suspend handling of DCOP events until after initialization is done.

This prevents JuK from crashing on startup while the MediaControl applet
is running.

CCMAIL:geiseri@voix.home.geiseri.com

svn path=/trunk/kdemultimedia/juk/; revision=229541
parent 9e4fa785
......@@ -18,6 +18,7 @@
#include <kuniqueapplication.h>
#include <kcmdlineargs.h>
#include <kaboutdata.h>
#include <dcopclient.h>
#include "juk.h"
......@@ -69,7 +70,14 @@ int main(int argc, char *argv[])
KCmdLineArgs::addCmdLineOptions(options);
Application a;
// Here we do some DCOP locking of sorts to prevent incoming DCOP calls
// before JuK has finished its initialization.
a.dcopClient()->suspend();
JuK *juk = new JuK();
a.dcopClient()->resume();
a.setMainWidget(juk);
juk->show();
......
......@@ -176,7 +176,7 @@ void SystemTray::wheelEvent(QWheelEvent *e)
// I already know the type here, but this file doesn't (and I don't want it
// to) know about the JuK class, so a static_cast won't work, and I was told
// that a reinterpret_cast isn't portable when combined with multiple
// inheritance.
// inheritance. (This is why I don't check the result.)
JuKIface *juk = dynamic_cast<JuKIface *>(parent());
......
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