We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 67f0859 commit 0886896Copy full SHA for 0886896
src/helpers/qownnotesmarkdownhighlighter.cpp
@@ -40,11 +40,10 @@ QOwnNotesMarkdownHighlighter::QOwnNotesMarkdownHighlighter(QTextDocument *parent
40
}
41
42
void QOwnNotesMarkdownHighlighter::updateCurrentNote(Note *note) {
43
- if (note != nullptr) {
44
- _currentNote = note;
45
- }
+ Q_ASSERT(note);
46
47
- _hasEncrypted = _currentNote ? _currentNote->hasEncryptedNoteText() : false;
+ _currentNote = note;
+ _hasEncrypted = _currentNote->hasEncryptedNoteText();
48
_highlightEncrypted = false; // Reset state when note changes
49
50
0 commit comments