Commit 0731ba09 authored by Laurent Montel's avatar Laurent Montel 😁

Return true if it's a texteditor

parent 9e62ddeb
......@@ -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")
......
......@@ -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();
}
......@@ -99,6 +99,7 @@ public:
void print();
void printPreview();
bool printSupportEnabled() const;
bool isTextEditor() const;
Q_SIGNALS:
void enableButtonOk(bool);
void switchToGraphicalMode();
......
......@@ -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) {
......
......@@ -86,6 +86,7 @@ public:
void printPreview();
bool printSupportEnabled() const;
bool isTextEditor() const;
public Q_SLOTS:
void find();
void replace();
......
Markdown is supported
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