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:
@@ -65,7 +65,7 @@ void QtProjectWizzard::newProject()
|
||||
setup();
|
||||
}
|
||||
|
||||
void QtProjectWizzard::newProjectFromCDB(const FilePath& filePath, const std::vector<FilePath>& headerPaths)
|
||||
void QtProjectWizzard::newProjectFromCDB(const FilePath& filePath)
|
||||
{
|
||||
if (!m_projectSettings)
|
||||
{
|
||||
@@ -91,16 +91,11 @@ void QtProjectWizzard::newProjectFromCDB(const FilePath& filePath, const std::ve
|
||||
std::shared_ptr<SourceGroupSettingsCxxCdb> sourceGroupSettings =
|
||||
std::make_shared<SourceGroupSettingsCxxCdb>(utility::getUuidString(), m_projectSettings.get());
|
||||
sourceGroupSettings->setCompilationDatabasePath(filePath);
|
||||
sourceGroupSettings->setSourcePaths(headerPaths);
|
||||
m_newSourceGroupSettings = sourceGroupSettings;
|
||||
|
||||
emptySourceGroupCDBVS();
|
||||
}
|
||||
|
||||
void QtProjectWizzard::refreshProjectFromSolution(const std::string& ideId, const std::string& solutionPath)
|
||||
{
|
||||
}
|
||||
|
||||
void QtProjectWizzard::editProject(const FilePath& settingsPath)
|
||||
{
|
||||
std::shared_ptr<ProjectSettings> settings = std::make_shared<ProjectSettings>(settingsPath);
|
||||
|
||||
@@ -29,8 +29,7 @@ public:
|
||||
public slots:
|
||||
void newProject();
|
||||
|
||||
void newProjectFromCDB(const FilePath& filePath, const std::vector<FilePath>& headerPaths);
|
||||
void refreshProjectFromSolution(const std::string& ideId, const std::string& solutionPath);
|
||||
void newProjectFromCDB(const FilePath& filePath);
|
||||
|
||||
void editProject(const FilePath& settingsPath);
|
||||
void editProject(std::shared_ptr<ProjectSettings> settings);
|
||||
|
||||
@@ -27,10 +27,10 @@ void QtProjectWizzardContentExtensions::populate(QGridLayout* layout, int& row)
|
||||
|
||||
void QtProjectWizzardContentExtensions::load()
|
||||
{
|
||||
m_sourceList->setStringList(m_settings->getSourceExtensions());
|
||||
m_sourceList->setWStringList(m_settings->getSourceExtensions());
|
||||
}
|
||||
|
||||
void QtProjectWizzardContentExtensions::save()
|
||||
{
|
||||
m_settings->setSourceExtensions(m_sourceList->getStringList());
|
||||
m_settings->setSourceExtensions(m_sourceList->getWStringList());
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ bool QtProjectWizzardContentPaths::check()
|
||||
{
|
||||
if (!expandedPath.exists())
|
||||
{
|
||||
missingPaths.append((expandedPath.str() + "\n").c_str());
|
||||
missingPaths.append(QString::fromStdWString(expandedPath.wstr() + L"\n"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -94,7 +94,7 @@ bool QtProjectWizzardContentPaths::check()
|
||||
}
|
||||
}
|
||||
|
||||
if (expandedPaths.size() && expandedPaths.size() == existingCount)
|
||||
if (!expandedPaths.empty() && expandedPaths.size() == existingCount)
|
||||
{
|
||||
existingPaths.push_back(path);
|
||||
}
|
||||
@@ -648,13 +648,13 @@ void QtProjectWizzardContentPathsHeaderSearch::finishedSelectDetectIncludesRootP
|
||||
|
||||
void QtProjectWizzardContentPathsHeaderSearch::finishedAcceptDetectedIncludePathsDialog()
|
||||
{
|
||||
const std::vector<std::string> detectedPaths = utility::splitToVector(m_filesDialog->getText(), "\n");
|
||||
const std::vector<std::wstring> detectedPaths = utility::split<std::vector<std::wstring>>(m_filesDialog->getWText(), L"\n");
|
||||
closedFilesDialog();
|
||||
|
||||
std::vector<std::string> headerSearchPaths = m_list->getStringList();
|
||||
std::vector<std::wstring> headerSearchPaths = m_list->getWStringList();
|
||||
|
||||
headerSearchPaths.reserve(headerSearchPaths.size() + detectedPaths.size());
|
||||
for (const std::string& detectedPath : detectedPaths)
|
||||
for (const std::wstring& detectedPath : detectedPaths)
|
||||
{
|
||||
if (!detectedPath.empty())
|
||||
{
|
||||
@@ -662,7 +662,7 @@ void QtProjectWizzardContentPathsHeaderSearch::finishedAcceptDetectedIncludePath
|
||||
}
|
||||
}
|
||||
|
||||
m_list->setStringList(headerSearchPaths);
|
||||
m_list->setWStringList(headerSearchPaths);
|
||||
}
|
||||
|
||||
void QtProjectWizzardContentPathsHeaderSearch::closedPathsDialog()
|
||||
|
||||
Reference in New Issue
Block a user