diff options
author | Eike Ziller <eike.ziller@nokia.com> | 2012-04-26 07:06:04 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@nokia.com> | 2012-04-26 07:06:04 +0200 |
commit | 71d9f33bef895a4ba030ffb0cdadc1bd1d36fdd5 (patch) | |
tree | e87efbaa99ab367c0b3aea8a68470686138736da /src/plugins/qt4projectmanager/qt4nodes.cpp | |
parent | d6d04d67864db86faba4a3daf62bd3665466e7b9 (diff) | |
parent | 4674d46197e8511a4ecdfcb00bf71b48401dc173 (diff) | |
download | qt-creator-71d9f33bef895a4ba030ffb0cdadc1bd1d36fdd5.tar.gz |
Merge remote-tracking branch 'origin/2.5'
Diffstat (limited to 'src/plugins/qt4projectmanager/qt4nodes.cpp')
-rw-r--r-- | src/plugins/qt4projectmanager/qt4nodes.cpp | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/src/plugins/qt4projectmanager/qt4nodes.cpp b/src/plugins/qt4projectmanager/qt4nodes.cpp index 930e53021e..065594ff38 100644 --- a/src/plugins/qt4projectmanager/qt4nodes.cpp +++ b/src/plugins/qt4projectmanager/qt4nodes.cpp @@ -1863,18 +1863,9 @@ void Qt4ProFileNode::applyEvaluate(EvalResult evalResult, bool async) newVarValues[DefinesVar] = m_readerExact->values(QLatin1String("DEFINES")); newVarValues[IncludePathVar] = includePaths(m_readerExact); newVarValues[CppFlagsVar] = m_readerExact->values("QMAKE_CXXFLAGS"); - newVarValues[CppHeaderVar] = m_readerExact->absoluteFileValues(QLatin1String("HEADERS"), - m_projectDir, - QStringList() << 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[CppHeaderVar] = fileListForVar(m_readerExact, m_readerCumulative, QLatin1String("HEADERS"), m_projectDir); + newVarValues[CppSourceVar] = fileListForVar(m_readerExact, m_readerCumulative, QLatin1String("SOURCES"), m_projectDir); + newVarValues[ObjCSourceVar] = fileListForVar(m_readerExact, m_readerCumulative, QLatin1String("OBJECTIVE_SOURCES"), m_projectDir); newVarValues[UiDirVar] = QStringList() << uiDirPath(m_readerExact); newVarValues[MocDirVar] = QStringList() << mocDirPath(m_readerExact); newVarValues[PkgConfigVar] = m_readerExact->values(QLatin1String("PKGCONFIG")); @@ -1925,6 +1916,23 @@ void Qt4ProFileNode::applyEvaluate(EvalResult evalResult, bool async) 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 // It does so by storing a modification time for each ui file we know about. |