forked from qt-creator/qt-creator
Wizard: Use normalized path separators
Task-number: QTCREATORBUG-13903 Change-Id: Ie7fc4bbf793a6379dbb8410c6ec23a48504beed0 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
102e49ca37
commit
704f3d539b
@@ -454,8 +454,9 @@ QString BaseFileWizardFactory::buildFileName(const QString &path,
|
|||||||
const QString &extension)
|
const QString &extension)
|
||||||
{
|
{
|
||||||
QString rc = path;
|
QString rc = path;
|
||||||
if (!rc.isEmpty() && !rc.endsWith(QDir::separator()))
|
const QChar slash = QLatin1Char('/');
|
||||||
rc += QDir::separator();
|
if (!rc.isEmpty() && !rc.endsWith(slash))
|
||||||
|
rc += slash;
|
||||||
rc += baseName;
|
rc += baseName;
|
||||||
// Add extension unless user specified something else
|
// Add extension unless user specified something else
|
||||||
const QChar dot = QLatin1Char('.');
|
const QChar dot = QLatin1Char('.');
|
||||||
|
@@ -220,9 +220,7 @@ bool GuiAppWizard::parametrizeTemplate(const QString &templatePath, const QStrin
|
|||||||
const GuiAppParameters ¶ms,
|
const GuiAppParameters ¶ms,
|
||||||
QString *target, QString *errorMessage)
|
QString *target, QString *errorMessage)
|
||||||
{
|
{
|
||||||
QString fileName = templatePath;
|
const QString fileName = templatePath + QLatin1Char('/') + templateName;
|
||||||
fileName += QDir::separator();
|
|
||||||
fileName += templateName;
|
|
||||||
Utils::FileReader reader;
|
Utils::FileReader reader;
|
||||||
if (!reader.fetch(fileName, QIODevice::Text, errorMessage))
|
if (!reader.fetch(fileName, QIODevice::Text, errorMessage))
|
||||||
return false;
|
return false;
|
||||||
|
@@ -50,7 +50,7 @@ QString QtProjectParameters::projectPath() const
|
|||||||
{
|
{
|
||||||
QString rc = path;
|
QString rc = path;
|
||||||
if (!rc.isEmpty())
|
if (!rc.isEmpty())
|
||||||
rc += QDir::separator();
|
rc += QLatin1Char('/');
|
||||||
rc += fileName;
|
rc += fileName;
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user