forked from qt-creator/qt-creator
Qt4Project code model: Also include files from cumulative parse
Task-number: QTCREATORBUG-7321 Change-Id: I3232c8618d13830caf5a511765eea80df9c7449b Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Daniel Teske <daniel.teske@nokia.com> Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
@@ -1856,18 +1856,9 @@ void Qt4ProFileNode::applyEvaluate(EvalResult evalResult, bool async)
|
|||||||
newVarValues[DefinesVar] = m_readerExact->values(QLatin1String("DEFINES"));
|
newVarValues[DefinesVar] = m_readerExact->values(QLatin1String("DEFINES"));
|
||||||
newVarValues[IncludePathVar] = includePaths(m_readerExact);
|
newVarValues[IncludePathVar] = includePaths(m_readerExact);
|
||||||
newVarValues[CppFlagsVar] = m_readerExact->values("QMAKE_CXXFLAGS");
|
newVarValues[CppFlagsVar] = m_readerExact->values("QMAKE_CXXFLAGS");
|
||||||
newVarValues[CppHeaderVar] = m_readerExact->absoluteFileValues(QLatin1String("HEADERS"),
|
newVarValues[CppHeaderVar] = fileListForVar(m_readerExact, m_readerCumulative, QLatin1String("HEADERS"), m_projectDir);
|
||||||
m_projectDir,
|
newVarValues[CppSourceVar] = fileListForVar(m_readerExact, m_readerCumulative, QLatin1String("SOURCES"), m_projectDir);
|
||||||
QStringList() << m_projectDir,
|
newVarValues[ObjCSourceVar] = fileListForVar(m_readerExact, m_readerCumulative, QLatin1String("OBJECTIVE_SOURCES"), m_projectDir);
|
||||||
0);
|
|
||||||
newVarValues[CppSourceVar] = m_readerExact->absoluteFileValues(QLatin1String("SOURCES"),
|
|
||||||
m_projectDir,
|
|
||||||
QStringList() << m_projectDir,
|
|
||||||
0);
|
|
||||||
newVarValues[ObjCSourceVar] = m_readerExact->absoluteFileValues(QLatin1String("OBJECTIVE_SOURCES"),
|
|
||||||
m_projectDir,
|
|
||||||
QStringList() << m_projectDir,
|
|
||||||
0);
|
|
||||||
newVarValues[UiDirVar] = QStringList() << uiDirPath(m_readerExact);
|
newVarValues[UiDirVar] = QStringList() << uiDirPath(m_readerExact);
|
||||||
newVarValues[MocDirVar] = QStringList() << mocDirPath(m_readerExact);
|
newVarValues[MocDirVar] = QStringList() << mocDirPath(m_readerExact);
|
||||||
newVarValues[PkgConfigVar] = m_readerExact->values(QLatin1String("PKGCONFIG"));
|
newVarValues[PkgConfigVar] = m_readerExact->values(QLatin1String("PKGCONFIG"));
|
||||||
@@ -1918,6 +1909,23 @@ void Qt4ProFileNode::applyEvaluate(EvalResult evalResult, bool async)
|
|||||||
m_readerCumulative = 0;
|
m_readerCumulative = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QStringList Qt4ProFileNode::fileListForVar(QtSupport::ProFileReader *readerExact, QtSupport::ProFileReader *readerCumulative,
|
||||||
|
const QString &varName, const QString &projectDir) const
|
||||||
|
{
|
||||||
|
QStringList result;
|
||||||
|
result = readerExact->absoluteFileValues(varName,
|
||||||
|
projectDir,
|
||||||
|
QStringList() << projectDir,
|
||||||
|
0);
|
||||||
|
if (readerCumulative)
|
||||||
|
result += readerCumulative->absoluteFileValues(varName,
|
||||||
|
projectDir,
|
||||||
|
QStringList() << projectDir,
|
||||||
|
0);
|
||||||
|
result.removeDuplicates();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
// This function is triggered after a build, and updates the state ui files
|
// This function is triggered after a build, and updates the state ui files
|
||||||
// It does so by storing a modification time for each ui file we know about.
|
// It does so by storing a modification time for each ui file we know about.
|
||||||
|
|
||||||
|
|||||||
@@ -393,6 +393,8 @@ private:
|
|||||||
void createUiCodeModelSupport();
|
void createUiCodeModelSupport();
|
||||||
QStringList updateUiFiles();
|
QStringList updateUiFiles();
|
||||||
|
|
||||||
|
QStringList fileListForVar(QtSupport::ProFileReader *readerExact, QtSupport::ProFileReader *readerCumulative,
|
||||||
|
const QString &varName, const QString &projectDir) const;
|
||||||
QString uiDirPath(QtSupport::ProFileReader *reader) const;
|
QString uiDirPath(QtSupport::ProFileReader *reader) const;
|
||||||
QString mocDirPath(QtSupport::ProFileReader *reader) const;
|
QString mocDirPath(QtSupport::ProFileReader *reader) const;
|
||||||
QStringList includePaths(QtSupport::ProFileReader *reader) const;
|
QStringList includePaths(QtSupport::ProFileReader *reader) const;
|
||||||
|
|||||||
Reference in New Issue
Block a user