mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-27 06:45:49 +03:00
Clazy: Fix some warnings
This commit is contained in:
parent
3caf8276a2
commit
fd6146d09e
2 changed files with 4 additions and 5 deletions
|
@ -141,7 +141,7 @@ QString DiscoveryPhase::adjustRenamedPath(const QString &original, SyncFileItem:
|
||||||
return OCC::adjustRenamedPath(d == SyncFileItem::Down ? _renamedItemsRemote : _renamedItemsLocal, original);
|
return OCC::adjustRenamedPath(d == SyncFileItem::Down ? _renamedItemsRemote : _renamedItemsLocal, original);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString adjustRenamedPath(const QMap<QString, QString> renamedItems, const QString original)
|
QString adjustRenamedPath(const QMap<QString, QString> &renamedItems, const QString &original)
|
||||||
{
|
{
|
||||||
int slashPos = original.size();
|
int slashPos = original.size();
|
||||||
while ((slashPos = original.lastIndexOf('/', slashPos - 1)) > 0) {
|
while ((slashPos = original.lastIndexOf('/', slashPos - 1)) > 0) {
|
||||||
|
@ -420,7 +420,7 @@ static void propertyMapToRemoteInfo(const QMap<QString, QString> &map, RemoteInf
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DiscoverySingleDirectoryJob::directoryListingIteratedSlot(QString file, const QMap<QString, QString> &map)
|
void DiscoverySingleDirectoryJob::directoryListingIteratedSlot(const QString &file, const QMap<QString, QString> &map)
|
||||||
{
|
{
|
||||||
if (!_ignoredFirst) {
|
if (!_ignoredFirst) {
|
||||||
// The first entry is for the folder itself, we should process it differently.
|
// The first entry is for the folder itself, we should process it differently.
|
||||||
|
@ -493,7 +493,6 @@ void DiscoverySingleDirectoryJob::lsJobFinishedWithErrorSlot(QNetworkReply *r)
|
||||||
{
|
{
|
||||||
QString contentType = r->header(QNetworkRequest::ContentTypeHeader).toString();
|
QString contentType = r->header(QNetworkRequest::ContentTypeHeader).toString();
|
||||||
int httpCode = r->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
|
int httpCode = r->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
|
||||||
QString httpReason = r->attribute(QNetworkRequest::HttpReasonPhraseAttribute).toString();
|
|
||||||
QString msg = r->errorString();
|
QString msg = r->errorString();
|
||||||
qCWarning(lcDiscovery) << "LSCOL job error" << r->errorString() << httpCode << r->error();
|
qCWarning(lcDiscovery) << "LSCOL job error" << r->errorString() << httpCode << r->error();
|
||||||
if (r->error() == QNetworkReply::NoError
|
if (r->error() == QNetworkReply::NoError
|
||||||
|
|
|
@ -127,7 +127,7 @@ signals:
|
||||||
void finished(const HttpResult<QVector<RemoteInfo>> &result);
|
void finished(const HttpResult<QVector<RemoteInfo>> &result);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void directoryListingIteratedSlot(QString, const QMap<QString, QString> &);
|
void directoryListingIteratedSlot(const QString &, const QMap<QString, QString> &);
|
||||||
void lsJobFinishedWithoutErrorSlot();
|
void lsJobFinishedWithoutErrorSlot();
|
||||||
void lsJobFinishedWithErrorSlot(QNetworkReply *);
|
void lsJobFinishedWithErrorSlot(QNetworkReply *);
|
||||||
|
|
||||||
|
@ -273,5 +273,5 @@ signals:
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Implementation of DiscoveryPhase::adjustRenamedPath
|
/// Implementation of DiscoveryPhase::adjustRenamedPath
|
||||||
QString adjustRenamedPath(const QMap<QString, QString> renamedItems, const QString original);
|
QString adjustRenamedPath(const QMap<QString, QString> &renamedItems, const QString &original);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue