Skip to content
Snippets Groups Projects
Commit ed6f2852 authored by Kai Koehne's avatar Kai Koehne
Browse files

QmlInspector: Fix regression in live preview

ClientProxy::isEnabled() now only returns true when the server plugins
are available too. Wait until then before using it to initialize
the livepreview objects.

Reviewed-by: Lasse Holmstedt
parent ccecfd70
No related branches found
No related tags found
No related merge requests found
......@@ -118,14 +118,16 @@ void InspectorPlugin::extensionsInitialized()
m_inspectorUi->setupUi();
}
// The adapter object is only added to the pool with a succesful connection,
// so we can immediately init our stuff.
void InspectorPlugin::objectAdded(QObject *object)
{
Debugger::QmlAdapter *adapter = qobject_cast<Debugger::QmlAdapter *>(object);
if (adapter) {
m_clientProxy = new ClientProxy(adapter);
m_inspectorUi->connected(m_clientProxy);
if (m_clientProxy->isConnected()) {
clientProxyConnected();
} else {
connect(m_clientProxy, SIGNAL(connected()), this, SLOT(clientProxyConnected()));
}
return;
}
......@@ -148,4 +150,9 @@ void InspectorPlugin::aboutToRemoveObject(QObject *obj)
}
}
void InspectorPlugin::clientProxyConnected()
{
m_inspectorUi->connected(m_clientProxy);
}
Q_EXPORT_PLUGIN(InspectorPlugin)
......@@ -74,6 +74,7 @@ public:
private slots:
void objectAdded(QObject *object);
void aboutToRemoveObject(QObject *obj);
void clientProxyConnected();
private:
void createActions();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment