forked from qt-creator/qt-creator
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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user