aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
diff options
context:
space:
mode:
authorAlbert Astals Cid <albert.astals@canonical.com>2014-08-21 15:36:30 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2014-08-24 09:56:59 +0200
commit4f98d16c66816e3097cf4b1764e2bf3d0f75ddf3 (patch)
tree864e5e73437445ad5ff8923249e5456df6e0d75a /src/qml
parent23776181b8e73dc7f18c3042fcc37c9f018f29c5 (diff)
Add const & to arguments
Change-Id: I1bcf69638fee32b6e6565b8ea828c0adcff48a67 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml')
-rw-r--r--src/qml/jsruntime/qv4debugging_p.h2
-rw-r--r--src/qml/qml/qqmlfileselector.cpp12
-rw-r--r--src/qml/qml/qqmlfileselector.h3
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: