Moved the CppHoverHandler to the CppEditor plugin

It used to be in CppTools, but since the hover handler only makes sense
in the context of the C++ editor, this is a better place.
This commit is contained in:
Thorbjørn Lindeijer
2008-12-16 12:22:08 +01:00
parent 24e6d15879
commit 1efe71992b
12 changed files with 65 additions and 45 deletions

View File

@@ -34,7 +34,6 @@
#include <cplusplus/pp.h>
#include "cppmodelmanager.h"
#include "cpphoverhandler.h"
#include "cpptoolsconstants.h"
#include "cpptoolseditorsupport.h"
@@ -464,8 +463,6 @@ CppModelManager::CppModelManager(QObject *parent) :
connect(this, SIGNAL(documentUpdated(CPlusPlus::Document::Ptr)),
this, SLOT(onDocumentUpdated(CPlusPlus::Document::Ptr)));
m_hoverHandler = new CppHoverHandler(this, this);
// Listen for editor closed and opened events so that we can keep track of changing files
connect(m_core->editorManager(), SIGNAL(editorOpened(Core::IEditor *)),
this, SLOT(editorOpened(Core::IEditor *)));
@@ -633,14 +630,6 @@ void CppModelManager::editorOpened(Core::IEditor *editor)
CppEditorSupport *editorSupport = new CppEditorSupport(this);
editorSupport->setTextEditor(textEditor);
m_editorSupport[textEditor] = editorSupport;
// ### move in CppEditorSupport
connect(editor, SIGNAL(tooltipRequested(TextEditor::ITextEditor*, QPoint, int)),
m_hoverHandler, SLOT(showToolTip(TextEditor::ITextEditor*, QPoint, int)));
// ### move in CppEditorSupport
connect(editor, SIGNAL(contextHelpIdRequested(TextEditor::ITextEditor*, int)),
m_hoverHandler, SLOT(updateContextHelpId(TextEditor::ITextEditor*, int)));
}
}