Show more info about a search and move UI for replacing

Change-Id: I6e024583c0d778a65007eb4590118c4329b2118a
Reviewed-on: http://codereview.qt-project.org/4554
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>
This commit is contained in:
Eike Ziller
2011-09-07 20:28:04 +02:00
parent d298cffeb0
commit 5990b039e8
23 changed files with 249 additions and 66 deletions

View File

@@ -228,7 +228,8 @@ static void find_helper(QFutureInterface<Usage> &future,
void CppFindReferences::findUsages(CPlusPlus::Symbol *symbol, const CPlusPlus::LookupContext &context)
{
m_currentSearch = Find::SearchResultWindow::instance()->startNewSearch(Find::SearchResultWindow::SearchOnly);
Overview overview;
m_currentSearch->setInfo(tr("C++ Usages:"), QString(), overview(context.fullyQualifiedName(symbol)));
connect(m_currentSearch, SIGNAL(activated(Find::SearchResultItem)),
this, SLOT(openEditor(Find::SearchResultItem)));
@@ -244,6 +245,8 @@ void CppFindReferences::renameUsages(CPlusPlus::Symbol *symbol, const CPlusPlus:
m_currentSearch = Find::SearchResultWindow::instance()->startNewSearch(
Find::SearchResultWindow::SearchAndReplace, QLatin1String("CppEditor"));
Overview overview;
m_currentSearch->setInfo(tr("C++ Usages:"), QString(), overview(context.fullyQualifiedName(symbol)));
m_currentSearch->setTextToReplace(textToReplace);
connect(m_currentSearch, SIGNAL(activated(Find::SearchResultItem)),
@@ -415,6 +418,7 @@ static void findMacroUses_helper(QFutureInterface<Usage> &future,
void CppFindReferences::findMacroUses(const Macro &macro)
{
m_currentSearch = Find::SearchResultWindow::instance()->startNewSearch(Find::SearchResultWindow::SearchOnly);
m_currentSearch->setInfo(tr("C++ Macro Usages:"), QString(), QString::fromLocal8Bit(macro.name()));
Find::SearchResultWindow::instance()->popup(true);