Commit 6a6c4210 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix cppcheck warning

parent e6625d84
......@@ -239,9 +239,9 @@ public:
if (group.hasKey(QStringLiteral("templateCount"))) {
const int numberTemplate = group.readEntry("templateCount", 0);
for (int i = 0; i < numberTemplate; ++i) {
KConfigGroup group = configFile->group(QStringLiteral("templateDefine_%1").arg(i));
const QString name = group.readEntry("Name", QString());
const QString text = group.readEntry("Text", QString());
KConfigGroup templateGroup = configFile->group(QStringLiteral("templateDefine_%1").arg(i));
const QString name = templateGroup.readEntry("Name", QString());
const QString text = templateGroup.readEntry("Text", QString());
createListWidgetItem(name, text, false);
}
......
......@@ -92,7 +92,6 @@ void TranslatorTest::shouldInvertLanguageWhenClickOnInvertButton()
from->setCurrentIndex(fromIndex);
to->setCurrentIndex(toIndex);
QPushButton *invert = edit.findChild<QPushButton *>(QStringLiteral("invert-button"));
QCOMPARE(fromIndex != toIndex, true);
QTest::mouseClick(invert, Qt::LeftButton);
const int newFromIndex = from->currentIndex();
const int newToIndex = to->currentIndex();
......
......@@ -86,7 +86,7 @@ void AclModifyJob::slotGroupSearchResult(KJob *job)
mNewRight[ rawEmail ] = mIt.value();
}
}
mIt++;
++mIt;
Q_EMIT searchNextContact();
}
......
......@@ -195,7 +195,7 @@ QHash<PimCommon::ActionType::Type, QList<QAction *> > PluginInterface::actionsTy
}
if (interface->plugin()->hasPopupMenuSupport()) {
type = PimCommon::ActionType::PopupMenu;
QList<QAction *> lst = listType.value(type);
lst = listType.value(type);
if (!lst.isEmpty()) {
QAction *act = new QAction(this);
act->setSeparator(true);
......@@ -207,7 +207,7 @@ QHash<PimCommon::ActionType::Type, QList<QAction *> > PluginInterface::actionsTy
}
if (interface->plugin()->hasToolBarSupport()) {
type = PimCommon::ActionType::ToolBar;
QList<QAction *> lst = listType.value(type);
lst = listType.value(type);
if (!lst.isEmpty()) {
QAction *act = new QAction(this);
act->setSeparator(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