forked from qt-creator/qt-creator
QmlProfiler: Remove use of Qt private headers
Use the copy of QDeclarativeDebugClient we ship with qtcreator. However, since the internal one misses a waitForConnected any connection will right now fail.
This commit is contained in:
@@ -40,7 +40,8 @@ SUBDIRS = plugin_coreplugin \
|
|||||||
plugin_analyzerbase \
|
plugin_analyzerbase \
|
||||||
plugin_qmljstools \
|
plugin_qmljstools \
|
||||||
plugin_macros \
|
plugin_macros \
|
||||||
debugger/dumper.pro
|
debugger/dumper.pro \
|
||||||
|
plugin_qmlprofiler
|
||||||
|
|
||||||
!win32 {
|
!win32 {
|
||||||
SUBDIRS += plugin_valgrindtoolbase \
|
SUBDIRS += plugin_valgrindtoolbase \
|
||||||
@@ -64,7 +65,6 @@ contains(QT_CONFIG, declarative) {
|
|||||||
|
|
||||||
minQtVersion(4, 7, 1) {
|
minQtVersion(4, 7, 1) {
|
||||||
SUBDIRS += plugin_qmldesigner
|
SUBDIRS += plugin_qmldesigner
|
||||||
SUBDIRS += plugin_qmlprofiler
|
|
||||||
} else {
|
} else {
|
||||||
warning()
|
warning()
|
||||||
warning("QmlDesigner plugin has been disabled.")
|
warning("QmlDesigner plugin has been disabled.")
|
||||||
|
@@ -7,6 +7,7 @@ include(../../qtcreatorplugin.pri)
|
|||||||
include(../../plugins/coreplugin/coreplugin.pri)
|
include(../../plugins/coreplugin/coreplugin.pri)
|
||||||
include(../../plugins/analyzerbase/analyzerbase.pri)
|
include(../../plugins/analyzerbase/analyzerbase.pri)
|
||||||
include(../../plugins/qmlprojectmanager/qmlprojectmanager.pri)
|
include(../../plugins/qmlprojectmanager/qmlprojectmanager.pri)
|
||||||
|
include(../../libs/qmljsdebugclient/qmljsdebugclient-lib.pri)
|
||||||
|
|
||||||
QT += network script declarative
|
QT += network script declarative
|
||||||
|
|
||||||
|
@@ -39,7 +39,7 @@
|
|||||||
#include <analyzerbase/analyzermanager.h>
|
#include <analyzerbase/analyzermanager.h>
|
||||||
#include <analyzerbase/analyzerconstants.h>
|
#include <analyzerbase/analyzerconstants.h>
|
||||||
|
|
||||||
#include <private/qdeclarativedebugclient_p.h>
|
#include <qmljsdebugclient/qdeclarativedebugclient_p.h>
|
||||||
|
|
||||||
#include "timelineview.h"
|
#include "timelineview.h"
|
||||||
#include "tracewindow.h"
|
#include "tracewindow.h"
|
||||||
|
@@ -38,7 +38,7 @@
|
|||||||
#include "qmlprofilerattachdialog.h"
|
#include "qmlprofilerattachdialog.h"
|
||||||
|
|
||||||
#include "tracewindow.h"
|
#include "tracewindow.h"
|
||||||
#include <private/qdeclarativedebugclient_p.h>
|
#include <qmljsdebugclient/qdeclarativedebugclient_p.h>
|
||||||
|
|
||||||
#include <analyzerbase/analyzermanager.h>
|
#include <analyzerbase/analyzermanager.h>
|
||||||
#include <analyzerbase/analyzerconstants.h>
|
#include <analyzerbase/analyzerconstants.h>
|
||||||
@@ -146,7 +146,7 @@ QmlProfilerTool::QmlProfilerTool(QObject *parent)
|
|||||||
QmlProfilerTool::~QmlProfilerTool()
|
QmlProfilerTool::~QmlProfilerTool()
|
||||||
{
|
{
|
||||||
if (d->m_client->isConnected())
|
if (d->m_client->isConnected())
|
||||||
d->m_client->disconnectFromHost();
|
d->m_client->close();
|
||||||
delete d->m_tabbed;
|
delete d->m_tabbed;
|
||||||
|
|
||||||
delete d->m_outputPaneAdapter;
|
delete d->m_outputPaneAdapter;
|
||||||
@@ -304,7 +304,6 @@ void QmlProfilerTool::connectToClient()
|
|||||||
d->m_client = newClient;
|
d->m_client = newClient;
|
||||||
|
|
||||||
d->m_client->connectToHost(d->m_host, d->m_port);
|
d->m_client->connectToHost(d->m_host, d->m_port);
|
||||||
d->m_client->waitForConnected();
|
|
||||||
|
|
||||||
if (d->m_client->isConnected()) {
|
if (d->m_client->isConnected()) {
|
||||||
d->m_traceWindow->setRecording(d->m_recordingEnabled);
|
d->m_traceWindow->setRecording(d->m_recordingEnabled);
|
||||||
@@ -323,10 +322,9 @@ void QmlProfilerTool::connectToClient()
|
|||||||
|
|
||||||
void QmlProfilerTool::disconnectClient()
|
void QmlProfilerTool::disconnectClient()
|
||||||
{
|
{
|
||||||
d->m_client->disconnectFromHost();
|
d->m_client->close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void QmlProfilerTool::startRecording()
|
void QmlProfilerTool::startRecording()
|
||||||
{
|
{
|
||||||
if (d->m_client->isConnected()) {
|
if (d->m_client->isConnected()) {
|
||||||
|
@@ -56,6 +56,8 @@
|
|||||||
|
|
||||||
#define GAP_TIME 150
|
#define GAP_TIME 150
|
||||||
|
|
||||||
|
using QmlJsDebugClient::QDeclarativeDebugClient;
|
||||||
|
|
||||||
namespace QmlProfiler {
|
namespace QmlProfiler {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
|
@@ -37,7 +37,7 @@
|
|||||||
#include <QtCore/qpointer.h>
|
#include <QtCore/qpointer.h>
|
||||||
#include <QtGui/qwidget.h>
|
#include <QtGui/qwidget.h>
|
||||||
|
|
||||||
#include <QtDeclarative/private/qdeclarativedebugclient_p.h>
|
#include <qmljsdebugclient/qdeclarativedebugclient_p.h>
|
||||||
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
@@ -50,6 +50,8 @@ class QPushButton;
|
|||||||
class QDeclarativeView;
|
class QDeclarativeView;
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
using QmlJsDebugClient::QDeclarativeDebugConnection;
|
||||||
|
|
||||||
namespace QmlProfiler {
|
namespace QmlProfiler {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user