diff options
Diffstat (limited to 'tools')
21 files changed, 103 insertions, 23 deletions
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 |