[Bug 262423] Akonadi shows too many "Could not authenticate" dialogs

Thomas McGuire mcguire at kde.org
Sun Jan 9 18:12:18 GMT 2011


https://bugs.kde.org/show_bug.cgi?id=262423


Thomas McGuire <mcguire at kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




--- Comment #2 from Thomas McGuire <mcguire kde org>  2011-01-09 19:12:17 ---
commit ee978a27e32006f8e184270fc6ea857ad5ed4b02
branch master
Author: Thomas McGuire <mcguire at kde.org>
Date:   Sun Jan 9 17:47:40 2011 +0000

    Remove the error dialog entirely.

    Several reasons:
    1) the text in it is factually incorrect
    2) dialogs that pop up are annoying
    3) kmail/akonaditray should be responsible for showing an error popup
anyway

    BUG: 262423

diff --git a/resources/pop3/pop3resource.cpp b/resources/pop3/pop3resource.cpp
index 85c6f8f..9a84202 100644
--- a/resources/pop3/pop3resource.cpp
+++ b/resources/pop3/pop3resource.cpp
@@ -47,8 +47,7 @@ POP3Resource::POP3Resource( const QString &id )
       mAskAgain( false ),
       mIntervalTimer( new QTimer( this ) ),
       mTestLocalInbox( false ),
-      mWallet( 0 ),
-      mErrorDialogShown( false )
+      mWallet( 0 )
 {
   setNeedsNetwork( true );
   Settings::self()->setResourceId( identifier() );
@@ -85,7 +84,7 @@ void POP3Resource::updateIntervalTimer()
 void POP3Resource::intervalCheckTriggered()
 {
   Q_ASSERT( mState == Idle );
-  if ( isOnline() && !mErrorDialogShown ) {
+  if ( isOnline() ) {
     kDebug() << "Starting interval mail check.";
     startMailCheck();
     mIntervalCheckInProgress = true;
@@ -520,22 +519,6 @@ void POP3Resource::loginJobResult( KJob *job )
       mAskAgain = true;
     cancelSync( i18n( "Unable to login to the server %1.",
Settings::self()->host() ) +
                 '\n' + job->errorString() );
-
-    // FIXME: "The server refused the supplied username and password." is not
correct! The server might
-    //        not even be online, there might be a connection problem etc
-    mErrorDialogShown = true;
-    int i = KMessageBox::questionYesNoCancelWId( winIdForDialogs(),
-                                  i18n( "The server refused the supplied
username and password. "
-                                        "Do you want to go to the settings,
have another attempt "
-                                        "at logging in, or do nothing?\n\n"
-                                        "%1", job->errorString() ),
-                                  i18n( "Could Not Authenticate" ),
-                                  KGuiItem( i18n( "Account Settings" ) ),
-                                  KGuiItem( i18nc( "Input username/password
manually and not store them", "Try Again" ) ) );
-    mErrorDialogShown = false;
-    if ( i == KMessageBox::Yes ) {
-      configure( winIdForDialogs() );
-      return;
     }
   }
   else {
@@ -998,7 +981,7 @@ void POP3Resource::startMailCheck()

 void POP3Resource::retrieveCollections()
 {
-  if ( mState == Idle && !mErrorDialogShown ) {
+  if ( mState == Idle ) {
     startMailCheck();
   }
   else {
diff --git a/resources/pop3/pop3resource.h b/resources/pop3/pop3resource.h
index b594a28..14aba20 100644
--- a/resources/pop3/pop3resource.h
+++ b/resources/pop3/pop3resource.h
@@ -143,7 +143,6 @@ class POP3Resource : public Akonadi::ResourceBase,
     bool mSavePassword;
     bool mTestLocalInbox;
     KWallet::Wallet *mWallet;
-    bool mErrorDialogShown;

     // Maps IDs on the server to message sizes on the server
     QMap<int,int> mIdsToSizeMap;

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the Kdepim-bugs mailing list