diff options
author | Kai Koehne <kai.koehne@nokia.com> | 2011-08-31 08:01:19 (GMT) |
---|---|---|
committer | Kai Koehne <kai.koehne@nokia.com> | 2011-09-15 07:11:40 (GMT) |
commit | 22ef6f15102cd287bd3cdbc9fe723d22b35560ca (patch) | |
tree | d71ffb26e7ee3b22a948dc8051be9544bf91c7c0 /src/declarative | |
parent | 52a4415f29245d816901d7fec15982a9e746c097 (diff) | |
download | Qt-22ef6f15102cd287bd3cdbc9fe723d22b35560ca.zip Qt-22ef6f15102cd287bd3cdbc9fe723d22b35560ca.tar.gz Qt-22ef6f15102cd287bd3cdbc9fe723d22b35560ca.tar.bz2 |
Debugger: Move QT_DECLARATIVE_DEBUG handling out of qdeclarative.h
Apps don't have to (directly or indirectly) include qdeclarative.h.
Instead, move the static instance to qdeclarativeengine.h, and
qdeclarativeview.h (which instantiates it's own engine).
Change-Id: I8b3e63ad4f134969734a2cc712395145d90e0dfa
Reviewed-on: http://codereview.qt.nokia.com/3941
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
(cherrypicked from commit 6cb39fb829b78b5f6e9751283c7cd50400821e2a)
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/debugger/debugger.pri | 3 | ||||
-rw-r--r-- | src/declarative/debugger/qdeclarativedebug.h | 67 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarative.h | 11 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativeengine.h | 1 | ||||
-rw-r--r-- | src/declarative/util/qdeclarativeview.h | 1 |
5 files changed, 71 insertions, 12 deletions
diff --git a/src/declarative/debugger/debugger.pri b/src/declarative/debugger/debugger.pri index 3134c79..a904f6f 100644 --- a/src/declarative/debugger/debugger.pri +++ b/src/declarative/debugger/debugger.pri @@ -27,4 +27,5 @@ HEADERS += \ $$PWD/qdeclarativeinspectorservice_p.h \ $$PWD/qdeclarativeinspectorinterface_p.h \ $$PWD/qjsdebuggeragent_p.h \ - $$PWD/qjsdebugservice_p.h + $$PWD/qjsdebugservice_p.h \ + $$PWD/qdeclarativedebug.h diff --git a/src/declarative/debugger/qdeclarativedebug.h b/src/declarative/debugger/qdeclarativedebug.h new file mode 100644 index 0000000..b7930b2 --- /dev/null +++ b/src/declarative/debugger/qdeclarativedebug.h @@ -0,0 +1,67 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QDECLARATIVEDEBUG_H +#define QDECLARATIVEDEBUG_H + +#include <QtCore/qglobal.h> + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Declarative) + +struct Q_DECLARATIVE_EXPORT QDeclarativeDebuggingEnabler +{ + QDeclarativeDebuggingEnabler(); +}; + +// Execute code in constructor before first QDeclarativeEngine is instantiated +#if defined(QT_DECLARATIVE_DEBUG) +static QDeclarativeDebuggingEnabler qmlEnableDebuggingHelper; +#endif + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QDECLARATIVEDEBUG_H diff --git a/src/declarative/qml/qdeclarative.h b/src/declarative/qml/qdeclarative.h index 5e8d0f4..399c207 100644 --- a/src/declarative/qml/qdeclarative.h +++ b/src/declarative/qml/qdeclarative.h @@ -405,17 +405,6 @@ QObject *qmlAttachedPropertiesObject(const QObject *obj, bool create = true) return qmlAttachedPropertiesObject(&idx, obj, &T::staticMetaObject, create); } -// Enable debugging before any QDeclarativeEngine is created -struct Q_DECLARATIVE_EXPORT QDeclarativeDebuggingEnabler -{ - QDeclarativeDebuggingEnabler(); -}; - -// Execute code in constructor before first QDeclarativeEngine is instantiated -#if defined(QT_DECLARATIVE_DEBUG) -static QDeclarativeDebuggingEnabler qmlEnableDebuggingHelper; -#endif - QT_END_NAMESPACE QML_DECLARE_TYPE(QObject) diff --git a/src/declarative/qml/qdeclarativeengine.h b/src/declarative/qml/qdeclarativeengine.h index 61ab2b2..4d6887f 100644 --- a/src/declarative/qml/qdeclarativeengine.h +++ b/src/declarative/qml/qdeclarativeengine.h @@ -47,6 +47,7 @@ #include <QtCore/qmap.h> #include <QtScript/qscriptvalue.h> #include <QtDeclarative/qdeclarativeerror.h> +#include <QtDeclarative/qdeclarativedebug.h> QT_BEGIN_HEADER diff --git a/src/declarative/util/qdeclarativeview.h b/src/declarative/util/qdeclarativeview.h index b3854fc..ef51934 100644 --- a/src/declarative/util/qdeclarativeview.h +++ b/src/declarative/util/qdeclarativeview.h @@ -47,6 +47,7 @@ #include <QtGui/qgraphicssceneevent.h> #include <QtGui/qgraphicsview.h> #include <QtGui/qwidget.h> +#include <QtDeclarative/qdeclarativedebug.h> QT_BEGIN_HEADER |