forked from qt-creator/qt-creator
CppTools: Fix using updated project part
1. Open a project consisting of two subprojects referencing the same source file. 2. Open the source file. 3. Click '#' in the editor toolbar and select the second project (part). 4. Update the project file, e.g. add a define ==> Editor does not reflect the added define This is due to comparing project part pointers. Fix by using the project part id that remains stable across project manager updates. Change-Id: Ifd1a113e55ebe2ecf036cd7caafdbfd6e4cdf415 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -49,7 +49,7 @@ public:
|
||||
struct Configuration {
|
||||
bool usePrecompiledHeaders = false;
|
||||
QByteArray editorDefines;
|
||||
ProjectPart::Ptr manuallySetProjectPart;
|
||||
QString preferredProjectPartId;
|
||||
};
|
||||
|
||||
struct UpdateParams {
|
||||
@@ -95,7 +95,7 @@ protected:
|
||||
void setState(const State &state);
|
||||
|
||||
static ProjectPartInfo determineProjectPart(const QString &filePath,
|
||||
const Configuration &config,
|
||||
const QString &preferredProjectPartId,
|
||||
const ProjectPartInfo ¤tProjectPartInfo,
|
||||
const ProjectExplorer::Project *activeProject,
|
||||
Language languagePreference,
|
||||
|
||||
Reference in New Issue
Block a user