summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cppfindreferences.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2011-05-06 12:48:44 +0200
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2011-05-12 20:10:02 +0200
commit882e34ee284731f9edb3a89c23fb7a0897c8da3a (patch)
treeeb7e4018f1acc36b03ae071e0c435eb56dd064f6 /src/plugins/cpptools/cppfindreferences.cpp
parent46c09e77cd73cfb54ef328799a287bf37191fc01 (diff)
downloadqt-creator-882e34ee284731f9edb3a89c23fb7a0897c8da3a.tar.gz
rewrite editor info bar handling
the info about the bars is now stored in the IFile, not in the EditorView. this is somewhat more expensive for the bars which identically apply to all editors of one type, but fixes consistency issues between views. additionally, it is now possible to set several simultaneous info bars per file, which ensures that no information is lost. Co-authored-by: mae
Diffstat (limited to 'src/plugins/cpptools/cppfindreferences.cpp')
-rw-r--r--src/plugins/cpptools/cppfindreferences.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/cpptools/cppfindreferences.cpp b/src/plugins/cpptools/cppfindreferences.cpp
index 9c23dc0a1f..9ae54543db 100644
--- a/src/plugins/cpptools/cppfindreferences.cpp
+++ b/src/plugins/cpptools/cppfindreferences.cpp
@@ -43,6 +43,7 @@
#include <coreplugin/progressmanager/futureprogress.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/icore.h>
+#include <coreplugin/infobar.h>
#include <ASTVisitor.h>
#include <AST.h>
@@ -279,7 +280,9 @@ void CppFindReferences::findAll_helper(Symbol *symbol, const LookupContext &cont
void CppFindReferences::onReplaceButtonClicked(const QString &text,
const QList<Find::SearchResultItem> &items)
{
- Core::EditorManager::instance()->hideEditorInfoBar(QLatin1String("CppEditor.Rename"));
+ // FIXME: abuse
+ Core::EditorManager::instance()->currentEditor()->file()->infoBar()->removeInfo(
+ QLatin1String("CppEditor.Rename"));
const QStringList fileNames = TextEditor::BaseFileFind::replaceAll(text, items);
if (!fileNames.isEmpty()) {