Commit 07f721a5 authored by Laurent Montel's avatar Laurent Montel 😁

Fix some cppcheck warning

parent 377a96aa
Pipeline #36183 passed with stage
in 26 minutes and 26 seconds
......@@ -165,7 +165,6 @@ bool QWinMetaFile::load(QBuffer &buffer)
WmfEnhMetaHeader eheader;
WmfMetaHeader header;
WmfPlaceableHeader pheader;
WORD checksum;
int filePos, idx, i;
WmfCmd *cmd, *last;
DWORD rdSize;
......@@ -194,7 +193,7 @@ bool QWinMetaFile::load(QBuffer &buffer)
st >> pheader.inch;
st >> pheader.reserved;
st >> pheader.checksum;
checksum = calcCheckSum(&pheader);
const WORD checksum = calcCheckSum(&pheader);
if (pheader.checksum != checksum) {
mIsPlaceable = false;
}
......
......@@ -15,6 +15,7 @@
PotentialPhishingDetailWidget::PotentialPhishingDetailWidget(QWidget *parent)
: QWidget(parent)
, mListWidget(new QListWidget(this))
{
QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->setContentsMargins(0, 0, 0, 0);
......@@ -22,7 +23,6 @@ PotentialPhishingDetailWidget::PotentialPhishingDetailWidget(QWidget *parent)
lab->setObjectName(QStringLiteral("label"));
mainLayout->addWidget(lab);
mListWidget = new QListWidget(this);
mListWidget->setObjectName(QStringLiteral("list_widget"));
mainLayout->addWidget(mListWidget);
}
......
......@@ -22,7 +22,7 @@ public:
void fillList(const QStringList &lst);
private:
QListWidget *mListWidget = nullptr;
QListWidget *const mListWidget = nullptr;
};
#endif // POTENTIALPHISHINGDETAILWIDGET_H
......@@ -225,11 +225,11 @@ void IdentityPage::slotRemoveIdentity()
KGuiItem(i18n("&Remove"),
QStringLiteral("edit-delete")))
== KMessageBox::Continue) {
for (QTreeWidgetItem *item : selectedItems) {
for (QTreeWidgetItem *selecteditem : selectedItems) {
IdentityListViewItem *identityItem = dynamic_cast<IdentityListViewItem *>(item);
identityName = identityItem->identity().identityName();
if (mIdentityManager->removeIdentity(identityName)) {
delete item;
delete selecteditem;
}
if (mIPage.mIdentityList->currentItem()) {
mIPage.mIdentityList->currentItem()->setSelected(true);
......
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