Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void TestClass::walletIsOpen( bool walletIsOpen )
- {
- if( walletIsOpen ){
- QVector<lxqt::Wallet::walletKeyValues> s = m_wallet->readAllKeyValues() ;
- size_t j = s.size() ;
- for( size_t i = 0 ; i < j ; i++ ){
- const QString& key = s.at( i ).getKey() ;
- const QByteArray& value = s.at( i ).getValue() ;
- qDebug() << "key=" << key << ":value=" << value ;
- }
- }else{
- qDebug() << "failed to open wallet" ;
- }
- /*
- * Delete the wallet object when done with it
- */
- m_wallet->deleteLater() ;
- }
- void TestClass::testWallet()
- {
- /*
- * open a default backend( internal one )
- */
- m_wallet = lxqt::Wallet::getWalletBackend() ;
- /*
- * set the QObject with "walletIsOpen(bool)" slot
- */
- m_wallet->setInterfaceObject( this ) ;
- /*
- * open a wallet.
- * This method will return the result of the attempt though a slot on an object set above.
- */
- m_wallet->open( "test_wallet_name","test_application_name" ) ;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement