Find: Display "This change cannot be undone" only once.

Every click on Search Again displayed an additional warning message bar.

If the bar is closed with the cross button, it reappears on Search
Again.

This implementation extended InfoBar with a reuseable method
bool containsInfo(const QString &id).

Task-number: QTCREATORBUG-6873

Change-Id: I1de100d3526b861fc2de190e32f903795fed52c0
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
Andre Hartmann
2012-07-08 10:13:27 +02:00
committed by Eike Ziller
parent d0152332a4
commit db265b1fa9
3 changed files with 12 additions and 1 deletions

View File

@@ -91,6 +91,16 @@ void InfoBar::removeInfo(const QString &id)
}
}
bool InfoBar::containsInfo(const QString &id) const
{
QListIterator<InfoBarEntry> it(m_infoBarEntries);
while (it.hasNext())
if (it.next().id == id)
return true;
return false;
}
void InfoBar::clear()
{
if (!m_infoBarEntries.isEmpty()) {