comparison src/changesetitem.cpp @ 566:1e76d1009167

Show matching branch names in search results as well as matching on comment
author Chris Cannam
date Wed, 29 Feb 2012 10:44:34 +0000
parents 533519ebc0cb
children 641ccce7c771
comparison
equal deleted inserted replaced
565:c2e212ab0068 566:1e76d1009167
90 m_detail = 0; 90 m_detail = 0;
91 emit detailHidden(); 91 emit detailHidden();
92 } 92 }
93 93
94 bool 94 bool
95 ChangesetItem::setSearchText(QString text) 95 ChangesetItem::matchSearchText(QString text)
96 { 96 {
97 m_searchText = text; 97 m_searchText = text;
98 m_searchMatches = (m_changeset->comment().contains 98 m_searchMatches = false;
99 (text, Qt::CaseInsensitive)); 99 if (m_showBranch) {
100 m_searchMatches = (m_changeset->branch().contains
101 (text, Qt::CaseInsensitive));
102 }
103 if (!m_searchMatches) {
104 m_searchMatches = (m_changeset->comment().contains
105 (text, Qt::CaseInsensitive));
106 }
100 return m_searchMatches; 107 return m_searchMatches;
101 } 108 }
102 109
103 void 110 void
104 ChangesetItem::mousePressEvent(QGraphicsSceneMouseEvent *e) 111 ChangesetItem::mousePressEvent(QGraphicsSceneMouseEvent *e)