src: fixed crash when indexing in headless mode

This commit is contained in:
mlangkabel
2018-07-23 14:20:16 +02:00
parent c523f1bd8b
commit 637857fb56
7 changed files with 16 additions and 11 deletions
+3 -3
View File
@@ -225,7 +225,7 @@ void Project::load()
}
}
void Project::refresh(RefreshMode refreshMode, DialogView* dialogView)
void Project::refresh(RefreshMode refreshMode, std::shared_ptr<DialogView> dialogView)
{
if (m_isIndexing)
{
@@ -345,7 +345,7 @@ void Project::refresh(RefreshMode refreshMode, DialogView* dialogView)
enabledModes.insert(enabledModes.end(), { REFRESH_UPDATED_FILES, REFRESH_UPDATED_AND_INCOMPLETE_FILES });
}
dialogView->startIndexingDialog(this, enabledModes, info);
dialogView->startIndexingDialog(this, enabledModes, info, [this, dialogView](const RefreshInfo& info) { buildIndex(info, dialogView); });
}
else
{
@@ -371,7 +371,7 @@ RefreshInfo Project::getRefreshInfo(RefreshMode mode) const
}
}
void Project::buildIndex(const RefreshInfo& info, DialogView* dialogView)
void Project::buildIndex(const RefreshInfo& info, std::shared_ptr<DialogView> dialogView)
{
if (m_isIndexing)
{