logic: fixed recent clearing issue (introduced in cad064b9)
* fixed order so that clearing is done before saving the project settings in database
This commit is contained in:
@@ -335,10 +335,6 @@ void Project::buildIndex(const RefreshInfo& info, DialogView* dialogView)
|
||||
|
||||
dialogView->showUnknownProgressDialog("Preparing Indexing", "Setting up Indexers");
|
||||
|
||||
m_storageCache->clear();
|
||||
|
||||
m_storage->setProjectSettingsText(TextAccess::createFromFile(getProjectSettingsFilePath())->getText());
|
||||
|
||||
std::shared_ptr<TaskGroupSequence> taskSequential = std::make_shared<TaskGroupSequence>();
|
||||
|
||||
if (info.mode == REFRESH_ALL_FILES)
|
||||
@@ -347,13 +343,16 @@ void Project::buildIndex(const RefreshInfo& info, DialogView* dialogView)
|
||||
}
|
||||
else if (info.filesToClear.size())
|
||||
{
|
||||
// add task for clearing the database
|
||||
taskSequential->addTask(std::make_shared<TaskCleanStorage>(
|
||||
m_storage.get(),
|
||||
utility::toVector(info.filesToClear)
|
||||
));
|
||||
}
|
||||
|
||||
m_storageCache->clear();
|
||||
|
||||
m_storage->setProjectSettingsText(TextAccess::createFromFile(getProjectSettingsFilePath())->getText());
|
||||
|
||||
std::shared_ptr<IndexerCommandList> indexerCommandList = std::make_shared<IndexerCommandList>();
|
||||
for (const std::shared_ptr<SourceGroup>& sourceGroup : m_sourceGroups)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user