Commit 96367b62 authored by jkobus's avatar jkobus Committed by Eike Ziller
Browse files

Do not use a qml subfolder for qtquick applications.



The subfolder triggers some unfortunate issues, like that the default
path that is chosen for adding files to the '/' prefix in the qrc is the
project directory.

Change-Id: Ia0010e01c37afb64506053014eae4524794e57d8
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent ba5f8cd9
......@@ -8,7 +8,7 @@ int main(int argc, char *argv[])
QtQuick1ApplicationViewer viewer;
viewer.addImportPath(QLatin1String("modules")); // ADDIMPORTPATH
viewer.setOrientation(QtQuick1ApplicationViewer::ScreenOrientationAuto); // ORIENTATION
viewer.setMainQmlFile(QLatin1String("qrc:///qml/main.qml")); // MAINQML
viewer.setMainQmlFile(QLatin1String("qrc:///main.qml")); // MAINQML
viewer.showExpanded();
return app.exec();
......
<RCC>
<qresource prefix="/">
<file>qml/main.qml</file>
<file>main.qml</file>
</qresource>
</RCC>
......@@ -6,7 +6,7 @@ int main(int argc, char *argv[])
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine;
engine.load(QUrl(QStringLiteral("qrc:///qml/main.qml")));
engine.load(QUrl(QStringLiteral("qrc:///main.qml")));
return app.exec();
}
<RCC>
<qresource prefix="/">
<file>qml/main.qml</file>
<file>main.qml</file>
</qresource>
</RCC>
......@@ -6,7 +6,7 @@ int main(int argc, char *argv[])
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine;
engine.load(QUrl(QStringLiteral("qrc:///qml/main.qml")));
engine.load(QUrl(QStringLiteral("qrc:///main.qml")));
return app.exec();
}
<RCC>
<qresource prefix="/">
<file>qml/main.qml</file>
<file>main.qml</file>
</qresource>
</RCC>
......@@ -6,7 +6,7 @@ int main(int argc, char *argv[])
QApplication app(argc, argv);
QQmlApplicationEngine engine;
engine.load(QUrl(QStringLiteral("qrc:///qml/main.qml")));
engine.load(QUrl(QStringLiteral("qrc:///main.qml")));
return app.exec();
}
<RCC>
<qresource prefix="/">
<file>qml/main.qml</file>
<file>main.qml</file>
</qresource>
</RCC>
......@@ -6,7 +6,7 @@ int main(int argc, char *argv[])
QApplication app(argc, argv);
QQmlApplicationEngine engine;
engine.load(QUrl(QStringLiteral("qrc:///qml/main.qml")));
engine.load(QUrl(QStringLiteral("qrc:///main.qml")));
return app.exec();
}
<RCC>
<qresource prefix="/">
<file>qml/main.qml</file>
<file>main.qml</file>
</qresource>
</RCC>
......@@ -208,7 +208,6 @@ void QtQuickApp::setTemplateInfo(const TemplateInfo &templateInfo)
QString QtQuickApp::pathExtended(int fileType) const
{
const QString qmlSubDir = QLatin1String("qml/");
const QString appViewerTargetSubDir = appViewerOriginSubDir();
const QString mainQmlFile = QLatin1String("main.qml");
......@@ -219,8 +218,8 @@ QString QtQuickApp::pathExtended(int fileType) const
const QString pathBase = outputPathBase();
switch (fileType) {
case MainQml: return pathBase + qmlSubDir + mainQmlFile;
case MainQmlOrigin: return originsRoot() + qmlSubDir + mainQmlFile;
case MainQml: return pathBase + mainQmlFile;
case MainQmlOrigin: return originsRoot() + mainQmlFile;
case MainQrc: return pathBase + mainQrcFile;
case MainQrcOrigin: return originsRoot() + mainQrcFile;
case QrcDeployment: return pathBase + qrcDeploymentFile;
......
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