summaryrefslogtreecommitdiff
path: root/src/plugins/coreplugin/find
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2017-10-25 16:07:21 +0200
committerEike Ziller <eike.ziller@qt.io>2017-10-25 16:07:21 +0200
commit7f626b1182cae5407fa5495b264aa3d9170aa09d (patch)
tree9a87c924c34adf333a2bd33200a31afb29af511a /src/plugins/coreplugin/find
parent81f5c1c8ec19bb58fc4cfb607e2c2f8ebf5cc6d8 (diff)
parentdd6092371374212b407ff248ba1fa5ba8fde795d (diff)
downloadqt-creator-7f626b1182cae5407fa5495b264aa3d9170aa09d.tar.gz
Merge remote-tracking branch 'origin/4.5'
Change-Id: Iceaa4ca40b5318744bde8a76c6d3ccca08df71bb
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);
}
}