Changeset View
Changeset View
Standalone View
Standalone View
src/search/katesearchbar.cpp
Show First 20 Lines • Show All 897 Lines • ▼ Show 20 Line(s) | 893 | { | |||
---|---|---|---|---|---|
898 | if (m_matchCounter > 0) { | 898 | if (m_matchCounter > 0) { | ||
899 | if (m_replaceMode) { | 899 | if (m_replaceMode) { | ||
900 | static_cast<KTextEditor::DocumentPrivate *>(m_view->document())->finishEditing(); | 900 | static_cast<KTextEditor::DocumentPrivate *>(m_view->document())->finishEditing(); | ||
901 | } | 901 | } | ||
902 | } | 902 | } | ||
903 | 903 | | |||
904 | // Add ScrollBarMarks | 904 | // Add ScrollBarMarks | ||
905 | if (!m_highlightRanges.empty()) { | 905 | if (!m_highlightRanges.empty()) { | ||
906 | KTextEditor::MarkInterface *iface = qobject_cast<KTextEditor::MarkInterface *>(m_view->document()); | 906 | KTextEditor::MarkInterfaceV2 *iface = qobject_cast<KTextEditor::MarkInterfaceV2 *>(m_view->document()); | ||
dhaumann: maybe use `auto` here. | |||||
907 | if (iface) { | 907 | if (iface) { | ||
908 | iface->setMarkDescription(KTextEditor::MarkInterface::SearchMatch, i18n("SearchHighLight")); | 908 | iface->setMarkDescription(KTextEditor::MarkInterface::SearchMatch, i18n("SearchHighLight")); | ||
909 | iface->setMarkPixmap(KTextEditor::MarkInterface::SearchMatch, QIcon().pixmap(0, 0)); | 909 | iface->setMarkIcon(KTextEditor::MarkInterface::SearchMatch, QIcon()); | ||
910 | for (const Range &r : m_highlightRanges) { | 910 | for (const Range &r : m_highlightRanges) { | ||
911 | iface->addMark(r.start().line(), KTextEditor::MarkInterface::SearchMatch); | 911 | iface->addMark(r.start().line(), KTextEditor::MarkInterface::SearchMatch); | ||
912 | } | 912 | } | ||
913 | } | 913 | } | ||
914 | } | 914 | } | ||
915 | 915 | | |||
916 | // Add highlights | 916 | // Add highlights | ||
917 | if (m_replaceMode) { | 917 | if (m_replaceMode) { | ||
▲ Show 20 Lines • Show All 769 Lines • Show Last 20 Lines |
maybe use auto here.