Renamed qmlhoverhandler.

This commit is contained in:
Roberto Raggi
2010-02-15 13:41:51 +01:00
parent d22610c724
commit 52b04f5d99
4 changed files with 16 additions and 17 deletions

View File

@@ -19,7 +19,7 @@ HEADERS += \
qmlexpressionundercursor.h \ qmlexpressionundercursor.h \
qmlfilewizard.h \ qmlfilewizard.h \
qmljshighlighter.h \ qmljshighlighter.h \
qmlhoverhandler.h \ qmljshoverhandler.h \
qmlmodelmanager.h \ qmlmodelmanager.h \
qmlmodelmanagerinterface.h qmlmodelmanagerinterface.h
@@ -32,7 +32,7 @@ SOURCES += \
qmlexpressionundercursor.cpp \ qmlexpressionundercursor.cpp \
qmlfilewizard.cpp \ qmlfilewizard.cpp \
qmljshighlighter.cpp \ qmljshighlighter.cpp \
qmlhoverhandler.cpp \ qmljshoverhandler.cpp \
qmlmodelmanager.cpp \ qmlmodelmanager.cpp \
qmlmodelmanagerinterface.cpp qmlmodelmanagerinterface.cpp

View File

@@ -28,13 +28,12 @@
**************************************************************************/ **************************************************************************/
#include "qmljseditorplugin.h" #include "qmljseditorplugin.h"
#include "qmljshighlighter.h" #include "qmljshighlighter.h"
#include "qmljseditor.h" #include "qmljseditor.h"
#include "qmljseditorconstants.h" #include "qmljseditorconstants.h"
#include "qmljseditorfactory.h" #include "qmljseditorfactory.h"
#include "qmljscodecompletion.h" #include "qmljscodecompletion.h"
#include "qmlhoverhandler.h" #include "qmljshoverhandler.h"
#include "qmlmodelmanager.h" #include "qmlmodelmanager.h"
#include "qmlfilewizard.h" #include "qmlfilewizard.h"
@@ -134,7 +133,7 @@ bool QmlJSEditorPlugin::initialize(const QStringList & /*arguments*/, QString *e
m_completion = new CodeCompletion(m_modelManager); m_completion = new CodeCompletion(m_modelManager);
addAutoReleasedObject(m_completion); addAutoReleasedObject(m_completion);
addAutoReleasedObject(new QmlHoverHandler()); addAutoReleasedObject(new HoverHandler());
// Restore settings // Restore settings
QSettings *settings = Core::ICore::instance()->settings(); QSettings *settings = Core::ICore::instance()->settings();

View File

@@ -29,7 +29,7 @@
#include "qmljseditor.h" #include "qmljseditor.h"
#include "qmlexpressionundercursor.h" #include "qmlexpressionundercursor.h"
#include "qmlhoverhandler.h" #include "qmljshoverhandler.h"
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <coreplugin/uniqueidmanager.h> #include <coreplugin/uniqueidmanager.h>
@@ -57,7 +57,7 @@ using namespace QmlJS;
using namespace QmlJSEditor; using namespace QmlJSEditor;
using namespace QmlJSEditor::Internal; using namespace QmlJSEditor::Internal;
QmlHoverHandler::QmlHoverHandler(QObject *parent) HoverHandler::HoverHandler(QObject *parent)
: QObject(parent) : QObject(parent)
, m_helpEngineNeedsSetup(false) , m_helpEngineNeedsSetup(false)
{ {
@@ -83,7 +83,7 @@ QmlHoverHandler::QmlHoverHandler(QObject *parent)
this, SLOT(editorOpened(Core::IEditor *))); this, SLOT(editorOpened(Core::IEditor *)));
} }
void QmlHoverHandler::editorOpened(IEditor *editor) void HoverHandler::editorOpened(IEditor *editor)
{ {
QmlJSEditorEditable *qmlEditor = qobject_cast<QmlJSEditorEditable *>(editor); QmlJSEditorEditable *qmlEditor = qobject_cast<QmlJSEditorEditable *>(editor);
if (!qmlEditor) if (!qmlEditor)
@@ -96,7 +96,7 @@ void QmlHoverHandler::editorOpened(IEditor *editor)
this, SLOT(updateContextHelpId(TextEditor::ITextEditor*, int))); this, SLOT(updateContextHelpId(TextEditor::ITextEditor*, int)));
} }
void QmlHoverHandler::showToolTip(TextEditor::ITextEditor *editor, const QPoint &point, int pos) void HoverHandler::showToolTip(TextEditor::ITextEditor *editor, const QPoint &point, int pos)
{ {
if (! editor) if (! editor)
return; return;
@@ -124,12 +124,12 @@ void QmlHoverHandler::showToolTip(TextEditor::ITextEditor *editor, const QPoint
} }
} }
void QmlHoverHandler::updateContextHelpId(TextEditor::ITextEditor *editor, int pos) void HoverHandler::updateContextHelpId(TextEditor::ITextEditor *editor, int pos)
{ {
updateHelpIdAndTooltip(editor, pos); updateHelpIdAndTooltip(editor, pos);
} }
void QmlHoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, int pos) void HoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, int pos)
{ {
m_helpId.clear(); m_helpId.clear();
m_toolTip.clear(); m_toolTip.clear();
@@ -209,7 +209,7 @@ void QmlHoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, in
} }
} }
QString QmlHoverHandler::prettyPrint(const QmlJS::Interpreter::Value *value, QmlJS::Interpreter::Context *context, QString HoverHandler::prettyPrint(const QmlJS::Interpreter::Value *value, QmlJS::Interpreter::Context *context,
QStringList *baseClasses) const QStringList *baseClasses) const
{ {
if (! value) if (! value)

View File

@@ -27,8 +27,8 @@
** **
**************************************************************************/ **************************************************************************/
#ifndef QMLHOVERHANDLER_H #ifndef QMLJSHOVERHANDLER_H
#define QMLHOVERHANDLER_H #define QMLJSHOVERHANDLER_H
#include "qmlmodelmanagerinterface.h" #include "qmlmodelmanagerinterface.h"
@@ -59,12 +59,12 @@ class ITextEditor;
namespace QmlJSEditor { namespace QmlJSEditor {
namespace Internal { namespace Internal {
class QmlHoverHandler : public QObject class HoverHandler : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
QmlHoverHandler(QObject *parent = 0); HoverHandler(QObject *parent = 0);
public slots: public slots:
void showToolTip(TextEditor::ITextEditor *editor, const QPoint &point, int pos); void showToolTip(TextEditor::ITextEditor *editor, const QPoint &point, int pos);
@@ -89,4 +89,4 @@ private:
} // namespace Internal } // namespace Internal
} // namespace QmlJSEditor } // namespace QmlJSEditor
#endif // QMLHOVERHANDLER_H #endif // QMLJSHOVERHANDLER_H