diff options
author | Martin Smith <martin.smith@digia.com> | 2013-11-04 14:17:51 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-05 15:40:14 +0100 |
commit | 2bb6fbbd0fe0fd769a01299b17648ac8fe9e3387 (patch) | |
tree | 8c32f8d5d04b2ddef750adddd1a0b69b1117adbb /src/widgets | |
parent | d1870d90365122167d650dada6e21db9e4aca91a (diff) |
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 <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/kernel/qwidget.h | 2 |
1 files changed, 2 insertions, 0 deletions
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<QWidget*>(QObject *o) { if (!o || !o->isWidgetType()) return 0; @@ -743,6 +744,7 @@ template <> inline const QWidget *qobject_cast<const QWidget*>(const QObject *o) if (!o || !o->isWidgetType()) return 0; return static_cast<const QWidget*>(o); } +#endif // !Q_QDOC inline QWidget *QWidget::childAt(int ax, int ay) const { return childAt(QPoint(ax, ay)); } |