Commit f3257814 authored by Pekka Vuorela's avatar Pekka Vuorela

Show startup error string purely in qml side

parent 3cbe2630
......@@ -143,6 +143,7 @@ int main(int argc, char *argv[])
context->setContextProperty( "term", &term );
context->setContextProperty( "util", &util );
context->setContextProperty( "keyLoader", &keyLoader );
context->setContextProperty( "startupErrorMessage", startupErrorMsg);
view.setResizeMode(QQuickView::SizeRootObjectToView);
view.setSource(QUrl("qrc:/qml/Main.qml"));
......@@ -151,11 +152,6 @@ int main(int argc, char *argv[])
if(!root)
qFatal("no root object - qml error");
QObject* win = root->findChild<QObject*>("window");
if(!startupErrorMsg.isEmpty())
QMetaObject::invokeMethod(win, "showErrorMessage", Qt::QueuedConnection, Q_ARG(QVariant, startupErrorMsg));
TextRender *tr = root->findChild<TextRender*>("textrender");
tr->setUtil(&util);
tr->setTerminal(&term);
......
......@@ -107,7 +107,6 @@ Item {
property int scrollBarWidth: 6*window.pixelRatio
anchors.fill: parent
objectName: "window"
color: bellTimer.running ? "#ffffff" : bgcolor
Lineview {
......@@ -448,6 +447,9 @@ Item {
Component.onCompleted: {
if( util.settingsValue("state/showWelcomeScreen") === true )
aboutDialog.state = "visible";
if (startupErrorMessage != "") {
Please register or sign in to reply
showErrorMessage(startupErrorMessage)
}
}
function showErrorMessage(string)
......
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