summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2015-09-02 08:13:18 +0200
committerMontel Laurent <[email protected]>2015-09-02 08:13:18 +0200
commit9120ff0c79c10c782fa86cebd17ad5a6d7cf66c4 (patch)
tree41d504fd55227a295ba0977df5cbaa91972ea4c9
parent1afb52552ded1c770636f216f64c8b09c88d39ca (diff)
Transform it as a class
-rw-r--r--libksieve/ksieveui/autocreatescripts/tests/autocreatescripts_gui.cpp3
-rw-r--r--libksieve/ksieveui/autocreatescripts/tests/parsingscript_gui.cpp3
-rw-r--r--libksieve/ksieveui/editor/tests/editorsieve_gui.cpp3
-rw-r--r--mailcommon/filter/filterconverter/filterconverttosieveresultdialog.cpp4
-rw-r--r--pimcommon/sievehighlighter/sievesyntaxhighlighterutil.cpp2
-rw-r--r--pimcommon/sievehighlighter/sievesyntaxhighlighterutil.h7
6 files changed, 14 insertions, 8 deletions
diff --git a/libksieve/ksieveui/autocreatescripts/tests/autocreatescripts_gui.cpp b/libksieve/ksieveui/autocreatescripts/tests/autocreatescripts_gui.cpp
index b17b5e5..4d62eca 100644
--- a/libksieve/ksieveui/autocreatescripts/tests/autocreatescripts_gui.cpp
+++ b/libksieve/ksieveui/autocreatescripts/tests/autocreatescripts_gui.cpp
@@ -37,7 +37,8 @@ int main(int argc, char **argv)
parser.process(app);
aboutData.processCommandLine(&parser);
KSieveUi::AutoCreateScriptDialog *dialog = new KSieveUi::AutoCreateScriptDialog;
- QStringList capabilities = PimCommon::SieveSyntaxHighlighterUtil::fullCapabilities();
+ PimCommon::SieveSyntaxHighlighterUtil sieveHighlighterutil;
+ const QStringList capabilities = sieveHighlighterutil.fullCapabilities();
//Add all capabilities for testing
dialog->setSieveCapabilities(capabilities);
if (dialog->exec()) {
diff --git a/libksieve/ksieveui/autocreatescripts/tests/parsingscript_gui.cpp b/libksieve/ksieveui/autocreatescripts/tests/parsingscript_gui.cpp
index 848639a..a4594a4 100644
--- a/libksieve/ksieveui/autocreatescripts/tests/parsingscript_gui.cpp
+++ b/libksieve/ksieveui/autocreatescripts/tests/parsingscript_gui.cpp
@@ -84,7 +84,8 @@ int main(int argc, char **argv)
dlg.show();
KSieveUi::AutoCreateScriptDialog *dialog = new KSieveUi::AutoCreateScriptDialog;
- QStringList capabilities = PimCommon::SieveSyntaxHighlighterUtil::fullCapabilities();
+ PimCommon::SieveSyntaxHighlighterUtil sieveHighlighterutil;
+ const QStringList capabilities = sieveHighlighterutil.fullCapabilities();
//Add all capabilities for testing
dialog->setSieveCapabilities(capabilities);
QString error;
diff --git a/libksieve/ksieveui/editor/tests/editorsieve_gui.cpp b/libksieve/ksieveui/editor/tests/editorsieve_gui.cpp
index 534e145..2e58f0d 100644
--- a/libksieve/ksieveui/editor/tests/editorsieve_gui.cpp
+++ b/libksieve/ksieveui/editor/tests/editorsieve_gui.cpp
@@ -45,7 +45,8 @@ int main(int argc, char **argv)
aboutData.processCommandLine(&parser);
SieveEditorTestWidget *dialog = new SieveEditorTestWidget;
- const QStringList capabilities = PimCommon::SieveSyntaxHighlighterUtil::fullCapabilities();
+ PimCommon::SieveSyntaxHighlighterUtil sieveHighlighterutil;
+ const QStringList capabilities = sieveHighlighterutil.fullCapabilities();
//Add all capabilities for testing
dialog->setSieveCapabilities(capabilities);
if (dialog->exec()) {
diff --git a/mailcommon/filter/filterconverter/filterconverttosieveresultdialog.cpp b/mailcommon/filter/filterconverter/filterconverttosieveresultdialog.cpp
index 31f7765..46bd585 100644
--- a/mailcommon/filter/filterconverter/filterconverttosieveresultdialog.cpp
+++ b/mailcommon/filter/filterconverter/filterconverttosieveresultdialog.cpp
@@ -55,7 +55,9 @@ FilterConvertToSieveResultDialog::FilterConvertToSieveResultDialog(QWidget *pare
mEditor->editor()->setSpellCheckingSupport(false);
mEditor->setObjectName(QStringLiteral("editor"));
PimCommon::SieveSyntaxHighlighter *syntaxHighlighter = new PimCommon::SieveSyntaxHighlighter(mEditor->editor()->document());
- syntaxHighlighter->addCapabilities(PimCommon::SieveSyntaxHighlighterUtil::fullCapabilities());
+ PimCommon::SieveSyntaxHighlighterUtil sieveHighlighterutil;
+ const QStringList capabilities = sieveHighlighterutil.fullCapabilities();
+ syntaxHighlighter->addCapabilities(capabilities);
topLayout->addWidget(mEditor);
topLayout->addWidget(buttonBox);
diff --git a/pimcommon/sievehighlighter/sievesyntaxhighlighterutil.cpp b/pimcommon/sievehighlighter/sievesyntaxhighlighterutil.cpp
index f51ca8a..d271a2e 100644
--- a/pimcommon/sievehighlighter/sievesyntaxhighlighterutil.cpp
+++ b/pimcommon/sievehighlighter/sievesyntaxhighlighterutil.cpp
@@ -19,7 +19,7 @@
namespace PimCommon
{
-QStringList SieveSyntaxHighlighterUtil::fullCapabilities()
+QStringList SieveSyntaxHighlighterUtil::fullCapabilities() const
{
return QStringList()
<< QStringLiteral("mboxmetadata")
diff --git a/pimcommon/sievehighlighter/sievesyntaxhighlighterutil.h b/pimcommon/sievehighlighter/sievesyntaxhighlighterutil.h
index 7cd0e1e..3bba1d0 100644
--- a/pimcommon/sievehighlighter/sievesyntaxhighlighterutil.h
+++ b/pimcommon/sievehighlighter/sievesyntaxhighlighterutil.h
@@ -24,10 +24,11 @@
namespace PimCommon
{
-namespace SieveSyntaxHighlighterUtil
+class PIMCOMMON_EXPORT SieveSyntaxHighlighterUtil
{
-PIMCOMMON_EXPORT QStringList fullCapabilities();
-}
+public:
+ QStringList fullCapabilities() const;
+};
}