50 #include <QtCore/qcoreapplication.h> 51 #include <QtCore/qeventloop.h> 52 #include <QtCore/qlist.h> 53 #include <QtScript/qscriptvalue.h> 97 {
return m_response; }
157 eventLoopPool << eventLoopStack;
158 eventLoopStack.clear();
159 while (!eventLoopPool.isEmpty()) {
160 QEventLoop *eventLoop = eventLoopPool.takeFirst();
180 frontend->postCommandFinished(ce->
id(), response);
200 d->frontend = frontend;
219 if (
d->eventLoopPool.isEmpty())
221 QEventLoop *eventLoop =
d->eventLoopPool.takeFirst();
223 d->eventLoopStack.prepend(eventLoop);
232 if (!
d->eventLoopStack.isEmpty()) {
234 d->eventLoopStack.takeFirst();
236 d->eventLoopPool.append(eventLoop);
247 while (!
d->eventLoopStack.isEmpty()) {
248 QEventLoop *eventLoop =
d->eventLoopStack.takeFirst();
278 q->notifyCommandFinished(fe->
id(), fe->
response());
301 d->backend->detach();
304 d->backend->attachTo(engine);
314 d->backend->detach();
321 d->backend->traceFunction();
338 d->backend->processCommand(
id, command);
QScriptEngineDebuggerFrontendPrivate()
QScriptEngineDebuggerFrontendPrivate * frontend
QScriptDebuggerCommandFinishedEvent(int id, const QScriptDebuggerResponse &response)
void detach()
Detaches this front-end from the current script engine.
void event(const QScriptDebuggerEvent &event)
Reimplemented Function
virtual QScriptDebuggerResponse execute(QScriptDebuggerBackend *backend, const QScriptDebuggerCommand &command)
Applies the given command to the given backend.
#define QT_END_NAMESPACE
This macro expands to.
The QScriptDebuggerFrontend class is the base class of debugger front-ends.
bool event(QEvent *e)
Reimplemented Function
The QScriptDebuggerResponse class represents a front-end's response to a QScriptDebuggerCommand.
QScriptDebuggerCommandEvent(int id, const QScriptDebuggerCommand &command)
~QScriptEngineDebuggerFrontend()
const QScriptDebuggerCommand & command() const
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
QList< QEventLoop * > eventLoopPool
QScriptEngineDebuggerFrontend()
void postCommandFinished(int id, const QScriptDebuggerResponse &response)
const QScriptDebuggerResponse & response() const
The QScriptEngine class provides an environment for evaluating Qt Script code.
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QEventLoop class provides a means of entering and leaving an event loop.
QScriptEngineDebuggerBackend * backend
void quit()
Tells the event loop to exit normally.
bool event(QEvent *e)
Reimplemented Function
The QScriptEngineDebuggerFrontend class provides an in-process debugger frontend. ...
void doPendingEvaluate(bool postEvent)
Executes the pending evaluate, if any.
~QScriptEngineDebuggerFrontendPrivate()
void processCommand(int id, const QScriptDebuggerCommand &command)
~QScriptDebuggerCommandFinishedEvent()
The QScriptDebuggerCommand class represents a command issued to a QScriptDebuggerFrontend.
QScriptValue traceFunction() const
~QScriptEngineDebuggerBackend()
virtual bool event(QEvent *e)
QScriptEngineDebuggerBackend(QScriptEngineDebuggerFrontendPrivate *frontend)
Creates a new QScriptEngineDebuggerBackend object for the given engine.
#define Q_DECLARE_PUBLIC(Class)
bool isRunning() const
Returns true if the event loop is running; otherwise returns false.
The QScriptDebuggerBackend class is the base class of debugger back-ends.
Type
This enum type defines the valid event types in Qt.
The QScriptDebuggerCommandExecutor applies debugger commands to a back-end.
~QScriptDebuggerCommandEvent()
QScriptDebuggerResponse m_response
QScriptDebuggerCommand m_command
~QScriptEngineDebuggerBackendPrivate()
void attachTo(QScriptEngine *engine)
Attaches this front-end to the given engine.
#define Q_DECLARE_PRIVATE(Class)
The QEvent class is the base class of all event classes.
Type type() const
Returns the event type.
QList< QEventLoop * > eventLoopStack
QScriptEngineDebuggerBackendPrivate()
The QScriptValue class acts as a container for the Qt Script data types.
virtual bool event(QEvent *)
void deleteLater()
Schedules this object for deletion.
int exec(ProcessEventsFlags flags=AllEvents)
Enters the main event loop and waits until exit() is called.
void resume()
Reimplemented Function
The QList class is a template class that provides lists.
QScriptDebuggerBackend * backend() const
void processCommand(int id, const QScriptDebuggerCommand &command)