summaryrefslogtreecommitdiff
path: root/src/plugins/diffeditor/diffeditor.cpp
diff options
context:
space:
mode:
authorDaniel Teske <daniel.teske@theqtcompany.com>2015-09-04 14:28:22 +0200
committerDaniel Teske <daniel.teske@theqtcompany.com>2015-09-07 12:26:47 +0000
commitda4ab870a150aa8c97d72997adc171c9c59eed2e (patch)
tree0e0d1a4fcc5e51aedbb4a2b23dccf9a9042e0758 /src/plugins/diffeditor/diffeditor.cpp
parentdd7eff037133e7723606113e56c3e346fe4d4aeb (diff)
downloadqt-creator-da4ab870a150aa8c97d72997adc171c9c59eed2e.tar.gz
Vcs: Simplify code by using Utils::equal
Change-Id: I8c58010e85c7e2a4b8a7c01fb81ce6b528f77b7d Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Diffstat (limited to 'src/plugins/diffeditor/diffeditor.cpp')
-rw-r--r--src/plugins/diffeditor/diffeditor.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/diffeditor/diffeditor.cpp b/src/plugins/diffeditor/diffeditor.cpp
index 485f191f81..f22d191b35 100644
--- a/src/plugins/diffeditor/diffeditor.cpp
+++ b/src/plugins/diffeditor/diffeditor.cpp
@@ -357,7 +357,7 @@ Core::IEditor *DiffEditor::duplicate()
Core::Id id = currentView()->id();
IDiffView *view = Utils::findOr(editor->m_views, editor->m_views.at(0),
- [id](IDiffView *v) { return v->id() == id; });
+ Utils::equal(&IDiffView::id, id));
QTC_ASSERT(view, view = editor->currentView());
editor->setupView(view);
@@ -607,7 +607,8 @@ IDiffView *DiffEditor::loadSettings()
Core::Id id = Core::Id::fromSetting(s->value(QLatin1String(diffViewKeyC)));
s->endGroup();
- IDiffView *view = Utils::findOr(m_views, m_views.at(0), [id](IDiffView *v) { return v->id() == id; });
+ IDiffView *view = Utils::findOr(m_views, m_views.at(0),
+ Utils::equal(&IDiffView::id, id));
QTC_CHECK(view);
return view;