Do not create parse jobs while the background parser is suspended

Authored by mwolff on Nov 19 2017, 4:16 PM.

Description

Do not create parse jobs while the background parser is suspended

Suspending only stopped the timer and suspended the thread weaver
queue. This is not enough: When startTimer is called the next time,
e.g. via ::addDocument, it would still trigger a call of
parseDocumentsInternal and eventually the creation of a parse job.
That one wouldn't be able to start working, as the queue is suspended.
But for clang parse jobs, it would already try to look for the
foreground parse environment (i.e. include paths and such). A future
patch will suspend the background parser while the core is being
initialized, which ensures that we won't create parse jobs with
broken environments at startup.

Subscribers: kdevelop-devel

Differential Revision: https://phabricator.kde.org/D8906

Details