Merge remote-tracking branch 'origin/KDE/4.14'

Conflicts:
	kmail/messageactions.cpp
	kmail/messageactions.h
	noteshared/noteutils.cpp
	pimcommon/baloodebug/baloodebugdialog.cpp
wilder-work
Montel Laurent 12 years ago
commit 3cc992e832
  1. 11
      kmkernel.cpp
  2. 3
      kmkernel.h
  3. 4
      kmmainwidget.cpp
  4. 21
      messageactions.cpp
  5. 4
      messageactions.h

@ -135,8 +135,12 @@ KMKernel::KMKernel (QObject *parent) :
mConfigureDialog(0),
mMailService(0),
mSystemNetworkStatus ( Solid::Networking::status() ),
mSystemTray(0)
mSystemTray(0),
mDebugBaloo(false)
{
if (!qgetenv("KDEPIM_BALOO_DEBUG").isEmpty()) {
mDebugBaloo = true;
}
Akonadi::AttributeFactory::registerAttribute<Akonadi::SearchDescriptionAttribute>();
QDBusConnection::sessionBus().registerService(QLatin1String("org.kde.kmail"));
KMail::Util::migrateFromKMail1();
@ -2115,3 +2119,8 @@ PimCommon::StorageServiceManager *KMKernel::storageServiceManager() const
{
return mStorageManager;
}
bool KMKernel::allowToDebugBalooSupport() const
{
return mDebugBaloo;
}

@ -474,6 +474,8 @@ public:
FolderArchiveManager *folderArchiveManager() const;
PimCommon::StorageServiceManager *storageServiceManager() const;
bool allowToDebugBalooSupport() const;
protected:
void agentInstanceBroken( const Akonadi::AgentInstance& instance );
@ -602,6 +604,7 @@ private:
PimCommon::AutoCorrection *mAutoCorrection;
FolderArchiveManager *mFolderArchiveManager;
PimCommon::StorageServiceManager *mStorageManager;
bool mDebugBaloo;
};
#endif // _KMKERNEL_H

@ -2915,6 +2915,10 @@ void KMMainWidget::showMessagePopup(const Akonadi::Item&msg ,const KUrl&url,cons
menu->addSeparator();
menu->addAction( mMsgView->openBlockableItems());
}
if (kmkernel->allowToDebugBalooSupport()) {
menu->addSeparator();
menu->addAction( mMsgActions->debugBalooAction() );
}
}
KAcceleratorManager::manage(menu);
menu->exec( aPoint, 0 );

@ -38,6 +38,8 @@
#include <Akonadi/KMime/MessageParts>
#include <AkonadiCore/ChangeRecorder>
#include <QAction>
#include "pimcommon/baloodebug/baloodebugdialog.h"
#include <KActionMenu>
#include <KActionCollection>
#include <QDebug>
@ -66,7 +68,8 @@ MessageActions::MessageActions( KActionCollection *ac, QWidget *parent )
mMessageView( 0 ),
mRedirectAction( 0 ),
mPrintPreviewAction( 0 ),
mCustomTemplatesMenu( 0 )
mCustomTemplatesMenu( 0 ),
mDebugBalooAction(0)
{
mReplyActionMenu = new KActionMenu( QIcon::fromTheme(QLatin1String("mail-reply-sender")), i18nc("Message->","&Reply"), this );
ac->addAction( QLatin1String("message_reply_menu"), mReplyActionMenu );
@ -192,6 +195,11 @@ MessageActions::MessageActions( KActionCollection *ac, QWidget *parent )
replyMenu()->addAction( mCustomTemplatesMenu->replyActionMenu() );
replyMenu()->addAction( mCustomTemplatesMenu->replyAllActionMenu() );
//Don't translate it. Shown only when we set env variable KDEPIM_BALOO_DEBUG
mDebugBalooAction = new QAction(QLatin1String("Debug Baloo..."), this);
connect( mDebugBalooAction, SIGNAL(triggered(bool)), this, SLOT(slotDebugBaloo()) );
updateActions();
}
@ -641,3 +649,14 @@ void MessageActions::slotConfigureWebShortcuts()
{
KToolInvocation::kdeinitExec( QLatin1String("kcmshell4"), QStringList() << QLatin1String("ebrowsing") );
}
void MessageActions::slotDebugBaloo()
{
if ( !mCurrentItem.isValid() )
return;
QPointer<PimCommon::BalooDebugDialog> dlg = new PimCommon::BalooDebugDialog;
dlg->setAkonadiId(mCurrentItem.id());
dlg->setAttribute( Qt::WA_DeleteOnClose );
dlg->setSearchType(PimCommon::BalooDebugSearchPathComboBox::Emails);
dlg->show();
}

@ -90,6 +90,7 @@ public:
void addWebShortcutsMenu( QMenu *menu, const QString & text );
QAction *debugBalooAction() const { return mDebugBalooAction; }
signals:
// This signal is emitted when a reply is triggered and the
@ -129,7 +130,7 @@ private slots:
void slotMailingListFilter();
void slotHandleWebShortcutAction();
void slotConfigureWebShortcuts();
void slotDebugBaloo();
private:
QList<QAction *> mMailListActionList;
@ -149,6 +150,7 @@ private:
QAction *mEditAction, *mAnnotateAction, *mPrintAction, *mPrintPreviewAction;
TemplateParser::CustomTemplatesMenu *mCustomTemplatesMenu;
QAction *mListFilterAction;
QAction *mDebugBalooAction;
};
}

Loading…
Cancel
Save