diff options
Diffstat (limited to 'qmake/library/qmakeevaluator.cpp')
-rw-r--r-- | qmake/library/qmakeevaluator.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/qmake/library/qmakeevaluator.cpp b/qmake/library/qmakeevaluator.cpp index 12e2827788..a87155cdef 100644 --- a/qmake/library/qmakeevaluator.cpp +++ b/qmake/library/qmakeevaluator.cpp @@ -271,13 +271,13 @@ void QMakeEvaluator::skipHashStr(const ushort *&tokPtr) // FIXME: this should not build new strings for direct sections. // Note that the E_SPRINTF and E_LIST implementations rely on the deep copy. -ProStringList QMakeEvaluator::split_value_list(const QStringRef &vals, const ProFile *source) +ProStringList QMakeEvaluator::split_value_list(const QStringRef &vals, int source) { QString build; ProStringList ret; if (!source) - source = currentProFile(); + source = currentFileId(); const QChar *vals_data = vals.data(); const int vals_len = vals.length(); @@ -1299,7 +1299,7 @@ void QMakeEvaluator::setupProject() { setTemplate(); ProValueMap &vars = m_valuemapStack.top(); - ProFile *proFile = currentProFile(); + int proFile = currentFileId(); vars[ProKey("TARGET")] << ProString(QFileInfo(currentFileName()).baseName()).setSource(proFile); vars[ProKey("_PRO_FILE_")] << ProString(currentFileName()).setSource(proFile); vars[ProKey("_PRO_FILE_PWD_")] << ProString(currentDirectory()).setSource(proFile); @@ -1593,6 +1593,14 @@ ProFile *QMakeEvaluator::currentProFile() const return 0; } +int QMakeEvaluator::currentFileId() const +{ + ProFile *pro = currentProFile(); + if (pro) + return pro->id(); + return 0; +} + QString QMakeEvaluator::currentFileName() const { ProFile *pro = currentProFile(); |