CppTools: Prioritize project parts from active project

...when selecting one for the editor document.

Change-Id: I85066aaa0862870cb2db2fb2cb40c2b2c23b2cac
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Nikolai Kosjar
2016-12-16 13:12:04 +01:00
parent b8b6f348e0
commit 566ab175b3
16 changed files with 119 additions and 35 deletions

View File

@@ -33,6 +33,8 @@
#include <QObject>
#include <QMutex>
namespace ProjectExplorer { class Project; }
namespace CppTools {
class CPPTOOLS_EXPORT BaseEditorDocumentParser : public QObject
@@ -58,8 +60,11 @@ public:
Configuration configuration() const;
void setConfiguration(const Configuration &configuration);
void update(const WorkingCopy &workingCopy);
void update(const QFutureInterface<void> &future, const WorkingCopy &workingCopy);
void update(const WorkingCopy &workingCopy,
const ProjectExplorer::Project *activeProject);
void update(const QFutureInterface<void> &future,
const WorkingCopy &workingCopy,
const ProjectExplorer::Project *activeProject);
ProjectPart::Ptr projectPart() const;
@@ -73,13 +78,15 @@ protected:
static ProjectPart::Ptr determineProjectPart(const QString &filePath,
const Configuration &config,
const State &state);
const State &state,
const ProjectExplorer::Project *activeProject);
mutable QMutex m_stateAndConfigurationMutex;
private:
virtual void updateHelper(const QFutureInterface<void> &future,
const WorkingCopy &workingCopy) = 0;
const WorkingCopy &workingCopy,
const ProjectExplorer::Project *activeProject) = 0;
const QString m_filePath;
Configuration m_configuration;