forked from qt-creator/qt-creator
		
	QmlInspector: tooltips in qmldebug mode
Reviewed by: Lasse Holmstedt
This commit is contained in:
		@@ -30,6 +30,7 @@
 | 
			
		||||
#include "qmlengine.h"
 | 
			
		||||
#include "qmladapter.h"
 | 
			
		||||
 | 
			
		||||
#include "debuggertooltip.h"
 | 
			
		||||
#include "debuggerconstants.h"
 | 
			
		||||
#include "debuggerplugin.h"
 | 
			
		||||
#include "debuggerdialogs.h"
 | 
			
		||||
@@ -170,6 +171,7 @@ void QmlEngine::connectionEstablished()
 | 
			
		||||
 | 
			
		||||
    ExtensionSystem::PluginManager *pluginManager = ExtensionSystem::PluginManager::instance();
 | 
			
		||||
    pluginManager->addObject(m_adapter);
 | 
			
		||||
    pluginManager->addObject(this);
 | 
			
		||||
    m_addedAdapterToObjectPool = true;
 | 
			
		||||
 | 
			
		||||
    plugin()->showMessage(tr("QML Debugger connected."), StatusBar);
 | 
			
		||||
@@ -233,6 +235,7 @@ void QmlEngine::shutdownEngineAsSlave()
 | 
			
		||||
    if (m_addedAdapterToObjectPool) {
 | 
			
		||||
        ExtensionSystem::PluginManager *pluginManager = ExtensionSystem::PluginManager::instance();
 | 
			
		||||
        pluginManager->removeObject(m_adapter);
 | 
			
		||||
        pluginManager->removeObject(this);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (m_attachToRunningExternalApp) {
 | 
			
		||||
@@ -445,9 +448,8 @@ static QHash<QString, WatchData> m_toolTipCache;
 | 
			
		||||
 | 
			
		||||
void QmlEngine::setToolTipExpression(const QPoint &mousePos, TextEditor::ITextEditor *editor, int cursorPos)
 | 
			
		||||
{
 | 
			
		||||
    Q_UNUSED(mousePos)
 | 
			
		||||
    Q_UNUSED(editor)
 | 
			
		||||
    Q_UNUSED(cursorPos)
 | 
			
		||||
    // this is processed by QML inspector, which has deps to qml js editor. Makes life easier.
 | 
			
		||||
    emit tooltipRequested(mousePos, editor, cursorPos);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//////////////////////////////////////////////////////////////////////
 | 
			
		||||
 
 | 
			
		||||
@@ -46,6 +46,10 @@
 | 
			
		||||
 | 
			
		||||
#include <projectexplorer/applicationlauncher.h>
 | 
			
		||||
 | 
			
		||||
namespace Core {
 | 
			
		||||
    class TextEditor;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
namespace Debugger {
 | 
			
		||||
namespace Internal {
 | 
			
		||||
 | 
			
		||||
@@ -120,6 +124,7 @@ private:
 | 
			
		||||
 | 
			
		||||
signals:
 | 
			
		||||
    void sendMessage(const QByteArray &msg);
 | 
			
		||||
    void tooltipRequested(const QPoint &mousePos, TextEditor::ITextEditor *editor, int cursorPos);
 | 
			
		||||
 | 
			
		||||
private slots:
 | 
			
		||||
    void connectionEstablished();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user