Commit 3a2a751c authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix clazy warning

parent e91cdee6
Pipeline #61728 failed with stage
in 25 minutes and 31 seconds
......@@ -95,7 +95,7 @@ void MigrationStatusWidget::onItemActivated(const QModelIndex &index)
{
auto hboxLayout = new QHBoxLayout;
auto label =
new QLabel(QStringLiteral("<a href=\"%1\">%2</a>").arg(index.data(MigratorModel::LogfileRole).toString()).arg(ki18n("Logfile").toString()), widget);
new QLabel(QStringLiteral("<a href=\"%1\">%2</a>").arg(index.data(MigratorModel::LogfileRole).toString(), ki18n("Logfile").toString()), widget);
label->setOpenExternalLinks(true);
hboxLayout->addWidget(label);
hboxLayout->addStretch();
......
......@@ -64,7 +64,7 @@ std::unique_ptr<QSettings> settingsForResource(const Akonadi::AgentInstance &ins
return {};
}
const auto configFile = Akonadi::ServerManager::self()->addNamespace(instance.identifier()) + QStringLiteral("rc");
const QString configFile = Akonadi::ServerManager::self()->addNamespace(instance.identifier()) + QStringLiteral("rc");
const auto configPath = QStandardPaths::locate(QStandardPaths::ConfigLocation, configFile);
return std::make_unique<QSettings>(configPath, QSettings::IniFormat);
}
......
......@@ -40,7 +40,7 @@ private Q_SLOTS:
void xqueryResultsInCallback();
private:
QPair<QString, ushort> synchronousHttpReq(const QString &content, ushort port, std::function<bool(const QString &)> chunkFn = nullptr);
QPair<QString, ushort> synchronousHttpReq(const QString &content, ushort port, const std::function<bool(const QString &)> &chunkFn = nullptr);
};
void UtEwsFakeSrvTest::emptyDialog()
......@@ -232,7 +232,7 @@ void UtEwsFakeSrvTest::emptyResponse()
void UtEwsFakeSrvTest::getEventsRequest()
{
const FakeEwsServer::DialogEntry::List emptyDialog;
// const FakeEwsServer::DialogEntry::List emptyDialog;
const QFETCH(QString, request);
const QFETCH(QStringList, events);
......@@ -515,7 +515,7 @@ void UtEwsFakeSrvTest::getEventsRequest_data()
void UtEwsFakeSrvTest::getStreamingEventsRequest()
{
bool callbackCalled = false;
const FakeEwsServer::DialogEntry::List emptyDialog;
// const FakeEwsServer::DialogEntry::List emptyDialog;
QScopedPointer<FakeEwsServer> srv(new FakeEwsServer(this));
QVERIFY(srv->start());
......@@ -791,7 +791,7 @@ void UtEwsFakeSrvTest::xqueryResultsInCallback()
QCOMPARE(resp.second, static_cast<ushort>(200));
}
QPair<QString, ushort> UtEwsFakeSrvTest::synchronousHttpReq(const QString &content, ushort port, std::function<bool(const QString &)> chunkFn)
QPair<QString, ushort> UtEwsFakeSrvTest::synchronousHttpReq(const QString &content, ushort port, const std::function<bool(const QString &)> &chunkFn)
{
QNetworkAccessManager nam(this);
QUrl url(QStringLiteral("http://127.0.0.1:%1/EWS/Exchange.asmx").arg(port));
......
......@@ -77,6 +77,7 @@ void KolabResourceState::collectionAttributesRetrieved(const Akonadi::Collection
void KolabResourceState::collectionsRetrieved(const Akonadi::Collection::List &collections)
{
Akonadi::Collection::List modifiedCollections;
modifiedCollections.reserve(collections.count());
for (const Akonadi::Collection &col : collections) {
modifiedCollections << processAnnotations(col);
}
......
......@@ -56,7 +56,7 @@ QString OXUtils::writeDateTime(const QDateTime &value)
return QString(result + QLatin1String("000"));
}
QString OXUtils::writeDate(const QDate &value)
QString OXUtils::writeDate(QDate value)
{
return writeDateTime(QDateTime(value, QTime(0, 0, 0), Qt::UTC));
}
......
......@@ -20,7 +20,7 @@ QString writeNumber(qlonglong value);
QString writeString(const QString &value);
QString writeName(const QString &value);
QString writeDateTime(const QDateTime &value);
QString writeDate(const QDate &value);
QString writeDate(QDate value);
bool readBoolean(const QString &text);
qlonglong readNumber(const QString &text);
......
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