Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorErik Verbruggen <erik@verbruggen.consulting>2022-06-10 12:28:05 +0300
committerHannah von Reth <vonreth@kde.org>2022-07-01 15:35:54 +0300
commitefac9f040127f0c3471ee051b4874500c3ee2969 (patch)
tree15d1581c88b4561f754cc60db81b16f09b078f0b /src
parentdfc2a03c40f73fa524f6c3f5bb37a84c8ef4494b (diff)
Fix a bunch of compiler warnings
Diffstat (limited to 'src')
-rw-r--r--src/cmd/cmd.cpp2
-rw-r--r--src/csync/csync.h2
-rw-r--r--src/gui/accountmanager.cpp1
-rw-r--r--src/gui/connectionvalidator.cpp1
-rw-r--r--src/gui/selectivesyncdialog.h4
-rw-r--r--src/gui/spaces/spacesmodel.cpp11
-rw-r--r--src/libsync/determineauthtypejobfactory.cpp4
-rw-r--r--src/libsync/owncloudpropagator.h2
-rw-r--r--src/plugins/vfs/off/vfs_off.cpp4
9 files changed, 19 insertions, 12 deletions
diff --git a/src/cmd/cmd.cpp b/src/cmd/cmd.cpp
index 9d62ddcd3..18b1ce81a 100644
--- a/src/cmd/cmd.cpp
+++ b/src/cmd/cmd.cpp
@@ -540,6 +540,8 @@ int main(int argc, char **argv)
});
} else {
QObject::connect(ctx.account->accessManager(), &QNetworkAccessManager::sslErrors, [](QNetworkReply *reply, const QList<QSslError> &errors) {
+ Q_UNUSED(reply)
+
qCritical() << "SSL error encountered";
for (auto e : errors) {
qCritical() << e.errorString();
diff --git a/src/csync/csync.h b/src/csync/csync.h
index a07fe0673..e85512ad4 100644
--- a/src/csync/csync.h
+++ b/src/csync/csync.h
@@ -131,7 +131,7 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(SyncInstructions)
// This enum is used with BITFIELD(3) and BITFIELD(4) in several places.
// Also, this value is stored in the database, so beware of value changes.
-enum ItemType {
+enum ItemType : unsigned {
ItemTypeFile = 0,
ItemTypeSoftLink = 1,
ItemTypeDirectory = 2,
diff --git a/src/gui/accountmanager.cpp b/src/gui/accountmanager.cpp
index 4aeaea983..32cc36710 100644
--- a/src/gui/accountmanager.cpp
+++ b/src/gui/accountmanager.cpp
@@ -51,7 +51,6 @@ const QString userUUIDC()
static const char caCertsKeyC[] = "CaCertificates";
static const char accountsC[] = "Accounts";
static const char versionC[] = "version";
-static const char serverVersionC[] = "serverVersion";
auto capabilitesC()
{
diff --git a/src/gui/connectionvalidator.cpp b/src/gui/connectionvalidator.cpp
index 7284f44ee..568844da4 100644
--- a/src/gui/connectionvalidator.cpp
+++ b/src/gui/connectionvalidator.cpp
@@ -109,6 +109,7 @@ void ConnectionValidator::slotCheckServerAndAuth()
auto checkServerJob = CheckServerJobFactory(nam).startJob(_account->url());
connect(nam, &AccessManager::sslErrors, this, [this](QNetworkReply *reply, const QList<QSslError> &errors) {
+ Q_UNUSED(reply)
Q_EMIT sslErrors(errors);
});
diff --git a/src/gui/selectivesyncdialog.h b/src/gui/selectivesyncdialog.h
index 6490a5212..fa96345f7 100644
--- a/src/gui/selectivesyncdialog.h
+++ b/src/gui/selectivesyncdialog.h
@@ -89,10 +89,10 @@ class SelectiveSyncDialog : public QDialog
Q_OBJECT
public:
// Dialog for a specific folder (used from the account settings button)
- explicit SelectiveSyncDialog(AccountPtr account, Folder *folder, QWidget *parent = nullptr, Qt::WindowFlags f = nullptr);
+ explicit SelectiveSyncDialog(AccountPtr account, Folder *folder, QWidget *parent = nullptr, Qt::WindowFlags f = {});
// Dialog for the whole account (Used from the wizard)
- explicit SelectiveSyncDialog(AccountPtr account, const QString &folder, QWidget *parent = nullptr, Qt::WindowFlags f = nullptr);
+ explicit SelectiveSyncDialog(AccountPtr account, const QString &folder, QWidget *parent = nullptr, Qt::WindowFlags f = {});
void accept() override;
diff --git a/src/gui/spaces/spacesmodel.cpp b/src/gui/spaces/spacesmodel.cpp
index ca7388411..97fa78eac 100644
--- a/src/gui/spaces/spacesmodel.cpp
+++ b/src/gui/spaces/spacesmodel.cpp
@@ -103,7 +103,7 @@ QVariant SpacesModel::data(const QModelIndex &index, int role) const
case Qt::DecorationRole:
switch (column) {
case Columns::Image: {
- auto it = _images.find(item.getId());
+ auto it = _images.constFind(item.getId());
if (it != _images.cend()) {
return QVariant::fromValue(*it);
}
@@ -125,13 +125,16 @@ QVariant SpacesModel::data(const QModelIndex &index, int role) const
});
job->start();
return _images[item.getId()];
- } break;
+ }
+ default:
+ return {};
}
case Qt::SizeHintRole: {
switch (column) {
- case Columns::Image: {
+ case Columns::Image:
return ImageSizeC;
- }
+ default:
+ return {};
}
}
}
diff --git a/src/libsync/determineauthtypejobfactory.cpp b/src/libsync/determineauthtypejobfactory.cpp
index 7f43298fc..f83cfd6fa 100644
--- a/src/libsync/determineauthtypejobfactory.cpp
+++ b/src/libsync/determineauthtypejobfactory.cpp
@@ -62,13 +62,13 @@ CoreJob *DetermineAuthTypeJobFactory::startJob(const QUrl &url)
// we fall back to basic in any case
if (authChallenge.contains(QByteArrayLiteral("bearer "))) {
- setJobResult(job, qVariantFromValue(AuthType::OAuth));
+ setJobResult(job, QVariant::fromValue(AuthType::OAuth));
} else {
if (authChallenge.isEmpty()) {
qCWarning(lcDetermineAuthTypeJob) << "Did not receive WWW-Authenticate reply to auth-test PROPFIND";
}
- setJobResult(job, qVariantFromValue(AuthType::Basic));
+ setJobResult(job, QVariant::fromValue(AuthType::Basic));
}
qCInfo(lcDetermineAuthTypeJob) << "Auth type for" << reply->url() << "is" << job->result();
diff --git a/src/libsync/owncloudpropagator.h b/src/libsync/owncloudpropagator.h
index dd2dbe5ff..213aab63f 100644
--- a/src/libsync/owncloudpropagator.h
+++ b/src/libsync/owncloudpropagator.h
@@ -376,9 +376,9 @@ public:
, _chunkSize(10 * 1000 * 1000) // 10 MB, overridden in setSyncOptions
, _account(account)
, _syncOptions(options)
- , _webDavUrl(baseUrl)
, _localDir((localDir.endsWith(QLatin1Char('/'))) ? localDir : localDir + QLatin1Char('/'))
, _remoteFolder((remoteFolder.endsWith(QLatin1Char('/'))) ? remoteFolder : remoteFolder + QLatin1Char('/'))
+ , _webDavUrl(baseUrl)
{
_chunkSize = _syncOptions._initialChunkSize;
qRegisterMetaType<PropagatorJob::AbortType>("PropagatorJob::AbortType");
diff --git a/src/plugins/vfs/off/vfs_off.cpp b/src/plugins/vfs/off/vfs_off.cpp
index cced0ca13..e72f66635 100644
--- a/src/plugins/vfs/off/vfs_off.cpp
+++ b/src/plugins/vfs/off/vfs_off.cpp
@@ -92,6 +92,8 @@ void VfsOff::startImpl(const VfsSetupParams &)
Result<Vfs::ConvertToPlaceholderResult, QString> VfsOff::updateMetadata(const SyncFileItem &item, const QString &filePath, const QString &replacesFile)
{
+ Q_UNUSED(replacesFile)
+
if (!item.isDirectory()) {
const bool isReadOnly = !item._remotePerm.isNull() && !item._remotePerm.hasPermission(RemotePermissions::CanWrite);
FileSystem::setFileReadOnlyWeak(filePath, isReadOnly);
@@ -101,4 +103,4 @@ Result<Vfs::ConvertToPlaceholderResult, QString> VfsOff::updateMetadata(const Sy
void VfsOff::fileStatusChanged(const QString &, SyncFileStatus)
{
-} \ No newline at end of file
+}