summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTasuku Suzuki <tasuku.suzuki@qt.io>2018-01-05 02:08:21 +0900
committerTasuku Suzuki <tasuku.suzuki@qt.io>2018-01-05 02:09:25 +0900
commitfe2aebc3fedb8e2c216995a365ad254270fbd079 (patch)
treeecef487814a09a82106a38e3937f7abb2bceadf7
parent7afe7a301a956ee97959fe32e91d80d34fd1fd69 (diff)
Fix a runtime error when agl_hmi_framework is not available
Change-Id: Ic5cfaabbc9af61eb57aa99a008544904afbc8068 Signed-off-by: Tasuku Suzuki <tasuku.suzuki@qt.io>
-rw-r--r--src/aglextras/hmi/aglapplication.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/aglextras/hmi/aglapplication.cpp b/src/aglextras/hmi/aglapplication.cpp
index 295c017..102a990 100644
--- a/src/aglextras/hmi/aglapplication.cpp
+++ b/src/aglextras/hmi/aglapplication.cpp
@@ -28,8 +28,10 @@
QT_BEGIN_NAMESPACE
-AGLApplicationPrivate::AGLApplicationPrivate (AGLApplication*)
+AGLApplicationPrivate::AGLApplicationPrivate (AGLApplication *app)
: binding_address(new QUrl)
+ , engine(new QQmlApplicationEngine(app))
+
{
;
}
@@ -73,7 +75,6 @@ AGLApplication::AGLApplication (int& argc, char** argv)
query.addQueryItem(QStringLiteral("token"), d_ptr->secret);
d_ptr->binding_address->setQuery(query);
- d_ptr->engine = new QQmlApplicationEngine();
if (!d_ptr->engine) {
qDebug("Cannot initialize QML Engine");
exit(EXIT_FAILURE);