Commit 0a8c34d3 authored by Kai Koehne's avatar Kai Koehne Committed by dt
Browse files

QmlApp: Only use QMLJSDEBUGGER define to activate qml debugging

Don't confuse users by two defines they have to comment in when
they just want to 'debug': Instead QMLJSDEBUGGER now activates
both the Js Debugger & and the QmlObserver services. Finetuning
can still be done by using the (undocumented) NO_JSDEBUGGER,
NO_QMLOBSERVER defines.
parent 81628398
......@@ -9,14 +9,16 @@ contains(CONFIG, dll) {
}
## Input
!contains(DEFINES, NO_JSDEBUGGER) {
HEADERS += \
include/jsdebuggeragent.h \
include/qmljsdebugger_global.h
SOURCES += \
jsdebuggeragent.cpp
}
contains(DEFINES, QMLOBSERVER) {
!contains(DEFINES, NO_QMLOBSERVER) {
include($$PWD/editor/editor.pri)
HEADERS += \
......
......@@ -2,8 +2,6 @@ TEMPLATE = lib
CONFIG+=dll
TARGET = QmlJSDebugger
DEFINES += QMLOBSERVER
unix:QMAKE_CXXFLAGS_DEBUG += -O3
include(../../../../src/qtcreatorlibrary.pri)
......
TEMPLATE = app
DEFINES += QMLOBSERVER
### FIXME: only debug plugins are now supported.
CONFIG -= release
......
......@@ -20,10 +20,9 @@ DEFINES += NETWORKACCESS
# TARGETUID3 #
symbian:TARGET.UID3 = 0xE1111234
# Define QMLJSDEBUGGER to enable basic debugging (setting breakpoints etc)
# Define QMLOBSERVER for advanced features (requires experimental QmlInspector plugin!)
#DEFINES += QMLJSDEBUGGER
#DEFINES += QMLOBSERVER
# Define QMLJSDEBUGGER to allow debugging of QML
# (This might significantly increase build time)
# DEFINES += QMLJSDEBUGGER
# The .cpp file which was generated for your project. Feel free to hack it.
SOURCES += main.cpp
......
......@@ -7,10 +7,10 @@
#include <QtDeclarative/QDeclarativeEngine>
#include <QtDeclarative/QDeclarativeContext>
#if defined(QMLJSDEBUGGER)
#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER)
#include <jsdebuggeragent.h>
#endif
#if defined(QMLOBSERVER)
#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER)
#include <qdeclarativeviewobserver.h>
#endif
......@@ -53,10 +53,10 @@ QmlApplicationViewer::QmlApplicationViewer(QWidget *parent) :
{
connect(engine(), SIGNAL(quit()), SLOT(close()));
setResizeMode(QDeclarativeView::SizeRootObjectToView);
#ifdef QMLJSDEBUGGER
#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER)
new QmlJSDebugger::JSDebuggerAgent(engine());
#endif
#ifdef QMLOBSERVER
#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER)
new QmlJSDebugger::QDeclarativeViewObserver(this, parent);
#endif
}
......
......@@ -7,10 +7,6 @@ SOURCES += $$PWD/qmlapplicationviewer.cpp
HEADERS += $$PWD/qmlapplicationviewer.h
INCLUDEPATH += $$PWD
contains(DEFINES, QMLOBSERVER) {
DEFINES *= QMLJSDEBUGGER
}
defineTest(minQtVersion) {
maj = $$1
min = $$2
......
Supports Markdown
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