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

Fix show developertooldialog

parent 286da5a6
......@@ -1742,11 +1742,18 @@ void ViewerPrivate::createActions()
void ViewerPrivate::slotShowDevelopmentTools()
{
DeveloperToolDialog *dlg = new DeveloperToolDialog(nullptr);
mViewer->page()->setDevToolsPage(dlg->enginePage());
mViewer->page()->triggerAction(QWebEnginePage::InspectElement);
connect(dlg, &DeveloperToolDialog::rejected, dlg, &DeveloperToolDialog::deleteLater);
dlg->show();
if (!mDeveloperToolDialog) {
mDeveloperToolDialog = new DeveloperToolDialog(nullptr);
mViewer->page()->setDevToolsPage(mDeveloperToolDialog->enginePage());
mViewer->page()->triggerAction(QWebEnginePage::InspectElement);
connect(mDeveloperToolDialog, &DeveloperToolDialog::rejected, mDeveloperToolDialog, &DeveloperToolDialog::deleteLater);
}
if (mDeveloperToolDialog->isHidden()) {
mDeveloperToolDialog->show();
}
mDeveloperToolDialog->raise();
mDeveloperToolDialog->activateWindow();
}
void ViewerPrivate::showContextMenu(KMime::Content *content, const QPoint &pos)
......
......@@ -94,6 +94,7 @@ class SubmittedFormWarningWidget;
class MailSourceWebEngineViewer;
class MailTrackingWarningWidget;
class ShowNextMessageWidget;
class DeveloperToolDialog;
/**
\brief Private class for the Viewer, the main widget in the messageviewer library.
......@@ -658,6 +659,7 @@ public:
/** Used only to be able to connect and disconnect finished() signal
in printMsg() and slotPrintMsg() since mHtmlWriter points only to abstract non-QObject class. */
QPointer<WebEnginePartHtmlWriter> mPartHtmlWriter;
QPointer<DeveloperToolDialog> mDeveloperToolDialog;
int mLevelQuote;
bool mDecrytMessageOverwrite = false;
......
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