diff options
author | Bernd Weimer <bernd.weimer@pelagicore.com> | 2019-07-02 16:06:50 +0200 |
---|---|---|
committer | Bernd Weimer <bernd.weimer@pelagicore.com> | 2019-07-23 11:09:17 +0200 |
commit | 2907a594a7d83f814ef9f8446d904409a18248d0 (patch) | |
tree | d15c5fa9f97c7a4e6c229fd31a5996303014810d /src/manager-lib | |
parent | 6482d3da242d6f9d1b894e71ac2f0289bdd7b792 (diff) | |
download | qtapplicationmanager-2907a594a7d83f814ef9f8446d904409a18248d0.tar.gz |
Improve invalid main QML handling
* Empty main QML file (string) throws an exception now
* Removed .qml extension requirement for main QML file on CL
* Schemes other than file:// and qrc:// are intentionally still not
verified
* Added more test cases
Change-Id: I1a34a16ee28fe1597a43bd6e73be5edf8e7b9d7d
Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
Diffstat (limited to 'src/manager-lib')
-rw-r--r-- | src/manager-lib/qmlinprocessruntime.cpp | 3 | ||||
-rw-r--r-- | src/manager-lib/qmlinprocessruntime.h | 1 |
2 files changed, 1 insertions, 3 deletions
diff --git a/src/manager-lib/qmlinprocessruntime.cpp b/src/manager-lib/qmlinprocessruntime.cpp index e45c555b..3929a58f 100644 --- a/src/manager-lib/qmlinprocessruntime.cpp +++ b/src/manager-lib/qmlinprocessruntime.cpp @@ -120,7 +120,6 @@ bool QmlInProcessRuntime::start() qCDebug(LogSystem) << "Updated Qml import paths:" << m_inProcessQmlEngine->importPathList(); } - m_componentError = false; QQmlComponent *component = new QQmlComponent(m_inProcessQmlEngine, m_app->nonAliasedInfo()->absoluteCodeFilePath()); if (!component->isReady()) { @@ -143,7 +142,7 @@ bool QmlInProcessRuntime::start() QMetaObject::invokeMethod(this, [component, appContext, obj, this]() { component->completeCreate(); - if (!obj || m_componentError) { + if (!obj) { qCCritical(LogSystem) << "could not load" << m_app->nonAliasedInfo()->absoluteCodeFilePath() << ": no root object"; delete obj; delete appContext; diff --git a/src/manager-lib/qmlinprocessruntime.h b/src/manager-lib/qmlinprocessruntime.h index 8c0281dc..4315bae1 100644 --- a/src/manager-lib/qmlinprocessruntime.h +++ b/src/manager-lib/qmlinprocessruntime.h @@ -98,7 +98,6 @@ private: QString m_document; QmlInProcessApplicationInterface *m_applicationIf = nullptr; - bool m_componentError; bool m_stopIfNoVisibleSurfaces = false; |