Commit 0cbeea43 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix warning reported by cppcheck

parent 00cf0c66
Pipeline #36241 passed with stage
in 39 minutes and 9 seconds
......@@ -88,8 +88,8 @@ void TextEditAutoCorrectionWidget::keyPressEvent(QKeyEvent *e)
AutocorrectionTestWidget::AutocorrectionTestWidget(QWidget *parent)
: QWidget(parent)
, mConfig(KSharedConfig::openConfig(QStringLiteral("autocorrectionguirc")))
{
mConfig = KSharedConfig::openConfig(QStringLiteral("autocorrectionguirc"));
PimCommon::PimCommonSettings::self()->setSharedConfig(mConfig);
PimCommon::PimCommonSettings::self()->load();
......
......@@ -262,9 +262,9 @@ public:
firstElement = false;
} else {
if (mModel->insertRow(mModel->rowCount())) {
const QModelIndex index = mModel->index(mModel->rowCount() - 1, 0);
mModel->setData(index, KEmailAddress::extractEmailAddress(addr), AclModel::UserIdRole);
mModel->setData(index, static_cast<int>(dlg.permissions()), AclModel::PermissionsRole);
const QModelIndex rowindex = mModel->index(mModel->rowCount() - 1, 0);
mModel->setData(rowindex, KEmailAddress::extractEmailAddress(addr), AclModel::UserIdRole);
mModel->setData(rowindex, static_cast<int>(dlg.permissions()), AclModel::PermissionsRole);
}
}
}
......
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