diff --git a/src/filter/filteractions/filteractionplaysound.h b/src/filter/filteractions/filteractionplaysound.h index 1de4143..8e0e7ca 100644 --- a/src/filter/filteractions/filteractionplaysound.h +++ b/src/filter/filteractions/filteractionplaysound.h @@ -1,52 +1,52 @@ /* * Copyright (c) 1996-1998 Stefan Taferner * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef MAILCOMMON_FILTERACTIONPLAYSOUND_H #define MAILCOMMON_FILTERACTIONPLAYSOUND_H #include "filteractionwithtest.h" namespace Phonon { class MediaObject; } namespace MailCommon { //============================================================================= // FilterActionPlaySound - execute command // Execute a sound //============================================================================= class FilterActionPlaySound : public FilterActionWithTest { Q_OBJECT public: FilterActionPlaySound(); - ~FilterActionPlaySound(); + ~FilterActionPlaySound() override; Q_REQUIRED_RESULT ReturnCode process(ItemContext &context, bool applyOnOutbound) const override; Q_REQUIRED_RESULT SearchRule::RequiredPart requiredPart() const override; static FilterAction *newAction(); Q_REQUIRED_RESULT bool argsFromStringInteractive(const QString &argsStr, const QString &filterName) override; Q_REQUIRED_RESULT bool isEmpty() const override; Q_REQUIRED_RESULT QString informationAboutNotValidAction() const override; private: mutable Phonon::MediaObject *mPlayer = nullptr; }; } #endif diff --git a/src/filter/filteractions/filteractionwithurl.h b/src/filter/filteractions/filteractionwithurl.h index b094e35..b55b6fa 100644 --- a/src/filter/filteractions/filteractionwithurl.h +++ b/src/filter/filteractions/filteractionwithurl.h @@ -1,118 +1,118 @@ /* * Copyright (c) 1996-1998 Stefan Taferner * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef MAILCOMMON_FILTERACTIONWITHURL_H #define MAILCOMMON_FILTERACTIONWITHURL_H #include "filteraction.h" #include namespace MailCommon { /** * @short Abstract base class for filter actions with a command line as parameter. * * Abstract base class for mail filter actions that need a command * line as parameter, e.g. 'forward to'. Can create a QLineEdit * (are there better widgets in the depths of the kdelibs?) as * parameter widget. A subclass of this must provide at least * implementations for the following methods: * * @li virtual FilterAction::ReturnCodes FilterAction::process * @li static FilterAction::newAction * * The implementation of FilterAction::process should take the * command line specified in mParameter, make all required * modifications and stream the resulting command line into @p * mProcess. Then you can start the command with @p mProcess.start(). * * @author Marc Mutz , based upon work by Stefan Taferner * @see FilterActionWithString FilterAction Filter KProcess */ class FilterActionWithUrlHelpButton : public QToolButton { Q_OBJECT public: explicit FilterActionWithUrlHelpButton(QWidget *parent = nullptr); ~FilterActionWithUrlHelpButton(); }; class FilterActionWithUrl : public FilterAction { Q_OBJECT public: /** * @copydoc FilterAction::FilterAction */ FilterActionWithUrl(const QString &name, const QString &label, QObject *parent = nullptr); /** * @copydoc FilterAction::~FilterAction */ - ~FilterActionWithUrl(); + ~FilterActionWithUrl() override; /** * @copydoc FilterAction::isEmpty */ Q_REQUIRED_RESULT bool isEmpty() const override; /** * @copydoc FilterAction::createParamWidget */ Q_REQUIRED_RESULT QWidget *createParamWidget(QWidget *parent) const override; /** * @copydoc FilterAction::applyParamWidgetValue */ void applyParamWidgetValue(QWidget *paramWidget) override; /** * @copydoc FilterAction::setParamWidgetValue */ void setParamWidgetValue(QWidget *paramWidget) const override; /** * @copydoc FilterAction::clearParamWidget */ void clearParamWidget(QWidget *paramWidget) const override; /** * @copydoc FilterAction::applyFromString */ void argsFromString(const QString &argsStr) override; /** * @copydoc FilterAction::argsAsString */ Q_REQUIRED_RESULT QString argsAsString() const override; /** * @copydoc FilterAction::displayString */ Q_REQUIRED_RESULT QString displayString() const override; protected: QString mParameter; private: mutable FilterActionWithUrlHelpButton *mHelpButton = nullptr; private Q_SLOTS: void slotHelp(); }; } #endif diff --git a/src/job/expirejob.h b/src/job/expirejob.h index f50b222..6022ba7 100644 --- a/src/job/expirejob.h +++ b/src/job/expirejob.h @@ -1,90 +1,90 @@ /* -*- mode: C++ -*- * Copyright (c) 2004 David Faure * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * In addition, as a special exception, the copyright holders give * permission to link the code of this program with any edition of * the Qt library by Trolltech AS, Norway (or with modified versions * of Qt that use the same license as Qt), and distribute linked * combinations including the two. You must obey the GNU General * Public License in all respects for all of the code used other than * Qt. If you modify this file, you may extend this exception to * your version of the file, but you are not obligated to do so. If * you do not wish to do so, delete this exception statement from * your version. */ #ifndef MAILCOMMON_EXPIREJOB_H #define MAILCOMMON_EXPIREJOB_H #include "jobscheduler.h" #include #include class KJob; namespace MailCommon { class ExpireJob : public ScheduledJob { Q_OBJECT public: explicit ExpireJob(const Akonadi::Collection &folder, bool immediate); ~ExpireJob() override; void execute() override; void kill() override; private: void slotDoWork(); void slotExpireDone(KJob *job); void slotMoveDone(KJob *job); void itemFetchResult(KJob *job); void done(); private: Akonadi::Item::List mRemovedMsgs; qint64 mMaxUnreadTime; qint64 mMaxReadTime; Akonadi::Collection mMoveToFolder; }; /// A scheduled "expire mails in this folder" task. class ScheduledExpireTask : public ScheduledTask { public: /// If immediate is set, the job will execute synchronously. This is used when /// the user requests explicitly that the operation should happen immediately. ScheduledExpireTask(const Akonadi::Collection &folder, bool immediate) : ScheduledTask(folder, immediate) { } - virtual ~ScheduledExpireTask() + ~ScheduledExpireTask() override { } ScheduledJob *run() override { return folder().isValid() ? new ExpireJob(folder(), isImmediate()) : nullptr; } int taskTypeId() const override { return 1; } }; } // namespace #endif diff --git a/src/search/searchrule/searchrulestring.h b/src/search/searchrule/searchrulestring.h index 1566b35..02c160d 100644 --- a/src/search/searchrule/searchrulestring.h +++ b/src/search/searchrule/searchrulestring.h @@ -1,87 +1,87 @@ /* Copyright (c) 2015-2018 Montel Laurent This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef SEARCHRULESTRING_H #define SEARCHRULESTRING_H #include "searchpattern.h" #include /** * @short This class represents a search pattern rule operating on a string. * * This class represents a search to be performed against a string. * The string can be either a message header, or a pseudo header, such * as \ */ namespace MailCommon { class SearchRuleString : public SearchRule { public: /** * Creates new new string search rule. * * @param field The field to search in. * @param function The function to use for searching. * @param contents The contents to search for. */ explicit SearchRuleString(const QByteArray &field = QByteArray(), Function function = FuncContains, const QString &contents = QString()); /** * Creates a new string search rule from an @p other rule. */ SearchRuleString(const SearchRuleString &other); /** * Initializes this rule with an @p other rule. */ const SearchRuleString &operator=(const SearchRuleString &other); /** * Destroys the string search rule. */ - virtual ~SearchRuleString(); + ~SearchRuleString() override; /** * @copydoc SearchRule::isEmpty() */ bool isEmpty() const override; /** * @copydoc SearchRule::requiredPart() */ RequiredPart requiredPart() const override; /** * @copydoc SearchRule::matches() */ bool matches(const Akonadi::Item &item) const override; /** * A helper method for the main matches() method. * Does the actual comparing. */ bool matchesInternal(const QString &contents) const; /** * @copydoc SearchRule::addQueryTerms() */ void addQueryTerms(Akonadi::SearchTerm &groupTerm, bool &emptyIsNotAnError) const override; QString informationAboutNotValidRules() const override; }; } #endif // SEARCHRULESTRING_H