summaryrefslogtreecommitdiff
path: root/src/plugins/coreplugin/find
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/coreplugin/find')
-rw-r--r--src/plugins/coreplugin/find/findtoolwindow.cpp2
-rw-r--r--src/plugins/coreplugin/find/highlightscrollbar.cpp9
2 files changed, 6 insertions, 5 deletions
diff --git a/src/plugins/coreplugin/find/findtoolwindow.cpp b/src/plugins/coreplugin/find/findtoolwindow.cpp
index 05704437eb..4a2e2a2a89 100644
--- a/src/plugins/coreplugin/find/findtoolwindow.cpp
+++ b/src/plugins/coreplugin/find/findtoolwindow.cpp
@@ -47,7 +47,7 @@ static bool validateRegExp(Utils::FancyLineEdit *edit, QString *errorMessage)
{
if (edit->text().isEmpty()) {
if (errorMessage)
- *errorMessage = FindToolWindow::tr("Empty search term");
+ *errorMessage = FindToolWindow::tr("Empty search term.");
return false;
}
if (Find::hasFindFlag(FindRegularExpression)) {
diff --git a/src/plugins/coreplugin/find/highlightscrollbar.cpp b/src/plugins/coreplugin/find/highlightscrollbar.cpp
index 3c6f8b1204..03be40b693 100644
--- a/src/plugins/coreplugin/find/highlightscrollbar.cpp
+++ b/src/plugins/coreplugin/find/highlightscrollbar.cpp
@@ -293,10 +293,11 @@ void HighlightScrollBarOverlay::paintEvent(QPaintEvent *paintEvent)
QPainter painter(this);
painter.setRenderHint(QPainter::Antialiasing, false);
- foreach (Utils::Theme::Color themeColor, highlights.keys()) {
- const QColor &color = creatorTheme()->color(themeColor);
- for (int i = 0, total = highlights[themeColor].size(); i < total; ++i) {
- const QRect rect = highlights[themeColor][i];
+ const auto highlightEnd = highlights.cend();
+ for (auto highlightIt = highlights.cbegin(); highlightIt != highlightEnd; ++highlightIt) {
+ const QColor &color = creatorTheme()->color(highlightIt.key());
+ for (int i = 0, total = highlightIt.value().size(); i < total; ++i) {
+ const QRect rect = highlightIt.value().at(i);
painter.fillRect(rect, color);
}
}