Find: Show number of replaced items after replace all

Show a fading indicator over the editor, or over the main window in case
of global search & replace.

Change-Id: I84a982bcfed558c0f84c08c3625a0cad4c5409d6
Task-number: QTCREATORBUG-3494
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Eike Ziller
2015-03-10 11:35:09 +01:00
parent a320daff86
commit ca41c24cc6
4 changed files with 27 additions and 10 deletions

View File

@@ -42,9 +42,10 @@
#include <coreplugin/find/ifindsupport.h>
#include <texteditor/texteditor.h>
#include <texteditor/refactoringchanges.h>
#include <utils/stylehelper.h>
#include <utils/qtcassert.h>
#include <utils/fadingindicator.h>
#include <utils/filesearch.h>
#include <utils/qtcassert.h>
#include <utils/stylehelper.h>
#include <QDebug>
#include <QSettings>
@@ -208,6 +209,9 @@ void BaseFileFind::doReplace(const QString &text,
{
QStringList files = replaceAll(text, items, preserveCase);
if (!files.isEmpty()) {
Utils::FadingIndicator::showText(ICore::mainWindow(),
tr("%1 occurrences replaced.").arg(items.size()),
Utils::FadingIndicator::SmallText);
DocumentManager::notifyFilesChangedInternally(files);
SearchResultWindow::instance()->hide();
}