Akonadi::ClearCacheFoldersJob Class

The ClearCacheFoldersJob class. More...

Header: #include <Akonadi/ClearCacheFoldersJob>
CMake: find_package(KPim6 REQUIRED COMPONENTS AkonadiWidgets)
target_link_libraries(mytarget PRIVATE KPim6::AkonadiWidgets)

Public Functions

ClearCacheFoldersJob(const Akonadi::Collection &folder, QObject *parent = nullptr)
ClearCacheFoldersJob(const Akonadi::Collection::List &folders, QObject *parent = nullptr)
virtual ~ClearCacheFoldersJob() override
bool canStart() const
bool canceled() const
QWidget *parentWidget() const
void setCanceled(bool newCanceled)
void setParentWidget(QWidget *newParentWidget)
void start()

Signals

void clearCacheDone()
void clearNextFolder()
void finished(bool success)

Detailed Description

Member Function Documentation

[explicit] ClearCacheFoldersJob::ClearCacheFoldersJob(const Akonadi::Collection &folder, QObject *parent = nullptr)

Creates a job to clear the cache for a single folder. folder The collection folder whose cache should be cleared. parent The parent object.

[explicit] ClearCacheFoldersJob::ClearCacheFoldersJob(const Akonadi::Collection::List &folders, QObject *parent = nullptr)

Creates a job to clear the cache for multiple folders. folders The collection folders whose cache should be cleared. parent The parent object.

[override virtual noexcept] ClearCacheFoldersJob::~ClearCacheFoldersJob()

Destroys the clear cache folders job.

bool ClearCacheFoldersJob::canStart() const

Returns whether the job can be started. Returns True if the job can be started, false otherwise.

bool ClearCacheFoldersJob::canceled() const

Returns whether the job was canceled. Returns True if canceled, false otherwise.

See also setCanceled().

[signal] void ClearCacheFoldersJob::clearCacheDone()

Emitted when the cache clearing is done.

[signal] void ClearCacheFoldersJob::clearNextFolder()

Emitted when the next folder's cache is about to be cleared.

[signal] void ClearCacheFoldersJob::finished(bool success)

Emitted when the operation has finished. success True if the operation was successful, false otherwise.

QWidget *ClearCacheFoldersJob::parentWidget() const

Returns the parent widget for this job. Returns The parent widget, or nullptr if none was set.

See also setParentWidget().

void ClearCacheFoldersJob::setCanceled(bool newCanceled)

Sets the canceled state of this job. newCanceled True to cancel the job.

See also canceled().

void ClearCacheFoldersJob::setParentWidget(QWidget *newParentWidget)

Sets the parent widget for this job. newParentWidget The parent widget.

See also parentWidget().

void ClearCacheFoldersJob::start()

Starts the cache clearing operation.