CppTools: Use Qt5-style connects

Mostly done by clazy.

Change-Id: I0fbbbe1a2d28b79bcb83093d608bca6e2f927ebb
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Orgad Shaneh
2016-03-12 22:53:45 +02:00
committed by Orgad Shaneh
parent 324e221bee
commit 46cacd901a
19 changed files with 100 additions and 100 deletions

View File

@@ -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);
}