ui: added check for entered project name to be a valid file name
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "qt/window/project_wizzard/QtProjectWizzardContentProjectData.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
#include <boost/filesystem/path.hpp>
|
||||
|
||||
#include "settings/ProjectSettings.h"
|
||||
#include "utility/file/FileSystem.h"
|
||||
@@ -79,6 +80,14 @@ bool QtProjectWizzardContentProjectData::check()
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!boost::filesystem::portable_file_name(m_projectName->text().toStdString()))
|
||||
{
|
||||
QMessageBox msgBox;
|
||||
msgBox.setText("The provided project name is not a valid file name. Please adjust the name accordingly.");
|
||||
msgBox.exec();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_projectFileLocation->getText().isEmpty())
|
||||
{
|
||||
QMessageBox msgBox;
|
||||
|
||||
Reference in New Issue
Block a user