summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cppfindreferences.cpp
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2016-03-12 22:53:45 +0200
committerOrgad Shaneh <orgads@gmail.com>2016-05-23 09:02:21 +0000
commit46cacd901aafa701020facbd6421da20f726425d (patch)
treefecc0e100e0a990dbb4f1cacc9c629503216d59d /src/plugins/cpptools/cppfindreferences.cpp
parent324e221bee71b4fe4d525626acfa8edbcec3f16b (diff)
downloadqt-creator-46cacd901aafa701020facbd6421da20f726425d.tar.gz
CppTools: Use Qt5-style connects
Mostly done by clazy. Change-Id: I0fbbbe1a2d28b79bcb83093d608bca6e2f927ebb Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Diffstat (limited to 'src/plugins/cpptools/cppfindreferences.cpp')
-rw-r--r--src/plugins/cpptools/cppfindreferences.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/plugins/cpptools/cppfindreferences.cpp b/src/plugins/cpptools/cppfindreferences.cpp
index 0f7bc7e2c4..6a8fae3651 100644
--- a/src/plugins/cpptools/cppfindreferences.cpp
+++ b/src/plugins/cpptools/cppfindreferences.cpp
@@ -329,11 +329,11 @@ void CppFindReferences::findUsages(Symbol *symbol,
SearchResultWindow::PreserveCaseDisabled,
QLatin1String("CppEditor"));
search->setTextToReplace(replacement);
- connect(search, SIGNAL(replaceButtonClicked(QString,QList<Core::SearchResultItem>,bool)),
- SLOT(onReplaceButtonClicked(QString,QList<Core::SearchResultItem>,bool)));
- connect(search, SIGNAL(paused(bool)), this, SLOT(setPaused(bool)));
+ connect(search, &SearchResult::replaceButtonClicked,
+ this, &CppFindReferences::onReplaceButtonClicked);
+ connect(search, &SearchResult::paused, this, &CppFindReferences::setPaused);
search->setSearchAgainSupported(true);
- connect(search, SIGNAL(searchAgainRequested()), this, SLOT(searchAgain()));
+ connect(search, &SearchResult::searchAgainRequested, this, &CppFindReferences::searchAgain);
CppFindReferencesParameters parameters;
parameters.symbolId = fullIdForSymbol(symbol);
parameters.symbolFileName = QByteArray(symbol->fileName());
@@ -358,9 +358,9 @@ void CppFindReferences::findAll_helper(SearchResult *search, Symbol *symbol,
search->finishSearch(false);
return;
}
- connect(search, SIGNAL(cancelled()), this, SLOT(cancel()));
- connect(search, SIGNAL(activated(Core::SearchResultItem)),
- this, SLOT(openEditor(Core::SearchResultItem)));
+ connect(search, &SearchResult::cancelled, this, &CppFindReferences::cancel);
+ connect(search, &SearchResult::activated,
+ this, &CppFindReferences::openEditor);
SearchResultWindow::instance()->popup(IOutputPane::ModeSwitch | IOutputPane::WithFocus);
const WorkingCopy workingCopy = m_modelManager->workingCopy();
@@ -372,7 +372,7 @@ void CppFindReferences::findAll_helper(SearchResult *search, Symbol *symbol,
FutureProgress *progress = ProgressManager::addTask(result, tr("Searching for Usages"),
CppTools::Constants::TASK_SEARCH);
- connect(progress, SIGNAL(clicked()), search, SLOT(popup()));
+ connect(progress, &FutureProgress::clicked, search, &SearchResult::popup);
}
void CppFindReferences::onReplaceButtonClicked(const QString &text,
@@ -645,15 +645,15 @@ void CppFindReferences::findMacroUses(const Macro &macro, const QString &replace
QLatin1String("CppEditor"));
search->setTextToReplace(replacement);
- connect(search, SIGNAL(replaceButtonClicked(QString,QList<Core::SearchResultItem>,bool)),
- SLOT(onReplaceButtonClicked(QString,QList<Core::SearchResultItem>,bool)));
+ connect(search, &SearchResult::replaceButtonClicked,
+ this, &CppFindReferences::onReplaceButtonClicked);
SearchResultWindow::instance()->popup(IOutputPane::ModeSwitch | IOutputPane::WithFocus);
- connect(search, SIGNAL(activated(Core::SearchResultItem)),
- this, SLOT(openEditor(Core::SearchResultItem)));
- connect(search, SIGNAL(cancelled()), this, SLOT(cancel()));
- connect(search, SIGNAL(paused(bool)), this, SLOT(setPaused(bool)));
+ connect(search, &SearchResult::activated,
+ this, &CppFindReferences::openEditor);
+ connect(search, &SearchResult::cancelled, this, &CppFindReferences::cancel);
+ connect(search, &SearchResult::paused, this, &CppFindReferences::setPaused);
const Snapshot snapshot = m_modelManager->snapshot();
const WorkingCopy workingCopy = m_modelManager->workingCopy();
@@ -676,7 +676,7 @@ void CppFindReferences::findMacroUses(const Macro &macro, const QString &replace
FutureProgress *progress = ProgressManager::addTask(result, tr("Searching for Usages"),
CppTools::Constants::TASK_SEARCH);
- connect(progress, SIGNAL(clicked()), search, SLOT(popup()));
+ connect(progress, &FutureProgress::clicked, search, &SearchResult::popup);
}
void CppFindReferences::renameMacroUses(const Macro &macro, const QString &replacement)
@@ -689,8 +689,8 @@ void CppFindReferences::createWatcher(const QFuture<Usage> &future, SearchResult
{
QFutureWatcher<Usage> *watcher = new QFutureWatcher<Usage>();
watcher->setPendingResultsLimit(1);
- connect(watcher, SIGNAL(resultsReadyAt(int,int)), this, SLOT(displayResults(int,int)));
- connect(watcher, SIGNAL(finished()), this, SLOT(searchFinished()));
+ connect(watcher, &QFutureWatcherBase::resultsReadyAt, this, &CppFindReferences::displayResults);
+ connect(watcher, &QFutureWatcherBase::finished, this, &CppFindReferences::searchFinished);
m_watchers.insert(watcher, search);
watcher->setFuture(future);
}