forked from qt-creator/qt-creator
Git: Use a progress timer for Grep
Change-Id: I579bd9bf9e4060f4620afcbd42ac866d0d19bd37 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
c997e5e54c
commit
654aa3a0d7
@@ -27,6 +27,7 @@
|
|||||||
#include "gitclient.h"
|
#include "gitclient.h"
|
||||||
#include "gitplugin.h"
|
#include "gitplugin.h"
|
||||||
|
|
||||||
|
#include <coreplugin/progressmanager/progressmanager.h>
|
||||||
#include <coreplugin/vcsmanager.h>
|
#include <coreplugin/vcsmanager.h>
|
||||||
#include <texteditor/findinfiles.h>
|
#include <texteditor/findinfiles.h>
|
||||||
#include <vcsbase/vcscommand.h>
|
#include <vcsbase/vcscommand.h>
|
||||||
@@ -116,9 +117,6 @@ public:
|
|||||||
|
|
||||||
void exec()
|
void exec()
|
||||||
{
|
{
|
||||||
m_fi.setProgressRange(0, 1);
|
|
||||||
m_fi.setProgressValue(0);
|
|
||||||
|
|
||||||
QStringList arguments;
|
QStringList arguments;
|
||||||
arguments << QLatin1String("-c") << QLatin1String("color.grep.match=bold red")
|
arguments << QLatin1String("-c") << QLatin1String("color.grep.match=bold red")
|
||||||
<< QLatin1String("grep") << QLatin1String("-zn")
|
<< QLatin1String("grep") << QLatin1String("-zn")
|
||||||
@@ -161,6 +159,7 @@ public:
|
|||||||
TextEditor::FileFindParameters parameters)
|
TextEditor::FileFindParameters parameters)
|
||||||
{
|
{
|
||||||
GitGrepRunner runner(fi, parameters);
|
GitGrepRunner runner(fi, parameters);
|
||||||
|
Core::ProgressTimer progress(fi, 20);
|
||||||
runner.exec();
|
runner.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user