forked from qt-creator/qt-creator
QmlDebug: Remove dead code
This commit is contained in:
@@ -55,6 +55,7 @@ public:
|
|||||||
, m_qmlClient(0)
|
, m_qmlClient(0)
|
||||||
, m_mainClient(0)
|
, m_mainClient(0)
|
||||||
, m_connectionAttempts(0)
|
, m_connectionAttempts(0)
|
||||||
|
, m_maxConnectionAttempts(50) // overall time: 50 x 200ms
|
||||||
, m_conn(0)
|
, m_conn(0)
|
||||||
{
|
{
|
||||||
m_connectionTimer.setInterval(200);
|
m_connectionTimer.setInterval(200);
|
||||||
@@ -223,11 +224,6 @@ bool QmlAdapter::isConnected() const
|
|||||||
return d->m_conn && d->m_qmlClient && d->m_conn->state() == QAbstractSocket::ConnectedState;
|
return d->m_conn && d->m_qmlClient && d->m_conn->state() == QAbstractSocket::ConnectedState;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QmlAdapter::isUnconnected() const
|
|
||||||
{
|
|
||||||
return !d->m_conn || d->m_conn->state() == QAbstractSocket::UnconnectedState;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDeclarativeEngineDebug *QmlAdapter::client() const
|
QDeclarativeEngineDebug *QmlAdapter::client() const
|
||||||
{
|
{
|
||||||
return d->m_mainClient;
|
return d->m_mainClient;
|
||||||
@@ -253,15 +249,6 @@ void QmlAdapter::showConnectionErrorMessage(const QString &message)
|
|||||||
d->m_engine.data()->showMessage(QLatin1String("QmlJSDebugger: ") + message, LogError);
|
d->m_engine.data()->showMessage(QLatin1String("QmlJSDebugger: ") + message, LogError);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlAdapter::setMaxConnectionAttempts(int maxAttempts)
|
|
||||||
{
|
|
||||||
d->m_maxConnectionAttempts = maxAttempts;
|
|
||||||
}
|
|
||||||
void QmlAdapter::setConnectionAttemptInterval(int interval)
|
|
||||||
{
|
|
||||||
d->m_connectionTimer.setInterval(interval);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool QmlAdapter::disableJsDebugging(bool block)
|
bool QmlAdapter::disableJsDebugging(bool block)
|
||||||
{
|
{
|
||||||
if (d->m_engine.isNull())
|
if (d->m_engine.isNull())
|
||||||
@@ -280,7 +267,6 @@ bool QmlAdapter::disableJsDebugging(bool block)
|
|||||||
return isBlocked;
|
return isBlocked;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void QmlAdapter::logServiceStatusChange(const QString &service, QDeclarativeDebugClient::Status newStatus)
|
void QmlAdapter::logServiceStatusChange(const QString &service, QDeclarativeDebugClient::Status newStatus)
|
||||||
{
|
{
|
||||||
switch (newStatus) {
|
switch (newStatus) {
|
||||||
|
|||||||
@@ -66,15 +66,10 @@ public:
|
|||||||
void closeConnection();
|
void closeConnection();
|
||||||
|
|
||||||
bool isConnected() const;
|
bool isConnected() const;
|
||||||
bool isUnconnected() const;
|
|
||||||
|
|
||||||
QmlJsDebugClient::QDeclarativeEngineDebug *client() const;
|
QmlJsDebugClient::QDeclarativeEngineDebug *client() const;
|
||||||
QmlJsDebugClient::QDeclarativeDebugConnection *connection() const;
|
QmlJsDebugClient::QDeclarativeDebugConnection *connection() const;
|
||||||
|
|
||||||
// TODO move to private API b/w engine and adapter
|
|
||||||
void setMaxConnectionAttempts(int maxAttempts);
|
|
||||||
void setConnectionAttemptInterval(int interval);
|
|
||||||
|
|
||||||
bool disableJsDebugging(bool block);
|
bool disableJsDebugging(bool block);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|||||||
@@ -85,11 +85,6 @@
|
|||||||
|
|
||||||
using namespace ProjectExplorer;
|
using namespace ProjectExplorer;
|
||||||
|
|
||||||
enum {
|
|
||||||
MaxConnectionAttempts = 50,
|
|
||||||
ConnectionAttemptDefaultInterval = 200
|
|
||||||
};
|
|
||||||
|
|
||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
@@ -258,10 +253,10 @@ void QmlEngine::connectionStartupFailed()
|
|||||||
case QMessageBox::Help: {
|
case QMessageBox::Help: {
|
||||||
Core::HelpManager *helpManager = Core::HelpManager::instance();
|
Core::HelpManager *helpManager = Core::HelpManager::instance();
|
||||||
helpManager->handleHelpRequest("qthelp://com.nokia.qtcreator/doc/creator-debugging-qml.html");
|
helpManager->handleHelpRequest("qthelp://com.nokia.qtcreator/doc/creator-debugging-qml.html");
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
notifyEngineRunFailed();
|
notifyEngineRunFailed();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -364,8 +359,6 @@ void QmlEngine::shutdownEngine()
|
|||||||
void QmlEngine::setupEngine()
|
void QmlEngine::setupEngine()
|
||||||
{
|
{
|
||||||
d->m_ping = 0;
|
d->m_ping = 0;
|
||||||
d->m_adapter.setMaxConnectionAttempts(MaxConnectionAttempts);
|
|
||||||
d->m_adapter.setConnectionAttemptInterval(ConnectionAttemptDefaultInterval);
|
|
||||||
connect(&d->m_adapter, SIGNAL(connectionError(QAbstractSocket::SocketError)),
|
connect(&d->m_adapter, SIGNAL(connectionError(QAbstractSocket::SocketError)),
|
||||||
SLOT(connectionError(QAbstractSocket::SocketError)));
|
SLOT(connectionError(QAbstractSocket::SocketError)));
|
||||||
connect(&d->m_adapter, SIGNAL(serviceConnectionError(QString)),
|
connect(&d->m_adapter, SIGNAL(serviceConnectionError(QString)),
|
||||||
|
|||||||
Reference in New Issue
Block a user