File indexing completed on 2024-05-12 15:47:07
0001 #include "kwalletsync.h" 0002 0003 #include <QTest> 0004 #include <QTextStream> 0005 0006 #include <KAboutData> 0007 #include <QDBusConnection> 0008 #include <QDBusConnectionInterface> 0009 #include <kwallet.h> 0010 0011 static QTextStream _out(stdout, QIODevice::WriteOnly); 0012 0013 void KWalletSyncTest::init() 0014 { 0015 if (!qEnvironmentVariableIsSet("DISPLAY")) { 0016 QSKIP("$DISPLAY is not set. These tests cannot be done without a graphical system."); 0017 } 0018 } 0019 0020 void KWalletSyncTest::openWallet() 0021 { 0022 _out << "About to ask for wallet sync\n"; 0023 0024 KWallet::Wallet *w = KWallet::Wallet::openWallet(KWallet::Wallet::NetworkWallet(), 0, KWallet::Wallet::Synchronous); 0025 QVERIFY(w != nullptr); 0026 0027 _out << "Got sync wallet: " << (w != nullptr) << '\n'; 0028 _out.flush(); 0029 } 0030 0031 QTEST_GUILESS_MAIN(KWalletSyncTest) 0032 0033 #include "moc_kwalletsync.cpp"