diff --git a/src/plugins/qmlprojectmanager/wizards/templates/app.pro b/share/qtcreator/templates/qmlapp/app.pro similarity index 100% rename from src/plugins/qmlprojectmanager/wizards/templates/app.pro rename to share/qtcreator/templates/qmlapp/app.pro diff --git a/src/plugins/qmlprojectmanager/wizards/templates/cpp/main.cpp b/share/qtcreator/templates/qmlapp/cpp/main.cpp similarity index 100% rename from src/plugins/qmlprojectmanager/wizards/templates/cpp/main.cpp rename to share/qtcreator/templates/qmlapp/cpp/main.cpp diff --git a/src/plugins/qmlprojectmanager/wizards/templates/cpp/qmlapplicationview.cpp b/share/qtcreator/templates/qmlapp/cpp/qmlapplicationview.cpp similarity index 100% rename from src/plugins/qmlprojectmanager/wizards/templates/cpp/qmlapplicationview.cpp rename to share/qtcreator/templates/qmlapp/cpp/qmlapplicationview.cpp diff --git a/src/plugins/qmlprojectmanager/wizards/templates/cpp/qmlapplicationview.h b/share/qtcreator/templates/qmlapp/cpp/qmlapplicationview.h similarity index 100% rename from src/plugins/qmlprojectmanager/wizards/templates/cpp/qmlapplicationview.h rename to share/qtcreator/templates/qmlapp/cpp/qmlapplicationview.h diff --git a/src/plugins/qmlprojectmanager/wizards/templates/cpp/symbianicon.svg b/share/qtcreator/templates/qmlapp/cpp/symbianicon.svg similarity index 100% rename from src/plugins/qmlprojectmanager/wizards/templates/cpp/symbianicon.svg rename to share/qtcreator/templates/qmlapp/cpp/symbianicon.svg diff --git a/src/plugins/qmlprojectmanager/wizards/templates/qml/app/app.qml b/share/qtcreator/templates/qmlapp/qml/app/app.qml similarity index 100% rename from src/plugins/qmlprojectmanager/wizards/templates/qml/app/app.qml rename to share/qtcreator/templates/qmlapp/qml/app/app.qml diff --git a/src/plugins/qmlprojectmanager/qmlproject.qrc b/src/plugins/qmlprojectmanager/qmlproject.qrc index 6b770593582e93c866fa82bea0c339fad68dc628..21338b6a545c42dd2363d51089465b4af45129ca 100644 --- a/src/plugins/qmlprojectmanager/qmlproject.qrc +++ b/src/plugins/qmlprojectmanager/qmlproject.qrc @@ -4,11 +4,5 @@ <file>images/qmlfolder.png</file> <file>images/qmlproject.png</file> <file>images/qml_wizard.png</file> - <file>wizards/templates/app.pro</file> - <file>wizards/templates/qml/app/app.qml</file> - <file>wizards/templates/cpp/qmlapplicationview.h</file> - <file>wizards/templates/cpp/symbianicon.svg</file> - <file>wizards/templates/cpp/main.cpp</file> - <file>wizards/templates/cpp/qmlapplicationview.cpp</file> </qresource> </RCC> diff --git a/src/plugins/qmlprojectmanager/wizards/qmlstandaloneapp.cpp b/src/plugins/qmlprojectmanager/wizards/qmlstandaloneapp.cpp index d8cc3392254b61bbc2be5db2264c14d945cd0610..9b9392cb38e3ed7650470f72c29fcbdcc2b3e784 100644 --- a/src/plugins/qmlprojectmanager/wizards/qmlstandaloneapp.cpp +++ b/src/plugins/qmlprojectmanager/wizards/qmlstandaloneapp.cpp @@ -34,6 +34,10 @@ #include <QtCore/QRegExp> #include <QtCore/QTextStream> +#ifndef CREATORLESSTEST +#include <coreplugin/icore.h> +#endif // CREATORLESSTEST + namespace QmlProjectManager { namespace Internal { @@ -136,7 +140,11 @@ QString QmlStandaloneApp::path(Path path, Location location) const const QString qmlRootFolder = QLatin1String("qml/") + (useExistingMainQml() ? m_mainQmlFile.dir().dirName() : m_projectName) + QLatin1Char('/'); +#ifdef CREATORLESSTEST const QString sourceRoot = QLatin1String(":/qmlproject/wizards/templates/"); +#else // CREATORLESSTEST + const QString sourceRoot = Core::ICore::instance()->resourcePath() + QLatin1String("/templates/qmlapp/"); +#endif // CREATORLESSTEST const QString cppSourceSubDir = QLatin1String("cpp/"); const QString cppTargetSubDir = cppSourceSubDir; const QString qmlExtension = QLatin1String(".qml");