aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlfileselector.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2015-10-20 14:30:36 +0200
committerErik Verbruggen <erik.verbruggen@theqtcompany.com>2015-10-22 12:42:13 +0000
commit35c1f930295c85a1ce4b257fd05d596d378ccff8 (patch)
tree6fdeaca26e9148890193f05c6be866f8e269faae /src/qml/qml/qqmlfileselector.cpp
parent8848abe69fa957d5406659229cecdada83da8421 (diff)
QML: file leak of QFileSelector.
When no "custom" file selector is set, the QQmlFileSelector would not delete the QFileSelector it created/owned. Change-Id: I0235d0dabdb8522db0b8b74a2a2d69ee5a20abb6 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlfileselector.cpp')
-rw-r--r--src/qml/qml/qqmlfileselector.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlfileselector.cpp b/src/qml/qml/qqmlfileselector.cpp
index 8597e8a5c7..ab880b7069 100644
--- a/src/qml/qml/qqmlfileselector.cpp
+++ b/src/qml/qml/qqmlfileselector.cpp
@@ -123,6 +123,12 @@ QQmlFileSelectorPrivate::QQmlFileSelectorPrivate()
myInstance.reset(new QQmlFileSelectorInterceptor(this));
}
+QQmlFileSelectorPrivate::~QQmlFileSelectorPrivate()
+{
+ if (ownSelector)
+ delete selector;
+}
+
/*!
Sets the QFileSelector instance for use by the QQmlFileSelector to \a selector.
QQmlFileSelector does not take ownership of the new QFileSelector. To reset QQmlFileSelector