diff options
46 files changed, 191 insertions, 50 deletions
diff --git a/src/3rdparty/webkit/WebCore/accessibility/qt/AccessibilityObjectQt.cpp b/src/3rdparty/webkit/WebCore/accessibility/qt/AccessibilityObjectQt.cpp index 07f13d4..756ece3 100644 --- a/src/3rdparty/webkit/WebCore/accessibility/qt/AccessibilityObjectQt.cpp +++ b/src/3rdparty/webkit/WebCore/accessibility/qt/AccessibilityObjectQt.cpp @@ -20,6 +20,8 @@ #include "config.h" #include "AccessibilityObject.h" +QT_BEGIN_NAMESPACE + #if HAVE(ACCESSIBILITY) namespace WebCore { @@ -37,3 +39,5 @@ AccessibilityObjectPlatformInclusion AccessibilityObject::accessibilityPlatformI } // namespace WebCore #endif // HAVE(ACCESSIBILITY) + +QT_END_NAMESPACE diff --git a/src/declarative/debugger/qmldebug.cpp b/src/declarative/debugger/qmldebug.cpp index dc779ac..41e27bc 100644 --- a/src/declarative/debugger/qmldebug.cpp +++ b/src/declarative/debugger/qmldebug.cpp @@ -47,6 +47,8 @@ #include <private/qobject_p.h> +QT_BEGIN_NAMESPACE + class QmlEngineDebugClient : public QmlDebugClient { public: @@ -142,8 +144,6 @@ void QmlEngineDebugPrivate::remove(QmlEngineDebug *c, QmlDebugExpressionQuery *q } } - -Q_DECLARE_METATYPE(QmlDebugObjectReference); void QmlEngineDebugPrivate::decode(QDataStream &ds, QmlDebugObjectReference &o, bool simple) { @@ -932,3 +932,7 @@ bool QmlDebugPropertyReference::hasNotifySignal() const { return m_hasNotifySignal; } + +QT_END_NAMESPACE + +Q_DECLARE_METATYPE(QmlDebugObjectReference); diff --git a/src/declarative/graphicsitems/qmlgraphicsanchors_p_p.h b/src/declarative/graphicsitems/qmlgraphicsanchors_p_p.h index 5b02158..22eabdd 100644 --- a/src/declarative/graphicsitems/qmlgraphicsanchors_p_p.h +++ b/src/declarative/graphicsitems/qmlgraphicsanchors_p_p.h @@ -87,9 +87,6 @@ public: return item == other.item && anchorLine == other.anchorLine; } }; -Q_DECLARE_METATYPE(QmlGraphicsAnchorLine) - - class QmlGraphicsAnchorsPrivate : public QObjectPrivate, public QmlGraphicsItemChangeListener { @@ -171,4 +168,7 @@ public: }; QT_END_NAMESPACE + +Q_DECLARE_METATYPE(QmlGraphicsAnchorLine) + #endif diff --git a/src/declarative/graphicsitems/qmlgraphicsitem.cpp b/src/declarative/graphicsitems/qmlgraphicsitem.cpp index 9fd8702..070c70f 100644 --- a/src/declarative/graphicsitems/qmlgraphicsitem.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsitem.cpp @@ -2884,6 +2884,6 @@ int QmlGraphicsItemPrivate::restart(QTime &t) return n; } -#include <moc_qmlgraphicsitem.cpp> - QT_END_NAMESPACE + +#include <moc_qmlgraphicsitem.cpp> diff --git a/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp b/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp index b4487a6..cc416d0 100644 --- a/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp @@ -62,8 +62,6 @@ #include <private/qobject_p.h> -QML_DECLARE_TYPE(QListModelInterface) - QT_BEGIN_NAMESPACE QHash<QObject*, QmlGraphicsVisualItemModelAttached*> QmlGraphicsVisualItemModelAttached::attachedProperties; @@ -1110,4 +1108,6 @@ void QmlGraphicsVisualDataModel::_q_destroyingPackage(QmlPackage *package) QT_END_NAMESPACE +QML_DECLARE_TYPE(QListModelInterface) + #include <qmlgraphicsvisualitemmodel.moc> diff --git a/src/declarative/qml/qmlcleanup.cpp b/src/declarative/qml/qmlcleanup.cpp index 599e4e7..e7767d2 100644 --- a/src/declarative/qml/qmlcleanup.cpp +++ b/src/declarative/qml/qmlcleanup.cpp @@ -43,6 +43,8 @@ #include "qmlengine_p.h" +QT_BEGIN_NAMESPACE + /*! \internal \class QmlCleanup @@ -82,4 +84,4 @@ QmlCleanup::~QmlCleanup() prev = 0; next = 0; } - +QT_END_NAMESPACE diff --git a/src/declarative/qml/qmlcompositetypedata_p.h b/src/declarative/qml/qmlcompositetypedata_p.h index c8b9f25..5358963 100644 --- a/src/declarative/qml/qmlcompositetypedata_p.h +++ b/src/declarative/qml/qmlcompositetypedata_p.h @@ -146,5 +146,7 @@ public: QByteArray data; }; +QT_END_NAMESPACE + #endif // QMLCOMPOSITETYPEDATA_P_H diff --git a/src/declarative/qml/qmlmetatype.cpp b/src/declarative/qml/qmlmetatype.cpp index e66f600..7dfc48d 100644 --- a/src/declarative/qml/qmlmetatype.cpp +++ b/src/declarative/qml/qmlmetatype.cpp @@ -840,6 +840,8 @@ QList<QmlType*> QmlMetaType::qmlTypes() return data->nameToType.values(); } +QT_END_NAMESPACE + #include <QtGui/qfont.h> #include <QtGui/qpixmap.h> #include <QtGui/qbrush.h> @@ -867,6 +869,7 @@ QList<QmlType*> QmlMetaType::qmlTypes() Q_DECLARE_METATYPE(QScriptValue); +QT_BEGIN_NAMESPACE /*! Copies \a copy into \a data, assuming they both are of type \a type. If \a copy is zero, a default type is copied. Returns true if the copy was diff --git a/src/declarative/qml/qmlpropertycache.cpp b/src/declarative/qml/qmlpropertycache.cpp index 04cffe1..a0a7cea 100644 --- a/src/declarative/qml/qmlpropertycache.cpp +++ b/src/declarative/qml/qmlpropertycache.cpp @@ -45,10 +45,10 @@ #include "qmlbinding.h" #include "qdebug.h" -QT_BEGIN_NAMESPACE - Q_DECLARE_METATYPE(QScriptValue); +QT_BEGIN_NAMESPACE + void QmlPropertyCache::Data::load(const QMetaProperty &p, QmlEngine *engine) { propType = p.userType(); diff --git a/src/declarative/qml/qmlscriptstring.h b/src/declarative/qml/qmlscriptstring.h index 73a473f..d07137e 100644 --- a/src/declarative/qml/qmlscriptstring.h +++ b/src/declarative/qml/qmlscriptstring.h @@ -77,10 +77,10 @@ private: QSharedDataPointer<QmlScriptStringPrivate> d; }; -Q_DECLARE_METATYPE(QmlScriptString); - QT_END_NAMESPACE +Q_DECLARE_METATYPE(QmlScriptString); + QT_END_HEADER #endif // QMLSCRIPTSTRING_H diff --git a/src/declarative/qml/qmlsqldatabase.cpp b/src/declarative/qml/qmlsqldatabase.cpp index 684caa2..9c951fc 100644 --- a/src/declarative/qml/qmlsqldatabase.cpp +++ b/src/declarative/qml/qmlsqldatabase.cpp @@ -65,6 +65,8 @@ Q_DECLARE_METATYPE(QSqlDatabase) Q_DECLARE_METATYPE(QSqlQuery) +QT_BEGIN_NAMESPACE + class QmlSqlQueryScriptClass: public QScriptClass { public: QmlSqlQueryScriptClass(QScriptEngine *engine) : QScriptClass(engine) @@ -423,3 +425,4 @@ We add a "forwardOnly" property that stops Qt caching results (code promises to through the data. */ +QT_END_NAMESPACE diff --git a/src/declarative/qml/qmlsqldatabase_p.h b/src/declarative/qml/qmlsqldatabase_p.h index 5a38bf0..9965a2b 100644 --- a/src/declarative/qml/qmlsqldatabase_p.h +++ b/src/declarative/qml/qmlsqldatabase_p.h @@ -42,6 +42,7 @@ #ifndef QMLSQLDATABASE_P_H #define QMLSQLDATABASE_P_H +#include <QtScript/qscriptengine.h> // // W A R N I N G // ------------- @@ -52,9 +53,12 @@ // // We mean it. // +QT_BEGIN_NAMESPACE class QScriptEngine; void qt_add_qmlsqldatabase(QScriptEngine *engine); +QT_END_NAMESPACE + #endif // QMLSQLDATABASE_P_H diff --git a/src/declarative/qml/qmlstringconverters_p.h b/src/declarative/qml/qmlstringconverters_p.h index dfc59ce..46b2de6 100644 --- a/src/declarative/qml/qmlstringconverters_p.h +++ b/src/declarative/qml/qmlstringconverters_p.h @@ -56,6 +56,8 @@ #include <QtCore/qglobal.h> #include <QtCore/qvariant.h> +QT_BEGIN_NAMESPACE + class QColor; class QPointF; class QSizeF; @@ -64,8 +66,6 @@ class QString; class QByteArray; class QVector3D; -QT_BEGIN_NAMESPACE - // XXX - Bauhaus currently uses these methods which is why they're exported namespace QmlStringConverters { diff --git a/src/declarative/qml/qmlworkerscript.cpp b/src/declarative/qml/qmlworkerscript.cpp index 5e39eaf..ec790ca 100644 --- a/src/declarative/qml/qmlworkerscript.cpp +++ b/src/declarative/qml/qmlworkerscript.cpp @@ -55,6 +55,7 @@ #include <QtDeclarative/qmlinfo.h> #include "qmlnetworkaccessmanagerfactory.h" + QT_BEGIN_NAMESPACE class WorkerDataEvent : public QEvent @@ -238,8 +239,13 @@ private: QAtomicInt m_ref; QmlWorkerListModel *m_model; }; + +QT_END_NAMESPACE + Q_DECLARE_METATYPE(QmlWorkerListModelAgent::VariantRef); +QT_BEGIN_NAMESPACE + QmlWorkerScriptEnginePrivate::QmlWorkerScriptEnginePrivate(QmlEngine *engine) : workerEngine(0), qmlengine(engine), m_nextId(0) { @@ -1030,8 +1036,10 @@ QVariant QmlWorkerListModel::data(int index, int role) const return m_values.at(index).value(role); } +QT_END_NAMESPACE + QML_DEFINE_TYPE(Qt,4,6,WorkerListModel,QmlWorkerListModel) #include "qmlworkerscript.moc" -QT_END_NAMESPACE + diff --git a/src/declarative/qml/qmlxmlhttprequest.cpp b/src/declarative/qml/qmlxmlhttprequest.cpp index 1883d1b..54e26df 100644 --- a/src/declarative/qml/qmlxmlhttprequest.cpp +++ b/src/declarative/qml/qmlxmlhttprequest.cpp @@ -91,7 +91,7 @@ #define D(arg) (arg)->release() #define A(arg) (arg)->addref() -namespace { +QT_BEGIN_NAMESPACE class DocumentImpl; class NodeImpl @@ -315,12 +315,14 @@ public: static QScriptValue load(QScriptEngine *engine, const QString &data); }; -}; // namespace +QT_END_NAMESPACE Q_DECLARE_METATYPE(Node); Q_DECLARE_METATYPE(NodeList); Q_DECLARE_METATYPE(NamedNodeMap); +QT_BEGIN_NAMESPACE + void NodeImpl::addref() { A(document); @@ -1624,4 +1626,6 @@ void qt_add_qmlxmlhttprequest(QScriptEngine *engine) engine->globalObject().setProperty(QLatin1String("DOMException"), domExceptionPrototype); } +QT_END_NAMESPACE + #include <qmlxmlhttprequest.moc> diff --git a/src/declarative/qml/qmlxmlhttprequest_p.h b/src/declarative/qml/qmlxmlhttprequest_p.h index dfed5d2..3a81278 100644 --- a/src/declarative/qml/qmlxmlhttprequest_p.h +++ b/src/declarative/qml/qmlxmlhttprequest_p.h @@ -42,6 +42,7 @@ #ifndef QMLXMLHTTPREQUEST_P_H #define QMLXMLHTTPREQUEST_P_H +#include <QtScript/qscriptengine.h> // // W A R N I N G // ------------- @@ -52,9 +53,12 @@ // // We mean it. // +QT_BEGIN_NAMESPACE class QScriptEngine; void qt_add_qmlxmlhttprequest(QScriptEngine *engine); +QT_END_NAMESPACE + #endif // QMLXMLHTTPREQUEST_P_H diff --git a/src/declarative/util/qmlpixmapcache.cpp b/src/declarative/util/qmlpixmapcache.cpp index c03b5df..acd1b89 100644 --- a/src/declarative/util/qmlpixmapcache.cpp +++ b/src/declarative/util/qmlpixmapcache.cpp @@ -600,6 +600,6 @@ int QmlPixmapCache::pendingRequests() return qmlActivePixmapReplies()->count(); } -#include <qmlpixmapcache.moc> - QT_END_NAMESPACE + +#include <qmlpixmapcache.moc> diff --git a/src/declarative/util/qmlstategroup.cpp b/src/declarative/util/qmlstategroup.cpp index d4db2b9..aad19d9 100644 --- a/src/declarative/util/qmlstategroup.cpp +++ b/src/declarative/util/qmlstategroup.cpp @@ -55,8 +55,6 @@ QT_BEGIN_NAMESPACE DEFINE_BOOL_CONFIG_OPTION(stateChangeDebug, STATECHANGE_DEBUG); -QML_DEFINE_TYPE(Qt,4,6,StateGroup,QmlStateGroup) - class QmlStateGroupPrivate : public QObjectPrivate { Q_DECLARE_PUBLIC(QmlStateGroup) @@ -421,3 +419,5 @@ void QmlStateGroup::removeState(QmlState *state) } QT_END_NAMESPACE + +QML_DEFINE_TYPE(Qt,4,6,StateGroup,QmlStateGroup) diff --git a/src/declarative/util/qmlstyledtext.cpp b/src/declarative/util/qmlstyledtext.cpp index 36b5e49..63f341e 100644 --- a/src/declarative/util/qmlstyledtext.cpp +++ b/src/declarative/util/qmlstyledtext.cpp @@ -58,6 +58,8 @@ The opening and closing tags must be correctly nested. */ +QT_BEGIN_NAMESPACE + class QmlStyledTextPrivate { public: @@ -341,3 +343,5 @@ QStringRef QmlStyledTextPrivate::parseValue(const QChar *&ch, const QString &tex return QStringRef(&textIn, valStart, valLength); } + +QT_END_NAMESPACE diff --git a/src/declarative/util/qmlstyledtext_p.h b/src/declarative/util/qmlstyledtext_p.h index 0cfb43e..502a4b5 100644 --- a/src/declarative/util/qmlstyledtext_p.h +++ b/src/declarative/util/qmlstyledtext_p.h @@ -44,10 +44,13 @@ #include <QSizeF> +QT_BEGIN_NAMESPACE + class QPainter; class QPointF; class QString; class QmlStyledTextPrivate; + class Q_DECLARATIVE_EXPORT QmlStyledText { public: @@ -60,4 +63,6 @@ private: QmlStyledTextPrivate *d; }; +QT_END_NAMESPACE + #endif diff --git a/src/declarative/util/qmlxmllistmodel.cpp b/src/declarative/util/qmlxmllistmodel.cpp index d31fadf..b2c2e61 100644 --- a/src/declarative/util/qmlxmllistmodel.cpp +++ b/src/declarative/util/qmlxmllistmodel.cpp @@ -126,8 +126,6 @@ private: QString m_query; }; -QML_DECLARE_TYPE(QmlXmlListModelRole) - class QmlXmlListModelPrivate; struct QmlXmlRoleList : public QmlConcreteList<QmlXmlListModelRole *> { @@ -725,4 +723,6 @@ void QmlXmlListModel::queryCompleted(int id, int size) QT_END_NAMESPACE +QML_DECLARE_TYPE(QmlXmlListModelRole) + #include <qmlxmllistmodel.moc> diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 336be91..4ec2ae2 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -122,15 +122,19 @@ extern bool qt_wince_is_pocket_pc(); //qguifunctions_wince.cpp static void initResources() { #if defined(Q_WS_WINCE) + Q_INIT_RESOURCE_EXTERN(qstyle_wince) Q_INIT_RESOURCE(qstyle_wince); #elif defined(Q_OS_SYMBIAN) + Q_INIT_RESOURCE_EXTERN(qstyle_s60) Q_INIT_RESOURCE(qstyle_s60); #else + Q_INIT_RESOURCE_EXTERN(qstyle) Q_INIT_RESOURCE(qstyle); #endif - + Q_INIT_RESOURCE_EXTERN(qmessagebox) Q_INIT_RESOURCE(qmessagebox); #if !defined(QT_NO_PRINTDIALOG) + Q_INIT_RESOURCE_EXTERN(qprintdialog) Q_INIT_RESOURCE(qprintdialog); #endif diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index d2fb925..e39d385 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -90,6 +90,9 @@ QT_BEGIN_NAMESPACE //#define QT_GL_NO_SCISSOR_TEST +#ifdef Q_WS_WIN +extern Q_GUI_EXPORT bool qt_cleartype_enabled; +#endif extern QImage qt_imageForBrush(int brushStyle, bool invert); @@ -1673,7 +1676,6 @@ bool QGL2PaintEngineEx::begin(QPaintDevice *pdev) #if !defined(QT_OPENGL_ES_2) #if defined(Q_WS_WIN) - extern Q_GUI_EXPORT bool qt_cleartype_enabled; if (qt_cleartype_enabled) #endif d->glyphCacheType = QFontEngineGlyphCache::Raster_RGBMask; diff --git a/src/plugins/imageformats/ico/qicohandler.cpp b/src/plugins/imageformats/ico/qicohandler.cpp index 4edb87a..032ff85 100644 --- a/src/plugins/imageformats/ico/qicohandler.cpp +++ b/src/plugins/imageformats/ico/qicohandler.cpp @@ -54,6 +54,9 @@ #include <QtCore/QFile> #include <QtCore/QBuffer> #include <qvariant.h> + +QT_BEGIN_NAMESPACE + // These next two structs represent how the icon information is stored // in an ICO file. typedef struct @@ -891,3 +894,4 @@ bool QtIcoHandler::jumpToNextImage() return jumpToImage(m_currentIconIndex + 1); } +QT_END_NAMESPACE diff --git a/src/plugins/imageformats/ico/qicohandler.h b/src/plugins/imageformats/ico/qicohandler.h index 394a5eb..4334ad9 100644 --- a/src/plugins/imageformats/ico/qicohandler.h +++ b/src/plugins/imageformats/ico/qicohandler.h @@ -43,6 +43,8 @@ #include <QtGui/QImageIOHandler> +QT_BEGIN_NAMESPACE + class ICOReader; class QtIcoHandler: public QImageIOHandler { @@ -71,5 +73,7 @@ private: }; +QT_END_NAMESPACE + #endif /* QTICOHANDLER_H */ diff --git a/tools/linguist/lconvert/main.cpp b/tools/linguist/lconvert/main.cpp index 3a30027..543c405 100644 --- a/tools/linguist/lconvert/main.cpp +++ b/tools/linguist/lconvert/main.cpp @@ -48,6 +48,8 @@ #include <iostream> +QT_USE_NAMESPACE + static int usage(const QStringList &args) { Q_UNUSED(args); diff --git a/tools/linguist/lupdate/qscript.cpp b/tools/linguist/lupdate/qscript.cpp index 6f34c2b..33276e6 100644 --- a/tools/linguist/lupdate/qscript.cpp +++ b/tools/linguist/lupdate/qscript.cpp @@ -40,6 +40,26 @@ ** ****************************************************************************/ + +#define Q_SCRIPT_REGEXPLITERAL_RULE1 7 + +#define Q_SCRIPT_REGEXPLITERAL_RULE2 8 + +#include <translator.h> + +#include <QtCore/qdebug.h> +#include <QtCore/qnumeric.h> +#include <QtCore/qstring.h> +#include <QtCore/qtextcodec.h> +#include <QtCore/qvariant.h> + +#include <ctype.h> +#include <stdlib.h> +#include <stdio.h> +#include <string.h> + +QT_BEGIN_NAMESPACE + class QScriptGrammar { public: @@ -174,7 +194,6 @@ public: } }; - const char *const QScriptGrammar::spell [] = { "end of file", "&", "&&", "&=", "break", "case", "catch", ":", ";", "continue", "default", "delete", "/", "/=", "do", ".", "else", "=", "==", "===", @@ -747,26 +766,6 @@ const int QScriptGrammar::action_check [] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}; - -#define Q_SCRIPT_REGEXPLITERAL_RULE1 7 - -#define Q_SCRIPT_REGEXPLITERAL_RULE2 8 - -#include <translator.h> - -#include <QtCore/qdebug.h> -#include <QtCore/qnumeric.h> -#include <QtCore/qstring.h> -#include <QtCore/qtextcodec.h> -#include <QtCore/qvariant.h> - -#include <ctype.h> -#include <stdlib.h> -#include <stdio.h> -#include <string.h> - -QT_BEGIN_NAMESPACE - static void recordMessage( Translator *tor, const QString &context, const QString &text, const QString &comment, const QString &extracomment, bool plural, const QString &fileName, int lineNo) diff --git a/tools/qmldebugger/standalone/engine.cpp b/tools/qmldebugger/standalone/engine.cpp index 6cfd82b..acd90f1 100644 --- a/tools/qmldebugger/standalone/engine.cpp +++ b/tools/qmldebugger/standalone/engine.cpp @@ -212,8 +212,8 @@ void EnginePane::enginesChanged() engineSelected(qobject_cast<DebuggerEngineItem*>(m_engineItems.at(0))->engineId()); } +QT_END_NAMESPACE #include "engine.moc" -QT_END_NAMESPACE diff --git a/tools/qmldebugger/standalone/expressionquerywidget.cpp b/tools/qmldebugger/standalone/expressionquerywidget.cpp index cd59871..4fea41f 100644 --- a/tools/qmldebugger/standalone/expressionquerywidget.cpp +++ b/tools/qmldebugger/standalone/expressionquerywidget.cpp @@ -51,6 +51,8 @@ #include "expressionquerywidget.h" +QT_BEGIN_NAMESPACE + ExpressionQueryWidget::ExpressionQueryWidget(Mode mode, QmlEngineDebug *client, QWidget *parent) : QWidget(parent), m_mode(mode), @@ -274,3 +276,5 @@ bool ExpressionQueryWidget::eventFilter(QObject *obj, QEvent *event) } return QWidget::eventFilter(obj, event); } + +QT_END_NAMESPACE diff --git a/tools/qmldebugger/standalone/main.cpp b/tools/qmldebugger/standalone/main.cpp index 715837e..c2117f2 100644 --- a/tools/qmldebugger/standalone/main.cpp +++ b/tools/qmldebugger/standalone/main.cpp @@ -42,6 +42,8 @@ #include "qmldebugger.h" +QT_USE_NAMESPACE + int main(int argc, char ** argv) { QApplication app(argc, argv); diff --git a/tools/qmldebugger/standalone/objecttree.cpp b/tools/qmldebugger/standalone/objecttree.cpp index cf467f2..b5bac53 100644 --- a/tools/qmldebugger/standalone/objecttree.cpp +++ b/tools/qmldebugger/standalone/objecttree.cpp @@ -52,6 +52,8 @@ Q_DECLARE_METATYPE(QmlDebugObjectReference) +QT_BEGIN_NAMESPACE + ObjectTree::ObjectTree(QmlEngineDebug *client, QWidget *parent) : QTreeWidget(parent), m_client(client), @@ -229,3 +231,5 @@ void ObjectTree::mousePressEvent(QMouseEvent *me) } } } + +QT_END_NAMESPACE diff --git a/tools/qmldebugger/standalone/qmldebugger.cpp b/tools/qmldebugger/standalone/qmldebugger.cpp index 4d86377..1c1057a 100644 --- a/tools/qmldebugger/standalone/qmldebugger.cpp +++ b/tools/qmldebugger/standalone/qmldebugger.cpp @@ -53,6 +53,8 @@ #include "engine.h" #include "qmldebugger.h" +QT_BEGIN_NAMESPACE + QmlDebugger::QmlDebugger(QWidget *parent) : QWidget(parent) { @@ -179,3 +181,5 @@ void QmlDebugger::disconnectFromHost() { client.disconnectFromHost(); } + +QT_END_NAMESPACE diff --git a/tools/qmldebugger/standalone/qmldebugger.h b/tools/qmldebugger/standalone/qmldebugger.h index da95ef9..3df47d1 100644 --- a/tools/qmldebugger/standalone/qmldebugger.h +++ b/tools/qmldebugger/standalone/qmldebugger.h @@ -45,6 +45,8 @@ #include <QtNetwork/qtcpsocket.h> #include <QtGui/qwidget.h> +QT_BEGIN_NAMESPACE + class QLabel; class QLineEdit; class QSpinBox; @@ -87,4 +89,6 @@ private: QTabWidget *m_tabs; }; +QT_END_NAMESPACE + #endif diff --git a/tools/qmlviewer/deviceorientation.cpp b/tools/qmlviewer/deviceorientation.cpp index c507479..0fb4a5a 100644 --- a/tools/qmlviewer/deviceorientation.cpp +++ b/tools/qmlviewer/deviceorientation.cpp @@ -41,6 +41,8 @@ #include "deviceorientation.h" +QT_USE_NAMESPACE + class DefaultDeviceOrientation : public DeviceOrientation { Q_OBJECT diff --git a/tools/qmlviewer/deviceorientation.h b/tools/qmlviewer/deviceorientation.h index fa7758f..efd45b3 100644 --- a/tools/qmlviewer/deviceorientation.h +++ b/tools/qmlviewer/deviceorientation.h @@ -44,6 +44,8 @@ #include <QObject> +QT_BEGIN_NAMESPACE + class DeviceOrientationPrivate; class DeviceOrientation : public QObject { @@ -66,4 +68,6 @@ private: friend class DeviceOrientationPrivate; }; +QT_END_NAMESPACE + #endif diff --git a/tools/qmlviewer/main.cpp b/tools/qmlviewer/main.cpp index b7a3f1a..14a4735 100644 --- a/tools/qmlviewer/main.cpp +++ b/tools/qmlviewer/main.cpp @@ -47,6 +47,8 @@ #include <QTranslator> #include <QDebug> +QT_USE_NAMESPACE + #if defined (Q_OS_SYMBIAN) #include <unistd.h> #include <sys/types.h> diff --git a/tools/qmlviewer/proxysettings.cpp b/tools/qmlviewer/proxysettings.cpp index 52fa74f..c3ec32e 100644 --- a/tools/qmlviewer/proxysettings.cpp +++ b/tools/qmlviewer/proxysettings.cpp @@ -45,6 +45,8 @@ #include "proxysettings.h" +QT_BEGIN_NAMESPACE + ProxySettings::ProxySettings (QWidget * parent) : QDialog (parent), Ui::ProxySettings() { @@ -104,3 +106,5 @@ bool ProxySettings::httpProxyInUse() QSettings settings; return settings.value ("http_proxy/use", 0).toBool (); } + +QT_END_NAMESPACE diff --git a/tools/qmlviewer/proxysettings.h b/tools/qmlviewer/proxysettings.h index b2f3e25..2392127 100644 --- a/tools/qmlviewer/proxysettings.h +++ b/tools/qmlviewer/proxysettings.h @@ -46,6 +46,7 @@ #include <QNetworkProxy> #include "ui_proxysettings.h" +QT_BEGIN_NAMESPACE /** */ class ProxySettings : public QDialog, public Ui::ProxySettings @@ -65,4 +66,6 @@ public slots: virtual void accept (); }; +QT_END_NAMESPACE + #endif // PROXYSETTINGS_H diff --git a/tools/qmlviewer/qfxtester.h b/tools/qmlviewer/qfxtester.h index 303ac3a..0a10763 100644 --- a/tools/qmlviewer/qfxtester.h +++ b/tools/qmlviewer/qfxtester.h @@ -65,8 +65,13 @@ public: private: QList<QObject *> m_events; }; + +QT_END_NAMESPACE + QML_DECLARE_TYPE(QmlGraphicsVisualTest) +QT_BEGIN_NAMESPACE + class QmlGraphicsVisualTestFrame : public QObject { Q_OBJECT @@ -90,8 +95,13 @@ private: QString m_hash; QUrl m_image; }; + +QT_END_NAMESPACE + QML_DECLARE_TYPE(QmlGraphicsVisualTestFrame) +QT_BEGIN_NAMESPACE + class QmlGraphicsVisualTestMouse : public QObject { Q_OBJECT @@ -134,8 +144,13 @@ private: int m_modifiers; bool m_viewport; }; + +QT_END_NAMESPACE + QML_DECLARE_TYPE(QmlGraphicsVisualTestMouse) +QT_BEGIN_NAMESPACE + class QmlGraphicsVisualTestKey : public QObject { Q_OBJECT @@ -178,8 +193,13 @@ private: int m_count; bool m_viewport; }; + +QT_END_NAMESPACE + QML_DECLARE_TYPE(QmlGraphicsVisualTestKey) +QT_BEGIN_NAMESPACE + class QmlGraphicsTester : public QAbstractAnimation { public: diff --git a/tools/qmlviewer/qmlfolderlistmodel.cpp b/tools/qmlviewer/qmlfolderlistmodel.cpp index 35c672d..cf63fec 100644 --- a/tools/qmlviewer/qmlfolderlistmodel.cpp +++ b/tools/qmlviewer/qmlfolderlistmodel.cpp @@ -44,6 +44,8 @@ #include <QDebug> #include <qmlcontext.h> +QT_BEGIN_NAMESPACE + class QmlFolderListModelPrivate { public: diff --git a/tools/qmlviewer/qmlfolderlistmodel.h b/tools/qmlviewer/qmlfolderlistmodel.h index 7357954..188ac27 100644 --- a/tools/qmlviewer/qmlfolderlistmodel.h +++ b/tools/qmlviewer/qmlfolderlistmodel.h @@ -45,6 +45,8 @@ #include <qml.h> #include "../../src/declarative/3rdparty/qlistmodelinterface_p.h" +QT_BEGIN_NAMESPACE + class QmlContext; class QModelIndex; @@ -114,6 +116,8 @@ private: QmlFolderListModelPrivate *d; }; +QT_END_NAMESPACE + QML_DECLARE_TYPE(QmlFolderListModel) #endif // QMLFOLDERLISTMODEL_H diff --git a/tools/qmlviewer/qmlviewer.cpp b/tools/qmlviewer/qmlviewer.cpp index 8b3b7aa..7c620ef 100644 --- a/tools/qmlviewer/qmlviewer.cpp +++ b/tools/qmlviewer/qmlviewer.cpp @@ -108,7 +108,6 @@ QT_BEGIN_NAMESPACE - class Screen : public QObject { Q_OBJECT @@ -131,7 +130,12 @@ signals: void orientationChanged(); }; +QT_END_NAMESPACE + QML_DECLARE_TYPE(Screen) + +QT_BEGIN_NAMESPACE + QML_DEFINE_TYPE(QmlViewer, 1, 0, Screen, Screen) class SizedMenuBar : public QMenuBar diff --git a/tools/qtestlib/chart/database.cpp b/tools/qtestlib/chart/database.cpp index dfc0fc5..1f1f7da 100644 --- a/tools/qtestlib/chart/database.cpp +++ b/tools/qtestlib/chart/database.cpp @@ -42,6 +42,7 @@ #include <QtGui> #include <QtXml> +QT_BEGIN_NAMESPACE // Database schema definition and open/create functions QString resultsTable = QString("(TestName varchar, TestCaseName varchar, Series varchar, Idx varchar, ") + @@ -319,3 +320,5 @@ void DataBaseWriter::addResult(const QString &series, const QString &index, cons query.bindValue(":ChartType", "BarChart"); execQuery(query); } + +QT_END_NAMESPACE diff --git a/tools/qtestlib/chart/database.h b/tools/qtestlib/chart/database.h index d9861ad..9a67490 100644 --- a/tools/qtestlib/chart/database.h +++ b/tools/qtestlib/chart/database.h @@ -43,6 +43,9 @@ #include <QtCore> #include <QtSql> +#include <QtCore/qglobal.h> + +QT_BEGIN_NAMESPACE extern QString resultsTable; QSqlDatabase openDataBase(const QString &databaseFile = "database"); @@ -57,6 +60,7 @@ void execQuery(const QString &spec, bool warnOnFail = true); void printDataBase(); void displayTable(const QString &table); + class TempTable { public: @@ -95,5 +99,7 @@ public: QSqlDatabase db; }; +QT_END_NAMESPACE #endif + diff --git a/tools/qtestlib/chart/reportgenerator.cpp b/tools/qtestlib/chart/reportgenerator.cpp index 1ce362c..c3b42a0 100644 --- a/tools/qtestlib/chart/reportgenerator.cpp +++ b/tools/qtestlib/chart/reportgenerator.cpp @@ -41,6 +41,7 @@ #include "reportgenerator.h" // Report generator file utility functions +QT_BEGIN_NAMESPACE QList<QByteArray> readLines(const QString &fileName) { @@ -559,3 +560,4 @@ QByteArray ReportGenerator::printColors(const QString &tableName, const QString return colors; } +QT_END_NAMESPACE diff --git a/tools/qtestlib/chart/reportgenerator.h b/tools/qtestlib/chart/reportgenerator.h index d44aea9..1f075bd 100644 --- a/tools/qtestlib/chart/reportgenerator.h +++ b/tools/qtestlib/chart/reportgenerator.h @@ -42,6 +42,9 @@ #define REPORTGENERATOR_H #include "database.h" +#include <QtCore/qglobal.h> + +QT_BEGIN_NAMESPACE class ReportGenerator { @@ -59,5 +62,7 @@ private: void printTestCaseResults(const QString &testCaseName); +QT_END_NAMESPACE + #endif |