Commit 66cea2e4 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix clazy warning

parent 8ed8bf1f
Pipeline #23127 passed with stage
in 8 minutes and 52 seconds
......@@ -39,7 +39,7 @@ void NoteEditorUtilsTest::testAddCheckmark_data()
QTest::addColumn<QString>("input");
QTest::addColumn<int>("position");
QTest::newRow("standard") << QStringLiteral("foo") << 0;
QTest::newRow("emptyline") << QStringLiteral("") << 0;
QTest::newRow("emptyline") << QString() << 0;
}
void NoteEditorUtilsTest::testAddCheckmark()
......
......@@ -333,6 +333,7 @@ void KNotesPart::printSelectedNotes(bool preview)
}
if (!printingTheme.isEmpty()) {
QList<KNotePrintObject *> listPrintObj;
listPrintObj.reserve(lst.count());
for (QListWidgetItem *item : lst) {
listPrintObj.append(new KNotePrintObject(static_cast<KNotesIconViewItem *>(item)->item()));
}
......@@ -446,7 +447,7 @@ void KNotesPart::killSelectedNotes()
return;
}
QList<KNotesIconViewItem *> items;
items.reserve(lst.count());
for (QListWidgetItem *item : lst) {
KNotesIconViewItem *knivi = static_cast<KNotesIconViewItem *>(item);
items.append(knivi);
......
......@@ -40,7 +40,7 @@ QString KNoteGrantleePrint::notesToHtml(const QList<KNotePrintObject *> &lst)
QVariantList notes;
notes.reserve(lst.count());
for (KNotePrintObject *n : lst) {
notes << QVariant::fromValue(static_cast<QObject *>(n));
notes << QVariant::fromValue(n);
}
QVariantHash variantList;
variantList.insert(QStringLiteral("notes"), notes);
......
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