Commit 704f3d53 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

Wizard: Use normalized path separators

Task-number: QTCREATORBUG-13903
Change-Id: Ie7fc4bbf793a6379dbb8410c6ec23a48504beed0
Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
parent 102e49ca
......@@ -454,8 +454,9 @@ QString BaseFileWizardFactory::buildFileName(const QString &path,
const QString &extension)
{
QString rc = path;
if (!rc.isEmpty() && !rc.endsWith(QDir::separator()))
rc += QDir::separator();
const QChar slash = QLatin1Char('/');
if (!rc.isEmpty() && !rc.endsWith(slash))
rc += slash;
rc += baseName;
// Add extension unless user specified something else
const QChar dot = QLatin1Char('.');
......
......@@ -220,9 +220,7 @@ bool GuiAppWizard::parametrizeTemplate(const QString &templatePath, const QStrin
const GuiAppParameters &params,
QString *target, QString *errorMessage)
{
QString fileName = templatePath;
fileName += QDir::separator();
fileName += templateName;
const QString fileName = templatePath + QLatin1Char('/') + templateName;
Utils::FileReader reader;
if (!reader.fetch(fileName, QIODevice::Text, errorMessage))
return false;
......
......@@ -50,7 +50,7 @@ QString QtProjectParameters::projectPath() const
{
QString rc = path;
if (!rc.isEmpty())
rc += QDir::separator();
rc += QLatin1Char('/');
rc += fileName;
return rc;
}
......
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