diff --git a/accountdialog.cpp b/accountdialog.cpp index 4e2a12856..26978e4b1 100644 --- a/accountdialog.cpp +++ b/accountdialog.cpp @@ -675,7 +675,7 @@ void AccountDialog::slotPipeliningClicked() "this is configurable, though, because some servers support pipelining " "but do not announce their capabilities. To check whether your POP3 server " "announces pipelining support use the \"Check What the Server " - "Supports\" button at the bottom of the dialog;\n" + "Supports\" button at the bottom of the Security tab in this dialog;\n" "if your server does not announce it, but you want more speed, then " "you should do some testing first by sending yourself a batch " "of mail and downloading it."), QString(), diff --git a/kmail.notifyrc b/kmail.notifyrc index 4345d162f..b64930e11 100644 --- a/kmail.notifyrc +++ b/kmail.notifyrc @@ -12,7 +12,19 @@ Comment[zh_TW]=KMail 郵件軟體 [Event/mail-check-error] Name=Error While Checking Mail +Name[pt]=Erro na Verificação do Correio +Name[pt_BR]=Erro durante a verificação de e-mails +Name[sv]=Fel vid kontroll av post +Name[uk]=Помилка під час спроби отримання пошти +Name[x-test]=xxError While Checking Mailxx +Name[zh_TW]=檢查郵件時發生錯誤 Comment=There was an error while checking for new mail +Comment[pt]=Ocorreu um erro ao verificar o correio novo +Comment[pt_BR]=Ocorreu um erro durante a verificação de novos e-mails +Comment[sv]=Ett fel uppstod vid kontroll av ny post +Comment[uk]=Під час спроби перевірки наявності нової пошти сталася помилка +Comment[x-test]=xxThere was an error while checking for new mailxx +Comment[zh_TW]=檢查郵件時發生錯誤 Action=Popup [Event/new-mail-arrived] diff --git a/kmfilteraction.cpp b/kmfilteraction.cpp index fa3337233..2ace6622a 100644 --- a/kmfilteraction.cpp +++ b/kmfilteraction.cpp @@ -1619,7 +1619,7 @@ QWidget* KMFilterActionForward::createParamWidget( QWidget* parent ) const lineEdit->setToolTip( i18n( "The addressee to whom the message will be forwarded." ) ); lineEdit->setWhatsThis( i18n( "The filter will forward the message to the addressee entered here." ) ); - QComboBox *templateCombo = new QComboBox( addressAndTemplate ); + KComboBox *templateCombo = new KComboBox( addressAndTemplate ); templateCombo->setObjectName( "templateCombo" ); hBox->addWidget( templateCombo ); @@ -1644,7 +1644,7 @@ void KMFilterActionForward::applyParamWidgetValue( QWidget* paramWidget ) Q_ASSERT( addressEdit ); KMFilterActionWithAddress::applyParamWidgetValue( addressEdit ); - QComboBox *templateCombo = paramWidget->findChild( "templateCombo" ); + KComboBox *templateCombo = paramWidget->findChild( "templateCombo" ); Q_ASSERT( templateCombo ); if ( templateCombo->currentIndex() == 0 ) { @@ -1662,7 +1662,7 @@ void KMFilterActionForward::setParamWidgetValue( QWidget* paramWidget ) const Q_ASSERT( addressEdit ); KMFilterActionWithAddress::setParamWidgetValue( addressEdit ); - QComboBox *templateCombo = paramWidget->findChild( "templateCombo" ); + KComboBox *templateCombo = paramWidget->findChild( "templateCombo" ); Q_ASSERT( templateCombo ); if ( mTemplate.isEmpty() ) { @@ -1685,7 +1685,7 @@ void KMFilterActionForward::clearParamWidget( QWidget* paramWidget ) const Q_ASSERT( addressEdit ); KMFilterActionWithAddress::clearParamWidget( addressEdit ); - QComboBox *templateCombo = paramWidget->findChild( "templateCombo" ); + KComboBox *templateCombo = paramWidget->findChild( "templateCombo" ); Q_ASSERT( templateCombo ); templateCombo->setCurrentIndex( 0 ); diff --git a/kmfolderdialog.cpp b/kmfolderdialog.cpp index 8c71fa0aa..5ec1534f3 100644 --- a/kmfolderdialog.cpp +++ b/kmfolderdialog.cpp @@ -997,7 +997,7 @@ KMail::FolderDialogMaintenanceTab::FolderDialogMaintenanceTab( KMFolderDialog *d label = new QLabel( folderDesc, filesGroup ); box->addRow( new QLabel( i18n("Folder type:"), filesGroup ), label ); - QLineEdit *label2 = new KLineEdit( mFolder->location(), filesGroup ); + KLineEdit *label2 = new KLineEdit( mFolder->location(), filesGroup ); label2->setReadOnly( true ); box->addRow( i18n("Location:"), label2 ); diff --git a/kmfolderimap.cpp b/kmfolderimap.cpp index 1019114f8..5ad4ee3da 100644 --- a/kmfolderimap.cpp +++ b/kmfolderimap.cpp @@ -451,7 +451,7 @@ int KMFolderImap::addMsg(QList& msgList, QList& aIndex_ret) // we need the messages that belong to the current set to pass them to the ImapJob QList temp_msgs = splitMessageList(*it, msgList); if ( temp_msgs.isEmpty() ) { - kDebug() << "Wow! KMFolderImap::splitMessageList() returned an empty list!"; + kDebug() << "Wow! KMFolderImap::splitMessageList() returned an empty list!"; // krazy:exclude=kdebug } imapJob = new ImapJob(temp_msgs, *it, ImapJob::tMoveMessage, this); connect(imapJob, SIGNAL(messageCopied(QList)), diff --git a/kmmessage.cpp b/kmmessage.cpp index 7d8e92085..f1f3bab1f 100644 --- a/kmmessage.cpp +++ b/kmmessage.cpp @@ -1143,7 +1143,7 @@ KMMessage* KMMessage::createMDN( MDN::ActionMode a, // RFC 2298: [ Confirmation from the user SHOULD be obtained (or no // MDN sent) ] if there is more than one distinct address in the // Disposition-Notification-To header. - kDebug() << "KPIMUtils::splitAddressList(receiptTo):" + kDebug() << "KPIMUtils::splitAddressList(receiptTo):" // krazy:exclude=kdebug << KPIMUtils::splitAddressList(receiptTo).join("\n"); if ( KPIMUtils::splitAddressList(receiptTo).count() > 1 ) { if ( !allowGUI ) return 0; // don't setMDNSentState here! diff --git a/mailsourceviewer.cpp b/mailsourceviewer.cpp index 25a599850..3fe8f5f96 100644 --- a/mailsourceviewer.cpp +++ b/mailsourceviewer.cpp @@ -53,7 +53,7 @@ void MailSourceHighlighter::highlightBlock ( const QString & text ) { { // Content- header starts a new mime part, and therefore new headers // If a Content-* header is found, change State to headers until a blank line is found. - if ( text.startsWith( "Content-" ) ) + if ( text.startsWith( QLatin1String( "Content-" ) ) ) { setCurrentBlockState( headersState ); } diff --git a/messagelistview/core/model.cpp b/messagelistview/core/model.cpp index f27aa50d9..6988917d2 100644 --- a/messagelistview/core/model.cpp +++ b/messagelistview/core/model.cpp @@ -48,6 +48,7 @@ #include "messagelistview/core/theme.h" #include "messagelistview/core/manager.h" #include "messagelistview/core/messageitemsetmanager.h" +#include "util.h" #include @@ -557,6 +558,13 @@ int Model::rowCount( const QModelIndex &parent ) const void Model::setStorageModel( StorageModel *storageModel, PreSelectionMode preSelectionMode ) { + // Prevent a case of recursion when opening a folder that has a message and the folder was + // never opened before. + static int recursionCounter = 0; + KMail::Util::RecursionPreventer preventer( recursionCounter ); + if ( preventer.isRecursive() ) + return; + if( mFillStepTimer.isActive() ) mFillStepTimer.stop(); diff --git a/rulewidgethandlermanager.cpp b/rulewidgethandlermanager.cpp index e199fe5c0..b7e140331 100644 --- a/rulewidgethandlermanager.cpp +++ b/rulewidgethandlermanager.cpp @@ -1437,7 +1437,7 @@ namespace { if ( valueIndex == -1 ) { tagCombo->setCurrentIndex( 0 ); // Still show tag if it was deleted from MsgTagMgr - QLineEdit *lineEdit = tagCombo->lineEdit(); + QLineEdit *lineEdit = tagCombo->lineEdit(); // krazy:exclude=qclasses Q_ASSERT( lineEdit ); lineEdit->setText( rule->contents() ); } else { diff --git a/scalix.cpp b/scalix.cpp index 42109504a..848bd04d3 100644 --- a/scalix.cpp +++ b/scalix.cpp @@ -30,9 +30,9 @@ FolderAttributeParser::FolderAttributeParser( const QString &attribute ) QStringList parts = attribute.split( ',', QString::SkipEmptyParts ); for ( int i = 0; i < parts.count(); ++i ) { - if ( parts[i].startsWith( "\\X-SpecialFolder=" ) ) + if ( parts[i].startsWith( QLatin1String( "\\X-SpecialFolder=" ) ) ) mFolderName = parts[i].mid( 17 ); - else if ( parts[i].startsWith( "\\X-FolderClass=" ) ) + else if ( parts[i].startsWith( QLatin1String( "\\X-FolderClass=" ) ) ) mFolderClass = parts[i].mid( 15 ); } } diff --git a/util.cpp b/util.cpp index e5c19b791..7e3457881 100644 --- a/util.cpp +++ b/util.cpp @@ -143,3 +143,19 @@ bool KMail::Util::handleUrlOnMac( const KUrl& url ) return false; #endif } + +KMail::Util::RecursionPreventer::RecursionPreventer( int &counter ) + : mCounter( counter ) +{ + mCounter++; +} + +KMail::Util::RecursionPreventer::~RecursionPreventer() +{ + mCounter--; +} + +bool KMail::Util::RecursionPreventer::isRecursive() const +{ + return mCounter > 1; +} \ No newline at end of file diff --git a/util.h b/util.h index b3afebc21..38f102c00 100644 --- a/util.h +++ b/util.h @@ -135,6 +135,22 @@ namespace Util { bool m_disabled; }; + /** + * Small helper class that implements a variable when it is constructed and decrements that + * when it is destructed. + * Intended use is to use this with a static int that is initialy 0. + */ + class RecursionPreventer + { + public: + explicit RecursionPreventer( int &counter ); + ~RecursionPreventer(); + bool isRecursive() const; + + private: + int &mCounter; + }; + } }