Q_DECLARE_INTERFACE use fixes

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
Ivailo Monev 2017-05-09 07:11:08 +00:00
parent 65a18c610d
commit 8f6ccd040e
16 changed files with 61 additions and 32 deletions

View file

@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QDeclarativeEngine; class QDeclarativeEngine;
struct Q_DECLARATIVE_EXPORT QDeclarativeExtensionInterface struct Q_DECLARATIVE_EXPORT QDeclarativeExtensionInterface
@ -58,10 +57,10 @@ struct Q_DECLARATIVE_EXPORT QDeclarativeExtensionInterface
virtual void initializeEngine(QDeclarativeEngine *engine, const char *uri) = 0; virtual void initializeEngine(QDeclarativeEngine *engine, const char *uri) = 0;
}; };
Q_DECLARE_INTERFACE(QDeclarativeExtensionInterface, "com.trolltech.Qt.QDeclarativeExtensionInterface/1.0")
QT_END_NAMESPACE QT_END_NAMESPACE
Q_DECLARE_INTERFACE(QDeclarativeExtensionInterface, "com.trolltech.Qt.QDeclarativeExtensionInterface/1.0")
QT_END_HEADER QT_END_HEADER
#endif // QDECLARATIVEEXTENSIONINTERFACE_H #endif // QDECLARATIVEEXTENSIONINTERFACE_H

View file

@ -65,10 +65,11 @@ private:
friend class QDeclarativeEnginePrivate; friend class QDeclarativeEnginePrivate;
QDeclarativeParserStatus **d; QDeclarativeParserStatus **d;
}; };
Q_DECLARE_INTERFACE(QDeclarativeParserStatus, "com.trolltech.qml.QDeclarativeParserStatus")
QT_END_NAMESPACE QT_END_NAMESPACE
Q_DECLARE_INTERFACE(QDeclarativeParserStatus, "com.trolltech.qml.QDeclarativeParserStatus")
QT_END_HEADER QT_END_HEADER
#endif // QDECLARATIVEPARSERSTATUS_H #endif // QDECLARATIVEPARSERSTATUS_H

View file

@ -48,8 +48,8 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QDeclarativeProperty; class QDeclarativeProperty;
class Q_DECLARATIVE_EXPORT QDeclarativePropertyValueInterceptor class Q_DECLARATIVE_EXPORT QDeclarativePropertyValueInterceptor
{ {
public: public:
@ -58,10 +58,11 @@ public:
virtual void setTarget(const QDeclarativeProperty &property) = 0; virtual void setTarget(const QDeclarativeProperty &property) = 0;
virtual void write(const QVariant &value) = 0; virtual void write(const QVariant &value) = 0;
}; };
Q_DECLARE_INTERFACE(QDeclarativePropertyValueInterceptor, "com.trolltech.qml.QDeclarativePropertyValueInterceptor")
QT_END_NAMESPACE QT_END_NAMESPACE
Q_DECLARE_INTERFACE(QDeclarativePropertyValueInterceptor, "com.trolltech.qml.QDeclarativePropertyValueInterceptor")
QT_END_HEADER QT_END_HEADER
#endif // QDECLARATIVEPROPERTYVALUEINTERCEPTOR_H #endif // QDECLARATIVEPROPERTYVALUEINTERCEPTOR_H

View file

@ -48,8 +48,8 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QDeclarativeProperty; class QDeclarativeProperty;
class Q_DECLARATIVE_EXPORT QDeclarativePropertyValueSource class Q_DECLARATIVE_EXPORT QDeclarativePropertyValueSource
{ {
public: public:
@ -57,10 +57,11 @@ public:
virtual ~QDeclarativePropertyValueSource(); virtual ~QDeclarativePropertyValueSource();
virtual void setTarget(const QDeclarativeProperty &) = 0; virtual void setTarget(const QDeclarativeProperty &) = 0;
}; };
Q_DECLARE_INTERFACE(QDeclarativePropertyValueSource, "com.trolltech.qml.QDeclarativePropertyValueSource")
QT_END_NAMESPACE QT_END_NAMESPACE
Q_DECLARE_INTERFACE(QDeclarativePropertyValueSource, "com.trolltech.qml.QDeclarativePropertyValueSource")
QT_END_HEADER QT_END_HEADER
#endif // QDECLARATIVEPROPERTYVALUESOURCE_H #endif // QDECLARATIVEPROPERTYVALUESOURCE_H

View file

@ -58,8 +58,13 @@ public:
virtual QObject *extension(QObject *object, const QString &iid) const = 0; virtual QObject *extension(QObject *object, const QString &iid) const = 0;
}; };
QT_END_NAMESPACE
Q_DECLARE_INTERFACE(QAbstractExtensionFactory, "com.trolltech.Qt.QAbstractExtensionFactory") Q_DECLARE_INTERFACE(QAbstractExtensionFactory, "com.trolltech.Qt.QAbstractExtensionFactory")
QT_BEGIN_NAMESPACE
class QAbstractExtensionManager class QAbstractExtensionManager
{ {
public: public:
@ -70,8 +75,13 @@ public:
virtual QObject *extension(QObject *object, const QString &iid) const = 0; virtual QObject *extension(QObject *object, const QString &iid) const = 0;
}; };
QT_END_NAMESPACE
Q_DECLARE_INTERFACE(QAbstractExtensionManager, "com.trolltech.Qt.QAbstractExtensionManager") Q_DECLARE_INTERFACE(QAbstractExtensionManager, "com.trolltech.Qt.QAbstractExtensionManager")
QT_BEGIN_NAMESPACE
template <class T> template <class T>
inline T qt_extension(QAbstractExtensionManager* manager, QObject *object) inline T qt_extension(QAbstractExtensionManager* manager, QObject *object)
{ return 0; } { return 0; }

View file

@ -64,10 +64,11 @@ public:
virtual QDesignerFormEditorInterface *core() const = 0; virtual QDesignerFormEditorInterface *core() const = 0;
}; };
Q_DECLARE_INTERFACE(QDesignerFormEditorPluginInterface, "com.trolltech.Qt.Designer.QDesignerFormEditorPluginInterface")
QT_END_NAMESPACE QT_END_NAMESPACE
Q_DECLARE_INTERFACE(QDesignerFormEditorPluginInterface, "com.trolltech.Qt.Designer.QDesignerFormEditorPluginInterface")
QT_END_HEADER QT_END_HEADER
#endif // ABSTRACTFORMEDITORPLUGIN_H #endif // ABSTRACTFORMEDITORPLUGIN_H

View file

@ -53,11 +53,10 @@
QT_BEGIN_HEADER QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
#ifndef QT_NO_ACCESSIBILITY #ifndef QT_NO_ACCESSIBILITY
QT_BEGIN_NAMESPACE
class QAccessibleInterface; class QAccessibleInterface;
class Q_GUI_EXPORT QAccessible class Q_GUI_EXPORT QAccessible
@ -451,13 +450,13 @@ private:
inline QAccessibleEvent::QAccessibleEvent(Type atype, int achild) inline QAccessibleEvent::QAccessibleEvent(Type atype, int achild)
: QEvent(atype), c(achild) {} : QEvent(atype), c(achild) {}
QT_END_NAMESPACE
#define QAccessibleInterface_iid "com.trolltech.Qt.QAccessibleInterface" #define QAccessibleInterface_iid "com.trolltech.Qt.QAccessibleInterface"
Q_DECLARE_INTERFACE(QAccessibleInterface, QAccessibleInterface_iid) Q_DECLARE_INTERFACE(QAccessibleInterface, QAccessibleInterface_iid)
#endif // QT_NO_ACCESSIBILITY #endif // QT_NO_ACCESSIBILITY
QT_END_NAMESPACE
QT_END_HEADER QT_END_HEADER
#endif // QACCESSIBLE_H #endif // QACCESSIBLE_H

View file

@ -67,9 +67,13 @@ struct Q_GUI_EXPORT QAccessibleBridgeFactoryInterface : public QFactoryInterface
virtual QAccessibleBridge *create(const QString& name) = 0; virtual QAccessibleBridge *create(const QString& name) = 0;
}; };
QT_END_NAMESPACE
#define QAccessibleBridgeFactoryInterface_iid "com.trolltech.Qt.QAccessibleBridgeFactoryInterface" #define QAccessibleBridgeFactoryInterface_iid "com.trolltech.Qt.QAccessibleBridgeFactoryInterface"
Q_DECLARE_INTERFACE(QAccessibleBridgeFactoryInterface, QAccessibleBridgeFactoryInterface_iid) Q_DECLARE_INTERFACE(QAccessibleBridgeFactoryInterface, QAccessibleBridgeFactoryInterface_iid)
QT_BEGIN_NAMESPACE
class Q_GUI_EXPORT QAccessibleBridgePlugin : public QObject, public QAccessibleBridgeFactoryInterface class Q_GUI_EXPORT QAccessibleBridgePlugin : public QObject, public QAccessibleBridgeFactoryInterface
{ {
Q_OBJECT Q_OBJECT

View file

@ -60,9 +60,13 @@ struct Q_GUI_EXPORT QAccessibleFactoryInterface : public QAccessible, public QFa
virtual QAccessibleInterface* create(const QString &key, QObject *object) = 0; virtual QAccessibleInterface* create(const QString &key, QObject *object) = 0;
}; };
QT_END_NAMESPACE
#define QAccessibleFactoryInterface_iid "com.trolltech.Qt.QAccessibleFactoryInterface" #define QAccessibleFactoryInterface_iid "com.trolltech.Qt.QAccessibleFactoryInterface"
Q_DECLARE_INTERFACE(QAccessibleFactoryInterface, QAccessibleFactoryInterface_iid) Q_DECLARE_INTERFACE(QAccessibleFactoryInterface, QAccessibleFactoryInterface_iid)
QT_BEGIN_NAMESPACE
class QAccessiblePluginPrivate; class QAccessiblePluginPrivate;
class Q_GUI_EXPORT QAccessiblePlugin : public QObject, public QAccessibleFactoryInterface class Q_GUI_EXPORT QAccessiblePlugin : public QObject, public QAccessibleFactoryInterface

View file

@ -479,7 +479,10 @@ private:
}; };
Q_DECLARE_OPERATORS_FOR_FLAGS(QGraphicsItem::GraphicsItemFlags) Q_DECLARE_OPERATORS_FOR_FLAGS(QGraphicsItem::GraphicsItemFlags)
QT_END_NAMESPACE
Q_DECLARE_INTERFACE(QGraphicsItem, "com.trolltech.Qt.QGraphicsItem") Q_DECLARE_INTERFACE(QGraphicsItem, "com.trolltech.Qt.QGraphicsItem")
QT_BEGIN_NAMESPACE
inline void QGraphicsItem::setPos(qreal ax, qreal ay) inline void QGraphicsItem::setPos(qreal ax, qreal ay)
{ setPos(QPointF(ax, ay)); } { setPos(QPointF(ax, ay)); }

View file

@ -46,10 +46,10 @@
QT_BEGIN_HEADER QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
#ifndef QT_NO_GRAPHICSVIEW #ifndef QT_NO_GRAPHICSVIEW
QT_BEGIN_NAMESPACE
class QGraphicsLayoutPrivate; class QGraphicsLayoutPrivate;
class QGraphicsLayoutItem; class QGraphicsLayoutItem;
class QGraphicsWidget; class QGraphicsWidget;
@ -86,12 +86,12 @@ private:
friend class QGraphicsWidget; friend class QGraphicsWidget;
}; };
QT_END_NAMESPACE
Q_DECLARE_INTERFACE(QGraphicsLayout, "com.trolltech.Qt.QGraphicsLayout") Q_DECLARE_INTERFACE(QGraphicsLayout, "com.trolltech.Qt.QGraphicsLayout")
#endif #endif
QT_END_NAMESPACE
QT_END_HEADER QT_END_HEADER
#endif #endif

View file

@ -48,10 +48,10 @@
QT_BEGIN_HEADER QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
#ifndef QT_NO_GRAPHICSVIEW #ifndef QT_NO_GRAPHICSVIEW
QT_BEGIN_NAMESPACE
class QGraphicsLayoutItemPrivate; class QGraphicsLayoutItemPrivate;
class QGraphicsItem; class QGraphicsItem;
class Q_GUI_EXPORT QGraphicsLayoutItem class Q_GUI_EXPORT QGraphicsLayoutItem
@ -120,8 +120,6 @@ private:
friend class QGraphicsLayout; friend class QGraphicsLayout;
}; };
Q_DECLARE_INTERFACE(QGraphicsLayoutItem, "com.trolltech.Qt.QGraphicsLayoutItem")
inline void QGraphicsLayoutItem::setMinimumSize(qreal aw, qreal ah) inline void QGraphicsLayoutItem::setMinimumSize(qreal aw, qreal ah)
{ setMinimumSize(QSizeF(aw, ah)); } { setMinimumSize(QSizeF(aw, ah)); }
inline void QGraphicsLayoutItem::setPreferredSize(qreal aw, qreal ah) inline void QGraphicsLayoutItem::setPreferredSize(qreal aw, qreal ah)
@ -144,10 +142,12 @@ inline qreal QGraphicsLayoutItem::maximumWidth() const
inline qreal QGraphicsLayoutItem::maximumHeight() const inline qreal QGraphicsLayoutItem::maximumHeight() const
{ return effectiveSizeHint(Qt::MaximumSize).height(); } { return effectiveSizeHint(Qt::MaximumSize).height(); }
#endif
QT_END_NAMESPACE QT_END_NAMESPACE
Q_DECLARE_INTERFACE(QGraphicsLayoutItem, "com.trolltech.Qt.QGraphicsLayoutItem")
#endif
QT_END_HEADER QT_END_HEADER
#endif #endif

View file

@ -61,7 +61,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QStyle; class QStyle;
class QPalette; class QPalette;
class QIcon; class QIcon;
@ -73,10 +72,13 @@ struct Q_GUI_EXPORT QGuiPlatformPluginInterface : public QFactoryInterface
{ {
}; };
#define QGuiPlatformPluginInterface_iid "com.nokia.qt.QGuiPlatformPluginInterface" QT_END_NAMESPACE
#define QGuiPlatformPluginInterface_iid "com.nokia.qt.QGuiPlatformPluginInterface"
Q_DECLARE_INTERFACE(QGuiPlatformPluginInterface, QGuiPlatformPluginInterface_iid) Q_DECLARE_INTERFACE(QGuiPlatformPluginInterface, QGuiPlatformPluginInterface_iid)
QT_BEGIN_NAMESPACE
class Q_GUI_EXPORT QGuiPlatformPlugin : public QObject, public QGuiPlatformPluginInterface class Q_GUI_EXPORT QGuiPlatformPlugin : public QObject, public QGuiPlatformPluginInterface
{ {
Q_OBJECT Q_OBJECT

View file

@ -60,7 +60,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QGraphicsSystem; class QGraphicsSystem;
struct QGraphicsSystemFactoryInterface : public QFactoryInterface struct QGraphicsSystemFactoryInterface : public QFactoryInterface
@ -68,10 +67,13 @@ struct QGraphicsSystemFactoryInterface : public QFactoryInterface
virtual QGraphicsSystem *create(const QString &key) = 0; virtual QGraphicsSystem *create(const QString &key) = 0;
}; };
#define QGraphicsSystemFactoryInterface_iid "com.trolltech.Qt.QGraphicsSystemFactoryInterface" QT_END_NAMESPACE
#define QGraphicsSystemFactoryInterface_iid "com.trolltech.Qt.QGraphicsSystemFactoryInterface"
Q_DECLARE_INTERFACE(QGraphicsSystemFactoryInterface, QGraphicsSystemFactoryInterface_iid) Q_DECLARE_INTERFACE(QGraphicsSystemFactoryInterface, QGraphicsSystemFactoryInterface_iid)
QT_BEGIN_NAMESPACE
class Q_GUI_EXPORT QGraphicsSystemPlugin : public QObject, public QGraphicsSystemFactoryInterface class Q_GUI_EXPORT QGraphicsSystemPlugin : public QObject, public QGraphicsSystemFactoryInterface
{ {
Q_OBJECT Q_OBJECT

View file

@ -49,7 +49,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QStyle; class QStyle;
struct Q_GUI_EXPORT QStyleFactoryInterface : public QFactoryInterface struct Q_GUI_EXPORT QStyleFactoryInterface : public QFactoryInterface
@ -57,10 +56,13 @@ struct Q_GUI_EXPORT QStyleFactoryInterface : public QFactoryInterface
virtual QStyle *create(const QString &key) = 0; virtual QStyle *create(const QString &key) = 0;
}; };
#define QStyleFactoryInterface_iid "com.trolltech.Qt.QStyleFactoryInterface" QT_END_NAMESPACE
#define QStyleFactoryInterface_iid "com.trolltech.Qt.QStyleFactoryInterface"
Q_DECLARE_INTERFACE(QStyleFactoryInterface, QStyleFactoryInterface_iid) Q_DECLARE_INTERFACE(QStyleFactoryInterface, QStyleFactoryInterface_iid)
QT_BEGIN_NAMESPACE
class Q_GUI_EXPORT QStylePlugin : public QObject, public QStyleFactoryInterface class Q_GUI_EXPORT QStylePlugin : public QObject, public QStyleFactoryInterface
{ {
Q_OBJECT Q_OBJECT

View file

@ -140,10 +140,10 @@ public:
virtual void drawObject(QPainter *painter, const QRectF &rect, QTextDocument *doc, int posInDocument, const QTextFormat &format) = 0; virtual void drawObject(QPainter *painter, const QRectF &rect, QTextDocument *doc, int posInDocument, const QTextFormat &format) = 0;
}; };
Q_DECLARE_INTERFACE(QTextObjectInterface, "com.trolltech.Qt.QTextObjectInterface")
QT_END_NAMESPACE QT_END_NAMESPACE
Q_DECLARE_INTERFACE(QTextObjectInterface, "com.trolltech.Qt.QTextObjectInterface")
QT_END_HEADER QT_END_HEADER
#endif // QABSTRACTTEXTDOCUMENTLAYOUT_H #endif // QABSTRACTTEXTDOCUMENTLAYOUT_H