src: fixed crash when indexing in headless mode
This commit is contained in:
@@ -145,7 +145,8 @@ void QtDialogView::hideProgressDialog()
|
||||
}
|
||||
|
||||
void QtDialogView::startIndexingDialog(
|
||||
Project* project, const std::vector<RefreshMode>& enabledModes, const RefreshInfo& info)
|
||||
Project* project, const std::vector<RefreshMode>& enabledModes, const RefreshInfo& info,
|
||||
std::function<void(const RefreshInfo& info)> onStartIndexing)
|
||||
{
|
||||
m_refreshInfos.clear();
|
||||
|
||||
@@ -206,7 +207,7 @@ void QtDialogView::startIndexingDialog(
|
||||
Task::dispatch(std::make_shared<TaskLambda>(
|
||||
[=]()
|
||||
{
|
||||
project->buildIndex(info, this);
|
||||
onStartIndexing(info);
|
||||
}
|
||||
));
|
||||
|
||||
|
||||
@@ -40,7 +40,8 @@ public:
|
||||
void hideProgressDialog() override;
|
||||
|
||||
void startIndexingDialog(
|
||||
Project* project, const std::vector<RefreshMode>& enabledModes, const RefreshInfo& info) override;
|
||||
Project* project, const std::vector<RefreshMode>& enabledModes, const RefreshInfo& info,
|
||||
std::function<void(const RefreshInfo& info)> onStartIndexing) override;
|
||||
void updateIndexingDialog(
|
||||
size_t startedFileCount, size_t finishedFileCount, size_t totalFileCount, const std::vector<FilePath>& sourcePaths) override;
|
||||
DatabasePolicy finishedIndexingDialog(
|
||||
|
||||
Reference in New Issue
Block a user