summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2016-03-24 06:56:32 +0100
committerMontel Laurent <[email protected]>2016-03-24 06:56:32 +0100
commitfe4239de421c45c2f0b833f21fd4c16b98b35ed9 (patch)
treed2c0c6588a1283c6c87b3436908e462bcc5711c9
parentd1bd29e6ffaeb953180f1b807d94ff96ae7de1d4 (diff)
Reactivate runjavascript
-rw-r--r--composereditorwebengine/src/private/composerwebengine_p.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/composereditorwebengine/src/private/composerwebengine_p.cpp b/composereditorwebengine/src/private/composerwebengine_p.cpp
index 4d22ad0..9da94bd 100644
--- a/composereditorwebengine/src/private/composerwebengine_p.cpp
+++ b/composereditorwebengine/src/private/composerwebengine_p.cpp
@@ -637,10 +637,10 @@ void ComposerEditorWebEnginePrivate::_k_setTextBackgroundColor()
QVariant ComposerEditorWebEnginePrivate::evaluateJavascript(const QString &command)
{
-#if 0
- return q->page()->mainFrame()->evaluateJavaScript(command);
-#endif
+ qDebug()<<" QVariant ComposerEditorWebEnginePrivate::evaluateJavascript(const QString &command)"<<command;
+ q->page()->runJavaScript(command);
return QVariant();
+ //TODO fix me return value.
}
void ComposerEditorWebEnginePrivate::_k_slotDeleteText()
@@ -961,20 +961,14 @@ void ComposerEditorWebEnginePrivate::_k_slotAdjustActions()
void ComposerEditorWebEnginePrivate::execCommand(const QString &cmd)
{
- #if 0
- QWebFrame *frame = q->page()->mainFrame();
const QString js = QStringLiteral("document.execCommand(\"%1\", false, null)").arg(cmd);
- frame->evaluateJavaScript(js);
-#endif
+ q->page()->runJavaScript(js);
}
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);
- frame->evaluateJavaScript(js);
-#endif
+ q->page()->runJavaScript(js);
}
bool ComposerEditorWebEnginePrivate::queryCommandState(const QString &cmd)