qt5base-lts/qmake/library
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
..
ioutils.cpp qmake: Apply modernize-use-nullptr 2018-08-08 17:30:32 +00:00
ioutils.h qmake: minor fixups to ioutils for building in qt creator context 2018-03-29 18:15:35 +00:00
proitems.cpp qmake: make yet more use of ProString::toQStringRef() 2017-08-26 12:11:35 +00:00
proitems.h qmake: Apply modernize-use-nullptr 2018-08-08 17:30:32 +00:00
qmake_global.h Updated license headers 2016-01-21 18:55:18 +00:00
qmakebuiltins.cpp qmake: Apply modernize-use-nullptr 2018-08-08 17:30:32 +00:00
qmakeevaluator_p.h qmake: make argument validation of built-ins data driven 2018-06-27 17:23:57 +00:00
qmakeevaluator.cpp qmake: Apply modernize-use-nullptr 2018-08-08 17:30:32 +00:00
qmakeevaluator.h qmake: Apply modernize-use-nullptr 2018-08-08 17:30:32 +00:00
qmakeglobals.cpp qmake: skip empty parts when splitting strings in some more places 2018-06-01 09:09:35 +00:00
qmakeglobals.h qmake: updates to the parsing code of external properties 2018-03-29 18:15:29 +00:00
qmakeparser.cpp qmake: fix file id mapping lifetime management 2018-08-24 12:16:37 +00:00
qmakeparser.h qmake: fix file id mapping lifetime management 2018-08-24 12:16:37 +00:00
qmakevfs.cpp qmake: fix file id mapping lifetime management 2018-08-24 12:16:37 +00:00
qmakevfs.h qmake: fix file id mapping lifetime management 2018-08-24 12:16:37 +00:00