mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 15:06:08 +03:00
Discovery: conding style: use const references for function parameters
This commit is contained in:
parent
46269dac4e
commit
38a8e5ee03
4 changed files with 15 additions and 15 deletions
|
@ -207,7 +207,7 @@ int get_errno_from_http_errcode( int err, const QString & reason ) {
|
|||
|
||||
|
||||
|
||||
DiscoverySingleDirectoryJob::DiscoverySingleDirectoryJob(AccountPtr account, const QString &path, QObject *parent)
|
||||
DiscoverySingleDirectoryJob::DiscoverySingleDirectoryJob(const AccountPtr &account, const QString &path, QObject *parent)
|
||||
: QObject(parent), _subPath(path), _account(account), _ignoredFirst(false)
|
||||
{
|
||||
}
|
||||
|
@ -237,7 +237,7 @@ void DiscoverySingleDirectoryJob::abort()
|
|||
}
|
||||
}
|
||||
|
||||
static csync_vio_file_stat_t* propertyMapToFileStat(QMap<QString,QString> map)
|
||||
static csync_vio_file_stat_t* propertyMapToFileStat(const QMap<QString,QString> &map)
|
||||
{
|
||||
csync_vio_file_stat_t* file_stat = csync_vio_file_stat_new();
|
||||
|
||||
|
@ -289,7 +289,7 @@ static csync_vio_file_stat_t* propertyMapToFileStat(QMap<QString,QString> map)
|
|||
return file_stat;
|
||||
}
|
||||
|
||||
void DiscoverySingleDirectoryJob::directoryListingIteratedSlot(QString file,QMap<QString,QString> map)
|
||||
void DiscoverySingleDirectoryJob::directoryListingIteratedSlot(QString file, const QMap<QString,QString> &map)
|
||||
{
|
||||
//qDebug() << Q_FUNC_INFO << _subPath << file << map.count() << map.keys() << _account->davPath() << _lsColJob->reply()->request().url().path();
|
||||
if (!_ignoredFirst) {
|
||||
|
@ -392,7 +392,7 @@ void DiscoveryMainThread::setupHooks(DiscoveryJob *discoveryJob, const QString &
|
|||
}
|
||||
|
||||
// Coming from owncloud_opendir -> DiscoveryJob::vio_opendir_hook -> doOpendirSignal
|
||||
void DiscoveryMainThread::doOpendirSlot(QString subPath, DiscoveryDirectoryResult *r)
|
||||
void DiscoveryMainThread::doOpendirSlot(const QString &subPath, DiscoveryDirectoryResult *r)
|
||||
{
|
||||
QString fullPath = _pathPrefix;
|
||||
if (!_pathPrefix.endsWith('/')) {
|
||||
|
@ -445,7 +445,7 @@ void DiscoveryMainThread::singleDirectoryJobResultSlot(const QList<FileStatPoint
|
|||
_discoveryJob->_vioMutex.unlock();
|
||||
}
|
||||
|
||||
void DiscoveryMainThread::singleDirectoryJobFinishedWithErrorSlot(int csyncErrnoCode, QString msg)
|
||||
void DiscoveryMainThread::singleDirectoryJobFinishedWithErrorSlot(int csyncErrnoCode, const QString &msg)
|
||||
{
|
||||
if (!_currentDiscoveryDirectoryResult) {
|
||||
return; // possibly aborted
|
||||
|
@ -461,7 +461,7 @@ void DiscoveryMainThread::singleDirectoryJobFinishedWithErrorSlot(int csyncErrno
|
|||
_discoveryJob->_vioMutex.unlock();
|
||||
}
|
||||
|
||||
void DiscoveryMainThread::singleDirectoryJobFirstDirectoryPermissionsSlot(QString p)
|
||||
void DiscoveryMainThread::singleDirectoryJobFirstDirectoryPermissionsSlot(const QString &p)
|
||||
{
|
||||
// Should be thread safe since the sync thread is blocked
|
||||
if (!_discoveryJob->_csync_ctx->remote.root_perms) {
|
||||
|
|
|
@ -80,7 +80,7 @@ struct DiscoveryDirectoryResult {
|
|||
class DiscoverySingleDirectoryJob : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DiscoverySingleDirectoryJob(AccountPtr account, const QString &path, QObject *parent = 0);
|
||||
explicit DiscoverySingleDirectoryJob(const AccountPtr &account, const QString &path, QObject *parent = 0);
|
||||
void start();
|
||||
void abort();
|
||||
// This is not actually a network job, it is just a job
|
||||
|
@ -89,9 +89,9 @@ signals:
|
|||
void etagConcatenation(const QString &);
|
||||
void etag(const QString &);
|
||||
void finishedWithResult(const QList<FileStatPointer> &);
|
||||
void finishedWithError(int csyncErrnoCode, QString msg);
|
||||
void finishedWithError(int csyncErrnoCode, const QString &msg);
|
||||
private slots:
|
||||
void directoryListingIteratedSlot(QString,QMap<QString,QString>);
|
||||
void directoryListingIteratedSlot(QString, const QMap<QString,QString>&);
|
||||
void lsJobFinishedWithoutErrorSlot();
|
||||
void lsJobFinishedWithErrorSlot(QNetworkReply*);
|
||||
private:
|
||||
|
@ -125,13 +125,13 @@ public:
|
|||
|
||||
public slots:
|
||||
// From DiscoveryJob:
|
||||
void doOpendirSlot(QString url, DiscoveryDirectoryResult* );
|
||||
void doOpendirSlot(const QString &url, DiscoveryDirectoryResult* );
|
||||
void doGetSizeSlot(const QString &path ,qint64 *result);
|
||||
|
||||
// From Job:
|
||||
void singleDirectoryJobResultSlot(const QList<FileStatPointer> &);
|
||||
void singleDirectoryJobFinishedWithErrorSlot(int csyncErrnoCode, QString msg);
|
||||
void singleDirectoryJobFirstDirectoryPermissionsSlot(QString);
|
||||
void singleDirectoryJobFinishedWithErrorSlot(int csyncErrnoCode, const QString &msg);
|
||||
void singleDirectoryJobFirstDirectoryPermissionsSlot(const QString&);
|
||||
|
||||
void slotGetSizeFinishedWithError();
|
||||
void slotGetSizeResult(const QVariantMap&);
|
||||
|
|
|
@ -698,7 +698,7 @@ void SyncEngine::startSync()
|
|||
QMetaObject::invokeMethod(discoveryJob, "start", Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
void SyncEngine::slotRootEtagReceived(QString e) {
|
||||
void SyncEngine::slotRootEtagReceived(const QString &e) {
|
||||
if (_remoteRootEtag.isEmpty()) {
|
||||
qDebug() << Q_FUNC_INFO << e;
|
||||
_remoteRootEtag = e;
|
||||
|
|
|
@ -94,7 +94,7 @@ signals:
|
|||
|
||||
// During update, before reconcile
|
||||
void rootEtag(QString);
|
||||
void folderDiscovered(bool local, QString folderUrl);
|
||||
void folderDiscovered(bool local, const QString &folderUrl);
|
||||
|
||||
// before actual syncing (after update+reconcile) for each item
|
||||
void syncItemDiscovered(const SyncFileItem&);
|
||||
|
@ -118,7 +118,7 @@ signals:
|
|||
void newBigFolder(const QString &folder);
|
||||
|
||||
private slots:
|
||||
void slotRootEtagReceived(QString);
|
||||
void slotRootEtagReceived(const QString &);
|
||||
void slotItemCompleted(const SyncFileItem& item, const PropagatorJob & job);
|
||||
void slotFinished();
|
||||
void slotProgress(const SyncFileItem& item, quint64 curent);
|
||||
|
|
Loading…
Reference in a new issue