Commit fcf95d7a authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Provide new signal with WebHitTestResult (needed by new plugin)

parent 95f4dd89
...@@ -69,6 +69,10 @@ void Viewer::initialize() ...@@ -69,6 +69,10 @@ void Viewer::initialize()
{ {
connect(d_ptr, &ViewerPrivate::replaceMsgByUnencryptedVersion, connect(d_ptr, &ViewerPrivate::replaceMsgByUnencryptedVersion,
this, &Viewer::replaceMsgByUnencryptedVersion); this, &Viewer::replaceMsgByUnencryptedVersion);
#ifdef MESSAGEVIEWER_USE_QTWEBENGINE
connect(d_ptr, &ViewerPrivate::displayPopupMenu,
this, &Viewer::displayPopupMenu);
#endif
connect(d_ptr, &ViewerPrivate::popupMenu, connect(d_ptr, &ViewerPrivate::popupMenu,
this, &Viewer::popupMenu); this, &Viewer::popupMenu);
connect(d_ptr, SIGNAL(urlClicked(Akonadi::Item,QUrl)), connect(d_ptr, SIGNAL(urlClicked(Akonadi::Item,QUrl)),
......
...@@ -357,7 +357,9 @@ Q_SIGNALS: ...@@ -357,7 +357,9 @@ Q_SIGNALS:
/** The user presses the right mouse button. 'url' may be 0. */ /** The user presses the right mouse button. 'url' may be 0. */
void popupMenu(const Akonadi::Item &msg, const QUrl &url, const QUrl &imageUrl, const QPoint &mousePos); void popupMenu(const Akonadi::Item &msg, const QUrl &url, const QUrl &imageUrl, const QPoint &mousePos);
#ifdef MESSAGEVIEWER_USE_QTWEBENGINE
void displayPopupMenu(const Akonadi::Item &msg, const MessageViewer::WebHitTestResult &result, const QPoint &mousePos);
#endif
/** /**
* The message viewer handles some types of urls itself, most notably http(s) * The message viewer handles some types of urls itself, most notably http(s)
* and ftp(s). When it can't handle the url it will Q_EMIT this signal. * and ftp(s). When it can't handle the url it will Q_EMIT this signal.
......
...@@ -2077,7 +2077,7 @@ void ViewerPrivate::slotUrlPopup(const MessageViewer::WebHitTestResult &result) ...@@ -2077,7 +2077,7 @@ void ViewerPrivate::slotUrlPopup(const MessageViewer::WebHitTestResult &result)
} else { } else {
mCopyURLAction->setText(i18n("Copy Link Address")); mCopyURLAction->setText(i18n("Copy Link Address"));
} }
Q_EMIT displayPopupMenu(mMessageItem, result, aPos);
Q_EMIT popupMenu(mMessageItem, mClickedUrl, mImageUrl, aPos); Q_EMIT popupMenu(mMessageItem, mClickedUrl, mImageUrl, aPos);
} }
......
...@@ -579,6 +579,10 @@ Q_SIGNALS: ...@@ -579,6 +579,10 @@ Q_SIGNALS:
void showStatusBarMessage(const QString &message); void showStatusBarMessage(const QString &message);
void replaceMsgByUnencryptedVersion(); void replaceMsgByUnencryptedVersion();
void popupMenu(const Akonadi::Item &msg, const QUrl &url, const QUrl &imageUrl, const QPoint &mousePos); void popupMenu(const Akonadi::Item &msg, const QUrl &url, const QUrl &imageUrl, const QPoint &mousePos);
#ifdef MESSAGEVIEWER_USE_QTWEBENGINE
void displayPopupMenu(const Akonadi::Item &msg, const MessageViewer::WebHitTestResult &result, const QPoint &mousePos);
#endif
void urlClicked(const Akonadi::Item &msg, const QUrl &url); void urlClicked(const Akonadi::Item &msg, const QUrl &url);
void requestConfigSync(); void requestConfigSync();
void showReader(KMime::Content *aMsgPart, bool aHTML, const QString &encoding); void showReader(KMime::Content *aMsgPart, bool aHTML, const QString &encoding);
......
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