1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-18 11:51:44 +02:00

Enable insecure fallback of QtKeychain

This commit is contained in:
Leo Franchi
2012-06-10 09:07:40 +02:00
parent f9c58dda1e
commit eb65f7ca39

View File

@@ -208,6 +208,9 @@ Account::saveCredentials( const QVariantHash &creds )
j->setKey( m_accountId );
j->setAutoDelete( false );
j->setBinaryData( data );
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
j->setInsecureFallback( true );
#endif
connect( j, SIGNAL( finished( QKeychain::Job* ) ), this, SLOT( keychainJobFinished( QKeychain::Job* ) ) );
j->start();
@@ -221,6 +224,9 @@ Account::loadCredentials() const
QKeychain::ReadPasswordJob* j = new QKeychain::ReadPasswordJob( QLatin1String( "tomahawkaccounts" ), const_cast<Account*>( this ) );
j->setKey( m_accountId );
j->setAutoDelete( false );
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
j->setInsecureFallback( true );
#endif
connect( j, SIGNAL( finished( QKeychain::Job* ) ), this, SLOT( keychainJobFinished( QKeychain::Job* ) ) );
@@ -269,6 +275,9 @@ Account::removeFromConfig()
QKeychain::DeletePasswordJob* j = new QKeychain::DeletePasswordJob( QLatin1String( "tomahawk" ), this );
j->setKey( m_accountId );
j->setAutoDelete( false );
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
j->setInsecureFallback( true );
#endif
connect( j, SIGNAL( finished( QKeychain::Job* ) ), this, SLOT( keychainJobFinished( QKeychain::Job* ) ) );
j->start();