logic: Fixed FilePath to not expand environment variables in constructor
This commit is contained in:
@@ -92,6 +92,34 @@ QSize QtProjectWizzardContentPaths::preferredWindowSize() const
|
||||
return QSize(750, 500);
|
||||
}
|
||||
|
||||
bool QtProjectWizzardContentPaths::check()
|
||||
{
|
||||
QString missingPaths;
|
||||
for (FilePath f : m_list->getList())
|
||||
{
|
||||
f = f.expandEnvironmentVariables();
|
||||
|
||||
if (!f.exists())
|
||||
{
|
||||
if (!missingPaths.isEmpty())
|
||||
{
|
||||
missingPaths.append("\n");
|
||||
}
|
||||
missingPaths.append(f.str().c_str());
|
||||
}
|
||||
|
||||
if (!missingPaths.isEmpty())
|
||||
{
|
||||
QMessageBox msgBox;
|
||||
msgBox.setText("These paths do not exist:\n" + missingPaths);
|
||||
msgBox.exec();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void QtProjectWizzardContentPaths::setInfo(const QString& title, const QString& description, const QString& help)
|
||||
{
|
||||
m_titleString = title;
|
||||
@@ -208,27 +236,8 @@ bool QtProjectWizzardContentPathsSource::check()
|
||||
msgBox.exec();
|
||||
return false;
|
||||
}
|
||||
QString missingPaths;
|
||||
for(FilePath f : m_list->getList())
|
||||
{
|
||||
if(!f.exists())
|
||||
{
|
||||
if(!missingPaths.isEmpty())
|
||||
{
|
||||
missingPaths.append("\n");
|
||||
}
|
||||
missingPaths.append(f.expandEnvironmentVariables().str().c_str());
|
||||
}
|
||||
if(!missingPaths.isEmpty())
|
||||
{
|
||||
QMessageBox msgBox;
|
||||
msgBox.setText("The following paths do not exist:\n" + missingPaths );
|
||||
msgBox.exec();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
return QtProjectWizzardContentPaths::check();
|
||||
}
|
||||
|
||||
QStringList QtProjectWizzardContentPathsSource::getFileNames() const
|
||||
@@ -309,11 +318,6 @@ QtProjectWizzardContentPathsCDBHeader::QtProjectWizzardContentPathsCDBHeader(
|
||||
);
|
||||
}
|
||||
|
||||
bool QtProjectWizzardContentPathsCDBHeader::check()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
QStringList QtProjectWizzardContentPathsCDBHeader::getFileNames() const
|
||||
{
|
||||
return getSourceFileNames(true);
|
||||
|
||||
Reference in New Issue
Block a user