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

Fix clazy warning

parent 1dc1e6b5
Pipeline #22592 passed with stage
in 58 minutes and 34 seconds
......@@ -19,6 +19,7 @@
#include "sendvcardsjob.h"
#include "sendvcardsplugininterface.h"
#include "kaddressbook_sendvcardsplugin_debug.h"
#include <KMessageBox>
#include <KLocalizedString>
......@@ -27,7 +28,6 @@
SendVcardsPluginInterface::SendVcardsPluginInterface(QObject *parent)
: PimCommon::GenericPluginInterface(parent)
, mAction(nullptr)
{
}
......@@ -73,7 +73,9 @@ void SendVcardsPluginInterface::exec()
if (!mListItems.isEmpty()) {
KABSendVCards::SendVcardsJob *sendVcards = new KABSendVCards::SendVcardsJob(mListItems, this);
connect(sendVcards, &KABSendVCards::SendVcardsJob::sendVCardsError, this, &SendVcardsPluginInterface::slotSendVcardsError);
sendVcards->start();
if (!sendVcards->start()) {
qCDebug(KADDRESSBOOK_SENDVCARDS_LOG) << "Impossible to send vcard";
}
}
}
......
......@@ -78,7 +78,7 @@ void ShortUrlEnginePluginManagerPrivate::initializePlugins()
mPluginList.push_back(info);
unique.insert(info.metaDataFileNameBaseName);
}
QVector<ShortUrlEnginePluginInfo>::iterator end(mPluginList.end());
const QVector<ShortUrlEnginePluginInfo>::iterator end(mPluginList.end());
for (QVector<ShortUrlEnginePluginInfo>::iterator it = mPluginList.begin(); it != end; ++it) {
loadPlugin(&(*it));
}
......
......@@ -465,6 +465,7 @@ public:
selectMessage
= i18n("<qt>Several of your identities match the receiver of this message,<br/>"
"please choose which of the following addresses is yours:</qt>");
possibleAddrs.reserve(addrs.count() + ccaddrs.count());
for (const KMime::Types::Mailbox &mbx : qAsConst(addrs)) {
possibleAddrs.append(QLatin1String(mbx.address()));
}
......
......@@ -46,7 +46,8 @@ QVector<ItineraryKDEConnectHandler::Device> ItineraryKDEConnectHandler::devices(
}
QVector<Device> devices;
for (const QString &deviceId : reply.value()) {
const auto values = reply.value();
for (const QString &deviceId : values) {
QDBusInterface deviceIface(QStringLiteral("org.kde.kdeconnect"), QStringLiteral("/modules/kdeconnect/devices/") + deviceId, QStringLiteral("org.kde.kdeconnect.device"));
QDBusReply<bool> pluginReply = deviceIface.call(QStringLiteral("hasPlugin"), QLatin1String("kdeconnect_share"));
......
......@@ -58,7 +58,7 @@ void EventModel::createMonitor()
// This is super-ugly, but the only way how to insert into CalendarBase
// without having direct access to CalendarBasePrivate.
// changeId is luckily ignored by CalendarBase.
incidenceChanger()->createFinished(0, item, Akonadi::IncidenceChanger::ResultCodeSuccess, QString());
Q_EMIT incidenceChanger()->createFinished(0, item, Akonadi::IncidenceChanger::ResultCodeSuccess, QString());
});
connect(mMonitor, &Akonadi::Monitor::itemChanged,
this, [this](const Akonadi::Item &item) {
......
......@@ -55,7 +55,7 @@ AdBlockBlockableItemsWidget::AdBlockBlockableItemsWidget(QWidget *parent)
mListItems->setContextMenuPolicy(Qt::CustomContextMenu);
mListItems->setAlternatingRowColors(true);
mListItems->setRootIsDecorated(false);
connect(mListItems, &PimCommon::CustomTreeView::customContextMenuRequested, this, &AdBlockBlockableItemsWidget::customContextMenuRequested);
connect(mListItems, &PimCommon::CustomTreeView::customContextMenuRequested, this, &AdBlockBlockableItemsWidget::slotCustomContextMenuRequested);
const QStringList lst = {i18n("Filter"), i18n("Address"), i18n("Type")};
mListItems->setHeaderLabels(lst);
......@@ -110,7 +110,7 @@ void AdBlockBlockableItemsWidget::saveFilters()
}
}
void AdBlockBlockableItemsWidget::customContextMenuRequested(const QPoint &)
void AdBlockBlockableItemsWidget::slotCustomContextMenuRequested(const QPoint &)
{
QTreeWidgetItem *item = mListItems->currentItem();
if (!item) {
......
......@@ -56,7 +56,7 @@ public:
static QString elementTypeToI18n(AdBlockBlockableItemsWidget::TypeElement type);
private:
void customContextMenuRequested(const QPoint &);
void slotCustomContextMenuRequested(const QPoint &);
void slotCopyFilterItem();
void slotOpenItem();
void slotBlockItem();
......
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