forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user