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

Fix some clazy warning

parent fe3d5b70
...@@ -153,7 +153,7 @@ QString NoteUtils::createToolTip(const Akonadi::Item &item) ...@@ -153,7 +153,7 @@ QString NoteUtils::createToolTip(const Akonadi::Item &item)
NoteUtils::NoteText NoteUtils::extractNoteText(QString noteText, const QString &titleAddon) NoteUtils::NoteText NoteUtils::extractNoteText(QString noteText, const QString &titleAddon)
{ {
const int pos = noteText.indexOf(QRegularExpression(QLatin1String("[\r\n]"))); const int pos = noteText.indexOf(QRegularExpression(QStringLiteral("[\r\n]")));
const QString noteTitle = noteText.left(pos).trimmed() + titleAddon; const QString noteTitle = noteText.left(pos).trimmed() + titleAddon;
noteText = noteText.mid(pos).trimmed(); noteText = noteText.mid(pos).trimmed();
......
...@@ -51,6 +51,8 @@ public: ...@@ -51,6 +51,8 @@ public:
explicit KNotesApp(QWidget *parent = nullptr); explicit KNotesApp(QWidget *parent = nullptr);
~KNotesApp(); ~KNotesApp();
Q_REQUIRED_RESULT QString name(Akonadi::Item::Id id) const;
Q_REQUIRED_RESULT QString text(Akonadi::Item::Id id) const;
public Q_SLOTS: public Q_SLOTS:
void newNote(const QString &name = QString(), const QString &text = QString()); void newNote(const QString &name = QString(), const QString &text = QString());
void newNoteFromClipboard(); void newNoteFromClipboard();
...@@ -58,8 +60,6 @@ public Q_SLOTS: ...@@ -58,8 +60,6 @@ public Q_SLOTS:
void showAllNotes() const; void showAllNotes() const;
void showNote(Akonadi::Item::Id id) const; void showNote(Akonadi::Item::Id id) const;
void hideNote(Akonadi::Item::Id id) const; void hideNote(Akonadi::Item::Id id) const;
QString name(Akonadi::Item::Id id) const;
QString text(Akonadi::Item::Id id) const;
void setName(Akonadi::Item::Id id, const QString &newName); void setName(Akonadi::Item::Id id, const QString &newName);
void setText(Akonadi::Item::Id id, const QString &newText); void setText(Akonadi::Item::Id id, const QString &newText);
......
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