diff --git a/c_adlib/ad_kw/native/kwallets_rw.cpp b/c_adlib/ad_kw/native/kwallets_rw.cpp index 56ce3a55..c1b5d269 100644 --- a/c_adlib/ad_kw/native/kwallets_rw.cpp +++ b/c_adlib/ad_kw/native/kwallets_rw.cpp @@ -42,10 +42,30 @@ using namespace KWallet; DCOPDemoWidget::DCOPDemoWidget() { - if ( !kapp->dcopClient()->isRegistered() ) { + + int ret = 0; + kapp->dcopClient()->isRegistered() ; + if (!ret) + { + if(kapp->dcopClient()->registerAs( "casaconsole" ).isEmpty()) + { + kapp->startKdeinit(); + kapp->dcopClient()->isRegistered() ; + if (!ret) + { + if (kapp->dcopClient()->registerAs( "casaconsole" ).isEmpty()) + { + printf("Cannot setup DCOP communication. Start kdeinit manually\n"); + return; + } + } + } + } + +/* if ( !kapp->dcopClient()->isRegistered() ) { kapp->dcopClient()->registerAs( "casaconsole" ); } - +*/ } DCOPDemoWidget::~DCOPDemoWidget()