From 5dc16d132497b54af608126ecf92f9e064c5aaf1 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Wed, 2 Oct 2019 00:03:18 +0200 Subject: Doc: Fix ButtonRole enum docs for QMessageBox and QDialogButtonBox Multiple topic commands (in this case, \enum) do not work across different classes. Reuse the documentation comment via an \include statement instead. Fixes: QTBUG-78910 Change-Id: Ife83bdc9bbad650835fafc072180d10037648d0a Reviewed-by: Paul Wicking --- src/widgets/dialogs/qmessagebox.cpp | 6 ++++++ src/widgets/widgets/qdialogbuttonbox.cpp | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'src/widgets') diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp index e20657a0f6..e1cc475a93 100644 --- a/src/widgets/dialogs/qmessagebox.cpp +++ b/src/widgets/dialogs/qmessagebox.cpp @@ -755,6 +755,12 @@ void QMessageBoxPrivate::_q_clicked(QPlatformDialogHelper::StandardButton button \sa QDialogButtonBox, {fowler}{GUI Design Handbook: Message Box}, {Standard Dialogs Example}, {Application Example} */ +/*! + \enum QMessageBox::ButtonRole + + \include qdialogbuttonbox.cpp buttonrole-enum +*/ + /*! \enum QMessageBox::StandardButton \since 4.2 diff --git a/src/widgets/widgets/qdialogbuttonbox.cpp b/src/widgets/widgets/qdialogbuttonbox.cpp index 28f6cdc7bd..7dba6df15c 100644 --- a/src/widgets/widgets/qdialogbuttonbox.cpp +++ b/src/widgets/widgets/qdialogbuttonbox.cpp @@ -522,8 +522,8 @@ QDialogButtonBox::~QDialogButtonBox() /*! \enum QDialogButtonBox::ButtonRole - \enum QMessageBox::ButtonRole +//! [buttonrole-enum] This enum describes the roles that can be used to describe buttons in the button box. Combinations of these roles are as flags used to describe different aspects of their behavior. @@ -546,6 +546,7 @@ QDialogButtonBox::~QDialogButtonBox() \omitvalue NRoles \sa StandardButton +//! [buttonrole-enum] */ /*! -- cgit v1.2.3