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

Start to implement show development tool

parent 249a2257
cmake_minimum_required(VERSION 3.5)
set(PIM_VERSION "5.14.42")
set(PIM_VERSION "5.14.43")
if (POLICY CMP0053)
cmake_policy(SET CMP0053 NEW)
......
......@@ -638,6 +638,12 @@ QAction *Viewer::resetMessageDisplayFormatAction() const
return d->mResetMessageDisplayFormat;
}
QAction *Viewer::developmentToolsAction() const
{
Q_D(const Viewer);
return d->mDevelopmentToolsAction;
}
KToggleAction *Viewer::disableEmoticonAction() const
{
Q_D(const Viewer);
......
......@@ -281,6 +281,8 @@ public:
Q_REQUIRED_RESULT QAction *saveAsAction() const;
Q_REQUIRED_RESULT QAction *saveMessageDisplayFormatAction() const;
Q_REQUIRED_RESULT QAction *resetMessageDisplayFormatAction() const;
Q_REQUIRED_RESULT QAction *developmentToolsAction() const;
Q_REQUIRED_RESULT KToggleAction *disableEmoticonAction() const;
Q_REQUIRED_RESULT KActionMenu *shareServiceUrlMenu() const;
Q_REQUIRED_RESULT HeaderStylePlugin *headerStylePlugin() const;
......
......@@ -1732,6 +1732,17 @@ void ViewerPrivate::createActions()
mDisableEmoticonAction = new KToggleAction(i18n("Disable Emoticon"), this);
ac->addAction(QStringLiteral("disable_emoticon"), mDisableEmoticonAction);
connect(mDisableEmoticonAction, &QAction::triggered, this, &ViewerPrivate::slotToggleEmoticons);
//Don't translate it.
mDevelopmentToolsAction = new KToggleAction(QStringLiteral("Development Tools"), this);
ac->addAction(QStringLiteral("development_tools"), mDevelopmentToolsAction);
connect(mDevelopmentToolsAction, &QAction::triggered, this, &ViewerPrivate::slotShowDevelopmentTools);
}
void ViewerPrivate::slotShowDevelopmentTools()
{
mViewer->page()->setDevToolsPage(mViewer->page());
}
void ViewerPrivate::showContextMenu(KMime::Content *content, const QPoint &pos)
......
......@@ -598,6 +598,7 @@ private:
void slotDelayPrintPreview();
void applyZoomValue(qreal factor, bool saveConfig = true);
void slotZoomChanged(qreal zoom);
void slotShowDevelopmentTools();
MimeTreeParser::NodeHelper *mNodeHelper = nullptr;
bool mHtmlMailGlobalSetting = false;
bool mHtmlLoadExternalDefaultSetting = false;
......@@ -648,6 +649,7 @@ public:
KToggleAction *mToggleFixFontAction = nullptr;
KToggleAction *mToggleDisplayModeAction = nullptr;
KToggleAction *mToggleMimePartTreeAction = nullptr;
QAction *mDevelopmentToolsAction = nullptr;
QAction *mSpeakTextAction = nullptr;
QAction *mCopyImageLocation = nullptr;
QUrl mClickedUrl;
......
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