diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-11-04 19:18:45 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-11-04 19:18:45 +0100 |
commit | dd45277a199e803767ebb5b2855409e1b98370f0 (patch) | |
tree | 19cfa4e5aa14ebf9013474173b1ae0d9008a5507 /share | |
parent | d6d7b97a61962b014ec36b2a004080e0547fb605 (diff) | |
parent | f4ac36b485d421ade2e90822e5f8a72177b031bb (diff) | |
download | qt-creator-dd45277a199e803767ebb5b2855409e1b98370f0.tar.gz |
Merge remote branch 'origin/2.1'
Conflicts:
share/qtcreator/templates/qmlapp/app.pro
src/plugins/plugins.pro
src/plugins/qt4projectmanager/qt4project.h
src/plugins/qt4projectmanager/qt4projectmanager_dependencies.pri
Diffstat (limited to 'share')
7 files changed, 43 insertions, 12 deletions
diff --git a/share/qtcreator/gdbmacros/dumper.py b/share/qtcreator/gdbmacros/dumper.py index 3e04b799bb..193b863e77 100644 --- a/share/qtcreator/gdbmacros/dumper.py +++ b/share/qtcreator/gdbmacros/dumper.py @@ -491,9 +491,12 @@ def listOfLocals(varList): item = Item(0, "local", name, name) try: item.value = frame.read_var(name) # this is a gdb value - except RuntimeError: - # happens for void foo() { std::string s; std::wstring w; } - #warn(" FRAME READ VAR ERROR: %s (%s): " % (symbol, name)) + except: + # RuntimeError: happens for + # void foo() { std::string s; std::wstring w; } + # ValueError: happens for (as of 2010/11/4) + # a local struct as found e.g. in + # gcc sources in gcc.c, int execute() continue #warn("ITEM %s: " % item.value) items.append(item) diff --git a/share/qtcreator/qml/qmljsdebugger/include/qt_private/qdeclarativedebughelper_p.h b/share/qtcreator/qml/qmljsdebugger/include/qt_private/qdeclarativedebughelper_p.h index d676ebce4d..4f57be9a5a 100644 --- a/share/qtcreator/qml/qmljsdebugger/include/qt_private/qdeclarativedebughelper_p.h +++ b/share/qtcreator/qml/qmljsdebugger/include/qt_private/qdeclarativedebughelper_p.h @@ -59,6 +59,10 @@ class QMLJSDEBUGGER_EXTERN QDeclarativeDebugHelper public: static QScriptEngine *getScriptEngine(QDeclarativeEngine *engine); static void setAnimationSlowDownFactor(qreal factor); + + // Enables remote debugging functionality + // Only use this for debugging in a safe environment! + static void enableDebugging(); }; QT_END_NAMESPACE diff --git a/share/qtcreator/qml/qmlobserver/main.cpp b/share/qtcreator/qml/qmlobserver/main.cpp index 2adfc2605f..464b6a83a8 100644 --- a/share/qtcreator/qml/qmlobserver/main.cpp +++ b/share/qtcreator/qml/qmlobserver/main.cpp @@ -50,6 +50,7 @@ #include <QDebug> #include <QMessageBox> #include "qdeclarativetester.h" +#include "private/qdeclarativedebughelper_p.h" QT_USE_NAMESPACE @@ -361,6 +362,9 @@ int main(int argc, char ** argv) if (stayOnTop) wflags |= Qt::WindowStaysOnTopHint; + // enable remote debugging + QDeclarativeDebugHelper::enableDebugging(); + QDeclarativeViewer *viewer = new QDeclarativeViewer(0, wflags); viewer->setAttribute(Qt::WA_DeleteOnClose, true); if (!scriptopts.isEmpty()) { diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/Geometry.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/Geometry.qml index 937f0b1551..bc8e47ddb5 100644 --- a/share/qtcreator/qmldesigner/propertyeditor/Qt/Geometry.qml +++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/Geometry.qml @@ -63,7 +63,7 @@ GroupBox { alignRight: false spacing: 4 singleStep: 1; - enabled: !anchorBackend.rightAnchored && !anchorBackend.horizontalCentered + enabled: !(anchorBackend.rightAnchored && anchorBackend.leftAnchored) backendValue: backendValues.width minimum: -2000; maximum: 2000; @@ -76,7 +76,7 @@ GroupBox { alignRight: false spacing: 4 singleStep: 1; - enabled: !anchorBackend.bottomAnchored && !anchorBackend.verticalCentered + enabled: !(anchorBackend.bottomAnchored && anchorBackend.topAnchored) backendValue: backendValues.height minimum: -2000; maximum: 2000; diff --git a/share/qtcreator/templates/qmlapp/app.pro b/share/qtcreator/templates/qmlapp/app.pro index 8cb2574dbd..bc1019778b 100644 --- a/share/qtcreator/templates/qmlapp/app.pro +++ b/share/qtcreator/templates/qmlapp/app.pro @@ -27,7 +27,7 @@ symbian:TARGET.UID3 = 0xE1111234 # and 0x2002CCCF value if protected UID is given to the application #symbian:DEPLOYMENT.installer_header = 0x2002CCCF -# Define QMLJSDEBUGGER to allow debugging of QML +# Define QMLJSDEBUGGER to allow debugging of QML in debug builds # (This might significantly increase build time) # DEFINES += QMLJSDEBUGGER diff --git a/share/qtcreator/templates/qmlapp/qmlapplicationviewer/qmlapplicationviewer.cpp b/share/qtcreator/templates/qmlapp/qmlapplicationviewer/qmlapplicationviewer.cpp index 5fdc94c8cd..59d9750edd 100644 --- a/share/qtcreator/templates/qmlapp/qmlapplicationviewer/qmlapplicationviewer.cpp +++ b/share/qtcreator/templates/qmlapp/qmlapplicationviewer/qmlapplicationviewer.cpp @@ -16,6 +16,10 @@ #include <QtDeclarative/QDeclarativeEngine> #include <QtDeclarative/QDeclarativeContext> +#if defined(QMLJSDEBUGGER) +#include <qt_private/qdeclarativedebughelper_p.h> +#endif + #if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER) #include <jsdebuggeragent.h> #endif @@ -30,6 +34,22 @@ #include <aknappui.h> #endif // Q_OS_SYMBIAN && ORIENTATIONLOCK +#if defined(QMLJSDEBUGGER) + +// Enable debugging before any QDeclarativeEngine is created +struct QmlJsDebuggingEnabler +{ + QmlJsDebuggingEnabler() + { + QDeclarativeDebugHelper::enableDebugging(); + } +}; + +// Execute code in constructor before first QDeclarativeEngine is instantiated +static QmlJsDebuggingEnabler enableDebuggingHelper; + +#endif // QMLJSDEBUGGER + class QmlApplicationViewerPrivate { QString mainQmlFile; diff --git a/share/qtcreator/templates/qmlapp/qmlapplicationviewer/qmlapplicationviewer.pri b/share/qtcreator/templates/qmlapp/qmlapplicationviewer/qmlapplicationviewer.pri index 09fd0efa79..246f25e784 100644 --- a/share/qtcreator/templates/qmlapp/qmlapplicationviewer/qmlapplicationviewer.pri +++ b/share/qtcreator/templates/qmlapp/qmlapplicationviewer/qmlapplicationviewer.pri @@ -34,20 +34,20 @@ contains(DEFINES, QMLJSDEBUGGER) { CONFIG(debug, debug|release) { !minQtVersion(4, 7, 1) { warning() + warning("Disabling QML debugging:") + warning() warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.") warning("This library requires Qt 4.7.1 or newer.") warning() - - error("Qt version $$QT_VERSION too old for QmlJS Debugging. Aborting.") - } - isEmpty(QMLJSDEBUGGER_PATH) { + DEFINES -= QMLJSDEBUGGER + } else:isEmpty(QMLJSDEBUGGER_PATH) { + warning() + warning("Disabling QML debugging:") warning() warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.") warning("Please specify its location on the qmake command line, eg") warning(" qmake -r QMLJSDEBUGGER_PATH=$CREATORDIR/share/qtcreator/qmljsdebugger") warning() - - error("QMLJSDEBUGGER defined, but no QMLJSDEBUGGER_PATH set on command line. Aborting.") DEFINES -= QMLJSDEBUGGER } else { include($$QMLJSDEBUGGER_PATH/qmljsdebugger-lib.pri) |