C++: introduce a project config file field in the projectPart.

This field is used by the generic project manager which passes the
".config" file in it. The advantage is that both the SnapshotUpdater and
the clang code model do not need to do anything smart, but can pass it
directly to the preprocessor.

Task-number: QTCREATORBUG-11390
Change-Id: I44fc7b20afd28fb59608412f2cce86af6f7e7d6b
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
Erik Verbruggen
2014-02-05 16:44:35 +01:00
parent 36dccb42fa
commit 346e84d219
10 changed files with 62 additions and 26 deletions

View File

@@ -218,15 +218,6 @@ void GenericProject::parseProject(RefreshOptions options)
// TODO: Possibly load some configuration from the project file
//QSettings projectInfo(m_fileName, QSettings::IniFormat);
m_defines.clear();
QFile configFile(configFileName());
if (configFile.open(QFile::ReadOnly)) {
// convert from local/file encoding to UTF-8
QTextStream configStream(&configFile);
m_defines = configStream.readAll().toUtf8();
}
}
if (options & Files)
@@ -265,7 +256,7 @@ void GenericProject::refresh(RefreshOptions options)
}
part->cxxVersion = CppTools::ProjectPart::CXX11; // assume C++11
part->projectDefines += m_defines;
part->projectConfigFile = configFileName();
// ### add _defines.
@@ -348,11 +339,6 @@ QStringList GenericProject::files() const
return m_files;
}
QByteArray GenericProject::defines() const
{
return m_defines;
}
QString GenericProject::displayName() const
{
return m_projectName;