summaryrefslogtreecommitdiff
path: root/src/plugins/cppeditor/cpppreprocessordialog.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2014-08-21 15:22:08 +0200
committerNikolai Kosjar <nikolai.kosjar@digia.com>2014-08-28 18:58:26 +0200
commit8b2cff4b8b79e83451666d8b3b08ad971c1c2121 (patch)
tree86baf32b03ba8a71ce11d16955609d5c915cc245 /src/plugins/cppeditor/cpppreprocessordialog.cpp
parenteedd47657f864fe20929c8bac6b346c75486c2ac (diff)
downloadqt-creator-8b2cff4b8b79e83451666d8b3b08ad971c1c2121.tar.gz
C++: introduce the unique ProjectPart::id()
And change the code-model inspector dialog to use them in the ProjectParts tab to sync the master/details view, and in the CppPreProcessorDialog to save/reload the selected part. Change-Id: I7cc8ac1c21d31122f8650985d0b85177ebabdfb8 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Diffstat (limited to 'src/plugins/cppeditor/cpppreprocessordialog.cpp')
-rw-r--r--src/plugins/cppeditor/cpppreprocessordialog.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/cppeditor/cpppreprocessordialog.cpp b/src/plugins/cppeditor/cpppreprocessordialog.cpp
index 0366069ae6..d470bdeec7 100644
--- a/src/plugins/cppeditor/cpppreprocessordialog.cpp
+++ b/src/plugins/cppeditor/cpppreprocessordialog.cpp
@@ -57,7 +57,7 @@ CppPreProcessorDialog::CppPreProcessorDialog(QWidget *parent, const QString &fil
CppSnippetProvider().decorateEditor(m_ui->editWidget);
- const QString &currentProjectFile = ProjectExplorer::SessionManager::value(
+ const QString &projectPartIdToUse = ProjectExplorer::SessionManager::value(
QLatin1String(Constants::CPP_PREPROCESSOR_PROJECT_PREFIX) + m_filePath).toString();
int currentIndex = 0;
@@ -70,7 +70,7 @@ CppPreProcessorDialog::CppPreProcessorDialog(QWidget *parent, const QString &fil
addition.projectPart = projectPart;
addition.additionalDirectives = ProjectExplorer::SessionManager::value(
projectPart->projectFile + QLatin1Char(',') + m_filePath).toString();
- if (projectPart->projectFile == currentProjectFile)
+ if (projectPart->id() == projectPartIdToUse)
currentIndex = m_ui->projectComboBox->count() - 1;
m_partAdditions << addition;
}
@@ -95,7 +95,7 @@ int CppPreProcessorDialog::exec()
ProjectExplorer::SessionManager::setValue(
QLatin1String(Constants::CPP_PREPROCESSOR_PROJECT_PREFIX) + m_filePath,
- m_partAdditions[m_ui->projectComboBox->currentIndex()].projectPart->projectFile);
+ m_partAdditions[m_ui->projectComboBox->currentIndex()].projectPart->id());
foreach (ProjectPartAddition partAddition, m_partAdditions) {
const QString &previousDirectives = ProjectExplorer::SessionManager::value(