aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlfileselector_p.h
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-07-20 16:46:28 +0200
committerHolger Freyther <holger+qt@freyther.de>2014-07-21 08:05:57 +0200
commit23e506fb3ea393e6ed1698923094000d6b640dac (patch)
tree2c3df8c112771d3292e19f2df35debd877fbc9ad /src/qml/qml/qqmlfileselector_p.h
parenta62955472b2acd644db46ea194d4fb0bc119150f (diff)
qml: Fix potential memory leak in the file selector
The myInstance doesn't seem to be part of a QObject parent/child relationship and Coverity complained about it. Use a QScopedPointer to make sure the data will be deleted. Fixes: CID 10606 Change-Id: I30848ab4d1e621d82281aaa7d6f84e0c2cce4084 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlfileselector_p.h')
-rw-r--r--src/qml/qml/qqmlfileselector_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlfileselector_p.h b/src/qml/qml/qqmlfileselector_p.h
index 501f563ade..73a98788ee 100644
--- a/src/qml/qml/qqmlfileselector_p.h
+++ b/src/qml/qml/qqmlfileselector_p.h
@@ -71,7 +71,7 @@ public:
QFileSelector* selector;
QPointer<QQmlEngine> engine;
bool ownSelector;
- QQmlFileSelectorInterceptor* myInstance;
+ QScopedPointer<QQmlFileSelectorInterceptor> myInstance;
};
class Q_QML_PRIVATE_EXPORT QQmlFileSelectorInterceptor : public QQmlAbstractUrlInterceptor