Commit 49830c48 authored by Kai Koehne's avatar Kai Koehne

QmlEngine: Cleanup

Merge private class back to public one.

Change-Id: I3255036ff60738418e2997dbeba97642afe87558
Reviewed-by: default avatarAurindam Jana <aurindam.jana@nokia.com>
parent 06fff61d
......@@ -143,7 +143,7 @@ void QmlAdapter::debugClientStatusChanged(QmlDebugClient::Status status)
QmlDebugClient *client = qobject_cast<QmlDebugClient*>(sender());
QTC_ASSERT(client, return);
m_qmlClient = qobject_cast<Internal::BaseQmlDebuggerClient *>(client);
m_qmlClient = qobject_cast<BaseQmlDebuggerClient *>(client);
m_qmlClient->startSession();
}
......@@ -192,13 +192,13 @@ void QmlAdapter::checkConnectionState()
void QmlAdapter::createDebuggerClients()
{
Internal::QScriptDebuggerClient *debugClient1 = new Internal::QScriptDebuggerClient(m_conn);
QScriptDebuggerClient *debugClient1 = new QScriptDebuggerClient(m_conn);
connect(debugClient1, SIGNAL(newStatus(QmlDebugClient::Status)),
this, SLOT(clientStatusChanged(QmlDebugClient::Status)));
connect(debugClient1, SIGNAL(newStatus(QmlDebugClient::Status)),
this, SLOT(debugClientStatusChanged(QmlDebugClient::Status)));
Internal::QmlV8DebuggerClient *debugClient2 = new Internal::QmlV8DebuggerClient(m_conn);
QmlV8DebuggerClient *debugClient2 = new QmlV8DebuggerClient(m_conn);
connect(debugClient2, SIGNAL(newStatus(QmlDebugClient::Status)),
this, SLOT(clientStatusChanged(QmlDebugClient::Status)));
connect(debugClient2, SIGNAL(newStatus(QmlDebugClient::Status)),
......@@ -207,8 +207,8 @@ void QmlAdapter::createDebuggerClients()
m_debugClients.insert(debugClient1->name(),debugClient1);
m_debugClients.insert(debugClient2->name(),debugClient2);
debugClient1->setEngine((Internal::QmlEngine*)(m_engine.data()));
debugClient2->setEngine((Internal::QmlEngine*)(m_engine.data()));
debugClient1->setEngine((QmlEngine*)(m_engine.data()));
debugClient2->setEngine((QmlEngine*)(m_engine.data()));
}
bool QmlAdapter::isConnected() const
......@@ -256,12 +256,12 @@ bool QmlAdapter::disableJsDebugging(bool block)
return isBlocked;
}
Internal::BaseQmlDebuggerClient *QmlAdapter::activeDebuggerClient()
BaseQmlDebuggerClient *QmlAdapter::activeDebuggerClient() const
{
return m_qmlClient;
}
QHash<QString, Internal::BaseQmlDebuggerClient*> QmlAdapter::debuggerClients()
QHash<QString, BaseQmlDebuggerClient*> QmlAdapter::debuggerClients() const
{
return m_debugClients;
}
......
......@@ -77,8 +77,8 @@ public:
bool disableJsDebugging(bool block);
Internal::BaseQmlDebuggerClient *activeDebuggerClient();
QHash<QString, Internal::BaseQmlDebuggerClient*> debuggerClients();
BaseQmlDebuggerClient *activeDebuggerClient() const;
QHash<QString, BaseQmlDebuggerClient*> debuggerClients() const;
BaseEngineDebugClient *engineDebugClient() const;
QDebugMessageClient *messageClient() const;
......
This diff is collapsed.
......@@ -30,19 +30,22 @@
**
**************************************************************************/
#ifndef DEBUGGER_QMLENGINE_H
#define DEBUGGER_QMLENGINE_H
#ifndef QMLENGINE_H
#define QMLENGINE_H
#include "debuggerengine.h"
#include "interactiveinterpreter.h"
#include "qmladapter.h"
#include "qmlinspectoradapter.h"
#include <projectexplorer/applicationlauncher.h>
#include <qmldebug/qdebugmessageclient.h>
#include <utils/outputformat.h>
#include <qmldebug/qmloutputparser.h>
#include <qmljs/qmljsdocument.h>
#include <utils/outputformat.h>
#include <QAbstractSocket>
QT_BEGIN_NAMESPACE
class QTextDocument;
QT_END_NAMESPACE
#include <QTextDocument>
namespace Core {
class IEditor;
......@@ -51,20 +54,14 @@ class IEditor;
namespace Debugger {
namespace Internal {
class QtMessageLogItem;
class QmlAdapter;
class QmlEnginePrivate;
class QtMessageLogItem;
class QmlEngine : public DebuggerEngine
{
Q_OBJECT
public:
enum LogDirection {
LogSend,
LogReceive
};
QmlEngine(const DebuggerStartParameters &startParameters,
DebuggerEngine *masterEngine);
~QmlEngine();
......@@ -81,26 +78,45 @@ public:
void filterApplicationMessage(const QString &msg, int channel);
void inferiorSpontaneousStop();
void logMessage(const QString &service, LogDirection direction, const QString &str);
enum LogDirection {
LogSend,
LogReceive
};
void logMessage(const QString &service, LogDirection direction,
const QString &str);
void setSourceFiles(const QStringList &fileNames);
void updateScriptSource(const QString &fileName, int lineOffset, int columnOffset, const QString &source);
QmlAdapter *adapter() const;
void updateScriptSource(const QString &fileName, int lineOffset,
int columnOffset, const QString &source);
void insertBreakpoint(BreakpointModelId id);
public slots:
signals:
void tooltipRequested(const QPoint &mousePos,
TextEditor::ITextEditor *editor, int cursorPos);
private slots:
void disconnected();
void documentUpdated(QmlJS::Document::Ptr doc);
void expressionEvaluated(quint32 queryId, const QVariant &result);
private slots:
void errorMessageBoxFinished(int result);
void updateCurrentContext();
void appendDebugOutput(QtMsgType type, const QString &message,
const QmlDebug::QDebugContextInfo &info);
void tryToConnect(quint16 port = 0);
void beginConnection(quint16 port = 0);
void connectionEstablished();
void connectionStartupFailed();
void appStartupFailed(const QString &errorMessage);
void connectionError(QAbstractSocket::SocketError error);
void serviceConnectionError(const QString &service);
void appendMessage(const QString &msg, Utils::OutputFormat);
void synchronizeWatchers();
private:
// DebuggerEngine implementation.
bool isSynchronous() const { return false; }
......@@ -154,22 +170,6 @@ private:
bool hasCapability(unsigned) const;
signals:
void tooltipRequested(const QPoint &mousePos,
TextEditor::ITextEditor *editor, int cursorPos);
private slots:
void tryToConnect(quint16 port = 0);
void beginConnection(quint16 port = 0);
void connectionEstablished();
void connectionStartupFailed();
void appStartupFailed(const QString &errorMessage);
void connectionError(QAbstractSocket::SocketError error);
void serviceConnectionError(const QString &service);
void appendMessage(const QString &msg, Utils::OutputFormat);
void synchronizeWatchers();
private:
void closeConnection();
void startApplicationLauncher();
......@@ -189,12 +189,23 @@ private:
bool adjustBreakpointLineAndColumn(const QString &filePath, quint32 *line,
quint32 *column, bool *valid);
private:
QmlAdapter m_adapter;
QmlInspectorAdapter m_inspectorAdapter;
ProjectExplorer::ApplicationLauncher m_applicationLauncher;
QTimer m_noDebugOutputTimer;
QmlOutputParser m_outputParser;
QHash<QString, QTextDocument*> m_sourceDocuments;
QHash<QString, QWeakPointer<TextEditor::ITextEditor> > m_sourceEditors;
InteractiveInterpreter m_interpreter;
QHash<QString,BreakpointModelId> pendingBreakpoints;
QList<quint32> queryIds;
bool m_retryOnConnectFail;
bool m_automaticConnect;
friend class QmlCppEngine;
QmlEnginePrivate *d;
};
} // namespace Internal
} // namespace Debugger
#endif // DEBUGGER_QMLENGINE_H
#endif // QMLENGINE_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment