diff options
author | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2016-04-08 10:45:22 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2016-04-08 10:45:53 +0200 |
commit | 1aa83ca46cf1ffebc5a486a0185dcf6313bca26b (patch) | |
tree | 1a8db2d1ab871315324bb72ab1f4afdbb45f0a21 /src/qml/qml/qqmlengine_p.h | |
parent | a28ebf1e0a8b0c30fb1b8062bd7e035cc0429476 (diff) | |
parent | a889bcb6c3c66a616e73fa5ed3c9d900d7c7d6f5 (diff) |
Merge remote-tracking branch 'origin/5.7' into dev
Change-Id: I60b8a701b6d90f8572143cf760873f6b8b453c14
Diffstat (limited to 'src/qml/qml/qqmlengine_p.h')
-rw-r--r-- | src/qml/qml/qqmlengine_p.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlengine_p.h b/src/qml/qml/qqmlengine_p.h index 795a505742..92eadb0540 100644 --- a/src/qml/qml/qqmlengine_p.h +++ b/src/qml/qml/qqmlengine_p.h @@ -269,6 +269,16 @@ private: void doDeleteInEngineThread(); }; +/* + This function should be called prior to evaluation of any js expression, + so that scarce resources are not freed prematurely (eg, if there is a + nested javascript expression). + */ +inline void QQmlEnginePrivate::referenceScarceResources() +{ + scarceResourcesRefCount += 1; +} + /*! Returns true if the calling thread is the QQmlEngine thread. */ |