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

Reactivate runjavascript

parent d1bd29e6
...@@ -637,10 +637,10 @@ void ComposerEditorWebEnginePrivate::_k_setTextBackgroundColor() ...@@ -637,10 +637,10 @@ void ComposerEditorWebEnginePrivate::_k_setTextBackgroundColor()
QVariant ComposerEditorWebEnginePrivate::evaluateJavascript(const QString &command) QVariant ComposerEditorWebEnginePrivate::evaluateJavascript(const QString &command)
{ {
#if 0 qDebug()<<" QVariant ComposerEditorWebEnginePrivate::evaluateJavascript(const QString &command)"<<command;
return q->page()->mainFrame()->evaluateJavaScript(command); q->page()->runJavaScript(command);
#endif
return QVariant(); return QVariant();
//TODO fix me return value.
} }
void ComposerEditorWebEnginePrivate::_k_slotDeleteText() void ComposerEditorWebEnginePrivate::_k_slotDeleteText()
...@@ -961,20 +961,14 @@ void ComposerEditorWebEnginePrivate::_k_slotAdjustActions() ...@@ -961,20 +961,14 @@ void ComposerEditorWebEnginePrivate::_k_slotAdjustActions()
void ComposerEditorWebEnginePrivate::execCommand(const QString &cmd) void ComposerEditorWebEnginePrivate::execCommand(const QString &cmd)
{ {
#if 0
QWebFrame *frame = q->page()->mainFrame();
const QString js = QStringLiteral("document.execCommand(\"%1\", false, null)").arg(cmd); const QString js = QStringLiteral("document.execCommand(\"%1\", false, null)").arg(cmd);
frame->evaluateJavaScript(js); q->page()->runJavaScript(js);
#endif
} }
void ComposerEditorWebEnginePrivate::execCommand(const QString &cmd, const QString &arg) void ComposerEditorWebEnginePrivate::execCommand(const QString &cmd, const QString &arg)
{ {
#if 0
QWebFrame *frame = q->page()->mainFrame();
const QString js = QStringLiteral("document.execCommand(\"%1\", false, \"%2\")").arg(cmd, arg); const QString js = QStringLiteral("document.execCommand(\"%1\", false, \"%2\")").arg(cmd, arg);
frame->evaluateJavaScript(js); q->page()->runJavaScript(js);
#endif
} }
bool ComposerEditorWebEnginePrivate::queryCommandState(const QString &cmd) bool ComposerEditorWebEnginePrivate::queryCommandState(const QString &cmd)
......
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