Commit c8e8ab48 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Modernize code

parent 9282953a
Pipeline #100493 canceled with stage
......@@ -59,9 +59,7 @@ public:
job->start(mEmail, mName);
}
~KeyGenerationJob() override
{
}
~KeyGenerationJob() override = default;
Q_SIGNALS:
void result(const QString &fingerprint);
......@@ -231,9 +229,7 @@ public:
{
}
~KeyImportJob() override
{
}
~KeyImportJob() override = default;
void slotCancel() override
{
......
......@@ -103,7 +103,7 @@ QString Global::assistantBasePath()
if (info.isAbsolute()) {
return info.absolutePath() + QDir::separator();
}
return QString();
return {};
}
QString Global::unpackAssistant(const QUrl &remotePackageUrl)
......@@ -117,7 +117,7 @@ QString Global::unpackAssistant(const QUrl &remotePackageUrl)
KIO::Job *job = KIO::copy(remotePackageUrl, QUrl::fromLocalFile(localPackageFile), KIO::Overwrite | KIO::HideProgressInfo);
qCDebug(ACCOUNTWIZARD_LOG) << "downloading remote URL" << remotePackageUrl << "to" << localPackageFile;
if (!job->exec()) {
return QString();
return {};
}
}
......@@ -132,7 +132,7 @@ QString Global::unpackAssistant(const QUrl &remotePackageUrl)
return dest + file.fileName() + QLatin1Char('/') + assistant + QLatin1Char('/') + assistant + QLatin1String(".desktop");
} else {
qCDebug(ACCOUNTWIZARD_LOG) << "failed" << getJob->errorString();
return QString();
return {};
}
}
......
......@@ -20,9 +20,7 @@ Identity::Identity(QObject *parent)
Q_ASSERT(m_identity != nullptr);
}
Identity::~Identity()
{
}
Identity::~Identity() = default;
void Identity::create()
{
......
......@@ -20,9 +20,7 @@ Ispdb::Ispdb(QObject *parent)
{
}
Ispdb::~Ispdb()
{
}
Ispdb::~Ispdb() = default;
void Ispdb::setEmail(const QString &address)
{
......@@ -314,7 +312,7 @@ QString Ispdb::name(length l) const
} else if (l == Short) {
return mDisplayShortName;
} else {
return QString(); // make compiler happy. Not me.
return {}; // make compiler happy. Not me.
}
}
......
......@@ -162,9 +162,7 @@ private:
};
struct Server {
Server()
{
}
Server() = default;
bool isValid() const
{
......@@ -180,9 +178,7 @@ struct Server {
QDebug operator<<(QDebug d, const Server &t);
struct identity {
identity()
{
}
identity() = default;
bool isValid() const
{
......
......@@ -38,9 +38,7 @@ Key::Key(QObject *parent)
{
}
Key::~Key()
{
}
Key::~Key() = default;
void Key::setKey(const GpgME::Key &key)
{
......
......@@ -16,8 +16,8 @@ SPDX-License-Identifier: LGPL-2.0-or-later
#include <KDBusService>
#include <KLocalizedString>
#include <cstdio>
#include <iostream>
#include <stdio.h>
#include <KCrash>
#include <QCommandLineOption>
......
......@@ -16,9 +16,7 @@ RestoreLdapSettingsJob::RestoreLdapSettingsJob(QObject *parent)
{
}
RestoreLdapSettingsJob::~RestoreLdapSettingsJob()
{
}
RestoreLdapSettingsJob::~RestoreLdapSettingsJob() = default;
void RestoreLdapSettingsJob::start()
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment