Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/kmail/distributionlistdialog.cpp b/kmail/distributionlistdialog.cpp
- index f2f937f..3838f6c 100644
- --- a/kmail/distributionlistdialog.cpp
- +++ b/kmail/distributionlistdialog.cpp
- @@ -135,6 +135,7 @@ DistributionListDialog::DistributionListDialog( QWidget *parent )
- void DistributionListDialog::setRecipients( const Recipient::List &recipients )
- {
- +#ifdef REALLY_WANT_AKONADI
- Recipient::List::ConstIterator it;
- for( it = recipients.constBegin(); it != recipients.constEnd(); ++it ) {
- QStringList emails = KPIMUtils::splitAddressList( (*it).email() );
- @@ -179,10 +180,14 @@ void DistributionListDialog::setRecipients( const Recipient::List &recipients )
- }
- }
- }
- +#else
- + kWarning() << "FIXME: DistributionListDialog::setRecipients";
- +#endif
- }
- void DistributionListDialog::slotUser1()
- {
- +#ifdef REALLY_WANT_AKONADI
- bool isEmpty = true;
- for (int i = 0; i < mRecipientsList->topLevelItemCount(); ++i) {
- @@ -258,4 +263,7 @@ void DistributionListDialog::slotUser1()
- new Akonadi::ItemCreateJob( groupItem, targetCollection );
- close();
- +#else
- + kWarning() << "FIXME: DistributionListDialog::slotUser1";
- +#endif
- }
- diff --git a/kmail/folderdialogacltab.cpp b/kmail/folderdialogacltab.cpp
- index 2383f9c..e503dad 100644
- --- a/kmail/folderdialogacltab.cpp
- +++ b/kmail/folderdialogacltab.cpp
- @@ -277,6 +277,7 @@ void KMail::FolderDialogACLTab::ListViewItem::load( const ACLListEntry& entry )
- void KMail::FolderDialogACLTab::ListViewItem::save( ACLList& aclList,
- IMAPUserIdFormat userIdFormat )
- {
- +#ifdef REALLY_WANT_AKONADI
- // expand distribution lists
- Akonadi::ContactGroupSearchJob *job = new Akonadi::ContactGroupSearchJob();
- job->setQuery( Akonadi::ContactGroupSearchJob::Name, userId() );
- @@ -303,6 +304,9 @@ void KMail::FolderDialogACLTab::ListViewItem::save( ACLList& aclList,
- }
- aclList.append( entry );
- }
- +#else
- + kWarning() << "FIXME: KMail::FolderDialogACLTab::ListViewItem::save";
- +#endif
- }
- ////
- diff --git a/kmail/headerstyle.cpp b/kmail/headerstyle.cpp
- index 66567fd..5d9f503 100644
- --- a/kmail/headerstyle.cpp
- +++ b/kmail/headerstyle.cpp
- @@ -487,6 +487,7 @@ namespace KMail {
- QString userHTML;
- +#ifdef REALLY_WANT_AKONADI
- /*Akonadi::ContactSearchJob *job = new Akonadi::ContactSearchJob();
- job->setLimit( 1 );
- job->setQuery( Akonadi::ContactSearchJob::Email, KPIMUtils::firstEmailAddress( message->from() ) );
- @@ -527,6 +528,11 @@ namespace KMail {
- }
- }
- else // TODO: find a usable one
- +#else
- + QString photoURL;
- + int photoWidth = 60;
- + int photoHeight = 60;
- +#endif
- {
- userHTML = " ";
- }
- diff --git a/kmail/keyresolver.cpp b/kmail/keyresolver.cpp
- index 92ec3a1..38580c3 100644
- --- a/kmail/keyresolver.cpp
- +++ b/kmail/keyresolver.cpp
- @@ -1738,6 +1738,7 @@ Kleo::KeyResolver::ContactPreferences Kleo::KeyResolver::lookupContactPreference
- if ( it != d->mContactPreferencesMap.end() )
- return it->second;
- +#ifdef REALLY_WANT_AKONADI
- Akonadi::ContactSearchJob *job = new Akonadi::ContactSearchJob();
- job->setLimit( 1 );
- job->setQuery( Akonadi::ContactSearchJob::Email, address );
- @@ -1758,9 +1759,14 @@ Kleo::KeyResolver::ContactPreferences Kleo::KeyResolver::lookupContactPreference
- }
- // insert into map and grab resulting iterator
- d->mContactPreferencesMap.insert( std::make_pair( address, pref ) );
- +#else
- + kWarning() << "FIXME: Kleo::KeyResolver::lookupContactPreferences";
- + ContactPreferences pref;
- +#endif
- return pref;
- }
- +#ifdef REALLY_WANT_AKONADI
- void Kleo::KeyResolver::writeCustomContactProperties( KABC::Addressee &contact, const ContactPreferences& pref ) const
- {
- contact.insertCustom( "KADDRESSBOOK", "CRYPTOENCRYPTPREF", Kleo::encryptionPreferenceToString( pref.encryptionPreference ) );
- @@ -1769,9 +1775,11 @@ void Kleo::KeyResolver::writeCustomContactProperties( KABC::Addressee &contact,
- contact.insertCustom( "KADDRESSBOOK", "OPENPGPFP", pref.pgpKeyFingerprints.join( "," ) );
- contact.insertCustom( "KADDRESSBOOK", "SMIMEFP", pref.smimeCertFingerprints.join( "," ) );
- }
- +#endif
- void Kleo::KeyResolver::saveContactPreference( const QString& email, const ContactPreferences& pref ) const
- {
- +#ifdef REALLY_WANT_AKONADI
- d->mContactPreferencesMap.insert( std::make_pair( email, pref ) );
- Akonadi::ContactSearchJob *job = new Akonadi::ContactSearchJob();
- @@ -1817,6 +1825,9 @@ void Kleo::KeyResolver::saveContactPreference( const QString& email, const Conta
- }
- // Assumption: 'pref' comes from d->mContactPreferencesMap already, no need to update that
- +#else
- + kWarning() << "FIXME: KeyResolver::saveContactPreference";
- +#endif
- }
- Kleo::KeyResolver::ContactPreferences::ContactPreferences()
- diff --git a/kmail/keyresolver.h b/kmail/keyresolver.h
- index 4833a47..4e2635f 100644
- --- a/kmail/keyresolver.h
- +++ b/kmail/keyresolver.h
- @@ -293,7 +293,9 @@ namespace Kleo {
- };
- ContactPreferences lookupContactPreferences( const QString& address ) const;
- +#ifdef REALLY_WANT_AKONADI
- void writeCustomContactProperties( KABC::Addressee &contact, const ContactPreferences& pref ) const;
- +#endif
- void saveContactPreference( const QString& email, const ContactPreferences& pref ) const;
- private:
- diff --git a/kmail/kmaddrbook.cpp b/kmail/kmaddrbook.cpp
- index 2bb2fb8..b787c17 100644
- --- a/kmail/kmaddrbook.cpp
- +++ b/kmail/kmaddrbook.cpp
- @@ -35,6 +35,7 @@
- void KabcBridge::addresses(QStringList& result) // includes lists
- {
- +#ifdef REALLY_WANT_AKONADI
- KCursorSaver busy(KBusyPtr::busy()); // loading might take a while
- Akonadi::ContactSearchJob *job = new Akonadi::ContactSearchJob();
- @@ -87,6 +88,10 @@ void KabcBridge::addresses(QStringList& result) // includes lists
- const KABC::ContactGroup::List contactGroups = groupJob->contactGroups();
- foreach ( const KABC::ContactGroup &group, contactGroups )
- result.append( group.name() );
- +#else
- + kWarning() << "FIXME: KabcBridge::addresses(result)";
- + return;
- +#endif
- result.sort();
- }
- @@ -95,6 +100,7 @@ QStringList KabcBridge::addresses()
- {
- QStringList entries;
- +#ifdef REALLY_WANT_AKONADI
- Akonadi::ContactSearchJob *job = new Akonadi::ContactSearchJob();
- if ( !job->exec() )
- return QStringList();
- @@ -102,6 +108,9 @@ QStringList KabcBridge::addresses()
- const KABC::Addressee::List contacts = job->contacts();
- foreach ( const KABC::Addressee &contact, contacts )
- entries.append( contact.fullEmail() );
- +#else
- + kWarning() << "FIXME: KabcBridge::addresses";
- +#endif
- return entries;
- }
- @@ -114,6 +123,7 @@ QString KabcBridge::expandNickName( const QString& nickName )
- const QString lowerNickName = nickName.toLower();
- +#ifdef REALLY_WANT_AKONADI
- Akonadi::ContactSearchJob *job = new Akonadi::ContactSearchJob();
- job->setQuery( Akonadi::ContactSearchJob::NickName, lowerNickName );
- if ( !job->exec() )
- @@ -124,6 +134,9 @@ QString KabcBridge::expandNickName( const QString& nickName )
- if ( contact.nickName().toLower() == lowerNickName )
- return contact.fullEmail();
- }
- +#else
- + kWarning() << "FIXME: KabcBridge::expandNickName";
- +#endif
- return QString();
- }
- diff --git a/kmail/kmmainwidget.cpp b/kmail/kmmainwidget.cpp
- index 6b4a5f7..4c2bcba 100644
- --- a/kmail/kmmainwidget.cpp
- +++ b/kmail/kmmainwidget.cpp
- @@ -3356,7 +3356,7 @@ void KMMainWidget::slotMsgPopup( KMMessage &msg, const KUrl &aUrl, const QPoint
- menu->addAction( mMsgView->mailToForwardAction() );
- menu->addSeparator();
- -
- +#ifdef REALLY_WANT_AKONADI
- QString email = KPIMUtils::firstEmailAddress( aUrl.path() );
- Akonadi::ContactSearchJob *job = new Akonadi::ContactSearchJob();
- job->setLimit( 1 );
- @@ -3370,6 +3370,9 @@ void KMMainWidget::slotMsgPopup( KMMessage &msg, const KUrl &aUrl, const QPoint
- } else {
- menu->addAction( mMsgView->openAddrBookAction() );
- }
- +#else
- + kWarning() << "FIXME: KMMainWidget::slotMsgPopup mailto";
- +#endif
- menu->addAction( mMsgView->copyURLAction() );
- } else {
- // popup on a not-mailto URL
- diff --git a/kmail/kmreadermainwin.cpp b/kmail/kmreadermainwin.cpp
- index d34b776..bec5a7d 100644
- --- a/kmail/kmreadermainwin.cpp
- +++ b/kmail/kmreadermainwin.cpp
- @@ -393,6 +393,7 @@ void KMReaderMainWin::slotMsgPopup( KMMessage &aMsg, const KUrl &aUrl, const QPo
- menu->addAction( mReaderWin->mailToForwardAction() );
- menu->addSeparator();
- }
- +#ifdef REALLY_WANT_AKONADI
- QString email = KPIMUtils::firstEmailAddress( aUrl.path() );
- Akonadi::ContactSearchJob *job = new Akonadi::ContactSearchJob( this );
- job->setLimit( 1 );
- @@ -408,6 +409,9 @@ void KMReaderMainWin::slotMsgPopup( KMMessage &aMsg, const KUrl &aUrl, const QPo
- }
- menu->addAction( mReaderWin->copyURLAction() );
- copyAdded = true;
- +#else
- + kWarning() << "FIXME: KMReaderMainWin::slotMsgPopup mailto";
- +#endif
- } else {
- // popup on a not-mailto URL
- menu->addAction( mReaderWin->urlOpenAction() );
- diff --git a/kmail/kmsearchpattern.cpp b/kmail/kmsearchpattern.cpp
- index 174be8d..da04786 100644
- --- a/kmail/kmsearchpattern.cpp
- +++ b/kmail/kmsearchpattern.cpp
- @@ -457,6 +457,7 @@ bool KMSearchRuleString::matchesInternal( const QString & msgContents ) const
- return ( QString::compare( msgContents.toLower(), contents().toLower() ) >= 0 );
- case FuncIsInAddressbook: {
- +#ifdef REALLY_WANT_AKONADI
- const QStringList addressList = KPIMUtils::splitAddressList( msgContents.toLower() );
- for ( QStringList::ConstIterator it = addressList.constBegin(); ( it != addressList.constEnd() ); ++it ) {
- Akonadi::ContactSearchJob *job = new Akonadi::ContactSearchJob();
- @@ -467,10 +468,14 @@ bool KMSearchRuleString::matchesInternal( const QString & msgContents ) const
- if ( !job->contacts().isEmpty() )
- return true;
- }
- +#else
- + kWarning() << "FIXME: KMSearchRuleString::matchesInternal FuncIsInAddressbook";
- +#endif
- return false;
- }
- case FuncIsNotInAddressbook: {
- +#ifdef REALLY_WANT_AKONADI
- const QStringList addressList = KPIMUtils::splitAddressList( msgContents.toLower() );
- for ( QStringList::ConstIterator it = addressList.constBegin(); ( it != addressList.constEnd() ); ++it ) {
- Akonadi::ContactSearchJob *job = new Akonadi::ContactSearchJob();
- @@ -481,10 +486,14 @@ bool KMSearchRuleString::matchesInternal( const QString & msgContents ) const
- if ( job->contacts().isEmpty() )
- return true;
- }
- +#else
- + kWarning() << "FIXME: KMSearchRuleString::matchesInternal FuncIsNotInAddressbook";
- +#endif
- return false;
- }
- case FuncIsInCategory: {
- +#ifdef REALLY_WANT_AKONADI
- QString category = contents();
- const QStringList addressList = KPIMUtils::splitAddressList( msgContents.toLower() );
- @@ -500,10 +509,14 @@ bool KMSearchRuleString::matchesInternal( const QString & msgContents ) const
- return true;
- }
- }
- +#else
- + kWarning() << "FIXME: KMSearchRuleString::matchesInternal FuncIsInCategory";
- +#endif
- return false;
- }
- case FuncIsNotInCategory: {
- +#if REALLY_WANT_AKONADI
- QString category = contents();
- const QStringList addressList = KPIMUtils::splitAddressList( msgContents.toLower() );
- @@ -520,6 +533,9 @@ bool KMSearchRuleString::matchesInternal( const QString & msgContents ) const
- }
- }
- +#else
- + kWarning() << "FIXME: KMSearchRuleString::matchesInternal FuncIsNotInCategory";
- +#endif
- return true;
- }
- default:
- diff --git a/kmail/main.cpp b/kmail/main.cpp
- index 703dac6..5652623 100644
- --- a/kmail/main.cpp
- +++ b/kmail/main.cpp
- @@ -147,12 +147,16 @@ int main(int argc, char *argv[])
- app.setEventLoopReached();
- app.delayedInstanceCreation();
- +#ifdef REALLY_WANT_AKONADI
- // Start Akonadi
- if ( !Akonadi::Control::start( kmkernel->getKMMainWidget() ) ) {
- //TODO: add message box after string freeze
- kWarning() << "Unable to start Akonadi server, exit application";
- return 1;
- }
- +#else
- + kWarning() << "Akonadi disabled";
- +#endif
- // Go!
- int ret = qApp->exec();
- diff --git a/kmail/xfaceconfigurator.cpp b/kmail/xfaceconfigurator.cpp
- index 209297e..5f0e562 100644
- --- a/kmail/xfaceconfigurator.cpp
- +++ b/kmail/xfaceconfigurator.cpp
- @@ -34,6 +34,8 @@
- #ifdef REALLY_WANT_AKONADI
- #include <akonadi/contact/contactsearchjob.h>
- +#else
- +#include <kdebug.h>
- #endif
- #include <kabc/addressee.h>
- #include <kcombobox.h>
- @@ -246,6 +248,7 @@ namespace KMail {
- void XFaceConfigurator::slotSelectFromAddressbook()
- {
- +#ifdef REALLY_WANT_AKONADI
- using namespace KPIMIdentities;
- IdentityManager manager( true );
- @@ -283,6 +286,9 @@ namespace KMail {
- else
- KMessageBox::information( this, i18n("No picture set for your address book entry."), i18n("No Picture") );
- }
- +#else
- + kWarning() << "FIXME: XFaceConfigurator::slotSelectFromAddressbook";
- +#endif
- }
- void XFaceConfigurator::slotUpdateXFace()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement