diff options
author | Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com> | 2011-05-30 10:51:45 (GMT) |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com> | 2011-05-30 12:27:07 (GMT) |
commit | 206ebd5af21d94c3f3b49d2cb645105a63e6f5fb (patch) | |
tree | 94692bb278445c84bffcaca3f2b63437e8490b62 /src/declarative | |
parent | f564f2786ddea1cf9bdc5cceee68ff206f0c5c69 (diff) | |
download | Qt-206ebd5af21d94c3f3b49d2cb645105a63e6f5fb.zip Qt-206ebd5af21d94c3f3b49d2cb645105a63e6f5fb.tar.gz Qt-206ebd5af21d94c3f3b49d2cb645105a63e6f5fb.tar.bz2 |
Renamed declarativeobserver plugin to qmldbg_inspector
Mainly since it's a good idea to prefix the plugin on Symbian, and at
the same time it's now consistency called 'inspector' rather than
'observer'.
Symbian .def files will need to be updated.
Change-Id: I43071331c8002f8844efd14105d01c730d97e946
Reviewed-by: Kai Koehne
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/debugger/debugger.pri | 6 | ||||
-rw-r--r-- | src/declarative/debugger/qdeclarativeinspectorinterface_p.h (renamed from src/declarative/debugger/qdeclarativeobserverinterface_p.h) | 8 | ||||
-rw-r--r-- | src/declarative/debugger/qdeclarativeinspectorservice.cpp (renamed from src/declarative/debugger/qdeclarativeobserverservice.cpp) | 46 | ||||
-rw-r--r-- | src/declarative/debugger/qdeclarativeinspectorservice_p.h (renamed from src/declarative/debugger/qdeclarativeobserverservice_p.h) | 12 | ||||
-rw-r--r-- | src/declarative/util/qdeclarativeview.cpp | 6 |
5 files changed, 39 insertions, 39 deletions
diff --git a/src/declarative/debugger/debugger.pri b/src/declarative/debugger/debugger.pri index 044db3c..3134c79 100644 --- a/src/declarative/debugger/debugger.pri +++ b/src/declarative/debugger/debugger.pri @@ -9,7 +9,7 @@ SOURCES += \ $$PWD/qdeclarativedebugtrace.cpp \ $$PWD/qdeclarativedebughelper.cpp \ $$PWD/qdeclarativedebugserver.cpp \ - $$PWD/qdeclarativeobserverservice.cpp \ + $$PWD/qdeclarativeinspectorservice.cpp \ $$PWD/qjsdebuggeragent.cpp \ $$PWD/qjsdebugservice.cpp @@ -24,7 +24,7 @@ HEADERS += \ $$PWD/qdeclarativedebughelper_p.h \ $$PWD/qdeclarativedebugserver_p.h \ $$PWD/qdeclarativedebugserverconnection_p.h \ - $$PWD/qdeclarativeobserverservice_p.h \ - $$PWD/qdeclarativeobserverinterface_p.h \ + $$PWD/qdeclarativeinspectorservice_p.h \ + $$PWD/qdeclarativeinspectorinterface_p.h \ $$PWD/qjsdebuggeragent_p.h \ $$PWD/qjsdebugservice_p.h diff --git a/src/declarative/debugger/qdeclarativeobserverinterface_p.h b/src/declarative/debugger/qdeclarativeinspectorinterface_p.h index efb47fa..aa29d68 100644 --- a/src/declarative/debugger/qdeclarativeobserverinterface_p.h +++ b/src/declarative/debugger/qdeclarativeinspectorinterface_p.h @@ -50,17 +50,17 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class Q_DECLARATIVE_EXPORT QDeclarativeObserverInterface +class Q_DECLARATIVE_EXPORT QDeclarativeInspectorInterface { public: - QDeclarativeObserverInterface() {} - virtual ~QDeclarativeObserverInterface() {} + QDeclarativeInspectorInterface() {} + virtual ~QDeclarativeInspectorInterface() {} virtual void activate() = 0; virtual void deactivate() = 0; }; -Q_DECLARE_INTERFACE(QDeclarativeObserverInterface, "com.trolltech.Qt.QDeclarativeObserverInterface/1.0") +Q_DECLARE_INTERFACE(QDeclarativeInspectorInterface, "com.trolltech.Qt.QDeclarativeInspectorInterface/1.0") QT_END_NAMESPACE diff --git a/src/declarative/debugger/qdeclarativeobserverservice.cpp b/src/declarative/debugger/qdeclarativeinspectorservice.cpp index 43d9281..9fec006 100644 --- a/src/declarative/debugger/qdeclarativeobserverservice.cpp +++ b/src/declarative/debugger/qdeclarativeinspectorservice.cpp @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#include "private/qdeclarativeobserverservice_p.h" -#include "private/qdeclarativeobserverinterface_p.h" +#include "private/qdeclarativeinspectorservice_p.h" +#include "private/qdeclarativeinspectorinterface_p.h" #include <QtCore/QCoreApplication> #include <QtCore/QDebug> @@ -51,30 +51,30 @@ QT_BEGIN_NAMESPACE -Q_GLOBAL_STATIC(QDeclarativeObserverService, serviceInstance) +Q_GLOBAL_STATIC(QDeclarativeInspectorService, serviceInstance) -QDeclarativeObserverService::QDeclarativeObserverService() +QDeclarativeInspectorService::QDeclarativeInspectorService() : QDeclarativeDebugService(QLatin1String("QDeclarativeObserverMode")) - , m_observer(0) + , m_inspectorPlugin(0) { } -QDeclarativeObserverService *QDeclarativeObserverService::instance() +QDeclarativeInspectorService *QDeclarativeInspectorService::instance() { return serviceInstance(); } -void QDeclarativeObserverService::addView(QDeclarativeView *view) +void QDeclarativeInspectorService::addView(QDeclarativeView *view) { m_views.append(view); } -void QDeclarativeObserverService::removeView(QDeclarativeView *view) +void QDeclarativeInspectorService::removeView(QDeclarativeView *view) { m_views.removeAll(view); } -void QDeclarativeObserverService::sendMessage(const QByteArray &message) +void QDeclarativeInspectorService::sendMessage(const QByteArray &message) { if (status() != Enabled) return; @@ -82,33 +82,33 @@ void QDeclarativeObserverService::sendMessage(const QByteArray &message) QDeclarativeDebugService::sendMessage(message); } -void QDeclarativeObserverService::statusChanged(Status status) +void QDeclarativeInspectorService::statusChanged(Status status) { if (m_views.isEmpty()) return; if (status == Enabled) { - if (!m_observer) - m_observer = loadObserverPlugin(); + if (!m_inspectorPlugin) + m_inspectorPlugin = loadInspectorPlugin(); - if (!m_observer) { - qWarning() << "Error while loading observer plugin"; + if (!m_inspectorPlugin) { + qWarning() << "Error while loading inspector plugin"; return; } - m_observer->activate(); + m_inspectorPlugin->activate(); } else { - if (m_observer) - m_observer->deactivate(); + if (m_inspectorPlugin) + m_inspectorPlugin->deactivate(); } } -void QDeclarativeObserverService::messageReceived(const QByteArray &message) +void QDeclarativeInspectorService::messageReceived(const QByteArray &message) { emit gotMessage(message); } -QDeclarativeObserverInterface *QDeclarativeObserverService::loadObserverPlugin() +QDeclarativeInspectorInterface *QDeclarativeInspectorService::loadInspectorPlugin() { QStringList pluginCandidates; const QStringList paths = QCoreApplication::libraryPaths(); @@ -124,11 +124,11 @@ QDeclarativeObserverInterface *QDeclarativeObserverService::loadObserverPlugin() if (!loader.load()) continue; - QDeclarativeObserverInterface *observer = - qobject_cast<QDeclarativeObserverInterface*>(loader.instance()); + QDeclarativeInspectorInterface *inspector = + qobject_cast<QDeclarativeInspectorInterface*>(loader.instance()); - if (observer) - return observer; + if (inspector) + return inspector; loader.unload(); } return 0; diff --git a/src/declarative/debugger/qdeclarativeobserverservice_p.h b/src/declarative/debugger/qdeclarativeinspectorservice_p.h index c883d4b..9fe0d601f 100644 --- a/src/declarative/debugger/qdeclarativeobserverservice_p.h +++ b/src/declarative/debugger/qdeclarativeinspectorservice_p.h @@ -54,15 +54,15 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) class QDeclarativeView; -class QDeclarativeObserverInterface; +class QDeclarativeInspectorInterface; -class Q_DECLARATIVE_EXPORT QDeclarativeObserverService : public QDeclarativeDebugService +class Q_DECLARATIVE_EXPORT QDeclarativeInspectorService : public QDeclarativeDebugService { Q_OBJECT public: - QDeclarativeObserverService(); - static QDeclarativeObserverService *instance(); + QDeclarativeInspectorService(); + static QDeclarativeInspectorService *instance(); void addView(QDeclarativeView *); void removeView(QDeclarativeView *); @@ -78,10 +78,10 @@ protected: virtual void messageReceived(const QByteArray &); private: - static QDeclarativeObserverInterface *loadObserverPlugin(); + static QDeclarativeInspectorInterface *loadInspectorPlugin(); QList<QDeclarativeView*> m_views; - QDeclarativeObserverInterface *m_observer; + QDeclarativeInspectorInterface *m_inspectorPlugin; }; QT_END_NAMESPACE diff --git a/src/declarative/util/qdeclarativeview.cpp b/src/declarative/util/qdeclarativeview.cpp index f6be2d7..bab991b 100644 --- a/src/declarative/util/qdeclarativeview.cpp +++ b/src/declarative/util/qdeclarativeview.cpp @@ -49,7 +49,7 @@ #include <qdeclarativeguard_p.h> #include <private/qdeclarativedebugtrace_p.h> -#include <private/qdeclarativeobserverservice_p.h> +#include <private/qdeclarativeinspectorservice_p.h> #include <qscriptvalueiterator.h> #include <qdebug.h> @@ -301,7 +301,7 @@ void QDeclarativeViewPrivate::init() q->viewport()->setAttribute(Qt::WA_NoSystemBackground); #endif - QDeclarativeObserverService::instance()->addView(q); + QDeclarativeInspectorService::instance()->addView(q); } /*! @@ -309,7 +309,7 @@ void QDeclarativeViewPrivate::init() */ QDeclarativeView::~QDeclarativeView() { - QDeclarativeObserverService::instance()->removeView(this); + QDeclarativeInspectorService::instance()->removeView(this); } /*! \property QDeclarativeView::source |