Skip to content

Commit

Permalink
ControllerScriptEngineBase: install console extension
Browse files Browse the repository at this point in the history
This allows new scripts to use console.* functions which for example
enables easier debugging using Qt's debugging and logging tools.
See https://doc.qt.io/qt-5/qtquick-debugging.html#console-api for more information
on the console extension api.
  • Loading branch information
Swiftb0y committed Aug 5, 2021
1 parent ac4cacd commit 6507dce
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ bool ControllerScriptEngineLegacy::initialize() {
return false;
}

m_pJSEngine->installExtensions(QJSEngine::ConsoleExtension);

// Binary data is passed from the Controller as a QByteArray, which
// QJSEngine::toScriptValue converts to an ArrayBuffer in JavaScript.
// ArrayBuffer cannot be accessed with the [] operator in JS; it needs
Expand Down

0 comments on commit 6507dce

Please sign in to comment.