1 #include <QtCore/QTextStream>
2 #include <QtGui/QApplication>
3 #include <QtCore/QTimer>
5 #include <kaboutdata.h>
6 #include <kcomponentdata.h>
7 #include <kcmdlineargs.h>
10 #include <kstandarddirs.h>
12 #include <QtDBus/QDBusConnectionInterface>
13 #include <QtDBus/QDBusConnection>
14 #include <QtDBus/QDBusReply>
16 static QTextStream
_out( stdout
, QIODevice::WriteOnly
);
20 _out
<< "About to ask for wallet sync" << endl
;
22 KWallet::Wallet
*w
= KWallet::Wallet::openWallet( KWallet::Wallet::NetworkWallet(), 0, KWallet::Wallet::Synchronous
);
24 _out
<< "Got sync wallet: " << (w
!= 0) << endl
;
27 int main( int argc
, char *argv
[] )
29 KAboutData
aboutData("kwalletsync", 0, ki18n("kwalletsync"), "version");
30 KComponentData
componentData(&aboutData
);
31 QApplication
app( argc
, argv
);
33 // force name with D-BUS
34 QDBusReply
<QDBusConnectionInterface::RegisterServiceReply
> reply
35 = QDBusConnection::sessionBus().interface()->registerService( "org.kde.kwalletsync",
36 QDBusConnectionInterface::ReplaceExistingService
);
38 if ( !reply
.isValid() )
40 _out
<< "D-BUS name request returned " << reply
.error().name() << endl
;
48 // vim: set noet ts=4 sts=4 sw=4: