summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakumi ASAKI <asaki@sra.co.jp>2016-01-21 10:59:25 +0900
committerTakumi ASAKI <takumi.asaki@gmail.com>2016-01-27 04:04:27 +0000
commit1715ea336efd8cc57eae65fcdf7d49153d424ea9 (patch)
treed89cb6d20a2249906e9ab8bd02444ea610c9d250
parentd3bb2ae020410f486642d63552edb16545ded07b (diff)
Use QMakeVfs to test existence in pro file evaluator
Change-Id: I5e8f93e78c12413b0ca86f0f5132585c527b7a5f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
-rw-r--r--src/linguist/shared/profileevaluator.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/linguist/shared/profileevaluator.cpp b/src/linguist/shared/profileevaluator.cpp
index 21fc698ed..f850f3c1c 100644
--- a/src/linguist/shared/profileevaluator.cpp
+++ b/src/linguist/shared/profileevaluator.cpp
@@ -35,6 +35,7 @@
#include "qmakeglobals.h"
#include "ioutils.h"
+#include "qmakevfs.h"
#include <QDir>
@@ -130,29 +131,28 @@ QStringList ProFileEvaluator::absoluteFileValues(
foreach (const QString &el, pro ? values(variable, pro) : values(variable)) {
QString absEl;
if (IoUtils::isAbsolutePath(el)) {
- const QString elWithSysroot = sysrootify(el, baseDirectory);
- if (IoUtils::exists(elWithSysroot)) {
- result << QDir::cleanPath(elWithSysroot);
+ const QString elWithSysroot = QDir::cleanPath(sysrootify(el, baseDirectory));
+ if (d->m_vfs->exists(elWithSysroot)) {
+ result << elWithSysroot;
goto next;
}
absEl = elWithSysroot;
} else {
foreach (const QString &dir, searchDirs) {
- QString fn = dir + QLatin1Char('/') + el;
- if (IoUtils::exists(fn)) {
- result << QDir::cleanPath(fn);
+ QString fn = QDir::cleanPath(dir + QLatin1Char('/') + el);
+ if (d->m_vfs->exists(fn)) {
+ result << fn;
goto next;
}
}
if (baseDirectory.isEmpty())
goto next;
- absEl = baseDirectory + QLatin1Char('/') + el;
+ absEl = QDir::cleanPath(baseDirectory + QLatin1Char('/') + el);
}
{
- absEl = QDir::cleanPath(absEl);
int nameOff = absEl.lastIndexOf(QLatin1Char('/'));
QString absDir = d->m_tmp1.setRawData(absEl.constData(), nameOff);
- if (IoUtils::exists(absDir)) {
+ if (d->m_vfs->exists(absDir)) {
QString wildcard = d->m_tmp2.setRawData(absEl.constData() + nameOff + 1,
absEl.length() - nameOff - 1);
if (wildcard.contains(QLatin1Char('*')) || wildcard.contains(QLatin1Char('?'))) {