ui: added check for entered project name to be a valid file name

This commit is contained in:
mlangkabel
2018-07-24 11:02:13 +02:00
parent ac31bb6779
commit 86b0583b6b
@@ -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;