ui: removed 'Save Project' and 'Save Project As' actions

* removed save actions from menu in QtMainWindow
* removed MessageSaveProject and all Listeners
* updated project loading to ask whether old project and db file should be kept at old location
* fixed crash for missing include files
* fixed simple header search within source paths was broken
This commit is contained in:
Eberhard Graether
2016-06-28 15:59:22 +02:00
parent 2cf033d43a
commit 8ca54f2091
16 changed files with 123 additions and 202 deletions
+3 -35
View File
@@ -91,36 +91,6 @@ Project::ProjectState Project::reload()
return m_state;
}
bool Project::save(const FilePath& projectSettingsFile)
{
bool differentLocation = (projectSettingsFile != m_projectSettingsFilepath);
if (!projectSettingsFile.empty())
{
setProjectSettingsFilePath(projectSettingsFile);
}
else
{
differentLocation = false;
}
if (m_projectSettingsFilepath.empty())
{
return false;
}
ProjectSettings settings;
settings.load(m_projectSettingsFilepath);
if (differentLocation || settings != *ProjectSettings::getInstance().get())
{
ProjectSettings::getInstance()->save(m_projectSettingsFilepath);
LOG_INFO_STREAM(<< "ProjectSettings saved to file: " << m_projectSettingsFilepath.str());
}
return true;
}
void Project::clearStorage()
{
if (m_state == PROJECT_OUTVERSIONED)
@@ -291,14 +261,12 @@ Parser::Arguments Project::getParserArguments() const
if (projSettings->getUseSourcePathsForHeaderSearch())
{
std::vector<FilePath> headerSearchSubPaths;
for (FilePath p : projSettings->getAbsoluteHeaderSearchPaths())
for (FilePath p : projSettings->getSourcePaths())
{
std::vector<FilePath> tempPaths = FileSystem::getSubDirectories(p);
headerSearchSubPaths.insert( headerSearchSubPaths.end(), tempPaths.begin(), tempPaths.end() );
utility::append(headerSearchSubPaths, FileSystem::getSubDirectories(p));
}
std::unique(headerSearchSubPaths.begin(),headerSearchSubPaths.end());
utility::append(args.systemHeaderSearchPaths, headerSearchSubPaths);
utility::append(args.systemHeaderSearchPaths, utility::unique(headerSearchSubPaths));
}
utility::append(args.frameworkSearchPaths, projSettings->getAbsoluteFrameworkSearchPaths());