From b855240b782395f94315f43ea3e7e182299fac48 Mon Sep 17 00:00:00 2001 From: Matthew Vogt Date: Thu, 16 Feb 2012 14:43:03 +1000 Subject: Rename QDeclarative symbols to QQuick and QQml Symbols beginning with QDeclarative are already exported by the quick1 module. Users can apply the bin/rename-qtdeclarative-symbols.sh script to modify client code using the previous names of the renamed symbols. Task-number: QTBUG-23737 Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66 Reviewed-by: Martin Jones --- src/plugins/accessible/quick/main.cpp | 4 +- .../accessible/quick/qaccessiblequickitem.cpp | 4 +- .../accessible/quick/qaccessiblequickitem.h | 6 +- .../accessible/quick/qaccessiblequickview.cpp | 4 +- .../accessible/quick/qaccessiblequickview.h | 2 +- src/plugins/accessible/quick/quick.pro | 2 +- src/plugins/accessible/shared/qaccessiblebase.pri | 4 +- .../accessible/shared/qdeclarativeaccessible.cpp | 161 --------------------- .../accessible/shared/qdeclarativeaccessible.h | 96 ------------ src/plugins/accessible/shared/qqmlaccessible.cpp | 161 +++++++++++++++++++++ src/plugins/accessible/shared/qqmlaccessible.h | 96 ++++++++++++ src/plugins/qmltooling/qmldbg_ost/qmldbg_ost.pro | 4 +- src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp | 12 +- src/plugins/qmltooling/qmldbg_ost/qmlostplugin.h | 12 +- src/plugins/qmltooling/qmldbg_ost/qostdevice.cpp | 2 +- src/plugins/qmltooling/qmldbg_ost/qostdevice.h | 2 +- src/plugins/qmltooling/qmldbg_ost/usbostcomm.h | 2 +- .../qmltooling/qmldbg_qtquick2/highlight.cpp | 2 +- src/plugins/qmltooling/qmldbg_qtquick2/highlight.h | 2 +- .../qmltooling/qmldbg_qtquick2/qmldbg_qtquick2.pro | 6 +- .../qmldbg_qtquick2/qquickviewinspector.cpp | 6 +- .../qmldbg_qtquick2/qquickviewinspector.h | 4 +- .../qmltooling/qmldbg_qtquick2/qtquick2plugin.cpp | 4 +- .../qmltooling/qmldbg_qtquick2/qtquick2plugin.h | 16 +- .../qmltooling/qmldbg_qtquick2/selectiontool.cpp | 2 +- .../qmltooling/qmldbg_qtquick2/selectiontool.h | 2 +- src/plugins/qmltooling/qmldbg_tcp/qmldbg_tcp.pro | 6 +- .../qmltooling/qmldbg_tcp/qtcpserverconnection.cpp | 16 +- .../qmltooling/qmldbg_tcp/qtcpserverconnection.h | 12 +- src/plugins/qmltooling/shared/abstracttool.cpp | 2 +- src/plugins/qmltooling/shared/abstracttool.h | 2 +- .../qmltooling/shared/abstractviewinspector.cpp | 30 ++-- .../qmltooling/shared/abstractviewinspector.h | 14 +- .../shared/qdeclarativeinspectorprotocol.h | 137 ------------------ .../qmltooling/shared/qmlinspectorconstants.h | 4 +- .../qmltooling/shared/qqmlinspectorprotocol.h | 137 ++++++++++++++++++ 36 files changed, 489 insertions(+), 489 deletions(-) delete mode 100644 src/plugins/accessible/shared/qdeclarativeaccessible.cpp delete mode 100644 src/plugins/accessible/shared/qdeclarativeaccessible.h create mode 100644 src/plugins/accessible/shared/qqmlaccessible.cpp create mode 100644 src/plugins/accessible/shared/qqmlaccessible.h delete mode 100644 src/plugins/qmltooling/shared/qdeclarativeinspectorprotocol.h create mode 100644 src/plugins/qmltooling/shared/qqmlinspectorprotocol.h (limited to 'src/plugins') diff --git a/src/plugins/accessible/quick/main.cpp b/src/plugins/accessible/quick/main.cpp index 08a5fe546b..783d4674da 100644 --- a/src/plugins/accessible/quick/main.cpp +++ b/src/plugins/accessible/quick/main.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -40,7 +40,7 @@ ****************************************************************************/ -#include "qdeclarativeaccessible.h" +#include "qqmlaccessible.h" #include "qaccessiblequickview.h" #include "qaccessiblequickitem.h" diff --git a/src/plugins/accessible/quick/qaccessiblequickitem.cpp b/src/plugins/accessible/quick/qaccessiblequickitem.cpp index 806a0f50c8..78e7ca86ef 100644 --- a/src/plugins/accessible/quick/qaccessiblequickitem.cpp +++ b/src/plugins/accessible/quick/qaccessiblequickitem.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE QAccessibleQuickItem::QAccessibleQuickItem(QQuickItem *item) - : QDeclarativeAccessible(item) + : QQmlAccessible(item) { } diff --git a/src/plugins/accessible/quick/qaccessiblequickitem.h b/src/plugins/accessible/quick/qaccessiblequickitem.h index a283f853fd..5c19666f32 100644 --- a/src/plugins/accessible/quick/qaccessiblequickitem.h +++ b/src/plugins/accessible/quick/qaccessiblequickitem.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -44,13 +44,13 @@ #include #include -#include "qdeclarativeaccessible.h" +#include "qqmlaccessible.h" QT_BEGIN_NAMESPACE #ifndef QT_NO_ACCESSIBILITY -class QAccessibleQuickItem : public QDeclarativeAccessible +class QAccessibleQuickItem : public QQmlAccessible { public: QAccessibleQuickItem(QQuickItem *item); diff --git a/src/plugins/accessible/quick/qaccessiblequickview.cpp b/src/plugins/accessible/quick/qaccessiblequickview.cpp index 05f0b8eed9..042d8dcf06 100644 --- a/src/plugins/accessible/quick/qaccessiblequickview.cpp +++ b/src/plugins/accessible/quick/qaccessiblequickview.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -45,7 +45,7 @@ #include #include "qaccessiblequickitem.h" -#include "qdeclarativeaccessible.h" +#include "qqmlaccessible.h" #ifndef QT_NO_ACCESSIBILITY diff --git a/src/plugins/accessible/quick/qaccessiblequickview.h b/src/plugins/accessible/quick/qaccessiblequickview.h index 66c8a52168..3ad87df937 100644 --- a/src/plugins/accessible/quick/qaccessiblequickview.h +++ b/src/plugins/accessible/quick/qaccessiblequickview.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/plugins/accessible/quick/quick.pro b/src/plugins/accessible/quick/quick.pro index 97a1d50098..ae6ec032da 100644 --- a/src/plugins/accessible/quick/quick.pro +++ b/src/plugins/accessible/quick/quick.pro @@ -4,7 +4,7 @@ TARGET = qtaccessiblequick load(qt_plugin) include ($$PWD/../shared/qaccessiblebase.pri) -QT += core-private gui-private v8-private declarative-private quick-private +QT += core-private gui-private v8-private qml-private quick-private DESTDIR = $$QT.gui.plugins/accessible QTDIR_build:REQUIRES += "contains(QT_CONFIG, accessibility)" diff --git a/src/plugins/accessible/shared/qaccessiblebase.pri b/src/plugins/accessible/shared/qaccessiblebase.pri index 8c82705443..56a8a1c9ef 100644 --- a/src/plugins/accessible/shared/qaccessiblebase.pri +++ b/src/plugins/accessible/shared/qaccessiblebase.pri @@ -3,5 +3,5 @@ INSTALLS += target INCLUDEPATH += $$PWD DEPENDPATH += $$PWD -SOURCES += $$PWD/qdeclarativeaccessible.cpp -HEADERS += $$PWD/qdeclarativeaccessible.h +SOURCES += $$PWD/qqmlaccessible.cpp +HEADERS += $$PWD/qqmlaccessible.h diff --git a/src/plugins/accessible/shared/qdeclarativeaccessible.cpp b/src/plugins/accessible/shared/qdeclarativeaccessible.cpp deleted file mode 100644 index a063dd043d..0000000000 --- a/src/plugins/accessible/shared/qdeclarativeaccessible.cpp +++ /dev/null @@ -1,161 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** 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$ -** -****************************************************************************/ - -#include -#include "qdeclarativeaccessible.h" - -#ifndef QT_NO_ACCESSIBILITY - -QT_BEGIN_NAMESPACE - - -QString Q_GUI_EXPORT qTextBeforeOffsetFromString(int offset, QAccessible2::BoundaryType boundaryType, - int *startOffset, int *endOffset, const QString& text); -QString Q_GUI_EXPORT qTextAtOffsetFromString(int offset, QAccessible2::BoundaryType boundaryType, - int *startOffset, int *endOffset, const QString& text); -QString Q_GUI_EXPORT qTextAfterOffsetFromString(int offset, QAccessible2::BoundaryType boundaryType, - int *startOffset, int *endOffset, const QString& text); - -QDeclarativeAccessible::QDeclarativeAccessible(QObject *object) - :QAccessibleObject(object) -{ -} - -QDeclarativeAccessible::~QDeclarativeAccessible() -{ -} - -QAccessibleInterface *QDeclarativeAccessible::childAt(int x, int y) const -{ - // Note that this function will disregard stacking order. - // (QAccessibleQuickView::childAt() does this correctly and more efficient) - - // If the item clips its children, we can return early if the coordinate is outside its rect - if (clipsChildren()) { - if (!rect().contains(x, y)) - return 0; - } - - for (int i = childCount() - 1; i >= 0; --i) { - QAccessibleInterface *childIface = child(i); - if (childIface && !childIface->state().invisible) { - if (childIface->rect().contains(x, y)) - return childIface; - } - delete childIface; - } - return 0; -} - -QAccessible::State QDeclarativeAccessible::state() const -{ - QAccessible::State state; - - //QRect viewRect(QPoint(0, 0), m_implementation->size()); - //QRect itemRect(m_item->scenePos().toPoint(), m_item->boundingRect().size().toSize()); - - QRect viewRect_ = viewRect(); - QRect itemRect = rect(); - - // qDebug() << "viewRect" << viewRect << "itemRect" << itemRect; - // error case: - if (viewRect_.isNull() || itemRect.isNull()) { - state.invisible = true; - } - - if (!viewRect_.intersects(itemRect)) { - state.offscreen = true; - // state.invisible = true; // no set at this point to ease development - } - - if (!object()->property("visible").toBool() || qFuzzyIsNull(object()->property("opacity").toDouble())) { - state.invisible = true; - } - - if ((role() == QAccessible::CheckBox || role() == QAccessible::RadioButton) && object()->property("checked").toBool()) { - state.checked = true; - } - - if (role() == QAccessible::EditableText) - state.focusable = true; - - //qDebug() << "state?" << m_item->property("state").toString() << m_item->property("status").toString() << m_item->property("visible").toString(); - - return state; -} - -QStringList QDeclarativeAccessible::actionNames() const -{ - QStringList actions; - switch (role()) { - case QAccessible::PushButton: - actions << QAccessibleActionInterface::pressAction(); - break; - case QAccessible::RadioButton: - case QAccessible::CheckBox: - actions << QAccessibleActionInterface::checkAction(); - break; - default: - break; - } - return actions; -} - -void QDeclarativeAccessible::doAction(const QString &actionName) -{ - if (role() == QAccessible::PushButton && actionName == QAccessibleActionInterface::pressAction()) { - QMetaObject::invokeMethod(object(), "accessibleAction"); - } - if ((role() == QAccessible::CheckBox || role() == QAccessible::RadioButton) && actionName == QAccessibleActionInterface::checkAction()) { - bool checked = object()->property("checked").toBool(); - object()->setProperty("checked", QVariant(!checked)); - } -} - -QStringList QDeclarativeAccessible::keyBindingsForAction(const QString &actionName) const -{ - Q_UNUSED(actionName) - return QStringList(); -} - -QT_END_NAMESPACE - -#endif // QT_NO_ACCESSIBILITY diff --git a/src/plugins/accessible/shared/qdeclarativeaccessible.h b/src/plugins/accessible/shared/qdeclarativeaccessible.h deleted file mode 100644 index 924e454fc9..0000000000 --- a/src/plugins/accessible/shared/qdeclarativeaccessible.h +++ /dev/null @@ -1,96 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** 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 QDECLARATIVEACCESSIBLE_H -#define QDECLARATIVEACCESSIBLE_H - -#include -#include -//#include -//#include -#include - -//#include - -QT_BEGIN_NAMESPACE - -#ifndef QT_NO_ACCESSIBILITY - -/* - -- Declarative Accessibility Overview. -- - - * Item interface classes: - QAccessibleDeclarativeItem for QtQuick1 - QAccessibleQuickItem for for QtQuick2 - Common base class: QDeclarativeAccessible - - * View interface classes. - - These are the root of the QML accessible tree and connects it to the widget hierarchy. - - QAccessbileDeclarativeView is the root for the QGraphicsView implementation - QAccessbileQuickView is the root for the SceneGraph implementation - -*/ -class QDeclarativeAccessible: public QAccessibleObject, public QAccessibleActionInterface -{ -public: - ~QDeclarativeAccessible(); - - virtual QRect viewRect() const = 0; - QAccessibleInterface *childAt(int, int) const; - QAccessible::State state() const; - - QStringList actionNames() const; - void doAction(const QString &actionName); - QStringList keyBindingsForAction(const QString &actionName) const; - -protected: - virtual bool clipsChildren() const = 0; - // For subclasses, use instantiateObject factory method outside the class. - QDeclarativeAccessible(QObject *object); -}; - -#endif // QT_NO_ACCESSIBILITY - -QT_END_NAMESPACE - -#endif // QDECLARATIVEACCESSIBLE_H diff --git a/src/plugins/accessible/shared/qqmlaccessible.cpp b/src/plugins/accessible/shared/qqmlaccessible.cpp new file mode 100644 index 0000000000..1818ebebfe --- /dev/null +++ b/src/plugins/accessible/shared/qqmlaccessible.cpp @@ -0,0 +1,161 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtQml 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$ +** +****************************************************************************/ + +#include +#include "qqmlaccessible.h" + +#ifndef QT_NO_ACCESSIBILITY + +QT_BEGIN_NAMESPACE + + +QString Q_GUI_EXPORT qTextBeforeOffsetFromString(int offset, QAccessible2::BoundaryType boundaryType, + int *startOffset, int *endOffset, const QString& text); +QString Q_GUI_EXPORT qTextAtOffsetFromString(int offset, QAccessible2::BoundaryType boundaryType, + int *startOffset, int *endOffset, const QString& text); +QString Q_GUI_EXPORT qTextAfterOffsetFromString(int offset, QAccessible2::BoundaryType boundaryType, + int *startOffset, int *endOffset, const QString& text); + +QQmlAccessible::QQmlAccessible(QObject *object) + :QAccessibleObject(object) +{ +} + +QQmlAccessible::~QQmlAccessible() +{ +} + +QAccessibleInterface *QQmlAccessible::childAt(int x, int y) const +{ + // Note that this function will disregard stacking order. + // (QAccessibleQuickView::childAt() does this correctly and more efficient) + + // If the item clips its children, we can return early if the coordinate is outside its rect + if (clipsChildren()) { + if (!rect().contains(x, y)) + return 0; + } + + for (int i = childCount() - 1; i >= 0; --i) { + QAccessibleInterface *childIface = child(i); + if (childIface && !childIface->state().invisible) { + if (childIface->rect().contains(x, y)) + return childIface; + } + delete childIface; + } + return 0; +} + +QAccessible::State QQmlAccessible::state() const +{ + QAccessible::State state; + + //QRect viewRect(QPoint(0, 0), m_implementation->size()); + //QRect itemRect(m_item->scenePos().toPoint(), m_item->boundingRect().size().toSize()); + + QRect viewRect_ = viewRect(); + QRect itemRect = rect(); + + // qDebug() << "viewRect" << viewRect << "itemRect" << itemRect; + // error case: + if (viewRect_.isNull() || itemRect.isNull()) { + state.invisible = true; + } + + if (!viewRect_.intersects(itemRect)) { + state.offscreen = true; + // state.invisible = true; // no set at this point to ease development + } + + if (!object()->property("visible").toBool() || qFuzzyIsNull(object()->property("opacity").toDouble())) { + state.invisible = true; + } + + if ((role() == QAccessible::CheckBox || role() == QAccessible::RadioButton) && object()->property("checked").toBool()) { + state.checked = true; + } + + if (role() == QAccessible::EditableText) + state.focusable = true; + + //qDebug() << "state?" << m_item->property("state").toString() << m_item->property("status").toString() << m_item->property("visible").toString(); + + return state; +} + +QStringList QQmlAccessible::actionNames() const +{ + QStringList actions; + switch (role()) { + case QAccessible::PushButton: + actions << QAccessibleActionInterface::pressAction(); + break; + case QAccessible::RadioButton: + case QAccessible::CheckBox: + actions << QAccessibleActionInterface::checkAction(); + break; + default: + break; + } + return actions; +} + +void QQmlAccessible::doAction(const QString &actionName) +{ + if (role() == QAccessible::PushButton && actionName == QAccessibleActionInterface::pressAction()) { + QMetaObject::invokeMethod(object(), "accessibleAction"); + } + if ((role() == QAccessible::CheckBox || role() == QAccessible::RadioButton) && actionName == QAccessibleActionInterface::checkAction()) { + bool checked = object()->property("checked").toBool(); + object()->setProperty("checked", QVariant(!checked)); + } +} + +QStringList QQmlAccessible::keyBindingsForAction(const QString &actionName) const +{ + Q_UNUSED(actionName) + return QStringList(); +} + +QT_END_NAMESPACE + +#endif // QT_NO_ACCESSIBILITY diff --git a/src/plugins/accessible/shared/qqmlaccessible.h b/src/plugins/accessible/shared/qqmlaccessible.h new file mode 100644 index 0000000000..570a3c8c40 --- /dev/null +++ b/src/plugins/accessible/shared/qqmlaccessible.h @@ -0,0 +1,96 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtQml 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 QQMLACCESSIBLE_H +#define QQMLACCESSIBLE_H + +#include +#include +//#include +//#include +#include + +//#include + +QT_BEGIN_NAMESPACE + +#ifndef QT_NO_ACCESSIBILITY + +/* + -- Declarative Accessibility Overview. -- + + * Item interface classes: + QAccessibleDeclarativeItem for QtQuick1 + QAccessibleQuickItem for for QtQuick2 + Common base class: QQmlAccessible + + * View interface classes. + + These are the root of the QML accessible tree and connects it to the widget hierarchy. + + QAccessbileDeclarativeView is the root for the QGraphicsView implementation + QAccessbileQuickView is the root for the SceneGraph implementation + +*/ +class QQmlAccessible: public QAccessibleObject, public QAccessibleActionInterface +{ +public: + ~QQmlAccessible(); + + virtual QRect viewRect() const = 0; + QAccessibleInterface *childAt(int, int) const; + QAccessible::State state() const; + + QStringList actionNames() const; + void doAction(const QString &actionName); + QStringList keyBindingsForAction(const QString &actionName) const; + +protected: + virtual bool clipsChildren() const = 0; + // For subclasses, use instantiateObject factory method outside the class. + QQmlAccessible(QObject *object); +}; + +#endif // QT_NO_ACCESSIBILITY + +QT_END_NAMESPACE + +#endif // QQMLACCESSIBLE_H diff --git a/src/plugins/qmltooling/qmldbg_ost/qmldbg_ost.pro b/src/plugins/qmltooling/qmldbg_ost/qmldbg_ost.pro index c1ca2a5ef9..6f973bcc18 100644 --- a/src/plugins/qmltooling/qmldbg_ost/qmldbg_ost.pro +++ b/src/plugins/qmltooling/qmldbg_ost/qmldbg_ost.pro @@ -1,10 +1,10 @@ TARGET = qmldbg_ost -QT += declarative network +QT += qml network load(qt_plugin) QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/qmltooling -QTDIR_build:REQUIRES += "contains(QT_CONFIG, declarative)" +QTDIR_build:REQUIRES += "contains(QT_CONFIG, qml)" SOURCES += \ qmlostplugin.cpp \ diff --git a/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp b/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp index d4d9629334..9bd68e7401 100644 --- a/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp +++ b/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -42,7 +42,7 @@ #include "qmlostplugin.h" #include "qostdevice.h" -#include +#include #include QT_BEGIN_NAMESPACE @@ -55,7 +55,7 @@ public: QOstDevice *ost; QPacketProtocol *protocol; - QDeclarativeDebugServer *debugServer; + QQmlDebugServer *debugServer; }; QmlOstPluginPrivate::QmlOstPluginPrivate() : @@ -75,7 +75,7 @@ QmlOstPlugin::~QmlOstPlugin() delete d_ptr; } -void QmlOstPlugin::setServer(QDeclarativeDebugServer *server) +void QmlOstPlugin::setServer(QQmlDebugServer *server) { Q_D(QmlOstPlugin); d->debugServer = server; @@ -127,12 +127,12 @@ void QmlOstPlugin::setPort(int port, bool block) if (!ok) { if (d->ost->errorString().length()) qDebug("Error from QOstDevice: %s", qPrintable(d->ost->errorString())); - qWarning("QDeclarativeDebugServer: Unable to listen on OST"); // This message is part of the signalling - do not change the format! + qWarning("QQmlDebugServer: Unable to listen on OST"); // This message is part of the signalling - do not change the format! return; } d->protocol = new QPacketProtocol(d->ost, this); QObject::connect(d->protocol, SIGNAL(readyRead()), this, SLOT(readyRead())); - qWarning("QDeclarativeDebugServer: Waiting for connection via OST"); // This message is part of the signalling - do not change the format! + qWarning("QQmlDebugServer: Waiting for connection via OST"); // This message is part of the signalling - do not change the format! } void QmlOstPlugin::readyRead() diff --git a/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.h b/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.h index 1bbba93b94..41c3a07f25 100644 --- a/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.h +++ b/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -43,26 +43,26 @@ #define QMLOSTPLUGIN_H #include -#include +#include QT_BEGIN_NAMESPACE -class QDeclarativeDebugServer; +class QQmlDebugServer; class QmlOstPluginPrivate; -class QmlOstPlugin : public QObject, public QDeclarativeDebugServerConnection +class QmlOstPlugin : public QObject, public QQmlDebugServerConnection { Q_OBJECT Q_DECLARE_PRIVATE(QmlOstPlugin) Q_DISABLE_COPY(QmlOstPlugin) - Q_INTERFACES(QDeclarativeDebugServerConnection) + Q_INTERFACES(QQmlDebugServerConnection) public: QmlOstPlugin(); ~QmlOstPlugin(); - void setServer(QDeclarativeDebugServer *server); + void setServer(QQmlDebugServer *server); void setPort(int port, bool bock); bool isConnected() const; diff --git a/src/plugins/qmltooling/qmldbg_ost/qostdevice.cpp b/src/plugins/qmltooling/qmldbg_ost/qostdevice.cpp index 289418cd83..2c557ac3cc 100644 --- a/src/plugins/qmltooling/qmldbg_ost/qostdevice.cpp +++ b/src/plugins/qmltooling/qmldbg_ost/qostdevice.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/plugins/qmltooling/qmldbg_ost/qostdevice.h b/src/plugins/qmltooling/qmldbg_ost/qostdevice.h index 609a71897b..4b645f9c8e 100644 --- a/src/plugins/qmltooling/qmldbg_ost/qostdevice.h +++ b/src/plugins/qmltooling/qmldbg_ost/qostdevice.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/plugins/qmltooling/qmldbg_ost/usbostcomm.h b/src/plugins/qmltooling/qmldbg_ost/usbostcomm.h index 246e162aee..b9bf53fbd2 100644 --- a/src/plugins/qmltooling/qmldbg_ost/usbostcomm.h +++ b/src/plugins/qmltooling/qmldbg_ost/usbostcomm.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/plugins/qmltooling/qmldbg_qtquick2/highlight.cpp b/src/plugins/qmltooling/qmldbg_qtquick2/highlight.cpp index e0662da590..bb4048ee92 100644 --- a/src/plugins/qmltooling/qmldbg_qtquick2/highlight.cpp +++ b/src/plugins/qmltooling/qmldbg_qtquick2/highlight.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/plugins/qmltooling/qmldbg_qtquick2/highlight.h b/src/plugins/qmltooling/qmldbg_qtquick2/highlight.h index 82096c6abd..1b1f10c8bb 100644 --- a/src/plugins/qmltooling/qmldbg_qtquick2/highlight.h +++ b/src/plugins/qmltooling/qmldbg_qtquick2/highlight.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/plugins/qmltooling/qmldbg_qtquick2/qmldbg_qtquick2.pro b/src/plugins/qmltooling/qmldbg_qtquick2/qmldbg_qtquick2.pro index b9c6584afc..014f964652 100644 --- a/src/plugins/qmltooling/qmldbg_qtquick2/qmldbg_qtquick2.pro +++ b/src/plugins/qmltooling/qmldbg_qtquick2/qmldbg_qtquick2.pro @@ -1,11 +1,11 @@ load(qt_module) TARGET = qmldbg_qtquick2 -QT += declarative-private quick-private core-private gui-private opengl-private v8-private +QT += qml-private quick-private core-private gui-private opengl-private v8-private load(qt_plugin) -DESTDIR = $$QT.declarative.plugins/qmltooling +DESTDIR = $$QT.qml.plugins/qmltooling INCLUDEPATH *= $$PWD $$PWD/../shared @@ -24,7 +24,7 @@ HEADERS += \ qquickviewinspector.h \ ../shared/abstracttool.h \ ../shared/abstractviewinspector.h \ - ../shared/qdeclarativeinspectorprotocol.h \ + ../shared/qqmlinspectorprotocol.h \ ../shared/qmlinspectorconstants.h target.path += $$[QT_INSTALL_PLUGINS]/qmltooling diff --git a/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.cpp b/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.cpp index b146c6e846..200c66ee35 100644 --- a/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.cpp +++ b/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -41,7 +41,7 @@ #include "qquickviewinspector.h" -#include "qdeclarativeinspectorprotocol.h" +#include "qqmlinspectorprotocol.h" #include "highlight.h" #include "selectiontool.h" @@ -206,7 +206,7 @@ void QQuickViewInspector::setWindowFlags(Qt::WindowFlags flags) w->setVisible(true); } -QDeclarativeEngine *QQuickViewInspector::declarativeEngine() const +QQmlEngine *QQuickViewInspector::declarativeEngine() const { return m_view->engine(); } diff --git a/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.h b/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.h index 07c38b1d5e..fbc3c17b87 100644 --- a/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.h +++ b/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -71,7 +71,7 @@ public: void changeTool(InspectorProtocol::Tool tool); Qt::WindowFlags windowFlags() const; void setWindowFlags(Qt::WindowFlags flags); - QDeclarativeEngine *declarativeEngine() const; + QQmlEngine *declarativeEngine() const; QQuickView *view() const { return m_view; } QQuickItem *overlay() const { return m_overlay; } diff --git a/src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.cpp b/src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.cpp index 206d0b2eb9..ea52788896 100644 --- a/src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.cpp +++ b/src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -43,7 +43,7 @@ #include "qquickviewinspector.h" #include -#include +#include #include namespace QmlJSDebugger { diff --git a/src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.h b/src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.h index d0f814c03c..d78aac6ead 100644 --- a/src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.h +++ b/src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -39,11 +39,11 @@ ** ****************************************************************************/ -#ifndef QDECLARATIVEINSPECTORPLUGIN_H -#define QDECLARATIVEINSPECTORPLUGIN_H +#ifndef QTQUICK2PLUGINPLUGIN_H +#define QTQUICK2PLUGINPLUGIN_H #include -#include +#include namespace QmlJSDebugger { @@ -51,17 +51,17 @@ class AbstractViewInspector; namespace QtQuick2 { -class QtQuick2Plugin : public QObject, public QDeclarativeInspectorInterface +class QtQuick2Plugin : public QObject, public QQmlInspectorInterface { Q_OBJECT Q_DISABLE_COPY(QtQuick2Plugin) - Q_INTERFACES(QDeclarativeInspectorInterface) + Q_INTERFACES(QQmlInspectorInterface) public: QtQuick2Plugin(); ~QtQuick2Plugin(); - // QDeclarativeInspectorInterface + // QQmlInspectorInterface bool canHandleView(QObject *view); void activate(QObject *view); void deactivate(); @@ -74,4 +74,4 @@ private: } // namespace QtQuick2 } // namespace QmlJSDebugger -#endif // QDECLARATIVEINSPECTORPLUGIN_H +#endif // QTQUICK2PLUGINPLUGIN_H diff --git a/src/plugins/qmltooling/qmldbg_qtquick2/selectiontool.cpp b/src/plugins/qmltooling/qmldbg_qtquick2/selectiontool.cpp index efa079dcf1..5ad102a92d 100644 --- a/src/plugins/qmltooling/qmldbg_qtquick2/selectiontool.cpp +++ b/src/plugins/qmltooling/qmldbg_qtquick2/selectiontool.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/plugins/qmltooling/qmldbg_qtquick2/selectiontool.h b/src/plugins/qmltooling/qmldbg_qtquick2/selectiontool.h index 7767317abe..c2aa26a1a7 100644 --- a/src/plugins/qmltooling/qmldbg_qtquick2/selectiontool.h +++ b/src/plugins/qmltooling/qmldbg_qtquick2/selectiontool.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/plugins/qmltooling/qmldbg_tcp/qmldbg_tcp.pro b/src/plugins/qmltooling/qmldbg_tcp/qmldbg_tcp.pro index 8ab507c055..cb663dbc0c 100644 --- a/src/plugins/qmltooling/qmldbg_tcp/qmldbg_tcp.pro +++ b/src/plugins/qmltooling/qmldbg_tcp/qmldbg_tcp.pro @@ -1,12 +1,12 @@ load(qt_module) TARGET = qmldbg_tcp -QT += declarative-private network +QT += qml-private network load(qt_plugin) -DESTDIR = $$QT.declarative.plugins/qmltooling -QTDIR_build:REQUIRES += "contains(QT_CONFIG, declarative)" +DESTDIR = $$QT.qml.plugins/qmltooling +QTDIR_build:REQUIRES += "contains(QT_CONFIG, qml)" SOURCES += \ qtcpserverconnection.cpp diff --git a/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp b/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp index 529d2094bf..63a3297f37 100644 --- a/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp +++ b/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -45,7 +45,7 @@ #include #include -#include +#include #include QT_BEGIN_NAMESPACE @@ -60,7 +60,7 @@ public: QPacketProtocol *protocol; QTcpServer *tcpServer; - QDeclarativeDebugServer *debugServer; + QQmlDebugServer *debugServer; }; QTcpServerConnectionPrivate::QTcpServerConnectionPrivate() : @@ -84,7 +84,7 @@ QTcpServerConnection::~QTcpServerConnection() delete d_ptr; } -void QTcpServerConnection::setServer(QDeclarativeDebugServer *server) +void QTcpServerConnection::setServer(QQmlDebugServer *server) { Q_D(QTcpServerConnection); d->debugServer = server; @@ -147,9 +147,9 @@ void QTcpServerConnection::listen() d->tcpServer = new QTcpServer(this); QObject::connect(d->tcpServer, SIGNAL(newConnection()), this, SLOT(newConnection())); if (d->tcpServer->listen(QHostAddress::Any, d->port)) - qWarning("QDeclarativeDebugServer: Waiting for connection on port %d...", d->port); + qWarning("QQmlDebugServer: Waiting for connection on port %d...", d->port); else - qWarning("QDeclarativeDebugServer: Unable to listen on port %d", d->port); + qWarning("QQmlDebugServer: Unable to listen on port %d", d->port); } @@ -170,7 +170,7 @@ void QTcpServerConnection::newConnection() Q_D(QTcpServerConnection); if (d->socket && d->socket->peerPort()) { - qWarning("QDeclarativeDebugServer: Another client is already connected"); + qWarning("QQmlDebugServer: Another client is already connected"); QTcpSocket *faultyConnection = d->tcpServer->nextPendingConnection(); delete faultyConnection; return; @@ -190,7 +190,7 @@ void QTcpServerConnection::newConnection() void QTcpServerConnection::invalidPacket() { - qWarning("QDeclarativeDebugServer: Received a corrupted packet! Giving up ..."); + qWarning("QQmlDebugServer: Received a corrupted packet! Giving up ..."); } Q_EXPORT_PLUGIN2(tcpserver, QTcpServerConnection) diff --git a/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.h b/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.h index f090c9709f..74c6b95e56 100644 --- a/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.h +++ b/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -43,25 +43,25 @@ #define QTCPSERVERCONNECTION_H #include -#include +#include QT_BEGIN_NAMESPACE -class QDeclarativeDebugServer; +class QQmlDebugServer; class QTcpServerConnectionPrivate; -class QTcpServerConnection : public QObject, public QDeclarativeDebugServerConnection +class QTcpServerConnection : public QObject, public QQmlDebugServerConnection { Q_OBJECT Q_DECLARE_PRIVATE(QTcpServerConnection) Q_DISABLE_COPY(QTcpServerConnection) - Q_INTERFACES(QDeclarativeDebugServerConnection) + Q_INTERFACES(QQmlDebugServerConnection) public: QTcpServerConnection(); ~QTcpServerConnection(); - void setServer(QDeclarativeDebugServer *server); + void setServer(QQmlDebugServer *server); void setPort(int port, bool bock); bool isConnected() const; diff --git a/src/plugins/qmltooling/shared/abstracttool.cpp b/src/plugins/qmltooling/shared/abstracttool.cpp index 0565537cca..69e468bd92 100644 --- a/src/plugins/qmltooling/shared/abstracttool.cpp +++ b/src/plugins/qmltooling/shared/abstracttool.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/plugins/qmltooling/shared/abstracttool.h b/src/plugins/qmltooling/shared/abstracttool.h index e21e3be1f8..35817064e2 100644 --- a/src/plugins/qmltooling/shared/abstracttool.h +++ b/src/plugins/qmltooling/shared/abstracttool.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/plugins/qmltooling/shared/abstractviewinspector.cpp b/src/plugins/qmltooling/shared/abstractviewinspector.cpp index cfa0f441cd..33e47d270d 100644 --- a/src/plugins/qmltooling/shared/abstractviewinspector.cpp +++ b/src/plugins/qmltooling/shared/abstractviewinspector.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -42,12 +42,12 @@ #include "abstractviewinspector.h" #include "abstracttool.h" -#include "qdeclarativeinspectorprotocol.h" +#include "qqmlinspectorprotocol.h" -#include -#include +#include +#include #include -#include +#include #include @@ -61,7 +61,7 @@ AbstractViewInspector::AbstractViewInspector(QObject *parent) : m_designModeBehavior(false), m_animationPaused(false), m_slowDownFactor(1.0), - m_debugService(QDeclarativeInspectorService::instance()) + m_debugService(QQmlInspectorService::instance()) { } @@ -78,8 +78,8 @@ void AbstractViewInspector::createQmlObject(const QString &qml, QObject *parent, imports += QLatin1Char('\n'); } - QDeclarativeContext *parentContext = declarativeEngine()->contextForObject(parent); - QDeclarativeComponent component(declarativeEngine()); + QQmlContext *parentContext = declarativeEngine()->contextForObject(parent); + QQmlComponent component(declarativeEngine()); QByteArray constructedQml = QString(imports + qml).toLatin1(); component.setData(constructedQml, QUrl::fromLocalFile(filename)); @@ -316,7 +316,7 @@ void AbstractViewInspector::handleMessage(const QByteArray &message) for (int i = 0; i < itemCount; ++i) { int debugId = -1; ds >> debugId; - if (QObject *obj = QDeclarativeDebugService::objectForId(debugId)) + if (QObject *obj = QQmlDebugService::objectForId(debugId)) selectedObjects << obj; } @@ -363,22 +363,22 @@ void AbstractViewInspector::handleMessage(const QByteArray &message) QString filename; QStringList imports; ds >> qml >> parentId >> imports >> filename; - createQmlObject(qml, QDeclarativeDebugService::objectForId(parentId), + createQmlObject(qml, QQmlDebugService::objectForId(parentId), imports, filename); break; } case InspectorProtocol::DestroyObject: { int debugId; ds >> debugId; - if (QObject *obj = QDeclarativeDebugService::objectForId(debugId)) + if (QObject *obj = QQmlDebugService::objectForId(debugId)) obj->deleteLater(); break; } case InspectorProtocol::MoveObject: { int debugId, newParent; ds >> debugId >> newParent; - reparentQmlObject(QDeclarativeDebugService::objectForId(debugId), - QDeclarativeDebugService::objectForId(newParent)); + reparentQmlObject(QQmlDebugService::objectForId(debugId), + QQmlDebugService::objectForId(newParent)); break; } case InspectorProtocol::ObjectIdList: { @@ -424,7 +424,7 @@ void AbstractViewInspector::sendCurrentObjects(const QList &objects) << objects.length(); foreach (QObject *object, objects) { - int id = QDeclarativeDebugService::idForObject(object); + int id = QQmlDebugService::idForObject(object); ds << id; } @@ -497,7 +497,7 @@ void AbstractViewInspector::sendColorChanged(const QColor &color) QString AbstractViewInspector::idStringForObject(QObject *obj) const { - const int id = QDeclarativeDebugService::idForObject(obj); + const int id = QQmlDebugService::idForObject(obj); return m_stringIdForObjectId.value(id); } diff --git a/src/plugins/qmltooling/shared/abstractviewinspector.h b/src/plugins/qmltooling/shared/abstractviewinspector.h index 741013239f..0dacc92233 100644 --- a/src/plugins/qmltooling/shared/abstractviewinspector.h +++ b/src/plugins/qmltooling/shared/abstractviewinspector.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -47,12 +47,12 @@ #include #include -#include "qdeclarativeinspectorprotocol.h" +#include "qqmlinspectorprotocol.h" #include "qmlinspectorconstants.h" QT_BEGIN_NAMESPACE -class QDeclarativeEngine; -class QDeclarativeInspectorService; +class QQmlEngine; +class QQmlInspectorService; class QKeyEvent; class QMouseEvent; class QWheelEvent; @@ -63,7 +63,7 @@ namespace QmlJSDebugger { class AbstractTool; /* - * The common code between QQuickView and QDeclarativeView inspectors lives here, + * The common code between QQuickView and QQuickView inspectors lives here, */ class AbstractViewInspector : public QObject { @@ -100,7 +100,7 @@ public: virtual void changeTool(InspectorProtocol::Tool tool) = 0; virtual Qt::WindowFlags windowFlags() const = 0; virtual void setWindowFlags(Qt::WindowFlags flags) = 0; - virtual QDeclarativeEngine *declarativeEngine() const = 0; + virtual QQmlEngine *declarativeEngine() const = 0; signals: void designModeBehaviorChanged(bool inDesignMode); @@ -159,7 +159,7 @@ private: qreal m_slowDownFactor; QHash m_stringIdForObjectId; - QDeclarativeInspectorService *m_debugService; + QQmlInspectorService *m_debugService; }; } // namespace QmlJSDebugger diff --git a/src/plugins/qmltooling/shared/qdeclarativeinspectorprotocol.h b/src/plugins/qmltooling/shared/qdeclarativeinspectorprotocol.h deleted file mode 100644 index 4c833b99dc..0000000000 --- a/src/plugins/qmltooling/shared/qdeclarativeinspectorprotocol.h +++ /dev/null @@ -1,137 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** 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 QDECLARATIVEINSPECTORPROTOCOL_H -#define QDECLARATIVEINSPECTORPROTOCOL_H - -#include -#include -#include -#include - -namespace QmlJSDebugger { - -class InspectorProtocol : public QObject -{ - Q_OBJECT - Q_ENUMS(Message Tool) - -public: - enum Message { - AnimationSpeedChanged = 0, - AnimationPausedChanged = 19, // highest value - ChangeTool = 1, - ClearComponentCache = 2, - ColorChanged = 3, - CreateObject = 5, - CurrentObjectsChanged = 6, - DestroyObject = 7, - MoveObject = 8, - ObjectIdList = 9, - Reload = 10, - Reloaded = 11, - SetAnimationSpeed = 12, - SetAnimationPaused = 18, - SetCurrentObjects = 14, - SetDesignMode = 15, - ShowAppOnTop = 16, - ToolChanged = 17 - }; - - enum Tool { - ColorPickerTool, - SelectMarqueeTool, - SelectTool, - ZoomTool - }; - - static inline QString toString(Message message) - { - return QLatin1String(staticMetaObject.enumerator(0).valueToKey(message)); - } - - static inline QString toString(Tool tool) - { - return QLatin1String(staticMetaObject.enumerator(1).valueToKey(tool)); - } -}; - -inline QDataStream & operator<< (QDataStream &stream, InspectorProtocol::Message message) -{ - return stream << static_cast(message); -} - -inline QDataStream & operator>> (QDataStream &stream, InspectorProtocol::Message &message) -{ - quint32 i; - stream >> i; - message = static_cast(i); - return stream; -} - -inline QDebug operator<< (QDebug dbg, InspectorProtocol::Message message) -{ - dbg << InspectorProtocol::toString(message); - return dbg; -} - -inline QDataStream & operator<< (QDataStream &stream, InspectorProtocol::Tool tool) -{ - return stream << static_cast(tool); -} - -inline QDataStream & operator>> (QDataStream &stream, InspectorProtocol::Tool &tool) -{ - quint32 i; - stream >> i; - tool = static_cast(i); - return stream; -} - -inline QDebug operator<< (QDebug dbg, InspectorProtocol::Tool tool) -{ - dbg << InspectorProtocol::toString(tool); - return dbg; -} - -} // namespace QmlJSDebugger - -#endif // QDECLARATIVEINSPECTORPROTOCOL_H diff --git a/src/plugins/qmltooling/shared/qmlinspectorconstants.h b/src/plugins/qmltooling/shared/qmlinspectorconstants.h index 1b25486bb6..e5a0ee5450 100644 --- a/src/plugins/qmltooling/shared/qmlinspectorconstants.h +++ b/src/plugins/qmltooling/shared/qmlinspectorconstants.h @@ -3,7 +3,7 @@ ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtDeclarative module of the Qt Toolkit. +** This file is part of the QtQml module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage @@ -42,7 +42,7 @@ #ifndef QMLINSPECTORCONSTANTS_H #define QMLINSPECTORCONSTANTS_H -#include +#include namespace QmlJSDebugger { namespace Constants { diff --git a/src/plugins/qmltooling/shared/qqmlinspectorprotocol.h b/src/plugins/qmltooling/shared/qqmlinspectorprotocol.h new file mode 100644 index 0000000000..63772aa8e4 --- /dev/null +++ b/src/plugins/qmltooling/shared/qqmlinspectorprotocol.h @@ -0,0 +1,137 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtQml 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 QQMLINSPECTORPROTOCOL_H +#define QQMLINSPECTORPROTOCOL_H + +#include +#include +#include +#include + +namespace QmlJSDebugger { + +class InspectorProtocol : public QObject +{ + Q_OBJECT + Q_ENUMS(Message Tool) + +public: + enum Message { + AnimationSpeedChanged = 0, + AnimationPausedChanged = 19, // highest value + ChangeTool = 1, + ClearComponentCache = 2, + ColorChanged = 3, + CreateObject = 5, + CurrentObjectsChanged = 6, + DestroyObject = 7, + MoveObject = 8, + ObjectIdList = 9, + Reload = 10, + Reloaded = 11, + SetAnimationSpeed = 12, + SetAnimationPaused = 18, + SetCurrentObjects = 14, + SetDesignMode = 15, + ShowAppOnTop = 16, + ToolChanged = 17 + }; + + enum Tool { + ColorPickerTool, + SelectMarqueeTool, + SelectTool, + ZoomTool + }; + + static inline QString toString(Message message) + { + return QLatin1String(staticMetaObject.enumerator(0).valueToKey(message)); + } + + static inline QString toString(Tool tool) + { + return QLatin1String(staticMetaObject.enumerator(1).valueToKey(tool)); + } +}; + +inline QDataStream & operator<< (QDataStream &stream, InspectorProtocol::Message message) +{ + return stream << static_cast(message); +} + +inline QDataStream & operator>> (QDataStream &stream, InspectorProtocol::Message &message) +{ + quint32 i; + stream >> i; + message = static_cast(i); + return stream; +} + +inline QDebug operator<< (QDebug dbg, InspectorProtocol::Message message) +{ + dbg << InspectorProtocol::toString(message); + return dbg; +} + +inline QDataStream & operator<< (QDataStream &stream, InspectorProtocol::Tool tool) +{ + return stream << static_cast(tool); +} + +inline QDataStream & operator>> (QDataStream &stream, InspectorProtocol::Tool &tool) +{ + quint32 i; + stream >> i; + tool = static_cast(i); + return stream; +} + +inline QDebug operator<< (QDebug dbg, InspectorProtocol::Tool tool) +{ + dbg << InspectorProtocol::toString(tool); + return dbg; +} + +} // namespace QmlJSDebugger + +#endif // QQMLINSPECTORPROTOCOL_H -- cgit v1.2.3