Commit e91d5b84 authored by Laurent Montel's avatar Laurent Montel 😁

We can copy in html page

parent 9be1f860
......@@ -106,6 +106,11 @@ void SieveEditorHelpHtmlWidget::zoomIn()
mWebView->setZoomFactor(mZoomFactor / 100.0);
}
void SieveEditorHelpHtmlWidget::copy()
{
mWebView->triggerPageAction(QWebEnginePage::Copy);
}
void SieveEditorHelpHtmlWidget::zoomOut()
{
if (mZoomFactor <= 10) {
......
......@@ -41,6 +41,7 @@ public:
void resetZoom();
void zoomOut();
void zoomIn();
void copy();
Q_SIGNALS:
void titleChanged(KSieveUi::SieveEditorHelpHtmlWidget *widget, const QString &title);
......
......@@ -275,7 +275,12 @@ void SieveEditorTextModeWidget::cut()
void SieveEditorTextModeWidget::copy()
{
mTextEdit->copy();
QWidget *w = mTabWidget->currentWidget();
if (w == mTextEdit) {
mTextEdit->copy();
} else if (SieveEditorHelpHtmlWidget *page = qobject_cast<SieveEditorHelpHtmlWidget *>(w)) {
page->copy();
}
}
void SieveEditorTextModeWidget::selectAll()
......
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