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

Fix clazy warning

parent 905fda17
......@@ -67,7 +67,7 @@ private Q_SLOTS:
first->setCurrentIndex(2);
QCOMPARE(dialog.editAttendees().count(), 1);
QCOMPARE(dialog.updateAttendees().count(), 2);
QCOMPARE(dialog.editAttendees()[0], attendee1);
QCOMPARE(dialog.editAttendees().constFirst(), attendee1);
}
};
......
......@@ -57,7 +57,7 @@ QTreeWidgetItem *AutoCheckTreeWidget::itemByPath(const QStringList &path) const
QStringList newPath = path;
QTreeWidgetItem *item = nullptr;
while (newPath.count()) {
while (!newPath.isEmpty()) {
item = findItem(item, newPath.takeFirst());
if (!item) {
return nullptr;
......
......@@ -129,7 +129,7 @@ static QStringList getSelectedCategories(AutoCheckTreeWidget *categoriesView)
QTreeWidgetItemIterator it(categoriesView, QTreeWidgetItemIterator::Checked);
while (*it) {
QStringList path = categoriesView->pathByItem(*it++);
if (path.count()) {
if (!path.isEmpty()) {
path.replaceInStrings(CategoryConfig::categorySeparator, QLatin1Char('\\')
+CategoryConfig::categorySeparator);
categories.append(path.join(CategoryConfig::categorySeparator));
......
......@@ -112,7 +112,7 @@ static QStringList getSelectedCategoriesFromCategoriesView(AutoCheckTreeWidget *
QTreeWidgetItemIterator it(categoriesView, QTreeWidgetItemIterator::Checked);
while (*it) {
QStringList path = categoriesView->pathByItem(*it++);
if (path.count()) {
if (!path.isEmpty()) {
path.replaceInStrings(CategoryConfig::categorySeparator, QLatin1Char('\\')
+CategoryConfig::categorySeparator);
categories.append(path.join(CategoryConfig::categorySeparator));
......
......@@ -88,18 +88,14 @@ ItemEditorPrivate::ItemEditorPrivate(Akonadi::IncidenceChanger *changer, EditorI
qq), qq);
qq->connect(mChanger,
SIGNAL(modifyFinished(int,Akonadi::Item,Akonadi::IncidenceChanger::ResultCode,
QString)),
SIGNAL(modifyFinished(int,Akonadi::Item,Akonadi::IncidenceChanger::ResultCode,QString)),
qq,
SLOT(onModifyFinished(int,Akonadi::Item,Akonadi::IncidenceChanger::ResultCode,
QString)));
SLOT(onModifyFinished(int,Akonadi::Item,Akonadi::IncidenceChanger::ResultCode,QString)));
qq->connect(mChanger,
SIGNAL(createFinished(int,Akonadi::Item,Akonadi::IncidenceChanger::ResultCode,
QString)),
SIGNAL(createFinished(int,Akonadi::Item,Akonadi::IncidenceChanger::ResultCode,QString)),
qq,
SLOT(onCreateFinished(int,Akonadi::Item,Akonadi::IncidenceChanger::ResultCode,
QString)));
SLOT(onCreateFinished(int,Akonadi::Item,Akonadi::IncidenceChanger::ResultCode,QString)));
}
void ItemEditorPrivate::moveJobFinished(KJob *job)
......
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