summaryrefslogtreecommitdiff
path: root/src/shared/proparser/qmakevfs.h
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2016-10-27 16:36:06 +0200
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2016-11-01 17:35:22 +0000
commita8010b0fff47d903d4a1f80e3adb1a2ef41beb33 (patch)
tree066c2d427f083ed6d1592835f6a4ccd08e330da1 /src/shared/proparser/qmakevfs.h
parentcf82f210804151452fce3cddb3cb2793dab976eb (diff)
downloadqt-creator-a8010b0fff47d903d4a1f80e3adb1a2ef41beb33.tar.gz
make VFS aware of exact vs. cumulative evaluation
the cumulative evaluation has a good chance to make a mess of the virtual file contents created by the exact parsing, so better contain it to its own namespace. the ProFile cache also needs to keep the files separate. this specifically addresses the side issue discussed in QTCREATORBUG-10779. it also fixes attempts to deploy the wrong build when the variant is selected through a cache file, as in QTCREATORBUG-15815. in the project explorer, we don't track from which evaluation pass particular files came from, so we try the cumulative first to get the most contents, and fall back to the exact one if the former file is empty (or does not exist at all). Task-number: QTCREATORBUG-15815 Change-Id: I2c1eb16c97526fa275a1c6a2eae9266d385859ac Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/shared/proparser/qmakevfs.h')
-rw-r--r--src/shared/proparser/qmakevfs.h29
1 files changed, 25 insertions, 4 deletions
diff --git a/src/shared/proparser/qmakevfs.h b/src/shared/proparser/qmakevfs.h
index 801658c62f..02c0a6406b 100644
--- a/src/shared/proparser/qmakevfs.h
+++ b/src/shared/proparser/qmakevfs.h
@@ -36,6 +36,12 @@
# endif
#endif
+#ifdef PROEVALUATOR_DUAL_VFS
+# ifndef PROEVALUATOR_CUMULATIVE
+# error PROEVALUATOR_DUAL_VFS requires PROEVALUATOR_CUMULATIVE
+# endif
+#endif
+
QT_BEGIN_NAMESPACE
class QMAKE_EXPORT QMakeVfs
@@ -47,14 +53,27 @@ public:
ReadOtherError
};
+ enum VfsFlag {
+ VfsExecutable = 1,
+ VfsExact = 0,
+#ifdef PROEVALUATOR_DUAL_VFS
+ VfsCumulative = 2,
+ VfsNoVirtual = 4
+#else
+ VfsCumulative = 0,
+ VfsNoVirtual = 0
+#endif
+ };
+ Q_DECLARE_FLAGS(VfsFlags, VfsFlag)
+
QMakeVfs();
- bool writeFile(const QString &fn, QIODevice::OpenMode mode, bool exe, const QString &contents, QString *errStr);
- ReadResult readFile(const QString &fn, QString *contents, QString *errStr);
- bool exists(const QString &fn);
+ bool writeFile(const QString &fn, QIODevice::OpenMode mode, VfsFlags flags, const QString &contents, QString *errStr);
+ ReadResult readFile(const QString &fn, VfsFlags flags, QString *contents, QString *errStr);
+ bool exists(const QString &fn, VfsFlags flags);
#ifndef PROEVALUATOR_FULL
- bool readVirtualFile(const QString &fn, QString *contents);
+ bool readVirtualFile(const QString &fn, VfsFlags flags, QString *contents);
void invalidateCache();
void invalidateContents();
@@ -71,4 +90,6 @@ private:
#endif
};
+Q_DECLARE_OPERATORS_FOR_FLAGS(QMakeVfs::VfsFlags)
+
QT_END_NAMESPACE