src: string replace fix in filepath

This commit is contained in:
Andreas Stallinger
2016-04-26 08:51:46 +02:00
parent f9aed67776
commit c3a148833b
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -123,7 +123,7 @@ FilePath FilePath::expandEnvironmentVariables() const
LOG_ERROR(match[1].str() + " is no a environment variable");
return FilePath();
}
text.replace( match[0].first, match[0].second, s);
text.replace( match.position(0), match.length(0), s);
}
return FilePath(text);
@@ -159,7 +159,7 @@ bool QtProjectWizzardContentData::check()
return false;
}
if (!FilePath(m_projectFileLocation->getText().toStdString()).exists())
if (!FilePath(m_projectFileLocation->getText().toStdString()).expandEnvironmentVariables().exists())
{
QMessageBox msgBox;
msgBox.setText("The specified location does not exist.");