Commit 87a78cdd authored by Erik Verbruggen's avatar Erik Verbruggen

C++: fix find/rename macro usages.

The replace button was not connected. Also made the search restarting
slightly more robust.

Change-Id: Iad7aea436749c0bda6ec4f58776e73b598a12a23
Reviewed-by: default avatarChristian Stenger <christian.stenger@digia.com>
parent 858cb6e3
......@@ -562,7 +562,7 @@ public:
Document::Ptr doc = snapshot.document(fileName);
QString source;
_Lrestart:
restart_search:
if (future->isPaused())
future->waitForResume();
if (future->isCanceled())
......@@ -579,7 +579,8 @@ _Lrestart:
if (macro.fileRevision() > useMacro.fileRevision()) {
// yes, it is outdated, so re-preprocess and start from scratch for this file.
doc = snapshot.preprocessedDocument(source, fileName);
goto _Lrestart;
usages.clear();
goto restart_search;
}
if (macro.name() == useMacro.name()) {
......@@ -655,8 +656,8 @@ void CppFindReferences::findMacroUses(const Macro &macro, const QString &replace
QLatin1String("CppEditor"));
search->setTextToReplace(replacement);
connect(search, SIGNAL(replaceButtonClicked(QString,QList<Find::SearchResultItem>)),
SLOT(onReplaceButtonClicked(QString,QList<Find::SearchResultItem>)));
connect(search, SIGNAL(replaceButtonClicked(QString,QList<Find::SearchResultItem>,bool)),
SLOT(onReplaceButtonClicked(QString,QList<Find::SearchResultItem>,bool)));
Find::SearchResultWindow::instance()->popup(Core::IOutputPane::ModeSwitch | Core::IOutputPane::WithFocus);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment