From 2bb6fbbd0fe0fd769a01299b17648ac8fe9e3387 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 4 Nov 2013 14:17:51 +0100 Subject: qdoc: Eliminate qobject_cast() collision Two template functions for qboject_cast() are defined in qwidget.h that confuse qdoc because qdoc doesn't handle template functions correctly. In this case, the documentation for all qobject_cast() functions appears in qobject.cpp where it is declared to be related to QObject. This fix surrounds the template functions in qwidget.h with #ifndef Q_QDOC ... #endif, since qdoc doesn't need to see them. This fix unmasks a linking bug QTBUG-34564, which will be fixed separately. Task-number: QTBUG-34505 Change-Id: I97fd32cc563bfa4a232819c097f41be56adf0114 Reviewed-by: Friedemann Kleint --- src/widgets/kernel/qwidget.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/widgets/kernel/qwidget.h b/src/widgets/kernel/qwidget.h index a9eeaa5470..159011b824 100644 --- a/src/widgets/kernel/qwidget.h +++ b/src/widgets/kernel/qwidget.h @@ -733,6 +733,7 @@ private: Q_DECLARE_OPERATORS_FOR_FLAGS(QWidget::RenderFlags) +#ifndef Q_QDOC template <> inline QWidget *qobject_cast(QObject *o) { if (!o || !o->isWidgetType()) return 0; @@ -743,6 +744,7 @@ template <> inline const QWidget *qobject_cast(const QObject *o) if (!o || !o->isWidgetType()) return 0; return static_cast(o); } +#endif // !Q_QDOC inline QWidget *QWidget::childAt(int ax, int ay) const { return childAt(QPoint(ax, ay)); } -- cgit v1.2.3