Commit 4439a14b authored by Laurent Montel's avatar Laurent Montel 😁

Reactivate removeFormat

parent 135436c3
......@@ -171,6 +171,7 @@ private:
Q_PRIVATE_SLOT(d, void _k_slotListDedent())
Q_PRIVATE_SLOT(d, void _k_slotOrderedList(bool b))
Q_PRIVATE_SLOT(d, void _k_slotUnOrderedList(bool b))
Q_PRIVATE_SLOT(d, void _k_slotResetFormat())
};
}
#endif // COMPOSERWEBENGINE_H
......@@ -265,8 +265,6 @@ void ComposerEditorWebEnginePrivate::createAction(ComposerWebEngine::ComposerWeb
action_unordered_list = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-list-unordered")), i18n("Unordered List"), q);
htmlEditorActionList.append(action_unordered_list);
q->connect(action_unordered_list, SIGNAL(triggered(bool)), SLOT(_k_slotUnOrderedList(bool)));
//FORWARD_ACTION(action_unordered_list, QWebPage::InsertUnorderedList);
}
break;
}
......@@ -383,7 +381,7 @@ void ComposerEditorWebEnginePrivate::createAction(ComposerWebEngine::ComposerWeb
case ComposerWebEngine::FormatReset: {
if (!action_format_reset) {
action_format_reset = new QAction(QIcon::fromTheme(QStringLiteral("draw-eraser")), i18n("Reset Font Settings"), q);
//FORWARD_ACTION(action_format_reset, QWebPage::RemoveFormat);
q->connect(action_format_reset, SIGNAL(triggered()), q, SLOT(_k_slotResetFormat()));
}
break;
}
......@@ -779,6 +777,11 @@ void ComposerEditorWebEnginePrivate::_k_slotUnOrderedList(bool b)
execCommand(QStringLiteral("insertUnorderedList"), convertBooleanToString(b));
}
void ComposerEditorWebEnginePrivate::_k_slotResetFormat()
{
execCommand(QStringLiteral("removeFormat"));
}
void ComposerEditorWebEnginePrivate::_k_setFontSize(int fontSize)
{
execCommand(QStringLiteral("fontSize"), QString::number(fontSize + 1)); //Verify
......
......@@ -105,6 +105,7 @@ public:
void _k_slotListDedent();
void _k_slotOrderedList(bool b);
void _k_slotUnOrderedList(bool b);
void _k_slotResetFormat();
QAction *getAction(QWebEnginePage::WebAction action) const;
QVariant evaluateJavascript(const QString &command);
......
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