diff --git a/src/widgets/helper/NotebookTab.cpp b/src/widgets/helper/NotebookTab.cpp index 42d9d4340..8b08c1bbd 100644 --- a/src/widgets/helper/NotebookTab.cpp +++ b/src/widgets/helper/NotebookTab.cpp @@ -307,11 +307,20 @@ bool NotebookTab::isSelected() const void NotebookTab::updateHighlightSources( const QHash &removedHighlightSources) { +#if QT_VERSION >= QT_VERSION_CHECK(6, 4, 0) for (const auto &[otherChannel, otherEvent] : removedHighlightSources.asKeyValueRange()) { this->highlightSources_.remove(otherChannel); } +#else + for (auto it = removedHighlightSources.cbegin(), + end = removedHighlightSources.cend(); + it != end; ++it) + { + this->highlightSources_.remove(it.key()); + } +#endif if (this->highlightSources_.empty()) { @@ -324,7 +333,7 @@ void NotebookTab::setSelected(bool value) { this->selected_ = value; - if (value == true) + if (value) { auto *splitNotebook = dynamic_cast(this->notebook_); if (splitNotebook)