Commit 851713c3 authored by Laurent Montel's avatar Laurent Montel
Browse files

Prepare to store filter

parent adc5314c
Pipeline #60172 passed with stage
in 40 minutes and 19 seconds
......@@ -124,6 +124,20 @@ QuickSearchLine::SearchOptions Filter::currentOptions() const
return mOptions;
void Filter::save(const KSharedConfig::Ptr &config, const QString &filtername)
KConfigGroup grp(config, "General");
int numberFilter = grp.readEntry("NumberFilter").toInt();
KConfigGroup newGroup(config, QStringLiteral("Filter_%1").arg(numberFilter++));
newGroup.writeEntry("name", filtername);
newGroup.writeEntry("searchString", mSearchString);
// TODO newGroup.writeEntry("searchOptions", mOptions);
newGroup.writeEntry("tagId", mTagId);
// newGroup.writeEntry("currentFolder", mCurrentFolder);
// TODO mStatus.toQInt32()
void Filter::setSearchString(const QString &search, QuickSearchLine::SearchOptions options)
const QString trimStr = search.trimmed();
......@@ -15,6 +15,7 @@
#include "widgets/quicksearchline.h"
#include <Akonadi/KMime/MessageStatus>
#include <Collection>
#include <KSharedConfig>
namespace MessageList
......@@ -87,6 +88,8 @@ public:
Q_REQUIRED_RESULT bool isEmpty() const;
Q_REQUIRED_RESULT QuickSearchLine::SearchOptions currentOptions() const;
void save(const KSharedConfig::Ptr &config, const QString &filtername);
void finished();
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment