Commit 5490b12c authored by Igor Kushnir's avatar Igor Kushnir

ParseProjectJob: revert all requests in doKill(), not destructor

ParseProjectJob finishes normally when all its requests are satisfied by
BackgroundParser, in which case there is nothing to revert. Both
ProjectController and RunController abort parsing by killing the job.

Apart from not doing unnecessary work when ParseProjectJob finishes
normally, this commit prevents a hypothetical crash in case the
BackgroundParser's destruction precedes a ParseProjectJob's destruction.
parent f0464333
......@@ -56,13 +56,11 @@ public:
bool ParseProjectJob::doKill()
qCDebug(LANGUAGE) << "stopping project parse job";
return true;
ParseProjectJob::~ParseProjectJob() = default;
ParseProjectJob::ParseProjectJob(IProject* project, bool forceUpdate, bool parseAllProjectSources)
: d_ptr{new ParseProjectJobPrivate(forceUpdate, parseAllProjectSources)}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment