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/main-lib/defaultconfiguration.cpp | |
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/main-lib/defaultconfiguration.cpp')
-rw-r--r-- | src/main-lib/defaultconfiguration.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main-lib/defaultconfiguration.cpp b/src/main-lib/defaultconfiguration.cpp index 9802fa98..b9e61e8e 100644 --- a/src/main-lib/defaultconfiguration.cpp +++ b/src/main-lib/defaultconfiguration.cpp @@ -150,7 +150,7 @@ void DefaultConfiguration::parseWithArguments(const QStringList &arguments, QStr QString DefaultConfiguration::mainQmlFile() const { - if (!m_clp.positionalArguments().isEmpty() && m_clp.positionalArguments().at(0).endsWith(qL1S(".qml"))) + if (!m_clp.positionalArguments().isEmpty()) return m_clp.positionalArguments().at(0); else return value<QString>(nullptr, { "ui", "mainQml" }); |