diff --git a/configuredialog.cpp b/configuredialog.cpp index db34f825d..6a2d41cb6 100644 --- a/configuredialog.cpp +++ b/configuredialog.cpp @@ -79,9 +79,7 @@ using KMime::DateFormatter; #include #include #include -#if KDE_VERSION >= 306 #include -#endif // Qt headers: #include @@ -1369,9 +1367,7 @@ void NetworkPage::ReceivingTab::slotRemoveSelectedAccount() { void NetworkPage::ReceivingTab::slotEditNotifications() { -#if KDE_VERSION >= 306 KNotifyDialog::configure(this); -#endif } void NetworkPage::ReceivingTab::setup() { diff --git a/kmaccount.cpp b/kmaccount.cpp index 51aa00be1..b65334418 100644 --- a/kmaccount.cpp +++ b/kmaccount.cpp @@ -31,9 +31,7 @@ KMPrecommand::KMPrecommand(const QString &precommand, QObject *parent) KMBroadcastStatus::instance()->setStatusMsg( i18n("Executing precommand %1").arg(precommand )); -#if KDE_VERSION >= 305 mPrecommandProcess.setUseShell(true); -#endif mPrecommandProcess << precommand; connect(&mPrecommandProcess, SIGNAL(processExited(KProcess *)), diff --git a/kmaccount.h b/kmaccount.h index 913698b50..0671fd369 100644 --- a/kmaccount.h +++ b/kmaccount.h @@ -37,11 +37,7 @@ signals: void finished(bool); protected: -#if KDE_VERSION >= 305 KProcess mPrecommandProcess; -#else - KShellProcess mPrecommandProcess; -#endif QString mPrecommand; }; diff --git a/kmaddrbook.cpp b/kmaddrbook.cpp index 2abfe680b..5ee663ef2 100644 --- a/kmaddrbook.cpp +++ b/kmaddrbook.cpp @@ -179,11 +179,7 @@ void KMAddrBookExternal::addEmail( const QString &addr, QWidget *parent) { QString email; QString name; -#if KDE_VERSION >= 305 KABC::Addressee::parseEmailAddress( addr, name, email ); -#else - parseEmailAddress( addr, name, email ); -#endif KABC::AddressBook *ab = KABC::StdAddressBook::self(); @@ -259,63 +255,3 @@ bool KMAddrBookExternal::checkForAddressBook() } } -#if KDE_VERSION < 305 -// FIXME: This function is duplicated from kdelibs/kabc. Remove it, when KMail -// depends on the 3.1 libs. -void KMAddrBookExternal::parseEmailAddress( const QString &rawEmail, - QString &fullName, - QString &email) -{ - int startPos, endPos, len; - QString partA, partB, result; - char endCh = '>'; - - startPos = rawEmail.find('<'); - if (startPos < 0) - { - startPos = rawEmail.find('('); - endCh = ')'; - } - if (startPos < 0) - { - // We couldn't find any separators, so we assume the whole string - // is the email address - email = rawEmail; - fullName = ""; - } - else - { - // We have a start position, try to find an end - endPos = rawEmail.find(endCh, startPos+1); - - if (endPos < 0) - { - // We couldn't find the end of the email address. We can only - // assume the entire string is the email address. - email = rawEmail; - fullName = ""; - } - else - { - // We have a start and end to the email address - - // Grab the name part - fullName = rawEmail.left(startPos).stripWhiteSpace(); - - // grab the email part - email = rawEmail.mid(startPos+1, endPos-startPos-1).stripWhiteSpace(); - - // Check that we do not have any extra characters on the end of the - // strings - len = fullName.length(); - if (fullName[0]=='"' && fullName[len-1]=='"') - fullName = fullName.mid(1, len-2); - else if (fullName[0]=='<' && fullName[len-1]=='>') - fullName = fullName.mid(1, len-2); - else if (fullName[0]=='(' && fullName[len-1]==')') - fullName = fullName.mid(1, len-2); - } - } -} -#endif - diff --git a/kmaddrbook.h b/kmaddrbook.h index 8f2058f86..fc7a97b74 100644 --- a/kmaddrbook.h +++ b/kmaddrbook.h @@ -24,14 +24,6 @@ public: static bool useKab(); static bool useKAddressbook(); static bool checkForAddressBook(); - -#if KDE_VERSION < 305 -private: - // FIXME: In version 3.1 this function is in kdelibs. Remove it from here - // when KMail doesn't need to be compilable with 3.0 libs anymore. - static void parseEmailAddress( const QString &rawEmail, QString &fullName, - QString &email ); -#endif }; #endif /*KMAddrBook_h*/ diff --git a/kmcomposewin.cpp b/kmcomposewin.cpp index 7b6dc2ece..9d64150a8 100644 --- a/kmcomposewin.cpp +++ b/kmcomposewin.cpp @@ -5059,10 +5059,8 @@ void KMComposeWin::slotUpdateToolbars() void KMComposeWin::slotEditKeys() { - KKeyDialog::configure( actionCollection() -#if KDE_VERSION >= 306 - , false /*don't allow one-letter shortcuts*/ -#endif + KKeyDialog::configure( actionCollection(), + false /*don't allow one-letter shortcuts*/ ); } diff --git a/kmfilteraction.cpp b/kmfilteraction.cpp index cd179e425..a90712489 100644 --- a/kmfilteraction.cpp +++ b/kmfilteraction.cpp @@ -462,12 +462,8 @@ KMFilterAction::ReturnCode KMFilterActionWithCommand::genericProcess(KMMessage* kCStringToFile( aMsg->asString(), tempFileName, //### false, false, false ); -#if KDE_VERSION >= 305 KProcess shProc; shProc.setUseShell(true); -#else - KShellProcess shProc; -#endif shProc << commandLine; // let the kernel collect the output for us: diff --git a/kmfilterdlg.cpp b/kmfilterdlg.cpp index 79add3607..faa72e0d1 100644 --- a/kmfilterdlg.cpp +++ b/kmfilterdlg.cpp @@ -499,18 +499,11 @@ void KMFilterListBox::slotApplyFilterChanges() // report on invalid filters: if ( !emptyFilters.empty() ) { -#if KDE_VERSION < 306 - QString msg = i18n("Some filters have not been saved because they were " - "invalid (e.g. containing no actions or no search " - "rules)."); - KMessageBox::information( 0, msg, QString::null, "ShowInvalidFilterWarning" ); -#else QString msg = i18n("The following filters have not been saved because they " "were invalid (e.g. containing no actions or no search " "rules)."); KMessageBox::informationList( 0, msg, emptyFilters, QString::null, "ShowInvalidFilterWarning" ); -#endif } if ( oIdxSelItem >= 0 ) { diff --git a/kmidentity.cpp b/kmidentity.cpp index 9a8fc68cd..750c4ab87 100644 --- a/kmidentity.cpp +++ b/kmidentity.cpp @@ -86,12 +86,8 @@ QString Signature::textFromCommand( bool * ok ) const } // create a shell process: -#if KDE_VERSION >= 305 KProcess proc; proc.setUseShell(true); -#else - KShellProcess proc; -#endif proc << mUrl; // let the kernel collect the output for us: diff --git a/kmmainwidget.cpp b/kmmainwidget.cpp index 298799818..de429c505 100644 --- a/kmmainwidget.cpp +++ b/kmmainwidget.cpp @@ -37,9 +37,7 @@ #include #include #include -#if KDE_VERSION >= 306 #include -#endif #include "kmbroadcaststatus.h" #include "kmfoldermgr.h" @@ -2345,13 +2343,11 @@ void KMMainWidget::setupActions() SLOT(slotEditKeys()), mActionCollection, "kmail_configure_shortcuts" ); -#if KDE_VERSION >= 306 // KStdAction::configureNotifications(this, SLOT(slotEditNotifications()), mActionCollection); (void) new KAction( i18n("Configure &Notifications..."), "knotify", 0, this, SLOT(slotEditNotifications()), mActionCollection, "kmail_configure_notifications" ); -#endif // KStdAction::preferences(this, SLOT(slotSettings()), mActionCollection); (void) new KAction( i18n("&Configure KMail..."), "configure", 0, kernel, @@ -2387,17 +2383,13 @@ void KMMainWidget::setupActions() //----------------------------------------------------------------------------- void KMMainWidget::slotEditNotifications() { -#if KDE_VERSION >= 306 KNotifyDialog::configure(this); -#endif } void KMMainWidget::slotEditKeys() { - KKeyDialog::configure( mActionCollection -#if KDE_VERSION >= 306 - , true /*allow on-letter shortcuts*/ -#endif + KKeyDialog::configure( mActionCollection, + true /*allow one-letter shortcuts*/ ); } diff --git a/kmstartup.cpp b/kmstartup.cpp index f7fb5f262..f8d70a907 100644 --- a/kmstartup.cpp +++ b/kmstartup.cpp @@ -75,7 +75,6 @@ QString getMyHostName(void) void checkConfigUpdates() { -#if KDE_VERSION >= 306 //Please update the currentUpdateLevel when new updates are created. const int currentUpdateLevel = 100; KConfig * config = KMKernel::config(); @@ -92,7 +91,6 @@ void checkConfigUpdates() { for ( QStringList::const_iterator it = updates.begin() ; it != updates.end() ; ++it ) config->checkUpdate( *it, updateFile ); startup.writeEntry( "update-level", currentUpdateLevel ); -#endif } void lockOrDie() {