logic: switched to using wstring for compiler flags
* removed getter for strings from QtDirectoryListBox because it is not used anymore * regard encoding of clang error messages
This commit is contained in:
@@ -458,12 +458,12 @@ void Application::updateTitle()
|
||||
|
||||
bool Application::checkSharedMemory()
|
||||
{
|
||||
std::string error = SharedMemory::checkSharedMemory(getUUID());
|
||||
std::wstring error = utility::decodeFromUtf8(SharedMemory::checkSharedMemory(getUUID()));
|
||||
if (error.size())
|
||||
{
|
||||
MessageStatus("Error on accessing shared memory. Indexing not possible. Please restart computer or run as admin: " + error, true).dispatch();
|
||||
MessageStatus(L"Error on accessing shared memory. Indexing not possible. Please restart computer or run as admin: " + error, true).dispatch();
|
||||
handleDialog(
|
||||
L"There was an error accessing shared memory on your computer: " + utility::decodeFromUtf8(error) + L"\n\n"
|
||||
L"There was an error accessing shared memory on your computer: " + error + L"\n\n"
|
||||
"Project indexing is not possible. Please restart your computer or try running Sourcetrail as admin. If the "
|
||||
"issue persists contact mail@sourcetrail.com");
|
||||
return false;
|
||||
|
||||
@@ -196,28 +196,28 @@ void SharedIndexerCommand::setLanguageStandard(const std::string& languageStanda
|
||||
m_languageStandard = languageStandard.c_str();
|
||||
}
|
||||
|
||||
std::vector<std::string> SharedIndexerCommand::getCompilerFlags() const
|
||||
std::vector<std::wstring> SharedIndexerCommand::getCompilerFlags() const
|
||||
{
|
||||
std::vector<std::string> result;
|
||||
std::vector<std::wstring> result;
|
||||
result.reserve(m_compilerFlags.size());
|
||||
|
||||
for (unsigned int i = 0; i < m_compilerFlags.size(); i++)
|
||||
{
|
||||
result.push_back(m_compilerFlags[i].c_str());
|
||||
result.push_back(utility::decodeFromUtf8(m_compilerFlags[i].c_str()));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void SharedIndexerCommand::setCompilerFlags(const std::vector<std::string>& compilerFlags)
|
||||
void SharedIndexerCommand::setCompilerFlags(const std::vector<std::wstring>& compilerFlags)
|
||||
{
|
||||
m_compilerFlags.clear();
|
||||
m_compilerFlags.reserve(compilerFlags.size());
|
||||
|
||||
for (const std::string& compilerFlag : compilerFlags)
|
||||
for (const std::wstring& compilerFlag : compilerFlags)
|
||||
{
|
||||
SharedMemory::String path(m_compilerFlags.get_allocator());
|
||||
path = compilerFlag.c_str();
|
||||
path = utility::encodeToUtf8(compilerFlag).c_str();
|
||||
m_compilerFlags.push_back(path);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,8 +32,8 @@ public:
|
||||
std::string getLanguageStandard() const;
|
||||
void setLanguageStandard(const std::string& languageStandard);
|
||||
|
||||
std::vector<std::string> getCompilerFlags() const;
|
||||
void setCompilerFlags(const std::vector<std::string>& compilerFlags);
|
||||
std::vector<std::wstring> getCompilerFlags() const;
|
||||
void setCompilerFlags(const std::vector<std::wstring>& compilerFlags);
|
||||
|
||||
std::vector<FilePath> getSystemHeaderSearchPaths() const;
|
||||
void setSystemHeaderSearchPaths(const std::vector<FilePath>& filePaths);
|
||||
|
||||
@@ -7,7 +7,7 @@ SourceGroupSettingsCxx::SourceGroupSettingsCxx(const std::string& id, SourceGrou
|
||||
: SourceGroupSettings(id, type, projectSettings)
|
||||
, m_headerSearchPaths(std::vector<FilePath>())
|
||||
, m_frameworkSearchPaths(std::vector<FilePath>())
|
||||
, m_compilerFlags(std::vector<std::string>())
|
||||
, m_compilerFlags(std::vector<std::wstring>())
|
||||
{
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ void SourceGroupSettingsCxx::load(std::shared_ptr<const ConfigManager> config)
|
||||
|
||||
setHeaderSearchPaths(getPathValues(key + "/header_search_paths/header_search_path", config));
|
||||
setFrameworkSearchPaths(getPathValues(key + "/framework_search_paths/framework_search_path", config));
|
||||
setCompilerFlags(getValues<std::string>(key + "/compiler_flags/compiler_flag", std::vector<std::string>(), config));
|
||||
setCompilerFlags(getValues<std::wstring>(key + "/compiler_flags/compiler_flag", std::vector<std::wstring>(), config));
|
||||
}
|
||||
|
||||
void SourceGroupSettingsCxx::save(std::shared_ptr<ConfigManager> config)
|
||||
@@ -133,12 +133,12 @@ void SourceGroupSettingsCxx::setFrameworkSearchPaths(const std::vector<FilePath>
|
||||
m_frameworkSearchPaths = frameworkSearchPaths;
|
||||
}
|
||||
|
||||
std::vector<std::string> SourceGroupSettingsCxx::getCompilerFlags() const
|
||||
std::vector<std::wstring> SourceGroupSettingsCxx::getCompilerFlags() const
|
||||
{
|
||||
return m_compilerFlags;
|
||||
}
|
||||
|
||||
void SourceGroupSettingsCxx::setCompilerFlags(const std::vector<std::string>& compilerFlags)
|
||||
void SourceGroupSettingsCxx::setCompilerFlags(const std::vector<std::wstring>& compilerFlags)
|
||||
{
|
||||
m_compilerFlags = compilerFlags;
|
||||
}
|
||||
|
||||
@@ -25,8 +25,8 @@ public:
|
||||
std::vector<FilePath> getFrameworkSearchPathsExpandedAndAbsolute() const;
|
||||
void setFrameworkSearchPaths(const std::vector<FilePath>& frameworkSearchPaths);
|
||||
|
||||
std::vector<std::string> getCompilerFlags() const;
|
||||
void setCompilerFlags(const std::vector<std::string>& compilerFlags);
|
||||
std::vector<std::wstring> getCompilerFlags() const;
|
||||
void setCompilerFlags(const std::vector<std::wstring>& compilerFlags);
|
||||
|
||||
private:
|
||||
virtual std::vector<std::wstring> getDefaultSourceExtensions() const override;
|
||||
@@ -34,7 +34,7 @@ private:
|
||||
|
||||
std::vector<FilePath> m_headerSearchPaths;
|
||||
std::vector<FilePath> m_frameworkSearchPaths;
|
||||
std::vector<std::string> m_compilerFlags;
|
||||
std::vector<std::wstring> m_compilerFlags;
|
||||
};
|
||||
|
||||
#endif // SOURCE_GROUP_SETTINGS_CXX_H
|
||||
|
||||
@@ -3,150 +3,150 @@
|
||||
#include "utility/utility.h"
|
||||
#include "utility/utilityApp.h"
|
||||
|
||||
std::vector<std::string> SourceGroupSettingsCxxEmpty::getAvailableArchTypes()
|
||||
std::vector<std::wstring> SourceGroupSettingsCxxEmpty::getAvailableArchTypes()
|
||||
{
|
||||
return {
|
||||
"aarch64",
|
||||
"aarch64_be",
|
||||
"arm",
|
||||
"armeb",
|
||||
"avr",
|
||||
"bpfel",
|
||||
"bpfeb",
|
||||
"hexagon",
|
||||
"mips",
|
||||
"mipsel",
|
||||
"mips64",
|
||||
"mips64el",
|
||||
"msp430",
|
||||
"powerpc64",
|
||||
"powerpc64le",
|
||||
"powerpc",
|
||||
"r600",
|
||||
"amdgcn",
|
||||
"riscv32",
|
||||
"riscv64",
|
||||
"sparc",
|
||||
"sparcv9",
|
||||
"sparcel",
|
||||
"s390x",
|
||||
"tce",
|
||||
"tcele",
|
||||
"thumb",
|
||||
"thumbeb",
|
||||
"i386",
|
||||
"x86_64",
|
||||
"xcore",
|
||||
"nvptx",
|
||||
"nvptx64",
|
||||
"le32",
|
||||
"le64",
|
||||
"amdil",
|
||||
"amdil64",
|
||||
"hsail",
|
||||
"hsail64",
|
||||
"spir",
|
||||
"spir64",
|
||||
"kalimba",
|
||||
"lanai",
|
||||
"shave",
|
||||
"wasm32",
|
||||
"wasm64",
|
||||
"renderscript32",
|
||||
"renderscript64",
|
||||
L"aarch64",
|
||||
L"aarch64_be",
|
||||
L"arm",
|
||||
L"armeb",
|
||||
L"avr",
|
||||
L"bpfel",
|
||||
L"bpfeb",
|
||||
L"hexagon",
|
||||
L"mips",
|
||||
L"mipsel",
|
||||
L"mips64",
|
||||
L"mips64el",
|
||||
L"msp430",
|
||||
L"powerpc64",
|
||||
L"powerpc64le",
|
||||
L"powerpc",
|
||||
L"r600",
|
||||
L"amdgcn",
|
||||
L"riscv32",
|
||||
L"riscv64",
|
||||
L"sparc",
|
||||
L"sparcv9",
|
||||
L"sparcel",
|
||||
L"s390x",
|
||||
L"tce",
|
||||
L"tcele",
|
||||
L"thumb",
|
||||
L"thumbeb",
|
||||
L"i386",
|
||||
L"x86_64",
|
||||
L"xcore",
|
||||
L"nvptx",
|
||||
L"nvptx64",
|
||||
L"le32",
|
||||
L"le64",
|
||||
L"amdil",
|
||||
L"amdil64",
|
||||
L"hsail",
|
||||
L"hsail64",
|
||||
L"spir",
|
||||
L"spir64",
|
||||
L"kalimba",
|
||||
L"lanai",
|
||||
L"shave",
|
||||
L"wasm32",
|
||||
L"wasm64",
|
||||
L"renderscript32",
|
||||
L"renderscript64",
|
||||
};
|
||||
}
|
||||
|
||||
std::vector<std::string> SourceGroupSettingsCxxEmpty::getAvailableVendorTypes()
|
||||
std::vector<std::wstring> SourceGroupSettingsCxxEmpty::getAvailableVendorTypes()
|
||||
{
|
||||
return {
|
||||
"unknown",
|
||||
"apple",
|
||||
"pc",
|
||||
"scei",
|
||||
"bgp",
|
||||
"bgq",
|
||||
"fsl",
|
||||
"ibm",
|
||||
"img",
|
||||
"mti",
|
||||
"nvidia",
|
||||
"csr",
|
||||
"myriad",
|
||||
"amd",
|
||||
"mesa"
|
||||
L"unknown",
|
||||
L"apple",
|
||||
L"pc",
|
||||
L"scei",
|
||||
L"bgp",
|
||||
L"bgq",
|
||||
L"fsl",
|
||||
L"ibm",
|
||||
L"img",
|
||||
L"mti",
|
||||
L"nvidia",
|
||||
L"csr",
|
||||
L"myriad",
|
||||
L"amd",
|
||||
L"mesa"
|
||||
};
|
||||
}
|
||||
|
||||
std::vector<std::string> SourceGroupSettingsCxxEmpty::getAvailableOsTypes()
|
||||
std::vector<std::wstring> SourceGroupSettingsCxxEmpty::getAvailableOsTypes()
|
||||
{
|
||||
return {
|
||||
"unknown",
|
||||
"cloudabi",
|
||||
"darwin",
|
||||
"dragonfly",
|
||||
"freebsd",
|
||||
"fuchsia",
|
||||
"ios",
|
||||
"kfreebsd",
|
||||
"linux",
|
||||
"lv2",
|
||||
"macosx",
|
||||
"netbsd",
|
||||
"openbsd",
|
||||
"solaris",
|
||||
"windows",
|
||||
"haiku",
|
||||
"minix",
|
||||
"rtems",
|
||||
"nacl",
|
||||
"cnk",
|
||||
"bitrig",
|
||||
"aix",
|
||||
"cuda",
|
||||
"nvcl",
|
||||
"amdhsa",
|
||||
"ps4",
|
||||
"elfiamcu",
|
||||
"tvos",
|
||||
"watchos",
|
||||
"mesa3d",
|
||||
"contiki"
|
||||
L"unknown",
|
||||
L"cloudabi",
|
||||
L"darwin",
|
||||
L"dragonfly",
|
||||
L"freebsd",
|
||||
L"fuchsia",
|
||||
L"ios",
|
||||
L"kfreebsd",
|
||||
L"linux",
|
||||
L"lv2",
|
||||
L"macosx",
|
||||
L"netbsd",
|
||||
L"openbsd",
|
||||
L"solaris",
|
||||
L"windows",
|
||||
L"haiku",
|
||||
L"minix",
|
||||
L"rtems",
|
||||
L"nacl",
|
||||
L"cnk",
|
||||
L"bitrig",
|
||||
L"aix",
|
||||
L"cuda",
|
||||
L"nvcl",
|
||||
L"amdhsa",
|
||||
L"ps4",
|
||||
L"elfiamcu",
|
||||
L"tvos",
|
||||
L"watchos",
|
||||
L"mesa3d",
|
||||
L"contiki"
|
||||
};
|
||||
}
|
||||
|
||||
std::vector<std::string> SourceGroupSettingsCxxEmpty::getAvailableEnvironmentTypes()
|
||||
std::vector<std::wstring> SourceGroupSettingsCxxEmpty::getAvailableEnvironmentTypes()
|
||||
{
|
||||
return {
|
||||
"unknown",
|
||||
"gnu",
|
||||
"gnuabi64",
|
||||
"gnueabihf",
|
||||
"gnueabi",
|
||||
"gnux32",
|
||||
"code16",
|
||||
"eabi",
|
||||
"eabihf",
|
||||
"android",
|
||||
"musl",
|
||||
"musleabi",
|
||||
"musleabihf",
|
||||
"msvc",
|
||||
"itanium",
|
||||
"cygnus",
|
||||
"amdopencl",
|
||||
"coreclr",
|
||||
"opencl"
|
||||
L"unknown",
|
||||
L"gnu",
|
||||
L"gnuabi64",
|
||||
L"gnueabihf",
|
||||
L"gnueabi",
|
||||
L"gnux32",
|
||||
L"code16",
|
||||
L"eabi",
|
||||
L"eabihf",
|
||||
L"android",
|
||||
L"musl",
|
||||
L"musleabi",
|
||||
L"musleabihf",
|
||||
L"msvc",
|
||||
L"itanium",
|
||||
L"cygnus",
|
||||
L"amdopencl",
|
||||
L"coreclr",
|
||||
L"opencl"
|
||||
};
|
||||
}
|
||||
|
||||
SourceGroupSettingsCxxEmpty::SourceGroupSettingsCxxEmpty(const std::string& id, SourceGroupType type, const ProjectSettings* projectSettings)
|
||||
: SourceGroupSettingsCxx(id, type, projectSettings)
|
||||
, m_targetOptionsEnabled(false)
|
||||
, m_targetArch("")
|
||||
, m_targetVendor("")
|
||||
, m_targetSys("")
|
||||
, m_targetAbi("")
|
||||
, m_targetArch(L"")
|
||||
, m_targetVendor(L"")
|
||||
, m_targetSys(L"")
|
||||
, m_targetAbi(L"")
|
||||
{
|
||||
}
|
||||
|
||||
@@ -161,10 +161,10 @@ void SourceGroupSettingsCxxEmpty::load(std::shared_ptr<const ConfigManager> conf
|
||||
const std::string key = s_keyPrefix + getId();
|
||||
|
||||
setTargetOptionsEnabled(getValue<bool>(key + "/cross_compilation/target_options_enabled", false, config));
|
||||
setTargetArch(getValue<std::string>(key + "/cross_compilation/target/arch", "", config));
|
||||
setTargetVendor(getValue<std::string>(key + "/cross_compilation/target/vendor", "", config));
|
||||
setTargetSys(getValue<std::string>(key + "/cross_compilation/target/sys", "", config));
|
||||
setTargetAbi(getValue<std::string>(key + "/cross_compilation/target/abi", "", config));
|
||||
setTargetArch(getValue<std::wstring>(key + "/cross_compilation/target/arch", L"", config));
|
||||
setTargetVendor(getValue<std::wstring>(key + "/cross_compilation/target/vendor", L"", config));
|
||||
setTargetSys(getValue<std::wstring>(key + "/cross_compilation/target/sys", L"", config));
|
||||
setTargetAbi(getValue<std::wstring>(key + "/cross_compilation/target/abi", L"", config));
|
||||
}
|
||||
|
||||
void SourceGroupSettingsCxxEmpty::save(std::shared_ptr<ConfigManager> config)
|
||||
@@ -201,56 +201,56 @@ void SourceGroupSettingsCxxEmpty::setTargetOptionsEnabled(bool targetOptionsEnab
|
||||
m_targetOptionsEnabled = targetOptionsEnabled;
|
||||
}
|
||||
|
||||
std::string SourceGroupSettingsCxxEmpty::getTargetArch() const
|
||||
std::wstring SourceGroupSettingsCxxEmpty::getTargetArch() const
|
||||
{
|
||||
return m_targetArch;
|
||||
}
|
||||
|
||||
void SourceGroupSettingsCxxEmpty::setTargetArch(const std::string& arch)
|
||||
void SourceGroupSettingsCxxEmpty::setTargetArch(const std::wstring& arch)
|
||||
{
|
||||
m_targetArch = arch;
|
||||
}
|
||||
|
||||
std::string SourceGroupSettingsCxxEmpty::getTargetVendor() const
|
||||
std::wstring SourceGroupSettingsCxxEmpty::getTargetVendor() const
|
||||
{
|
||||
return m_targetVendor;
|
||||
}
|
||||
|
||||
void SourceGroupSettingsCxxEmpty::setTargetVendor(const std::string& vendor)
|
||||
void SourceGroupSettingsCxxEmpty::setTargetVendor(const std::wstring& vendor)
|
||||
{
|
||||
m_targetVendor = vendor;
|
||||
}
|
||||
|
||||
std::string SourceGroupSettingsCxxEmpty::getTargetSys() const
|
||||
std::wstring SourceGroupSettingsCxxEmpty::getTargetSys() const
|
||||
{
|
||||
return m_targetSys;
|
||||
}
|
||||
|
||||
void SourceGroupSettingsCxxEmpty::setTargetSys(const std::string& sys)
|
||||
void SourceGroupSettingsCxxEmpty::setTargetSys(const std::wstring& sys)
|
||||
{
|
||||
m_targetSys = sys;
|
||||
}
|
||||
|
||||
std::string SourceGroupSettingsCxxEmpty::getTargetAbi() const
|
||||
std::wstring SourceGroupSettingsCxxEmpty::getTargetAbi() const
|
||||
{
|
||||
return m_targetAbi;
|
||||
}
|
||||
|
||||
void SourceGroupSettingsCxxEmpty::setTargetAbi(const std::string& abi)
|
||||
void SourceGroupSettingsCxxEmpty::setTargetAbi(const std::wstring& abi)
|
||||
{
|
||||
m_targetAbi = abi;
|
||||
}
|
||||
|
||||
std::string SourceGroupSettingsCxxEmpty::getTargetFlag() const
|
||||
std::wstring SourceGroupSettingsCxxEmpty::getTargetFlag() const
|
||||
{
|
||||
std::string targetFlag = "";
|
||||
std::wstring targetFlag = L"";
|
||||
if (m_targetOptionsEnabled && !m_targetArch.empty())
|
||||
{
|
||||
targetFlag = "--target=";
|
||||
targetFlag = L"--target=";
|
||||
targetFlag += m_targetArch;
|
||||
targetFlag += "-" + (m_targetVendor.empty() ? "unknown" : m_targetVendor);
|
||||
targetFlag += "-" + (m_targetSys.empty() ? "unknown" : m_targetSys);
|
||||
targetFlag += "-" + (m_targetAbi.empty() ? "unknown" : m_targetAbi);
|
||||
targetFlag += L"-" + (m_targetVendor.empty() ? L"unknown" : m_targetVendor);
|
||||
targetFlag += L"-" + (m_targetSys.empty() ? L"unknown" : m_targetSys);
|
||||
targetFlag += L"-" + (m_targetAbi.empty() ? L"unknown" : m_targetAbi);
|
||||
}
|
||||
return targetFlag;
|
||||
}
|
||||
|
||||
@@ -7,10 +7,10 @@ class SourceGroupSettingsCxxEmpty
|
||||
: public SourceGroupSettingsCxx
|
||||
{
|
||||
public:
|
||||
static std::vector<std::string> getAvailableArchTypes();
|
||||
static std::vector<std::string> getAvailableVendorTypes();
|
||||
static std::vector<std::string> getAvailableOsTypes();
|
||||
static std::vector<std::string> getAvailableEnvironmentTypes();
|
||||
static std::vector<std::wstring> getAvailableArchTypes();
|
||||
static std::vector<std::wstring> getAvailableVendorTypes();
|
||||
static std::vector<std::wstring> getAvailableOsTypes();
|
||||
static std::vector<std::wstring> getAvailableEnvironmentTypes();
|
||||
|
||||
SourceGroupSettingsCxxEmpty(const std::string& id, SourceGroupType type, const ProjectSettings* projectSettings);
|
||||
virtual ~SourceGroupSettingsCxxEmpty();
|
||||
@@ -23,26 +23,26 @@ public:
|
||||
bool getTargetOptionsEnabled() const;
|
||||
void setTargetOptionsEnabled(bool targetOptionsEnabled);
|
||||
|
||||
std::string getTargetArch() const;
|
||||
void setTargetArch(const std::string& arch);
|
||||
std::wstring getTargetArch() const;
|
||||
void setTargetArch(const std::wstring& arch);
|
||||
|
||||
std::string getTargetVendor() const;
|
||||
void setTargetVendor(const std::string& vendor);
|
||||
std::wstring getTargetVendor() const;
|
||||
void setTargetVendor(const std::wstring& vendor);
|
||||
|
||||
std::string getTargetSys() const;
|
||||
void setTargetSys(const std::string& sys);
|
||||
std::wstring getTargetSys() const;
|
||||
void setTargetSys(const std::wstring& sys);
|
||||
|
||||
std::string getTargetAbi() const;
|
||||
void setTargetAbi(const std::string& abi);
|
||||
std::wstring getTargetAbi() const;
|
||||
void setTargetAbi(const std::wstring& abi);
|
||||
|
||||
std::string getTargetFlag() const;
|
||||
std::wstring getTargetFlag() const;
|
||||
|
||||
private:
|
||||
bool m_targetOptionsEnabled;
|
||||
std::string m_targetArch;
|
||||
std::string m_targetVendor;
|
||||
std::string m_targetSys;
|
||||
std::string m_targetAbi;
|
||||
std::wstring m_targetArch;
|
||||
std::wstring m_targetVendor;
|
||||
std::wstring m_targetSys;
|
||||
std::wstring m_targetAbi;
|
||||
};
|
||||
|
||||
#endif // SOURCE_GROUP_SETTINGS_CXX_EMPTY_H
|
||||
|
||||
@@ -7,7 +7,7 @@ IndexerCommandCxx::IndexerCommandCxx(
|
||||
const FilePath& workingDirectory,
|
||||
const std::vector<FilePath>& systemHeaderSearchPaths,
|
||||
const std::vector<FilePath>& frameworkSearchPaths,
|
||||
const std::vector<std::string>& compilerFlags
|
||||
const std::vector<std::wstring>& compilerFlags
|
||||
)
|
||||
: IndexerCommand(sourceFilePath, indexedPaths, excludedPaths)
|
||||
, m_workingDirectory(workingDirectory)
|
||||
@@ -49,7 +49,7 @@ const std::vector<FilePath>& IndexerCommandCxx::getFrameworkSearchPaths() const
|
||||
return m_frameworkSearchPaths;
|
||||
}
|
||||
|
||||
const std::vector<std::string>& IndexerCommandCxx::getCompilerFlags() const
|
||||
const std::vector<std::wstring>& IndexerCommandCxx::getCompilerFlags() const
|
||||
{
|
||||
return m_compilerFlags;
|
||||
}
|
||||
|
||||
@@ -19,20 +19,20 @@ public:
|
||||
const FilePath& workingDirectory,
|
||||
const std::vector<FilePath>& systemHeaderSearchPaths,
|
||||
const std::vector<FilePath>& frameworkSearchPaths,
|
||||
const std::vector<std::string>& compilerFlags);
|
||||
const std::vector<std::wstring>& compilerFlags);
|
||||
|
||||
virtual size_t getByteSize(size_t stringSize) const override;
|
||||
|
||||
const std::vector<FilePath>& getSystemHeaderSearchPaths() const;
|
||||
const std::vector<FilePath>& getFrameworkSearchPaths() const;
|
||||
const std::vector<std::string>& getCompilerFlags() const;
|
||||
const std::vector<std::wstring>& getCompilerFlags() const;
|
||||
const FilePath& getWorkingDirectory() const;
|
||||
|
||||
private:
|
||||
FilePath m_workingDirectory;
|
||||
std::vector<FilePath> m_systemHeaderSearchPaths;
|
||||
std::vector<FilePath> m_frameworkSearchPaths;
|
||||
std::vector<std::string> m_compilerFlags;
|
||||
std::vector<std::wstring> m_compilerFlags;
|
||||
};
|
||||
|
||||
#endif // INDEXER_COMMAND_CXXL_H
|
||||
|
||||
@@ -13,7 +13,7 @@ std::vector<FilePath> IndexerCommandCxxCdb::getSourceFilesFromCDB(const FilePath
|
||||
|
||||
if (!error.empty())
|
||||
{
|
||||
const std::string message = "Loading Clang compilation database failed with error: \"" + error + "\"";
|
||||
const std::wstring message = L"Loading Clang compilation database failed with error: \"" + utility::decodeFromUtf8(error) + L"\"";
|
||||
LOG_ERROR(message);
|
||||
MessageStatus(message, true).dispatch();
|
||||
}
|
||||
@@ -44,7 +44,7 @@ IndexerCommandCxxCdb::IndexerCommandCxxCdb(
|
||||
const std::set<FilePath>& indexedPaths,
|
||||
const std::set<FilePath>& excludedPaths,
|
||||
const FilePath& workingDirectory,
|
||||
const std::vector<std::string>& compilerFlags,
|
||||
const std::vector<std::wstring>& compilerFlags,
|
||||
const std::vector<FilePath>& systemHeaderSearchPaths,
|
||||
const std::vector<FilePath>& frameworkSearchPaths
|
||||
)
|
||||
|
||||
@@ -25,7 +25,7 @@ public:
|
||||
const std::set<FilePath>& indexedPaths,
|
||||
const std::set<FilePath>& excludedPaths,
|
||||
const FilePath& workingDirectory,
|
||||
const std::vector<std::string>& compilerFlags,
|
||||
const std::vector<std::wstring>& compilerFlags,
|
||||
const std::vector<FilePath>& systemHeaderSearchPaths,
|
||||
const std::vector<FilePath>& frameworkSearchPaths);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ IndexerCommandCxxEmpty::IndexerCommandCxxEmpty(
|
||||
const std::string& languageStandard,
|
||||
const std::vector<FilePath>& systemHeaderSearchPaths,
|
||||
const std::vector<FilePath>& frameworkSearchPaths,
|
||||
const std::vector<std::string>& compilerFlags
|
||||
const std::vector<std::wstring>& compilerFlags
|
||||
)
|
||||
: IndexerCommandCxx(sourceFilePath, indexedPaths, excludedPaths, workingDirectory, systemHeaderSearchPaths, frameworkSearchPaths, compilerFlags)
|
||||
, m_languageStandard(languageStandard)
|
||||
|
||||
@@ -19,7 +19,7 @@ public:
|
||||
const std::string& languageStandard,
|
||||
const std::vector<FilePath>& systemHeaderSearchPaths,
|
||||
const std::vector<FilePath>& frameworkSearchPaths,
|
||||
const std::vector<std::string>& compilerFlags);
|
||||
const std::vector<std::wstring>& compilerFlags);
|
||||
|
||||
virtual IndexerCommandType getIndexerCommandType() const override;
|
||||
virtual size_t getByteSize(size_t stringSize) const override;
|
||||
|
||||
@@ -75,9 +75,12 @@ void CxxParser::buildIndex(std::shared_ptr<IndexerCommandCxxCdb> indexerCommand)
|
||||
clang::tooling::CompileCommand compileCommand;
|
||||
compileCommand.Filename = indexerCommand->getSourceFilePath().str();
|
||||
compileCommand.Directory = indexerCommand->getWorkingDirectory().str();
|
||||
compileCommand.CommandLine = utility::concat(indexerCommand->getCompilerFlags(), getCommandlineArgumentsEssential(
|
||||
std::vector<std::string>(), indexerCommand->getSystemHeaderSearchPaths(), indexerCommand->getFrameworkSearchPaths()
|
||||
));
|
||||
compileCommand.CommandLine = utility::concat(
|
||||
utility::convert<std::wstring, std::string>(indexerCommand->getCompilerFlags(), [](const std::wstring & flag) { return utility::encodeToUtf8(flag); }),
|
||||
getCommandlineArgumentsEssential(
|
||||
std::vector<std::wstring>(), indexerCommand->getSystemHeaderSearchPaths(), indexerCommand->getFrameworkSearchPaths()
|
||||
)
|
||||
);
|
||||
|
||||
if (!utility::isPrefix("-", compileCommand.CommandLine.front()))
|
||||
{
|
||||
@@ -93,14 +96,17 @@ void CxxParser::buildIndex(std::shared_ptr<IndexerCommandCxxEmpty> indexerComman
|
||||
{
|
||||
clang::tooling::CompileCommand compileCommand;
|
||||
compileCommand.Filename = utility::encodeToUtf8(indexerCommand->getSourceFilePath().wstr());
|
||||
compileCommand.Directory = indexerCommand->getWorkingDirectory().str();
|
||||
compileCommand.CommandLine = prependSyntaxOnlyToolArgs(appendFilePath(getCommandlineArguments(indexerCommand), utility::encodeToUtf8(indexerCommand->getSourceFilePath().wstr())));
|
||||
compileCommand.Directory = utility::encodeToUtf8(indexerCommand->getWorkingDirectory().wstr());
|
||||
compileCommand.CommandLine = prependSyntaxOnlyToolArgs(appendFilePath(
|
||||
getCommandlineArguments(indexerCommand),
|
||||
utility::encodeToUtf8(indexerCommand->getSourceFilePath().wstr())
|
||||
));
|
||||
|
||||
CxxCompilationDatabaseSingle compilationDatabase(compileCommand);
|
||||
runTool(&compilationDatabase, indexerCommand->getSourceFilePath());
|
||||
}
|
||||
|
||||
void CxxParser::buildIndex(const std::string& fileName, std::shared_ptr<TextAccess> fileContent, std::vector<std::string> compilerFlags)
|
||||
void CxxParser::buildIndex(const std::wstring& fileName, std::shared_ptr<TextAccess> fileContent, std::vector<std::wstring> compilerFlags)
|
||||
{
|
||||
std::shared_ptr<CanonicalFilePathCache> canonicalFilePathCache = std::make_shared<CanonicalFilePathCache>();
|
||||
|
||||
@@ -114,7 +120,7 @@ void CxxParser::buildIndex(const std::string& fileName, std::shared_ptr<TextAcce
|
||||
actionFactory.create(),
|
||||
fileContent->getText(),
|
||||
args,
|
||||
fileName
|
||||
utility::encodeToUtf8(fileName)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -133,7 +139,7 @@ void CxxParser::runTool(clang::tooling::CompilationDatabase* compilationDatabase
|
||||
}
|
||||
|
||||
std::vector<std::string> CxxParser::getCommandlineArgumentsEssential(
|
||||
const std::vector<std::string>& compilerFlags, const std::vector<FilePath>& systemHeaderSearchPaths, const std::vector<FilePath>& frameworkSearchPaths
|
||||
const std::vector<std::wstring>& compilerFlags, const std::vector<FilePath>& systemHeaderSearchPaths, const std::vector<FilePath>& frameworkSearchPaths
|
||||
) const {
|
||||
std::vector<std::string> args;
|
||||
|
||||
@@ -156,18 +162,21 @@ std::vector<std::string> CxxParser::getCommandlineArgumentsEssential(
|
||||
// This option tells clang just to continue parsing no matter how manny errors have been thrown.
|
||||
args.push_back("-ferror-limit=0");
|
||||
|
||||
args.insert(args.end(), compilerFlags.begin(), compilerFlags.end());
|
||||
for (const std::wstring& compilerFlag: compilerFlags)
|
||||
{
|
||||
args.push_back(utility::encodeToUtf8(compilerFlag));
|
||||
}
|
||||
|
||||
for (const FilePath& path: systemHeaderSearchPaths)
|
||||
for (const FilePath& path : systemHeaderSearchPaths)
|
||||
{
|
||||
args.push_back("-isystem");
|
||||
args.push_back(path.str());
|
||||
args.push_back(utility::encodeToUtf8(path.wstr()));
|
||||
}
|
||||
|
||||
for (const FilePath& path: frameworkSearchPaths)
|
||||
{
|
||||
args.push_back("-iframework");
|
||||
args.push_back(path.str());
|
||||
args.push_back(utility::encodeToUtf8(path.wstr()));
|
||||
}
|
||||
|
||||
return args;
|
||||
|
||||
@@ -26,13 +26,13 @@ public:
|
||||
|
||||
void buildIndex(std::shared_ptr<IndexerCommandCxxCdb> indexerCommand);
|
||||
void buildIndex(std::shared_ptr<IndexerCommandCxxEmpty> indexerCommand);
|
||||
void buildIndex(const std::string& fileName, std::shared_ptr<TextAccess> fileContent, std::vector<std::string> compilerFlags = {});
|
||||
void buildIndex(const std::wstring& fileName, std::shared_ptr<TextAccess> fileContent, std::vector<std::wstring> compilerFlags = {});
|
||||
|
||||
private:
|
||||
void runTool(clang::tooling::CompilationDatabase* compilationDatabase, const FilePath& sourceFilePath);
|
||||
|
||||
std::vector<std::string> getCommandlineArgumentsEssential(
|
||||
const std::vector<std::string>& compilerFlags,
|
||||
const std::vector<std::wstring>& compilerFlags,
|
||||
const std::vector<FilePath>& systemHeaderSearchPaths,
|
||||
const std::vector<FilePath>& frameworkSearchPaths) const;
|
||||
std::vector<std::string> getCommandlineArguments(std::shared_ptr<IndexerCommandCxxEmpty> indexerCommand) const;
|
||||
|
||||
@@ -66,7 +66,7 @@ std::vector<std::shared_ptr<IndexerCommand>> SourceGroupCxxCdb::getIndexerComman
|
||||
utility::append(frameworkSearchPaths, m_settings->getFrameworkSearchPathsExpandedAndAbsolute());
|
||||
utility::append(frameworkSearchPaths, appSettings->getFrameworkSearchPathsExpanded());
|
||||
|
||||
const std::vector<std::string> compilerFlags = m_settings->getCompilerFlags();
|
||||
const std::vector<std::wstring> compilerFlags = m_settings->getCompilerFlags();
|
||||
|
||||
std::set<FilePath> indexedPaths = getIndexedPaths();
|
||||
std::set<FilePath> excludedPaths = getExcludedPaths();
|
||||
@@ -87,7 +87,7 @@ std::vector<std::shared_ptr<IndexerCommand>> SourceGroupCxxCdb::getIndexerComman
|
||||
|
||||
if (!error.empty())
|
||||
{
|
||||
const std::string message = "Loading Clang compilation database failed with error: \"" + error + "\"";
|
||||
const std::wstring message = L"Loading Clang compilation database failed with error: \"" + utility::decodeFromUtf8(error) + L"\"";
|
||||
LOG_ERROR(message);
|
||||
MessageStatus(message, true).dispatch();
|
||||
}
|
||||
@@ -110,7 +110,10 @@ std::vector<std::shared_ptr<IndexerCommand>> SourceGroupCxxCdb::getIndexerComman
|
||||
indexedPaths,
|
||||
excludedPaths,
|
||||
FilePath(command.Directory),
|
||||
utility::concat(command.CommandLine, compilerFlags),
|
||||
utility::concat(
|
||||
utility::convert<std::string, std::wstring>(command.CommandLine, [](const std::string& arg) { return utility::decodeFromUtf8(arg); }),
|
||||
compilerFlags
|
||||
),
|
||||
systemHeaderSearchPaths,
|
||||
frameworkSearchPaths
|
||||
));
|
||||
|
||||
@@ -40,9 +40,9 @@ std::vector<std::shared_ptr<IndexerCommand>> SourceGroupCxxEmpty::getIndexerComm
|
||||
utility::append(frameworkSearchPaths, m_settings->getFrameworkSearchPathsExpandedAndAbsolute());
|
||||
utility::append(frameworkSearchPaths, appSettings->getFrameworkSearchPathsExpanded());
|
||||
|
||||
std::vector<std::string> compilerFlags;
|
||||
std::vector<std::wstring> compilerFlags;
|
||||
{
|
||||
const std::string targetFlag = m_settings->getTargetFlag();
|
||||
const std::wstring targetFlag = m_settings->getTargetFlag();
|
||||
if (!targetFlag.empty())
|
||||
{
|
||||
compilerFlags.push_back(targetFlag);
|
||||
|
||||
@@ -240,7 +240,7 @@ void QtDirectoryListBox::dropEvent(QDropEvent *event)
|
||||
std::vector<FilePath> QtDirectoryListBox::getList()
|
||||
{
|
||||
std::vector<FilePath> list;
|
||||
for (const std::wstring& s : getWStringList())
|
||||
for (const std::wstring& s : getStringList())
|
||||
{
|
||||
list.push_back(FilePath(s));
|
||||
}
|
||||
@@ -254,10 +254,10 @@ void QtDirectoryListBox::setList(const std::vector<FilePath>& list, bool readOnl
|
||||
{
|
||||
strList.push_back(path.wstr());
|
||||
}
|
||||
setWStringList(strList, readOnly);
|
||||
setStringList(strList, readOnly);
|
||||
}
|
||||
|
||||
std::vector<std::wstring> QtDirectoryListBox::getWStringList()
|
||||
std::vector<std::wstring> QtDirectoryListBox::getStringList()
|
||||
{
|
||||
std::vector<std::wstring> list;
|
||||
for (int i = 0; i < m_list->count(); ++i)
|
||||
@@ -268,7 +268,7 @@ std::vector<std::wstring> QtDirectoryListBox::getWStringList()
|
||||
return list;
|
||||
}
|
||||
|
||||
void QtDirectoryListBox::setWStringList(const std::vector<std::wstring>& list, bool readOnly)
|
||||
void QtDirectoryListBox::setStringList(const std::vector<std::wstring>& list, bool readOnly)
|
||||
{
|
||||
clear();
|
||||
|
||||
@@ -285,26 +285,6 @@ void QtDirectoryListBox::setWStringList(const std::vector<std::wstring>& list, b
|
||||
m_relativeRootDirectory = root;
|
||||
}
|
||||
|
||||
std::vector<std::string> QtDirectoryListBox::getStringList()
|
||||
{
|
||||
std::vector<std::string> list;
|
||||
for (std::wstring s: getWStringList())
|
||||
{
|
||||
list.push_back(utility::encodeToUtf8(s));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
void QtDirectoryListBox::setStringList(const std::vector<std::string>& list, bool readOnly)
|
||||
{
|
||||
std::vector<std::wstring> wlist;
|
||||
for (std::string s : list)
|
||||
{
|
||||
wlist.push_back(utility::decodeFromUtf8(s));
|
||||
}
|
||||
setWStringList(wlist);
|
||||
}
|
||||
|
||||
QtListItemWidget* QtDirectoryListBox::addListBoxItemWithText(const QString& text)
|
||||
{
|
||||
QtListItemWidget* widget = addListBoxItem();
|
||||
|
||||
@@ -59,11 +59,8 @@ public:
|
||||
std::vector<FilePath> getList();
|
||||
void setList(const std::vector<FilePath>& list, bool readOnly = false);
|
||||
|
||||
std::vector<std::wstring> getWStringList();
|
||||
void setWStringList(const std::vector<std::wstring>& list, bool readOnly = false);
|
||||
|
||||
std::vector<std::string> getStringList();
|
||||
void setStringList(const std::vector<std::string>& list, bool readOnly = false);
|
||||
std::vector<std::wstring> getStringList();
|
||||
void setStringList(const std::vector<std::wstring>& list, bool readOnly = false);
|
||||
|
||||
QtListItemWidget* addListBoxItemWithText(const QString& text);
|
||||
|
||||
|
||||
@@ -644,10 +644,10 @@ void QtProjectWizzard::selectedProjectType(SourceGroupType sourceGroupType)
|
||||
m_newSourceGroupSettings = std::make_shared<SourceGroupSettingsCxxEmpty>(sourceGroupId, sourceGroupType, m_projectSettings.get());
|
||||
if (applicationSettingsContainVisualStudioHeaderSearchPaths())
|
||||
{
|
||||
std::vector<std::string> flags;
|
||||
flags.push_back("-fms-extensions");
|
||||
flags.push_back("-fms-compatibility");
|
||||
flags.push_back("-fms-compatibility-version=19");
|
||||
std::vector<std::wstring> flags;
|
||||
flags.push_back(L"-fms-extensions");
|
||||
flags.push_back(L"-fms-compatibility");
|
||||
flags.push_back(L"-fms-compatibility-version=19");
|
||||
std::dynamic_pointer_cast<SourceGroupSettingsCxx>(m_newSourceGroupSettings)->setCompilerFlags(flags);
|
||||
}
|
||||
emptySourceGroup();
|
||||
|
||||
+16
-16
@@ -61,11 +61,11 @@ void QtProjectWizzardContentCrossCompilationOptions::populate(QGridLayout* layou
|
||||
QLabel* label = new QLabel("Architecture:");
|
||||
|
||||
m_arch = new QComboBox();
|
||||
std::vector<std::string> archTypes = SourceGroupSettingsCxxEmpty::getAvailableArchTypes();
|
||||
std::vector<std::wstring> archTypes = SourceGroupSettingsCxxEmpty::getAvailableArchTypes();
|
||||
std::sort(archTypes.begin(), archTypes.end());
|
||||
for (size_t i = 0; i < archTypes.size(); i++)
|
||||
{
|
||||
m_arch->insertItem(i, archTypes[i].c_str());
|
||||
m_arch->insertItem(i, QString::fromStdWString(archTypes[i]));
|
||||
}
|
||||
m_arch->setCurrentIndex(m_arch->findText("x86_64"));
|
||||
|
||||
@@ -77,11 +77,11 @@ void QtProjectWizzardContentCrossCompilationOptions::populate(QGridLayout* layou
|
||||
QLabel* label = new QLabel("Vendor:");
|
||||
|
||||
m_vendor = new QComboBox();
|
||||
std::vector<std::string> vendorTypes = SourceGroupSettingsCxxEmpty::getAvailableVendorTypes();
|
||||
std::vector<std::wstring> vendorTypes = SourceGroupSettingsCxxEmpty::getAvailableVendorTypes();
|
||||
std::sort(vendorTypes.begin() + 1, vendorTypes.end());
|
||||
for (size_t i = 0; i < vendorTypes.size(); i++)
|
||||
{
|
||||
m_vendor->insertItem(i, vendorTypes[i].c_str());
|
||||
m_vendor->insertItem(i, QString::fromStdWString(vendorTypes[i]));
|
||||
}
|
||||
|
||||
gridLayout->addWidget(label, 1, 0, Qt::AlignRight);
|
||||
@@ -92,11 +92,11 @@ void QtProjectWizzardContentCrossCompilationOptions::populate(QGridLayout* layou
|
||||
QLabel* label = new QLabel("OS:");
|
||||
|
||||
m_sys = new QComboBox();
|
||||
std::vector<std::string> osTypes = SourceGroupSettingsCxxEmpty::getAvailableOsTypes();
|
||||
std::vector<std::wstring> osTypes = SourceGroupSettingsCxxEmpty::getAvailableOsTypes();
|
||||
std::sort(osTypes.begin() + 1, osTypes.end());
|
||||
for (size_t i = 0; i < osTypes.size(); i++)
|
||||
{
|
||||
m_sys->insertItem(i, osTypes[i].c_str());
|
||||
m_sys->insertItem(i, QString::fromStdWString(osTypes[i]));
|
||||
}
|
||||
|
||||
gridLayout->addWidget(label, 2, 0, Qt::AlignRight);
|
||||
@@ -107,11 +107,11 @@ void QtProjectWizzardContentCrossCompilationOptions::populate(QGridLayout* layou
|
||||
QLabel* label = new QLabel("Environment:");
|
||||
|
||||
m_abi = new QComboBox();
|
||||
std::vector<std::string> environmentTypes = SourceGroupSettingsCxxEmpty::getAvailableEnvironmentTypes();
|
||||
std::vector<std::wstring> environmentTypes = SourceGroupSettingsCxxEmpty::getAvailableEnvironmentTypes();
|
||||
std::sort(environmentTypes.begin() + 1, environmentTypes.end());
|
||||
for (size_t i = 0; i < environmentTypes.size(); i++)
|
||||
{
|
||||
m_abi->insertItem(i, environmentTypes[i].c_str());
|
||||
m_abi->insertItem(i, QString::fromStdWString(environmentTypes[i]));
|
||||
}
|
||||
|
||||
gridLayout->addWidget(label, 3, 0, Qt::AlignRight);
|
||||
@@ -132,10 +132,10 @@ void QtProjectWizzardContentCrossCompilationOptions::load()
|
||||
if (std::shared_ptr<SourceGroupSettingsCxxEmpty> cxxSettings = std::dynamic_pointer_cast<SourceGroupSettingsCxxEmpty>(m_sourceGroupSettings))
|
||||
{
|
||||
m_useTargetOptions->setChecked(cxxSettings->getTargetOptionsEnabled());
|
||||
m_arch->setCurrentText(QString::fromStdString(cxxSettings->getTargetArch()));
|
||||
m_vendor->setCurrentText(QString::fromStdString(cxxSettings->getTargetVendor()));
|
||||
m_sys->setCurrentText(QString::fromStdString(cxxSettings->getTargetSys()));
|
||||
m_abi->setCurrentText(QString::fromStdString(cxxSettings->getTargetAbi()));
|
||||
m_arch->setCurrentText(QString::fromStdWString(cxxSettings->getTargetArch()));
|
||||
m_vendor->setCurrentText(QString::fromStdWString(cxxSettings->getTargetVendor()));
|
||||
m_sys->setCurrentText(QString::fromStdWString(cxxSettings->getTargetSys()));
|
||||
m_abi->setCurrentText(QString::fromStdWString(cxxSettings->getTargetAbi()));
|
||||
}
|
||||
|
||||
updateTargetOptionsEnabled();
|
||||
@@ -146,10 +146,10 @@ void QtProjectWizzardContentCrossCompilationOptions::save()
|
||||
if (std::shared_ptr<SourceGroupSettingsCxxEmpty> cxxSettings = std::dynamic_pointer_cast<SourceGroupSettingsCxxEmpty>(m_sourceGroupSettings))
|
||||
{
|
||||
cxxSettings->setTargetOptionsEnabled(m_useTargetOptions->isChecked());
|
||||
cxxSettings->setTargetArch(m_arch->currentText().toStdString());
|
||||
cxxSettings->setTargetVendor(m_vendor->currentText().toStdString());
|
||||
cxxSettings->setTargetSys(m_sys->currentText().toStdString());
|
||||
cxxSettings->setTargetAbi(m_abi->currentText().toStdString());
|
||||
cxxSettings->setTargetArch(m_arch->currentText().toStdWString());
|
||||
cxxSettings->setTargetVendor(m_vendor->currentText().toStdWString());
|
||||
cxxSettings->setTargetSys(m_sys->currentText().toStdWString());
|
||||
cxxSettings->setTargetAbi(m_abi->currentText().toStdWString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,10 +27,10 @@ void QtProjectWizzardContentExtensions::populate(QGridLayout* layout, int& row)
|
||||
|
||||
void QtProjectWizzardContentExtensions::load()
|
||||
{
|
||||
m_sourceList->setWStringList(m_settings->getSourceExtensions());
|
||||
m_sourceList->setStringList(m_settings->getSourceExtensions());
|
||||
}
|
||||
|
||||
void QtProjectWizzardContentExtensions::save()
|
||||
{
|
||||
m_settings->setSourceExtensions(m_sourceList->getWStringList());
|
||||
m_settings->setSourceExtensions(m_sourceList->getStringList());
|
||||
}
|
||||
|
||||
@@ -647,7 +647,7 @@ void QtProjectWizzardContentPathsHeaderSearch::finishedAcceptDetectedIncludePath
|
||||
const std::vector<std::wstring> detectedPaths = utility::split<std::vector<std::wstring>>(m_filesDialog->getText(), L"\n");
|
||||
closedFilesDialog();
|
||||
|
||||
std::vector<std::wstring> headerSearchPaths = m_list->getWStringList();
|
||||
std::vector<std::wstring> headerSearchPaths = m_list->getStringList();
|
||||
|
||||
headerSearchPaths.reserve(headerSearchPaths.size() + detectedPaths.size());
|
||||
for (const std::wstring& detectedPath : detectedPaths)
|
||||
@@ -658,7 +658,7 @@ void QtProjectWizzardContentPathsHeaderSearch::finishedAcceptDetectedIncludePath
|
||||
}
|
||||
}
|
||||
|
||||
m_list->setWStringList(headerSearchPaths);
|
||||
m_list->setStringList(headerSearchPaths);
|
||||
}
|
||||
|
||||
void QtProjectWizzardContentPathsHeaderSearch::closedPathsDialog()
|
||||
|
||||
@@ -145,7 +145,7 @@ private:
|
||||
"c++1z",
|
||||
utility::concat(std::vector<FilePath> { projectDataSrcRoot }, ApplicationSettings::getInstance()->getHeaderSearchPathsExpanded()),
|
||||
ApplicationSettings::getInstance()->getFrameworkSearchPathsExpanded(),
|
||||
std::vector<std::string> { "--target=x86_64-pc-windows-msvc" }
|
||||
std::vector<std::wstring> { L"--target=x86_64-pc-windows-msvc" }
|
||||
);
|
||||
|
||||
parser.buildIndex(command);
|
||||
|
||||
@@ -3840,7 +3840,7 @@ public:
|
||||
" mov x, eax\n"
|
||||
"}\n"
|
||||
"}\n",
|
||||
{ "--target=i686-pc-windows-msvc" }
|
||||
{ L"--target=i686-pc-windows-msvc" }
|
||||
);
|
||||
|
||||
TS_ASSERT(utility::containsElement<std::wstring>(
|
||||
@@ -4002,7 +4002,7 @@ public:
|
||||
"c++1z",
|
||||
std::vector<FilePath>(),
|
||||
std::vector<FilePath>(),
|
||||
std::vector<std::string>()
|
||||
std::vector<std::wstring>()
|
||||
);
|
||||
|
||||
std::shared_ptr<TestParserClient> client = std::make_shared<TestParserClient>();
|
||||
@@ -4083,12 +4083,12 @@ public:
|
||||
// }
|
||||
|
||||
private:
|
||||
std::shared_ptr<TestParserClient> parseCode(std::string code, std::vector<std::string> compilerFlags = {})
|
||||
std::shared_ptr<TestParserClient> parseCode(std::string code, std::vector<std::wstring> compilerFlags = {})
|
||||
{
|
||||
std::shared_ptr<TestFileRegister> fileRegister = std::make_shared<TestFileRegister>();
|
||||
std::shared_ptr<TestParserClient> parserClient = std::make_shared<TestParserClient>();
|
||||
CxxParser parser(parserClient, fileRegister);
|
||||
parser.buildIndex("input.cc", TextAccess::createFromString(code), utility::concat(compilerFlags, std::vector<std::string>(1, "-std=c++1z")));
|
||||
parser.buildIndex(L"input.cc", TextAccess::createFromString(code), utility::concat(compilerFlags, std::vector<std::wstring>(1, L"-std=c++1z")));
|
||||
return parserClient;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user