Commit 69e141c3 authored by ck's avatar ck

QML stuff: Fix compilation for namespaced Qt.

parent e073099c
......@@ -56,9 +56,11 @@
#include <stdio.h>
#include <string.h>
QT_QML_BEGIN_NAMESPACE
QT_BEGIN_NAMESPACE
extern double qstrtod(const char *s00, char const **se, bool *ok);
QT_END_NAMESPACE
QT_QML_BEGIN_NAMESPACE
#define shiftWindowsLineBreak() \
do { \
......
......@@ -32,7 +32,9 @@
#include "formeditoritem.h"
QT_BEGIN_NAMESPACE
class QGraphicsItem;
QT_END_NAMESPACE
namespace QmlDesigner {
......
......@@ -35,7 +35,9 @@
#include <qmlitemnode.h>
#include "snappinglinecreator.h"
QT_BEGIN_NAMESPACE
class QTimeLine;
QT_END_NAMESPACE
namespace QmlDesigner {
......
......@@ -37,8 +37,9 @@
#include <qmlitemnode.h>
#include "abstractformeditortool.h"
QT_BEGIN_NAMESPACE
class QGraphicsSceneMouseEvent;
QT_END_NAMESPACE
namespace QmlDesigner {
......
......@@ -32,8 +32,10 @@
#include <qmlmodelview.h>
QT_BEGIN_NAMESPACE
class QGraphicsScene;
class QGraphicsSceneMouseEvent;
QT_END_NAMESPACE
namespace QmlDesigner {
......
......@@ -32,7 +32,9 @@
#include <QWidget>
QT_BEGIN_NAMESPACE
class QActionGroup;
QT_END_NAMESPACE
namespace QmlDesigner {
......
......@@ -32,7 +32,9 @@
#include <QWidgetAction>
QT_BEGIN_NAMESPACE
class QStandardItemModel;
QT_END_NAMESPACE
namespace QmlDesigner {
......
......@@ -32,7 +32,9 @@
#include "formeditoritem.h"
QT_BEGIN_NAMESPACE
class QLineF;
QT_END_NAMESPACE
namespace QmlDesigner {
......
......@@ -32,7 +32,9 @@
#include <QWidget>
QT_BEGIN_NAMESPACE
class QToolBar;
QT_END_NAMESPACE
namespace QmlDesigner {
......
......@@ -32,7 +32,9 @@
#include <QWidgetAction>
QT_BEGIN_NAMESPACE
class QAbstractItemModel;
QT_END_NAMESPACE
namespace QmlDesigner {
......
......@@ -33,7 +33,9 @@
#include <QWidgetAction>
#include <QWeakPointer>
QT_BEGIN_NAMESPACE
class QComboBox;
QT_END_NAMESPACE
namespace QmlDesigner {
......
......@@ -35,7 +35,9 @@
#include <QStringList>
QT_BEGIN_NAMESPACE
class QStandardItemModel;
QT_END_NAMESPACE
namespace QmlDesigner {
......
......@@ -35,12 +35,14 @@
#include <QtCore/QObject>
#include <QtCore/QString>
QT_BEGIN_NAMESPACE
class QUndoStack;
class QWidget;
class QIODevice;
class QProcess;
class QPlainTextEdit;
class QmlError;
QT_END_NAMESPACE
namespace QmlDesigner {
......
......@@ -32,8 +32,10 @@
#include <QtCore/QObject>
QT_BEGIN_NAMESPACE
class QWidget;
class QDialog;
QT_END_NAMESPACE
namespace QmlDesigner {
......
......@@ -32,7 +32,9 @@
#include <QTimeLine>
#include <QDrag>
QT_BEGIN_NAMESPACE
class QMimeData;
QT_END_NAMESPACE
namespace QmlDesigner {
......
......@@ -32,9 +32,11 @@
#include <QtGui/QFrame>
QT_BEGIN_NAMESPACE
class QGraphicsItem;
class QPixmap;
class QMimeData;
QT_END_NAMESPACE
namespace QmlDesigner {
......
......@@ -36,7 +36,9 @@
#include <QDebug>
#include <QTimeLine>
QT_BEGIN_NAMESPACE
class QLabel;
QT_END_NAMESPACE
namespace QmlDesigner {
......
......@@ -37,10 +37,12 @@
#include <QPainter>
QT_BEGIN_NAMESPACE
class QTreeView;
class QStandardItem;
class QItemSelection;
class QModelIndex;
QT_END_NAMESPACE
namespace QmlDesigner {
......
......@@ -34,10 +34,12 @@
#include <QWeakPointer>
QT_BEGIN_NAMESPACE
class QTreeView;
class QStandardItem;
class QItemSelection;
class QModelIndex;
QT_END_NAMESPACE
namespace QmlDesigner {
......
......@@ -51,6 +51,8 @@ public:
} // namespace QmlDesigner
QT_BEGIN_NAMESPACE
Q_DECLARE_INTERFACE(QmlDesigner::IPlugin, QMLDESIGNER_PLUGIN_INTERFACE)
QT_END_NAMESPACE
#endif // IPLUGIN_H
......@@ -34,9 +34,11 @@
#include <QtCore/QObject>
#include <QtCore/QList>
QT_BEGIN_NAMESPACE
class QString;
class QAbstractItemModel;
class QDialog;
QT_END_NAMESPACE
namespace QmlDesigner {
......
......@@ -160,7 +160,6 @@ private:
int mTop, mLeft, mBottom, mRight;
};
QML_DECLARE_TYPE(QBoxLayoutObject);
class QHBoxLayoutObject : public QBoxLayoutObject
{
......@@ -168,7 +167,6 @@ Q_OBJECT
public:
QHBoxLayoutObject(QObject *parent=0);
};
QML_DECLARE_TYPE(QHBoxLayoutObject);
class QVBoxLayoutObject : public QBoxLayoutObject
{
......@@ -176,11 +174,14 @@ Q_OBJECT
public:
QVBoxLayoutObject(QObject *parent=0);
};
QML_DECLARE_TYPE(QVBoxLayoutObject);
#endif // BASICLAYOUTS_H
QT_END_NAMESPACE
QML_DECLARE_TYPE(QBoxLayoutObject);
QML_DECLARE_TYPE(QHBoxLayoutObject);
QML_DECLARE_TYPE(QVBoxLayoutObject);
QT_END_HEADER
......@@ -1109,9 +1109,6 @@ void QGroupBoxDeclarativeUI::animate(int frame)
gb->update();
}
QML_DECLARE_TYPE(QTabObject);
QML_DEFINE_TYPE(Qt,4,6,QTabObject,QTabObject); //### with namespacing, this should just be 'Tab'
class QTabWidgetDeclarativeUI : public QObject
{
Q_OBJECT
......@@ -1171,6 +1168,8 @@ public:
{}
};
QT_END_NAMESPACE
QML_DEFINE_EXTENDED_TYPE(Bauhaus,1,0,QWidget,QWidget,QWidgetDeclarativeUI);
//display
......@@ -1230,7 +1229,7 @@ QML_DEFINE_EXTENDED_TYPE(Bauhaus,1,0,QMenu,QMenu, QMenuDeclarativeUI)
//QML_DEFINE_TYPE(Bauhaus,1,0,BauhausreeView,BauhausreeView);
//QML_DEFINE_TYPE(Bauhaus,1,0,BauhausableView,BauhausableView);
QML_DECLARE_TYPE(QTabObject);
QML_DEFINE_TYPE(Qt,4,6,QTabObject,QTabObject); //### with namespacing, this should just be 'Tab'
#include "basicwidgets.moc"
QT_END_NAMESPACE
......@@ -57,9 +57,6 @@
#include "filewidget.h"
#include "layoutwidget.h"
QT_BEGIN_NAMESPACE
QML_DECLARE_TYPE(QWidget);
//display
......@@ -97,12 +94,16 @@ QML_DECLARE_TYPE(QTabWidget);
QML_DECLARE_TYPE(FileWidget);
QML_DECLARE_TYPE(LayoutWidget);
QT_BEGIN_NAMESPACE
class Action : public QAction {
Q_OBJECT
public:
Action(QObject *parent = 0) : QAction(parent) {}
};
QT_END_NAMESPACE
QML_DECLARE_TYPE(QMenu);
QML_DECLARE_TYPE(Action);
......@@ -115,6 +116,4 @@ QML_DECLARE_TYPE(Action);
//top-level windows?
QT_END_NAMESPACE
#endif // BASICWIDGETS_H
......@@ -39,9 +39,10 @@
#include <qml.h>
#include <propertyeditorvalue.h>
QT_BEGIN_NAMESPACE
class QtColorButton;
class QToolButton;
QT_END_NAMESPACE
namespace QmlDesigner {
......
......@@ -35,10 +35,11 @@
#include <qml.h>
QT_BEGIN_NAMESPACE
class QLabel;
class QPushButton;
class QFontDialog;
QT_END_NAMESPACE
namespace QmlDesigner {
......
......@@ -37,8 +37,10 @@
#include "qmlanchorbindingproxy.h"
QT_BEGIN_NAMESPACE
class QShortcut;
class QStackedWidget;
QT_END_NAMESPACE
namespace QmlDesigner {
......
......@@ -48,11 +48,11 @@ public:
virtual QLayout *layout() const;
};
QML_DECLARE_TYPE(QLayoutObject);
#endif // QLAYOUTOBJECT_H
QT_END_NAMESPACE
QML_DECLARE_TYPE(QLayoutObject);
QT_END_HEADER
#endif // QLAYOUTOBJECT_H
......@@ -63,7 +63,6 @@ private:
QRectF geometry;
QGraphicsLayout *proxy;
};
QML_DECLARE_TYPE(QProxyLayout);
class QProxyLayoutItem : public QObject, public QGraphicsLayoutItem
{
......@@ -87,10 +86,12 @@ private:
QRectF geometry;
QGraphicsLayoutItem *other;
};
QML_DECLARE_TYPE(QProxyLayoutItem);
#endif // QPROXYLAYOUTITEM_H
QT_END_NAMESPACE
QML_DECLARE_TYPE(QProxyLayout);
QML_DECLARE_TYPE(QProxyLayoutItem);
QT_END_HEADER
......@@ -33,9 +33,11 @@
#include <QtGui/QGroupBox>
#include <QtGui/QPushButton>
QT_BEGIN_NAMESPACE
class QListWidget;
class QVBoxLayout;
class QTableWidget;
QT_END_NAMESPACE
namespace QmlDesigner {
......
......@@ -35,7 +35,9 @@
#include <QSharedPointer>
#include "corelib_global.h"
QT_BEGIN_NAMESPACE
class QTextStream;
QT_END_NAMESPACE
namespace QmlDesigner {
namespace Internal {
......
......@@ -39,7 +39,9 @@
#include <QObject>
QT_BEGIN_NAMESPACE
class QStyle;
QT_END_NAMESPACE
namespace QmlDesigner {
namespace Internal {
......
......@@ -47,6 +47,8 @@ public:
} // namespace QmlDesigner
QT_BEGIN_NAMESPACE
Q_DECLARE_INTERFACE(QmlDesigner::IWidgetPlugin, QMLDESIGNER_WIDGETPLUGIN_INTERFACE)
QT_END_NAMESPACE
#endif // IWIDGETPLUGIN_H
......@@ -38,7 +38,9 @@
#include <import.h>
QT_BEGIN_NAMESPACE
class QUrl;
QT_END_NAMESPACE
namespace QmlDesigner {
......
......@@ -36,7 +36,9 @@
#include <QtCore/QMetaType>
#include <QVariant>
QT_BEGIN_NAMESPACE
class QTextStream;
QT_END_NAMESPACE
namespace QmlDesigner {
......
......@@ -37,11 +37,13 @@
#include <propertymetainfo.h>
#include <qmlanchors.h>
QT_BEGIN_NAMESPACE
class QPainter;
class QStyleOptionGraphicsItem;
class QmlContext;
class QGraphicsItem;
class QGraphicsTransform;
QT_END_NAMESPACE
namespace QmlDesigner {
......
......@@ -41,9 +41,11 @@
#include <modelnode.h>
#include <nodeinstance.h>
QT_BEGIN_NAMESPACE
class QmlEngine;
class QGraphicsScene;
class QGraphicsView;
QT_END_NAMESPACE
namespace QmlDesigner {
......
......@@ -38,7 +38,9 @@
#include "corelib_global.h"
#include "invalidmetainfoexception.h"
QT_BEGIN_NAMESPACE
class QmlContext;
QT_END_NAMESPACE
namespace QmlDesigner {
......
......@@ -33,6 +33,9 @@
#include "corelib_global.h"
#include "abstractproperty.h"
QT_BEGIN_NAMESPACE
class QTextStream;
QT_END_NAMESPACE
namespace QmlDesigner {
......
......@@ -32,7 +32,9 @@
#include "objectnodeinstance.h"
QT_BEGIN_NAMESPACE
class QmlComponent;
QT_END_NAMESPACE
namespace QmlDesigner {
namespace Internal {
......
......@@ -32,7 +32,9 @@
#include "objectnodeinstance.h"
QT_BEGIN_NAMESPACE
class QGraphicsObject;
QT_END_NAMESPACE
namespace QmlDesigner {
namespace Internal {
......
......@@ -40,11 +40,13 @@
#include <nodeinstanceview.h>
#include "nodeinstancemetaobject.h"
QT_BEGIN_NAMESPACE
class QGraphicsItem;
class QmlContext;
class QmlMetaProperty;
class QmlContext;
class QmlBinding;
QT_END_NAMESPACE
namespace QmlDesigner {
......
......@@ -32,7 +32,9 @@
#include "objectnodeinstance.h"
QT_BEGIN_NAMESPACE
class QmlTransition;
QT_END_NAMESPACE
namespace QmlDesigner {
namespace Internal {
......
......@@ -40,6 +40,7 @@
enum { debug = false };
QT_BEGIN_NAMESPACE
// Allow usage of QFileInfo in hash / qSort
......@@ -53,6 +54,7 @@ static uint qHash(const QFileInfo &fileInfo)
return qHash(fileInfo.filePath());
}
QT_END_NAMESPACE
namespace QmlDesigner {
......