logic: used wstring in FilePath constructor

* used wstring in FilePath constructor where easily possible
* added FilePath concatenate method that accepts string parameter
* implemented using only wstring in MessageStatus
* used wstring in config
This commit is contained in:
mlangkabel
2018-01-30 11:00:23 +01:00
parent 143cf6a02d
commit 0dda63f7ae
157 changed files with 1230 additions and 945 deletions
+5 -10
View File
@@ -13,7 +13,7 @@
#include "utility/utilityUuid.h"
const size_t ProjectSettings::VERSION = 4;
const char PROJECT_FILE_EXTENSION[] = ".srctrlprj";
const wchar_t PROJECT_FILE_EXTENSION[] = L".srctrlprj";
LanguageType ProjectSettings::getLanguageOfProject(const FilePath& filePath)
{
@@ -48,11 +48,6 @@ ProjectSettings::ProjectSettings(const FilePath& projectFilePath)
setFilePath(projectFilePath);
}
ProjectSettings::ProjectSettings(std::string projectName, const FilePath& projectFileLocation)
{
setProjectFilePath(projectName, projectFileLocation);
}
ProjectSettings::~ProjectSettings()
{
}
@@ -114,14 +109,14 @@ FilePath ProjectSettings::getProjectFilePath() const
return getFilePath();
}
void ProjectSettings::setProjectFilePath(std::string projectName, const FilePath& projectFileLocation)
void ProjectSettings::setProjectFilePath(std::wstring projectName, const FilePath& projectFileLocation)
{
setFilePath(FilePath(projectFileLocation.str() + "/" + projectName + PROJECT_FILE_EXTENSION));
setFilePath(projectFileLocation.getConcatenated(L"/" + projectName + PROJECT_FILE_EXTENSION));
}
std::string ProjectSettings::getProjectName() const
std::wstring ProjectSettings::getProjectName() const
{
return getFilePath().withoutExtension().fileName();
return getFilePath().withoutExtension().wFileName();
}
FilePath ProjectSettings::getProjectDirectoryPath() const