summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cppfindreferences.cpp
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@nokia.com>2011-09-09 08:46:51 +0200
committerEike Ziller <eike.ziller@nokia.com>2011-09-13 15:38:47 +0200
commit1e47de1416b0321507ed114f513bd6822f0b089a (patch)
tree4ea2228ebd8b582fb24b54254df8f27ae159f0f9 /src/plugins/cpptools/cppfindreferences.cpp
parent5990b039e89a41423b1b6acf40936aa8ba83f4f7 (diff)
downloadqt-creator-1e47de1416b0321507ed114f513bd6822f0b089a.tar.gz
Move advanced search dialog into search result pane.
And move the cancel button into the specific search result widget. Change-Id: Ide8173e1ec5de091e1c1332a2b0c47d9a30a4c87 Reviewed-on: http://codereview.qt-project.org/4555 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com> Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Diffstat (limited to 'src/plugins/cpptools/cppfindreferences.cpp')
-rw-r--r--src/plugins/cpptools/cppfindreferences.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/plugins/cpptools/cppfindreferences.cpp b/src/plugins/cpptools/cppfindreferences.cpp
index 52b0066fa0..9bcd6fbea1 100644
--- a/src/plugins/cpptools/cppfindreferences.cpp
+++ b/src/plugins/cpptools/cppfindreferences.cpp
@@ -274,7 +274,7 @@ void CppFindReferences::findAll_helper(Symbol *symbol, const LookupContext &cont
result = QtConcurrent::run(&find_helper, workingCopy, context, this, symbol);
m_watcher.setFuture(result);
-
+ connect(m_currentSearch, SIGNAL(cancelled()), this, SLOT(cancel()));
Core::FutureProgress *progress = progressManager->addTask(result, tr("Searching"),
CppTools::Constants::TASK_SEARCH);
@@ -310,6 +310,11 @@ void CppFindReferences::searchFinished()
emit changed();
}
+void CppFindReferences::cancel()
+{
+ m_watcher.cancel();
+}
+
void CppFindReferences::openEditor(const Find::SearchResultItem &item)
{
if (item.path.size() > 0) {
@@ -439,6 +444,7 @@ void CppFindReferences::findMacroUses(const Macro &macro)
QFuture<Usage> result;
result = QtConcurrent::run(&findMacroUses_helper, workingCopy, snapshot, this, macro);
m_watcher.setFuture(result);
+ connect(m_currentSearch, SIGNAL(cancelled()), this, SLOT(cancel()));
Core::ProgressManager *progressManager = Core::ICore::instance()->progressManager();
Core::FutureProgress *progress = progressManager->addTask(result, tr("Searching"),