svn path=/branches/work/akonadi-ports/kdepim/; revision=1040452
wilder-work
Laurent Montel 17 years ago
parent d94095c48d
commit 0e0ba44419
  1. 2
      kmfilter.cpp
  2. 6
      kmfilter.h
  3. 4
      kmfilteraction.cpp
  4. 8
      kmfilteraction.h
  5. 14
      kmfiltermgr.cpp
  6. 5
      kmfiltermgr.h
  7. 10
      kmkernel.cpp
  8. 2
      kmkernel.h

@ -185,7 +185,7 @@ KMPopFilterAction KMFilter::action()
}
// only for !bPopFilter
bool KMFilter::folderRemoved( KMFolder* aFolder, KMFolder* aNewFolder )
bool KMFilter::folderRemoved( const Akonadi::Collection & aFolder, const Akonadi::Collection& aNewFolder )
{
bool rem = false;

@ -24,7 +24,7 @@
#include "kmpopheaders.h"
#include <kshortcut.h>
#include <akonadi/collection.h>
class QString;
class KConfigGroup;
namespace KMime {
@ -252,7 +252,7 @@ public:
/** This sets the toolbar name for this filter.
* The toolbar name is the text to be displayed underneath the toolbar icon
* for this filter. This is usually the same as name(), expect when
* for this filter. This is usually the same as name(), expect when
* explicitly set by this function.
* This is useful if the normal filter mame is too long for the toolbar.
* @see toolbarName, name
@ -290,7 +290,7 @@ public:
* @return true if a change in some action occurred,
* false if no action was affected.
*/
bool folderRemoved( KMFolder* aFolder, KMFolder* aNewFolder );
bool folderRemoved( const Akonadi::Collection& aFolder, const Akonadi::Collection& aNewFolder );
/** Returns the filter in a human-readable form. useful for
debugging but not much else. Don't use, as it may well go away

@ -113,7 +113,7 @@ void KMFilterAction::clearParamWidget( QWidget * ) const
{
}
bool KMFilterAction::folderRemoved(KMFolder*, KMFolder*)
bool KMFilterAction::folderRemoved(const Akonadi::Collection&, const Akonadi::Collection&)
{
return false;
}
@ -388,7 +388,7 @@ const QString KMFilterActionWithFolder::displayString() const
#endif
}
bool KMFilterActionWithFolder::folderRemoved( KMFolder* aFolder, KMFolder* aNewFolder )
bool KMFilterActionWithFolder::folderRemoved( const Akonadi::Collection& aFolder, const Akonadi::Collection& aNewFolder )
{
#if 0
if ( aFolder == mFolder ) {

@ -27,9 +27,9 @@
#include <QPointer>
#include <QStringList>
#include <akonadi/collection.h>
class KMFolder;
class KTemporaryFile;
class KTemporaryFile;
class KMFolder;
namespace KMime {
class Message;
class Content;
@ -140,7 +140,7 @@ public:
/** Called from the filter when a folder is removed. Tests if the
folder @p aFolder is used and changes to @p aNewFolder in this
case. Returns true if a change was made. */
virtual bool folderRemoved(KMFolder* aFolder, KMFolder* aNewFolder);
virtual bool folderRemoved(const Akonadi::Collection & aFolder, const Akonadi::Collection & aNewFolder);
/** Static function that creates a filter action of this type. */
static KMFilterAction* newAction();
@ -433,7 +433,7 @@ public:
/** Called from the filter when a folder is removed. Tests if the
folder @p aFolder is used and changes to @p aNewFolder in this
case. Returns true if a change was made. */
virtual bool folderRemoved(KMFolder* aFolder, KMFolder* aNewFolder);
virtual bool folderRemoved(const Akonadi::Collection& aFolder, const Akonadi::Collection& aNewFolder);
protected:
Akonadi::Collection mFolder;

@ -43,8 +43,8 @@ KMFilterMgr::KMFilterMgr( bool popFilter )
if ( bPopFilter ) {
kDebug() << "pPopFilter set";
}
connect( kmkernel, SIGNAL( folderRemoved( KMFolder* ) ),
this, SLOT( slotFolderRemoved( KMFolder* ) ) );
connect( kmkernel, SIGNAL( folderRemoved( const Akonadi::Collection& ) ),
this, SLOT( slotFolderRemoved( const Akonadi::Collection & ) ) );
}
@ -72,7 +72,7 @@ void KMFilterMgr::readConfig(void)
if ( bPopFilter ) {
KConfigGroup group = config->group( "General" );
mShowLater = group.readEntry( "popshowDLmsgs", false );
}
}
mFilters = FilterImporterExporter::readFiltersFromConfig( config, bPopFilter );
}
@ -81,7 +81,7 @@ void KMFilterMgr::writeConfig(bool withSync)
{
KSharedConfig::Ptr config = KMKernel::config();
// Now, write out the new stuff:
// Now, write out the new stuff:
FilterImporterExporter::writeFiltersToConfig( mFilters, config, bPopFilter );
KConfigGroup group = config->group( "General" );
if ( bPopFilter )
@ -510,13 +510,13 @@ void KMFilterMgr::setFilters( const QList<KMFilter*> &filters )
endUpdate();
}
void KMFilterMgr::slotFolderRemoved( KMFolder * aFolder )
void KMFilterMgr::slotFolderRemoved( const Akonadi::Collection & aFolder )
{
folderRemoved( aFolder, 0 );
folderRemoved( aFolder, Akonadi::Collection() );
}
//-----------------------------------------------------------------------------
bool KMFilterMgr::folderRemoved(KMFolder* aFolder, KMFolder* aNewFolder)
bool KMFilterMgr::folderRemoved(const Akonadi::Collection & aFolder, const Akonadi::Collection & aNewFolder)
{
mDirtyBufferedFolderTarget = true;
bool rem = false;

@ -22,6 +22,7 @@
#include "kmfilteraction.h" // for KMFilterAction::ReturnCode
#include "kmfolder.h"
#include <akonadi/collection.h>
namespace KMime {
class Message;
@ -161,7 +162,7 @@ public:
Tests if the folder aFolder is used in any action. Changes
to aNewFolder folder in this case. Returns true if a change
occurred. */
bool folderRemoved(KMFolder* aFolder, KMFolder* aNewFolder);
bool folderRemoved(const Akonadi::Collection& aFolder, const Akonadi::Collection& aNewFolder);
/** Called from the folder manager when a new folder has been
created. Forwards this to the filter dialog if that is open. */
@ -177,7 +178,7 @@ public:
return mShowLater;
}
public slots:
void slotFolderRemoved( KMFolder *aFolder );
void slotFolderRemoved( const Akonadi::Collection &aFolder );
signals:
void filterListUpdated();

@ -1604,18 +1604,18 @@ void KMKernel::init()
the_weaver = new ThreadWeaver::Weaver( this );
connect( the_folderMgr, SIGNAL( folderRemoved(KMFolder*) ),
this, SIGNAL( folderRemoved(KMFolder*) ) );
connect( the_folderMgr, SIGNAL( folderRemoved(const Akonadi::Collection &) ),
this, SIGNAL( folderRemoved(const Akonadi::Collection&) ) );
#if 0 //TODO port to akonadi
connect( the_dimapFolderMgr, SIGNAL( folderRemoved(KMFolder*) ),
this, SIGNAL( folderRemoved(KMFolder*) ) );
connect( the_imapFolderMgr, SIGNAL( folderRemoved(KMFolder*) ),
this, SIGNAL( folderRemoved(KMFolder*) ) );
#else
kDebug() << "AKONADI PORT: Disabled code in " << Q_FUNC_INFO;
kDebug() << "AKONADI PORT: Disabled code in " << Q_FUNC_INFO;
#endif
connect( the_searchFolderMgr, SIGNAL( folderRemoved(KMFolder*) ),
this, SIGNAL( folderRemoved(KMFolder*) ) );
connect( the_searchFolderMgr, SIGNAL( folderRemoved(const Akonadi::Collection&) ),
this, SIGNAL( folderRemoved(const Akonadi::Collection&) ) );
mBackgroundTasksTimer = new QTimer( this );
mBackgroundTasksTimer->setSingleShot( true );

@ -445,7 +445,7 @@ protected slots:
signals:
void configChanged();
void folderRemoved( KMFolder* aFolder );
void folderRemoved( const Akonadi::Collection &aFolder );
void onlineStatusChanged( GlobalSettings::EnumNetworkState::type );
void customTemplatesChanged();

Loading…
Cancel
Save