[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.5/kdenetwork/kopete/libkopete
From: Bernhard Beschow <bbeschow () cs ! tu-berlin ! de>
Date: 2010-07-17 18:52:44
Message-ID: 20100717185244.1A1FBAC76A () svn ! kde ! org
[Download RAW message or body]
SVN commit 1151086 by beschow:
be infinitely patient when asking for passwords - don't pop up addidional password \
dialogs for each account when the user didn't enter the kwallet password within 15 \
seconds
M +1 -22 kopetewalletmanager.cpp
--- branches/KDE/4.5/kdenetwork/kopete/libkopete/kopetewalletmanager.cpp \
#1151085:1151086 @@ -25,8 +25,6 @@
#include <qwidget.h>
#include <qapplication.h>
-#define KWALLET_TIMEOUT 15000
-
static WId mainWindowID()
{
if ( QWidget *w = Kopete::UI::Global::mainWidget() )
@@ -37,7 +35,7 @@
class Kopete::WalletManager::Private
{
public:
- Private() : wallet(0), signal(0), firstTry(true) {}
+ Private() : wallet(0), signal(0) {}
~Private() { delete wallet; delete signal; }
KWallet::Wallet *wallet;
@@ -50,16 +48,11 @@
// instead, we store a KopeteWalletSignal which we connect to, and create
// a new one for each set of requests.
KopeteWalletSignal *signal;
-
- bool firstTry;
- QTimer timeoutTimer;
};
Kopete::WalletManager::WalletManager()
: d( new Private )
{
- d->timeoutTimer.setSingleShot( true );
- connect( &(d->timeoutTimer), SIGNAL(timeout()), this, \
SLOT(slotWalletChangedStatus()) ); }
Kopete::WalletManager::~WalletManager()
@@ -115,15 +108,12 @@
return;
}
- d->firstTry = true;
- d->timeoutTimer.start( KWALLET_TIMEOUT );
connect( d->wallet, SIGNAL(walletOpened(bool)), SLOT(slotWalletChangedStatus()) );
}
void Kopete::WalletManager::slotWalletChangedStatus()
{
kDebug(14010) << " isOpen: " << d->wallet->isOpen();
- d->timeoutTimer.stop();
if( d->wallet->isOpen() )
{
@@ -149,19 +139,8 @@
delete d->wallet;
d->wallet = 0;
- if ( d->firstTry )
- {
- // Try again if it's the first failure
- kDebug(14010) << "wallet open timeout";
- openWalletInner();
- d->firstTry = false;
- return;
- }
- else
- {
kWarning(14010) << "wallet open error";
}
- }
emitWalletOpened( d->wallet );
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic