Commit 73a6fb1b authored by Laurent Montel's avatar Laurent Montel 😁

Allow to use selectall action in html mode too

parent 9d5af6c0
......@@ -117,6 +117,11 @@ bool SieveEditorHelpHtmlWidget::hasSelection() const
return mWebView->hasSelection();
}
void SieveEditorHelpHtmlWidget::selectAll()
{
mWebView->triggerPageAction(QWebEnginePage::SelectAll);
}
void SieveEditorHelpHtmlWidget::zoomOut()
{
if (mZoomFactor <= 10) {
......
......@@ -44,6 +44,7 @@ public:
void copy();
bool hasSelection() const;
void selectAll();
Q_SIGNALS:
void titleChanged(KSieveUi::SieveEditorHelpHtmlWidget *widget, const QString &title);
......
......@@ -298,7 +298,12 @@ void SieveEditorTextModeWidget::copy()
void SieveEditorTextModeWidget::selectAll()
{
mTextEdit->selectAll();
QWidget *w = mTabWidget->currentWidget();
if (w == mTextEdit) {
mTextEdit->selectAll();
} else if (SieveEditorHelpHtmlWidget *page = qobject_cast<SieveEditorHelpHtmlWidget *>(w)) {
page->selectAll();
}
}
bool SieveEditorTextModeWidget::isUndoAvailable() const
......
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