diff options
Diffstat (limited to 'src/qml')
-rw-r--r-- | src/qml/jsruntime/qv4debugging_p.h | 2 | ||||
-rw-r--r-- | src/qml/qml/qqmlfileselector.cpp | 12 | ||||
-rw-r--r-- | src/qml/qml/qqmlfileselector.h | 3 |
3 files changed, 15 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4debugging_p.h b/src/qml/jsruntime/qv4debugging_p.h index cedfee7f90..46d6313b68 100644 --- a/src/qml/jsruntime/qv4debugging_p.h +++ b/src/qml/jsruntime/qv4debugging_p.h @@ -70,7 +70,7 @@ enum PauseReason { class DebuggerAgent; struct DebuggerBreakPoint { - DebuggerBreakPoint(QString fileName, int line) + DebuggerBreakPoint(const QString &fileName, int line) : fileName(fileName), lineNumber(line) {} QString fileName; diff --git a/src/qml/qml/qqmlfileselector.cpp b/src/qml/qml/qqmlfileselector.cpp index 8498a4d67d..ffda7a3cf9 100644 --- a/src/qml/qml/qqmlfileselector.cpp +++ b/src/qml/qml/qqmlfileselector.cpp @@ -162,6 +162,18 @@ void QQmlFileSelector::setExtraSelectors(QStringList &strings) d->selector->setExtraSelectors(strings); } + +/*! + Adds extra selectors contained in \a strings to the current QFileSelector being used. + Use this when extra selectors are all you need to avoid having to create your own + QFileSelector instance. +*/ +void QQmlFileSelector::setExtraSelectors(const QStringList &strings) +{ + Q_D(QQmlFileSelector); + d->selector->setExtraSelectors(strings); +} + /*! Gets the QQmlFileSelector currently active on the target \a engine. */ diff --git a/src/qml/qml/qqmlfileselector.h b/src/qml/qml/qqmlfileselector.h index ec9bbc77db..64d10d3cdc 100644 --- a/src/qml/qml/qqmlfileselector.h +++ b/src/qml/qml/qqmlfileselector.h @@ -59,7 +59,8 @@ public: QQmlFileSelector(QQmlEngine* engine, QObject* parent=0); ~QQmlFileSelector(); void setSelector(QFileSelector *selector); - void setExtraSelectors(QStringList &strings); + void setExtraSelectors(QStringList &strings); // TODO Qt6: remove + void setExtraSelectors(const QStringList &strings); static QQmlFileSelector* get(QQmlEngine*); private: |