From 14e4c19c2ce29b153c6655ff77e91a9e1c7c878c Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Sun, 13 Jan 2013 17:09:00 +0200 Subject: [PATCH] Search: Fix false positive rename warning Change-Id: Ic483d2ef05112463bc80d96ac4adf858b5f158fd Reviewed-by: hjk --- src/plugins/find/searchresultwidget.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/plugins/find/searchresultwidget.cpp b/src/plugins/find/searchresultwidget.cpp index 28eb8a9faeb..6acfeabb135 100644 --- a/src/plugins/find/searchresultwidget.cpp +++ b/src/plugins/find/searchresultwidget.cpp @@ -230,14 +230,13 @@ void SearchResultWidget::addResults(const QList &items, Search m_searchResultTreeView->addResults(items, mode); updateMatchesFoundLabel(); if (firstItems) { - QByteArray undoWarningIdName(UNDO_WARNING_ID); - if (!m_dontAskAgainGroup.isEmpty()) - undoWarningIdName.append('/' + m_dontAskAgainGroup.toLatin1()); - Core::Id undoWarningId(undoWarningIdName); - if (m_infoBar.canInfoBeAdded(undoWarningId)) { - Core::InfoBarEntry info(undoWarningId, tr("This change cannot be undone."), - Core::InfoBarEntry::GlobalSuppressionEnabled); - m_infoBar.addInfo(info); + if (!m_dontAskAgainGroup.isEmpty()) { + Core::Id undoWarningId(QByteArray(UNDO_WARNING_ID) + '/' + m_dontAskAgainGroup.toLatin1()); + if (m_infoBar.canInfoBeAdded(undoWarningId)) { + Core::InfoBarEntry info(undoWarningId, tr("This change cannot be undone."), + Core::InfoBarEntry::GlobalSuppressionEnabled); + m_infoBar.addInfo(info); + } } m_replaceTextEdit->setEnabled(true);