logic: more wstring usages
* removed header paths from VS Project setup message since VS doesn't send these anymore * implemented using wstring in IDE communication * fixed retrieving filepaths from QtDirectoryListbox that contain special characters * use wstring for source extensions * added special character as file extension to FileManagerTestSuite
This commit is contained in:
@@ -13,7 +13,7 @@ SourceGroupSettings::SourceGroupSettings(const std::string& id, SourceGroupType
|
||||
, m_standard("")
|
||||
, m_sourcePaths(std::vector<FilePath>())
|
||||
, m_excludePaths(std::vector<FilePath>())
|
||||
, m_sourceExtensions(std::vector<std::string>())
|
||||
, m_sourceExtensions(std::vector<std::wstring>())
|
||||
{
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ void SourceGroupSettings::load(std::shared_ptr<const ConfigManager> config)
|
||||
setStandard(getValue<std::string>(key + "/standard", "", config));
|
||||
setSourcePaths(getPathValues(key + "/source_paths/source_path", config));
|
||||
setExcludePaths(getPathValues(key + "/exclude_paths/exclude_path", config));
|
||||
setSourceExtensions(getValues(key + "/source_extensions/source_extension", std::vector<std::string>(), config));
|
||||
setSourceExtensions(getValues(key + "/source_extensions/source_extension", std::vector<std::wstring>(), config));
|
||||
}
|
||||
|
||||
void SourceGroupSettings::save(std::shared_ptr<ConfigManager> config)
|
||||
@@ -158,7 +158,7 @@ void SourceGroupSettings::setExcludePaths(const std::vector<FilePath>& excludePa
|
||||
m_excludePaths = excludePaths;
|
||||
}
|
||||
|
||||
std::vector<std::string> SourceGroupSettings::getSourceExtensions() const
|
||||
std::vector<std::wstring> SourceGroupSettings::getSourceExtensions() const
|
||||
{
|
||||
if (m_sourceExtensions.empty())
|
||||
{
|
||||
@@ -167,7 +167,7 @@ std::vector<std::string> SourceGroupSettings::getSourceExtensions() const
|
||||
return m_sourceExtensions;
|
||||
}
|
||||
|
||||
void SourceGroupSettings::setSourceExtensions(const std::vector<std::string>& sourceExtensions)
|
||||
void SourceGroupSettings::setSourceExtensions(const std::vector<std::wstring>& sourceExtensions)
|
||||
{
|
||||
m_sourceExtensions = sourceExtensions;
|
||||
}
|
||||
|
||||
@@ -50,8 +50,8 @@ public:
|
||||
std::vector<FilePath> getExcludePathsExpandedAndAbsolute() const;
|
||||
void setExcludePaths(const std::vector<FilePath>& excludePaths);
|
||||
|
||||
std::vector<std::string> getSourceExtensions() const;
|
||||
void setSourceExtensions(const std::vector<std::string>& sourceExtensions);
|
||||
std::vector<std::wstring> getSourceExtensions() const;
|
||||
void setSourceExtensions(const std::vector<std::wstring>& sourceExtensions);
|
||||
|
||||
protected:
|
||||
template<typename T>
|
||||
@@ -73,7 +73,7 @@ protected:
|
||||
const ProjectSettings* m_projectSettings;
|
||||
|
||||
private:
|
||||
virtual std::vector<std::string> getDefaultSourceExtensions() const = 0;
|
||||
virtual std::vector<std::wstring> getDefaultSourceExtensions() const = 0;
|
||||
virtual std::string getDefaultStandard() const = 0;
|
||||
|
||||
std::string m_id;
|
||||
@@ -84,7 +84,7 @@ private:
|
||||
std::string m_standard;
|
||||
std::vector<FilePath> m_sourcePaths;
|
||||
std::vector<FilePath> m_excludePaths;
|
||||
std::vector<std::string> m_sourceExtensions;
|
||||
std::vector<std::wstring> m_sourceExtensions;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
|
||||
@@ -143,19 +143,19 @@ void SourceGroupSettingsCxx::setCompilerFlags(const std::vector<std::string>& co
|
||||
m_compilerFlags = compilerFlags;
|
||||
}
|
||||
|
||||
std::vector<std::string> SourceGroupSettingsCxx::getDefaultSourceExtensions() const
|
||||
std::vector<std::wstring> SourceGroupSettingsCxx::getDefaultSourceExtensions() const
|
||||
{
|
||||
std::vector<std::string> defaultValues;
|
||||
std::vector<std::wstring> defaultValues;
|
||||
|
||||
switch (getType())
|
||||
{
|
||||
case SOURCE_GROUP_CPP_EMPTY:
|
||||
defaultValues.push_back(".cpp");
|
||||
defaultValues.push_back(".cxx");
|
||||
defaultValues.push_back(".cc");
|
||||
defaultValues.push_back(L".cpp");
|
||||
defaultValues.push_back(L".cxx");
|
||||
defaultValues.push_back(L".cc");
|
||||
break;
|
||||
case SOURCE_GROUP_C_EMPTY:
|
||||
defaultValues.push_back(".c");
|
||||
defaultValues.push_back(L".c");
|
||||
break;
|
||||
case SOURCE_GROUP_CXX_CDB:
|
||||
default:
|
||||
|
||||
@@ -29,7 +29,7 @@ public:
|
||||
void setCompilerFlags(const std::vector<std::string>& compilerFlags);
|
||||
|
||||
private:
|
||||
virtual std::vector<std::string> getDefaultSourceExtensions() const override;
|
||||
virtual std::vector<std::wstring> getDefaultSourceExtensions() const override;
|
||||
virtual std::string getDefaultStandard() const override;
|
||||
|
||||
std::vector<FilePath> m_headerSearchPaths;
|
||||
|
||||
@@ -74,9 +74,9 @@ void SourceGroupSettingsJava::setClasspath(const std::vector<FilePath>& classpat
|
||||
{
|
||||
m_classpath = classpath;
|
||||
}
|
||||
std::vector<std::string> SourceGroupSettingsJava::getDefaultSourceExtensions() const
|
||||
std::vector<std::wstring> SourceGroupSettingsJava::getDefaultSourceExtensions() const
|
||||
{
|
||||
return std::vector<std::string>(1, ".java");
|
||||
return { L".java" };
|
||||
}
|
||||
|
||||
std::string SourceGroupSettingsJava::getDefaultStandard() const
|
||||
|
||||
@@ -28,7 +28,7 @@ public:
|
||||
void setClasspath(const std::vector<FilePath>& classpath);
|
||||
|
||||
private:
|
||||
virtual std::vector<std::string> getDefaultSourceExtensions() const override;
|
||||
virtual std::vector<std::wstring> getDefaultSourceExtensions() const override;
|
||||
virtual std::string getDefaultStandard() const override;
|
||||
|
||||
bool m_useJreSystemLibrary;
|
||||
|
||||
Reference in New Issue
Block a user