summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2016-05-18 21:27:51 +0200
committerMontel Laurent <[email protected]>2016-05-18 21:27:51 +0200
commit0731ba0930e9ab271dd6cec29d22aa469d7319d5 (patch)
tree7b2a568d75611476b1c72db18996029117b34a76
parent9e62ddebbd12b5194d032caa58c62652a911debf (diff)
Return true if it's a texteditor
-rw-r--r--CMakeLists.txt2
-rw-r--r--src/ksieveui/editor/sieveeditortextmodewidget.cpp7
-rw-r--r--src/ksieveui/editor/sieveeditortextmodewidget.h1
-rw-r--r--src/ksieveui/editor/sieveeditorwidget.cpp8
-rw-r--r--src/ksieveui/editor/sieveeditorwidget.h1
5 files changed, 17 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4f0d840..feebde5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,7 +18,7 @@ include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(ECMQtDeclareLoggingCategory)
include(ECMAddTests)
-set(PIM_VERSION "5.2.43")
+set(PIM_VERSION "5.2.44")
set(KF5_VERSION "5.19.0")
set(LIBKSIEVE_LIB_VERSION ${PIM_VERSION})
set(KDEPIMLIBS_LIB_VERSION "5.2.40")
diff --git a/src/ksieveui/editor/sieveeditortextmodewidget.cpp b/src/ksieveui/editor/sieveeditortextmodewidget.cpp
index 8f1e59e..8dd8188 100644
--- a/src/ksieveui/editor/sieveeditortextmodewidget.cpp
+++ b/src/ksieveui/editor/sieveeditortextmodewidget.cpp
@@ -521,8 +521,13 @@ void SieveEditorTextModeWidget::debugSieveScript()
delete dlg;
}
-bool SieveEditorTextModeWidget::printSupportEnabled() const
+bool SieveEditorTextModeWidget::isTextEditor() const
{
QWidget *w = mTabWidget->currentWidget();
return (w == mTextEdit);
}
+
+bool SieveEditorTextModeWidget::printSupportEnabled() const
+{
+ return isTextEditor();
+}
diff --git a/src/ksieveui/editor/sieveeditortextmodewidget.h b/src/ksieveui/editor/sieveeditortextmodewidget.h
index 687743c..d3d1ee6 100644
--- a/src/ksieveui/editor/sieveeditortextmodewidget.h
+++ b/src/ksieveui/editor/sieveeditortextmodewidget.h
@@ -99,6 +99,7 @@ public:
void print();
void printPreview();
bool printSupportEnabled() const;
+ bool isTextEditor() const;
Q_SIGNALS:
void enableButtonOk(bool);
void switchToGraphicalMode();
diff --git a/src/ksieveui/editor/sieveeditorwidget.cpp b/src/ksieveui/editor/sieveeditorwidget.cpp
index 63ed08d..0c343a1 100644
--- a/src/ksieveui/editor/sieveeditorwidget.cpp
+++ b/src/ksieveui/editor/sieveeditorwidget.cpp
@@ -691,6 +691,14 @@ QUrl SieveEditorWidget::currentHelpUrl() const
return QUrl();
}
+bool SieveEditorWidget::isTextEditor() const
+{
+ if (mMode == TextMode) {
+ return mTextModeWidget->isTextEditor();
+ }
+ return false;
+}
+
bool SieveEditorWidget::printSupportEnabled() const
{
if (mMode == TextMode) {
diff --git a/src/ksieveui/editor/sieveeditorwidget.h b/src/ksieveui/editor/sieveeditorwidget.h
index 867da67..4ec4874 100644
--- a/src/ksieveui/editor/sieveeditorwidget.h
+++ b/src/ksieveui/editor/sieveeditorwidget.h
@@ -86,6 +86,7 @@ public:
void printPreview();
bool printSupportEnabled() const;
+ bool isTextEditor() const;
public Q_SLOTS:
void find();
void replace();