qt5base-lts/qmake
Oswald Buddenhagen f12fd482f5 qmake: fix file id mapping lifetime management
turns out that flushing the ids together with the ProFile cache was an
abysmal idea, as the latter expires after a few seconds after loading
the project, while references to the ProFiles (and thus the underlying
file ids) are kept for as long as the project stays loaded. the early
flush would cause re-use of the file ids, which would wreak all kinds of
havoc when re-loading projects.

but just ref-counting the vfs class is insufficient as well, as then the
ProFile cache (which expires after a timeout) could outlive all VFS
instances and thus refer to ids which were discarded and later re-used.

so we ref-count, and additionally let the cache instance hold a
reference to the vfs class.

this is sync-up with qt creator; no actual effect on qmake itself.

amends 190aa94be.

Change-Id: Idd4478ffc1c2405b3b83df32fba45b1f687f6a18
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
(cherry picked from qtcreator/d03fb350672d311dccc06f0bcb4da744a3c99745)
(cherry picked from qtcreator/1ddfb443b686ef04cc0e28363308ce70d01f0d73)
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-08-24 12:16:37 +00:00
..
doc Merge branch '5.11' into dev 2018-07-31 13:33:14 +02:00
generators Merge remote-tracking branch 'origin/5.11' into dev 2018-08-16 18:48:59 +02:00
library qmake: fix file id mapping lifetime management 2018-08-24 12:16:37 +00:00
cachekeys.h Updated license headers 2016-01-21 18:55:18 +00:00
main.cpp qmake: Apply modernize-use-nullptr 2018-08-08 17:30:32 +00:00
Makefile.unix Add qbswap for a memory region 2018-07-04 03:04:40 +00:00
Makefile.unix.macos Merge remote-tracking branch 'origin/5.8' into dev 2016-12-13 09:39:20 +01:00
Makefile.unix.mingw fix "make clean" of qmake in a builddir with spaces on mingw 2017-12-14 18:06:31 +00:00
Makefile.unix.unix Move the readlink(2) wrapper to qcore_unix.cpp 2017-07-08 02:18:16 +00:00
Makefile.unix.win32 Fix builds with some MinGW distributions 2018-08-02 07:10:00 +00:00
Makefile.win32 Merge branch '5.11' into dev 2018-07-31 13:33:14 +02:00
meta.cpp qmake: refactor QMakeMetaInfo::findLib() interface 2018-07-16 15:44:23 +00:00
meta.h qmake: refactor QMakeMetaInfo::findLib() interface 2018-07-16 15:44:23 +00:00
option.cpp qmake: Apply modernize-use-nullptr 2018-08-08 17:30:32 +00:00
option.h qmake: Apply modernize-use-nullptr 2018-08-08 17:30:32 +00:00
project.cpp qmake: make argument validation of built-ins data driven 2018-06-27 17:23:57 +00:00
project.h Merge remote-tracking branch 'origin/5.7' into dev 2016-07-19 20:14:40 +02:00
property.cpp qmake: Apply modernize-use-nullptr 2018-08-08 17:30:32 +00:00
property.h move generation of qconfig.cpp (and qt.conf) to qmake-based configure 2016-12-13 18:56:12 +00:00
qmake_pch.h Updated license headers 2016-01-21 18:55:18 +00:00
qmake-aux.pro revert to building qmake with qconfig.cpp 2017-01-06 20:09:08 +00:00
qmake.pro qmake: improve the fake project 2018-08-06 10:25:50 +00:00