QmlJSInspector: Renamed Observer to Inspector

Manually redid Qt 4.8 commit 206ebd5af21d94c3f3b49d2cb645105a63e6f5fb,
to make future code synchronization easier.

In order not to have to change the QmlApplicationViewer again, a
compatibility class QDeclarativeViewObserver is retained that subclasses
QDeclarativeViewInspector.

Change-Id: Ief87ae2f8f76b1db0c9d65085e4832424b277603
Reviewed-on: http://codereview.qt.nokia.com/242
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
Thorbjørn Lindeijer
2011-05-30 16:32:25 +02:00
committed by Kai Koehne
parent e0f79761f3
commit 335f6ad0f7
51 changed files with 528 additions and 474 deletions

View File

@@ -30,8 +30,8 @@
**
**************************************************************************/
#ifndef OBSERVERPROTOCOL_H
#define OBSERVERPROTOCOL_H
#ifndef INSPECTORPROTOCOL_H
#define INSPECTORPROTOCOL_H
#include <QtCore/QDebug>
#include <QtCore/QMetaType>
@@ -40,7 +40,7 @@
namespace QmlJSDebugger {
class ObserverProtocol : public QObject
class InspectorProtocol : public QObject
{
Q_OBJECT
Q_ENUMS(Message Tool)
@@ -85,44 +85,44 @@ public:
}
};
inline QDataStream & operator<< (QDataStream &stream, ObserverProtocol::Message message)
inline QDataStream & operator<< (QDataStream &stream, InspectorProtocol::Message message)
{
return stream << static_cast<quint32>(message);
}
inline QDataStream & operator>> (QDataStream &stream, ObserverProtocol::Message &message)
inline QDataStream & operator>> (QDataStream &stream, InspectorProtocol::Message &message)
{
quint32 i;
stream >> i;
message = static_cast<ObserverProtocol::Message>(i);
message = static_cast<InspectorProtocol::Message>(i);
return stream;
}
inline QDebug operator<< (QDebug dbg, ObserverProtocol::Message message)
inline QDebug operator<< (QDebug dbg, InspectorProtocol::Message message)
{
dbg << ObserverProtocol::toString(message);
dbg << InspectorProtocol::toString(message);
return dbg;
}
inline QDataStream & operator<< (QDataStream &stream, ObserverProtocol::Tool tool)
inline QDataStream & operator<< (QDataStream &stream, InspectorProtocol::Tool tool)
{
return stream << static_cast<quint32>(tool);
}
inline QDataStream & operator>> (QDataStream &stream, ObserverProtocol::Tool &tool)
inline QDataStream & operator>> (QDataStream &stream, InspectorProtocol::Tool &tool)
{
quint32 i;
stream >> i;
tool = static_cast<ObserverProtocol::Tool>(i);
tool = static_cast<InspectorProtocol::Tool>(i);
return stream;
}
inline QDebug operator<< (QDebug dbg, ObserverProtocol::Tool tool)
inline QDebug operator<< (QDebug dbg, InspectorProtocol::Tool tool)
{
dbg << ObserverProtocol::toString(tool);
dbg << InspectorProtocol::toString(tool);
return dbg;
}
} // namespace QmlJSDebugger
#endif // OBSERVERPROTOCOL_H
#endif // INSPECTORPROTOCOL_H

View File

@@ -1,3 +1,3 @@
INCLUDEPATH += $$PWD
DEPENDPATH += $$PWD
HEADERS += $$PWD/observerprotocol.h
HEADERS += $$PWD/inspectorprotocol.h