Show build and search progress detail also in status bar.

A widget specifically layouted for the status bar can now be registered
with the progress information. The newest one is made visible next to
the summary progress bar. If a newer one vanishes, the older becomes
visible again.

Change-Id: Iedf0e88a542ea442ae86fa51c792c68fbc6eef3c
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Eike Ziller
2013-04-08 15:02:30 +02:00
parent 9e714006ee
commit 920e7ca1f1
8 changed files with 98 additions and 13 deletions

View File

@@ -160,6 +160,8 @@ void BaseFileFind::runSearch(Find::SearchResult *search)
FileFindParameters parameters = search->userData().value<FileFindParameters>();
CountingLabel *label = new CountingLabel;
connect(search, SIGNAL(countChanged(int)), label, SLOT(updateCount(int)));
CountingLabel *statusLabel = new CountingLabel;
connect(search, SIGNAL(countChanged(int)), statusLabel, SLOT(updateCount(int)));
Find::SearchResultWindow::instance()->popup(Core::IOutputPane::Flags(Core::IOutputPane::ModeSwitch | Core::IOutputPane::WithFocus));
QFutureWatcher<FileSearchResultList> *watcher = new QFutureWatcher<FileSearchResultList>();
d->m_watchers.insert(watcher, search);
@@ -182,6 +184,7 @@ void BaseFileFind::runSearch(Find::SearchResult *search)
tr("Search"),
QLatin1String(Constants::TASK_SEARCH));
progress->setWidget(label);
progress->setStatusBarWidget(statusLabel);
connect(progress, SIGNAL(clicked()), search, SLOT(popup()));
}