Commit 0044c8d7 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix some cppcheck warning

parent 1b86d024
Pipeline #83517 canceled with stage
......@@ -239,9 +239,9 @@ KContacts::Addressee::List ImportWindowContact::importFile(const QString &fileNa
for (QDomElement urlInfo = url.firstChildElement(); !urlInfo.isNull(); urlInfo = urlInfo.nextSiblingElement()) {
const QString urlInfoTag = urlInfo.tagName();
if (urlInfoTag == QLatin1String("c:Value")) {
KContacts::ResourceLocatorUrl url;
url.setUrl(QUrl::fromUserInput(urlInfo.text()));
contact.insertExtraUrl(url);
KContacts::ResourceLocatorUrl resourceLocalUrl;
resourceLocalUrl.setUrl(QUrl::fromUserInput(urlInfo.text()));
contact.insertExtraUrl(resourceLocalUrl);
} else {
qCWarning(IMPORTEXPORTWINDOWSCONTACTPLUGIN_LOG) << " url info tag not supported yet " << urlInfoTag;
}
......
......@@ -37,8 +37,8 @@ void MergeContactSelectInformationScrollAreaTest::shouldHaveDefaultValue()
QVERIFY(widget);
for (int i = 0; i < stackedwidget->count(); ++i) {
QWidget *w = stackedwidget->widget(i);
const QString objName = w->objectName();
QWidget *widget = stackedwidget->widget(i);
const QString objName = widget->objectName();
bool hasCorrectName = (objName == QLatin1String("mergedcontactwidget")) || (objName == QLatin1String("selectwidget"));
QVERIFY(hasCorrectName);
}
......
......@@ -43,7 +43,6 @@ void MergeContactSelectInformationTabWidgetTest::shouldAddTab()
listItem << item1;
listItem << item2;
conflict.list = listItem;
KABMergeContacts::MergeContacts::ConflictInformations conflictInformation = KABMergeContacts::MergeContacts::Birthday;
conflict.list = listItem;
......
......@@ -118,7 +118,7 @@ void MergeContactWidget::slotUpdateMergeButton()
void MergeContactWidget::slotMergeContacts()
{
mSelectedItems = listSelectedContacts();
const Akonadi::Collection col = mCollectionCombobox->currentCollection();
// const Akonadi::Collection col = mCollectionCombobox->currentCollection();
KABMergeContacts::MergeContacts mergeContacts;
mergeContacts.setItems(mSelectedItems);
......
......@@ -109,10 +109,10 @@ void AutomaticAddContactsJob::slotFetchAllCollections(KJob *job)
const Akonadi::AgentType agentType = dlg->agentType();
if (agentType.isValid()) {
auto job = new Akonadi::AgentInstanceCreateJob(agentType, this);
connect(job, &KJob::result, this, &AutomaticAddContactsJob::slotResourceCreationDone);
job->configure();
job->start();
auto createJob = new Akonadi::AgentInstanceCreateJob(agentType, this);
connect(createJob, &KJob::result, this, &AutomaticAddContactsJob::slotResourceCreationDone);
createJob->configure();
createJob->start();
delete dlg;
return;
} else { // if agent is not valid => return error and finish job
......
......@@ -93,7 +93,7 @@ public:
QUrl::fromLocalFile(KIconLoader::global()->iconPath(QStringLiteral("document-open-remote"), KIconLoader::Small)).url();
if (!memento) {
auto memento = new MessageViewer::VcardMemento(lst);
memento = new MessageViewer::VcardMemento(lst);
msgPart->setMemento(memento);
auto nodeHelper = msgPart->nodeHelper();
......
......@@ -125,8 +125,6 @@ void ViewerPluginExternalscriptInterface::createAction(KActionCollection *ac)
menu->addAction(act);
mActionGroup->addAction(act);
}
}
if (!infos.isEmpty()) {
menu->addSeparator();
}
auto act = new QAction(QIcon::fromTheme(QStringLiteral("settings-configure")), i18n("Configure"), menu);
......
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