Commit 5eb251da authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

krunner: Define context variable before parsing the script

Otherwise we have to reevaluate a bunch of expressions to update with
the new value. Fixes several warnings too.
parent 603af9f1
...@@ -88,8 +88,8 @@ View::View(QWindow *) ...@@ -88,8 +88,8 @@ View::View(QWindow *)
package.setPath(packageName); package.setPath(packageName);
} }
m_qmlObj->setSource(package.fileUrl("runcommandmainscript"));
m_qmlObj->engine()->rootContext()->setContextProperty(QStringLiteral("runnerWindow"), this); m_qmlObj->engine()->rootContext()->setContextProperty(QStringLiteral("runnerWindow"), this);
m_qmlObj->setSource(package.fileUrl("runcommandmainscript"));
m_qmlObj->completeInitialization(); m_qmlObj->completeInitialization();
auto screenRemoved = [this](QScreen* screen) { auto screenRemoved = [this](QScreen* screen) {
......
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