Commit 0c0c5920 authored by Christian Kandeler's avatar Christian Kandeler
Browse files

Allow dashes in project names...

... for mobile and QtQuick projects.
This effectively reverts 8eb60c65

, which
was probably done for the then-relevant Symbian platform.

Change-Id: I2bfdec822dfdcc353790f0b5980960e30336d147
Task-number: QTCREATORBUG-7602
Reviewed-by: default avatarAlessandro Portale <alessandro.portale@nokia.com>
parent e3a5e27e
......@@ -164,26 +164,24 @@ QString AbstractMobileApp::path(int fileType) const
const QString originsRootShared = templatesRoot() + QLatin1String("shared/");
const QString mainCppFileName = QLatin1String("main.cpp");
const QString symbianIconFileName = QLatin1String("symbianicon.svg");
QString cleanProjectName = m_projectName;
cleanProjectName.replace(QLatin1Char('-'), QString());
switch (fileType) {
case MainCpp: return outputPathBase() + mainCppFileName;
case MainCppOrigin: return originsRootApp + mainCppFileName;
case AppPro: return outputPathBase() + cleanProjectName + QLatin1String(".pro");
case AppPro: return outputPathBase() + m_projectName + QLatin1String(".pro");
case AppProOrigin: return originsRootApp + QLatin1String("app.pro");
case AppProPath: return outputPathBase();
case DesktopFremantle: return outputPathBase() + cleanProjectName + QLatin1String(".desktop");
case DesktopHarmattan: return outputPathBase() + cleanProjectName + QLatin1String("_harmattan.desktop");
case DesktopFremantle: return outputPathBase() + m_projectName + QLatin1String(".desktop");
case DesktopHarmattan: return outputPathBase() + m_projectName + QLatin1String("_harmattan.desktop");
case DesktopOrigin: return originsRootShared + QLatin1String("app.desktop");
case DeploymentPri: return outputPathBase() + DeploymentPriFileName;
case DeploymentPriOrigin: return originsRootShared + DeploymentPriFileName;
case SymbianSvgIcon: return outputPathBase() + cleanProjectName + QLatin1String(".svg");
case SymbianSvgIcon: return outputPathBase() + m_projectName + QLatin1String(".svg");
case SymbianSvgIconOrigin: return !m_symbianSvgIcon.isEmpty() ? m_symbianSvgIcon
: originsRootShared + symbianIconFileName;
case PngIcon64: return outputPathBase() + cleanProjectName + QLatin1String("64.png");
case PngIcon64: return outputPathBase() + m_projectName + QLatin1String("64.png");
case PngIconOrigin64: return !m_pngIcon64.isEmpty() ? m_pngIcon64
: originsRootShared + QLatin1String("icon64.png");
case PngIcon80: return outputPathBase() + cleanProjectName + QLatin1String("80.png");
case PngIcon80: return outputPathBase() + m_projectName + QLatin1String("80.png");
case PngIconOrigin80: return !m_pngIcon80.isEmpty() ? m_pngIcon80
: originsRootShared + QLatin1String("icon80.png");
default: return pathExtended(fileType);
......
......@@ -173,10 +173,9 @@ bool QtQuickApp::setExternalModules(const QStringList &uris,
QString QtQuickApp::pathExtended(int fileType) const
{
QString cleanProjectName = projectName().replace(QLatin1Char('-'), QString());
const bool importQmlFile = m_mainQmlMode == ModeImport;
const QString qmlSubDir = QLatin1String("qml/")
+ (importQmlFile ? m_mainQmlFile.dir().dirName() : cleanProjectName)
+ (importQmlFile ? m_mainQmlFile.dir().dirName() : projectName())
+ QLatin1Char('/');
const QString appViewerTargetSubDir = appViewerOriginsSubDir;
......
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