aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/texteditor/basefilefind.cpp
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@theqtcompany.com>2015-03-10 11:35:09 +0100
committerEike Ziller <eike.ziller@theqtcompany.com>2015-03-13 12:01:57 +0000
commitca41c24cc68ea51733ec329b50da219d99d533b4 (patch)
treee1b5189ee522ec93fe355348121d13cdd1dbb984 /src/plugins/texteditor/basefilefind.cpp
parenta320daff865cefa6a880c80f3bae897dd7557345 (diff)
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>
Diffstat (limited to 'src/plugins/texteditor/basefilefind.cpp')
-rw-r--r--src/plugins/texteditor/basefilefind.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/texteditor/basefilefind.cpp b/src/plugins/texteditor/basefilefind.cpp
index 9e00297faf..49bf4f4b91 100644
--- a/src/plugins/texteditor/basefilefind.cpp
+++ b/src/plugins/texteditor/basefilefind.cpp
@@ -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();
}