aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
diff options
context:
space:
mode:
authorAndré Klitzing <aklitzing@gmail.com>2016-01-12 16:06:12 +0100
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2016-01-21 08:23:56 +0000
commit706238e037da37a28514336e1e264709f049fba7 (patch)
tree176ca08d92ab281cc99a2682353364b1654c3d6b /src/qml
parent38ec3bd755fd07ce860ef28c44f4c7148559de7c (diff)
Add selector() to get underlying FileSelector
Change-Id: If33a23e7ba06523e964d8299365f43e8125c1619 Task-number: QTBUG-45983 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml')
-rw-r--r--src/qml/qml/qqmlfileselector.cpp10
-rw-r--r--src/qml/qml/qqmlfileselector.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlfileselector.cpp b/src/qml/qml/qqmlfileselector.cpp
index d86f0ceec6..461ca33b3e 100644
--- a/src/qml/qml/qqmlfileselector.cpp
+++ b/src/qml/qml/qqmlfileselector.cpp
@@ -121,6 +121,16 @@ QQmlFileSelector::~QQmlFileSelector()
interceptorInstances()->remove(d->myInstance.data());
}
+/*!
+ \since 5.7
+ Returns the QFileSelector instance used by the QQmlFileSelector.
+*/
+QFileSelector *QQmlFileSelector::selector() const Q_DECL_NOTHROW
+{
+ Q_D(const QQmlFileSelector);
+ return d->selector;
+}
+
QQmlFileSelectorPrivate::QQmlFileSelectorPrivate()
{
Q_Q(QQmlFileSelector);
diff --git a/src/qml/qml/qqmlfileselector.h b/src/qml/qml/qqmlfileselector.h
index 4a20bf12e2..34ba4d7a56 100644
--- a/src/qml/qml/qqmlfileselector.h
+++ b/src/qml/qml/qqmlfileselector.h
@@ -56,6 +56,7 @@ class Q_QML_EXPORT QQmlFileSelector : public QObject
public:
QQmlFileSelector(QQmlEngine* engine, QObject* parent=0);
~QQmlFileSelector();
+ QFileSelector *selector() const Q_DECL_NOTHROW;
void setSelector(QFileSelector *selector);
void setExtraSelectors(QStringList &strings); // TODO Qt6: remove
void setExtraSelectors(const QStringList &strings);