Commit 121a4ae1 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix some cppcheck warning + initialize variable in header + const

variables
parent 30e4c9a1
Pipeline #83378 passed with stage
in 8 minutes and 53 seconds
......@@ -14,7 +14,7 @@
class TAutoconfLdap : public AutoconfigKolabLdap
{
public:
void startJob(const QUrl &url) Q_DECL_OVERRIDE
void startJob(const QUrl &url) override
{
QCOMPARE(url, expectedUrls.takeFirst());
if (replace.contains(url)) {
......
......@@ -37,7 +37,6 @@ static QVariant::Type argumentType(const QMetaObject *mo, const QString &method)
if (m.methodSignature().isEmpty()) {
qCWarning(ACCOUNTWIZARD_LOG) << "Did not find D-Bus method: " << method << " available methods are:";
const int numberOfMethod(mo->methodCount());
for (int i = 0; i < numberOfMethod; ++i) {
qCWarning(ACCOUNTWIZARD_LOG) << mo->method(i).methodSignature();
}
......@@ -55,7 +54,6 @@ static QVariant::Type argumentType(const QMetaObject *mo, const QString &method)
Resource::Resource(const QString &type, QObject *parent)
: SetupObject(parent)
, m_typeIdentifier(type)
, m_editMode(false)
{
}
......
......@@ -31,7 +31,8 @@ public Q_SLOTS:
private:
void instanceCreateResult(KJob *job);
QString m_typeIdentifier, m_name;
const QString m_typeIdentifier;
QString m_name;
QMap<QString, QVariant> m_settings;
Akonadi::AgentInstance m_instance;
......
......@@ -292,8 +292,6 @@ QObject *SetupManager::ispDB(const QString &type)
return new SetupAutoconfigKolabLdap(this);
} else if (t == QLatin1String("autoconfigkolabfreebusy")) {
return new SetupAutoconfigKolabFreebusy(this);
} else if (t == QLatin1String("ispdb")) {
return new SetupIspdb(this);
} else {
return new SetupIspdb(this);
}
......
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