summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2015-01-23 13:05:12 +0400
committerKonstantin Ritt <ritt.ks@gmail.com>2015-02-13 16:29:16 +0000
commit9b67d89c24666d405dd00e63bb56c924738aa002 (patch)
treebf0c0197b68097e9aace8ac3708dcbf0e3fe0c7c /src/corelib/io
parent22b5c39e8e0f4d8cb8a2b2d661e0451e01b75929 (diff)
Pass params of shareable type by const-ref rather than by value
...where passing them by value was not intentional. Change-Id: Ifd5036d57b41fddeeacfbd3f5890881605b80647 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qfilesystemwatcher_fsevents.mm12
-rw-r--r--src/corelib/io/qfilesystemwatcher_fsevents_p.h8
-rw-r--r--src/corelib/io/qsettings_winrt.cpp4
3 files changed, 12 insertions, 12 deletions
diff --git a/src/corelib/io/qfilesystemwatcher_fsevents.mm b/src/corelib/io/qfilesystemwatcher_fsevents.mm
index 1dc45a7e41..1076b8f5b4 100644
--- a/src/corelib/io/qfilesystemwatcher_fsevents.mm
+++ b/src/corelib/io/qfilesystemwatcher_fsevents.mm
@@ -283,13 +283,13 @@ void QFseventsFileSystemWatcherEngine::processEvent(ConstFSEventStreamRef stream
#endif
}
-void QFseventsFileSystemWatcherEngine::doEmitFileChanged(const QString path, bool removed)
+void QFseventsFileSystemWatcherEngine::doEmitFileChanged(const QString &path, bool removed)
{
DEBUG() << "emitting fileChanged for" << path << "with removed =" << removed;
emit fileChanged(path, removed);
}
-void QFseventsFileSystemWatcherEngine::doEmitDirectoryChanged(const QString path, bool removed)
+void QFseventsFileSystemWatcherEngine::doEmitDirectoryChanged(const QString &path, bool removed)
{
DEBUG() << "emitting directoryChanged for" << path << "with removed =" << removed;
emit directoryChanged(path, removed);
@@ -316,10 +316,10 @@ QFseventsFileSystemWatcherEngine::QFseventsFileSystemWatcherEngine(QObject *pare
// We cannot use signal-to-signal queued connections, because the
// QSignalSpy cannot spot signals fired from other/alien threads.
- connect(this, SIGNAL(emitDirectoryChanged(const QString, bool)),
- this, SLOT(doEmitDirectoryChanged(const QString, bool)), Qt::QueuedConnection);
- connect(this, SIGNAL(emitFileChanged(const QString, bool)),
- this, SLOT(doEmitFileChanged(const QString, bool)), Qt::QueuedConnection);
+ connect(this, SIGNAL(emitDirectoryChanged(QString,bool)),
+ this, SLOT(doEmitDirectoryChanged(QString,bool)), Qt::QueuedConnection);
+ connect(this, SIGNAL(emitFileChanged(QString,bool)),
+ this, SLOT(doEmitFileChanged(QString,bool)), Qt::QueuedConnection);
connect(this, SIGNAL(scheduleStreamRestart()),
this, SLOT(restartStream()), Qt::QueuedConnection);
diff --git a/src/corelib/io/qfilesystemwatcher_fsevents_p.h b/src/corelib/io/qfilesystemwatcher_fsevents_p.h
index bd75a0aa32..b4640afc4e 100644
--- a/src/corelib/io/qfilesystemwatcher_fsevents_p.h
+++ b/src/corelib/io/qfilesystemwatcher_fsevents_p.h
@@ -74,13 +74,13 @@ public:
void processEvent(ConstFSEventStreamRef streamRef, size_t numEvents, char **eventPaths, const FSEventStreamEventFlags eventFlags[], const FSEventStreamEventId eventIds[]);
Q_SIGNALS:
- void emitFileChanged(const QString path, bool removed);
- void emitDirectoryChanged(const QString path, bool removed);
+ void emitFileChanged(const QString &path, bool removed);
+ void emitDirectoryChanged(const QString &path, bool removed);
void scheduleStreamRestart();
private slots:
- void doEmitFileChanged(const QString path, bool removed);
- void doEmitDirectoryChanged(const QString path, bool removed);
+ void doEmitFileChanged(const QString &path, bool removed);
+ void doEmitDirectoryChanged(const QString &path, bool removed);
void restartStream();
private:
diff --git a/src/corelib/io/qsettings_winrt.cpp b/src/corelib/io/qsettings_winrt.cpp
index 8f9d6d3692..bf8b157d00 100644
--- a/src/corelib/io/qsettings_winrt.cpp
+++ b/src/corelib/io/qsettings_winrt.cpp
@@ -281,7 +281,7 @@ class QWinRTSettingsPrivate : public QSettingsPrivate
public:
QWinRTSettingsPrivate(QSettings::Scope scope, const QString &organization,
const QString &application);
- QWinRTSettingsPrivate(QString rKey);
+ QWinRTSettingsPrivate(const QString &rKey);
~QWinRTSettingsPrivate();
void remove(const QString &uKey);
@@ -315,7 +315,7 @@ QWinRTSettingsPrivate::QWinRTSettingsPrivate(QSettings::Scope scope, const QStri
init(scope);
}
-QWinRTSettingsPrivate::QWinRTSettingsPrivate(QString rPath)
+QWinRTSettingsPrivate::QWinRTSettingsPrivate(const QString &rPath)
: QSettingsPrivate(QSettings::NativeFormat, QSettings::UserScope, rPath, QString())
, writeContainer(0)
{