logic: Added migration for C/C++ standard to ProjectSettings

* extended SettingsMigrator to support lambdas
* added PROJECT_STATE_NEEDS_MIGRATION and dialog for loading old project files
This commit is contained in:
Eberhard Graether
2016-09-15 12:23:18 +02:00
parent 73ef7c1bcb
commit 5680bf7b25
12 changed files with 261 additions and 82 deletions
+2 -27
View File
@@ -10,38 +10,13 @@ int StorageProvider::getStorageCount() const
void StorageProvider::pushIndexerTarget(std::shared_ptr<IntermediateStorage> storage)
{
const std::size_t storageSize = storage->getSourceLocationCount();
std::list<std::shared_ptr<IntermediateStorage>>::iterator it;
std::lock_guard<std::mutex> lock(m_storagesMutex);
for (it = m_storages.begin(); it != m_storages.end(); it++)
{
if ((*it)->getSourceLocationCount() < storageSize)
{
break;
}
}
m_storages.insert(it, storage);
m_storages.push_back(storage);
}
std::shared_ptr<IntermediateStorage> StorageProvider::popIndexerTarget()
{
std::shared_ptr<IntermediateStorage> ret;
{
std::lock_guard<std::mutex> lock(m_storagesMutex);
if (m_storages.size() > 1)
{
std::list<std::shared_ptr<IntermediateStorage>>::iterator it = m_storages.begin();
it++;
ret = *it;
m_storages.erase(it);
}
else
{
ret = std::make_shared<IntermediateStorage>();
}
}
return ret;
return std::make_shared<IntermediateStorage>();;
}
std::shared_ptr<IntermediateStorage> StorageProvider::popInjectionSource()