From e3e0a6d6d6c50dc21439f24728ee3614c5825d36 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 20 Apr 2018 13:01:27 +0200 Subject: doc: Document Qt namespace in multiple modules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit qdoc didn't handle this. This update fixes most of what was wrong, but tuning the details of the namespace reference pages might follw. We have namespace Qt as an exaqmple. Most of the elements in the Qt namespace are in QtCore, but a few functions are declared in QtGui. Before this update, qdoc used the hack of using #ifdef to remove the declarations from qtextdocument.h in QtGui and .cpp and then added them back into qtnamespace.h and .cpp in QtCore. Now that hack is no longer necessary. The functions in the Qt namespace that are declared in QtGui are documented there, but the documentation is linked to from the namespace reference page, which remains in QtCore. That is, only one \namespace command is used to document the Qt namespace, and it appears in qnamespace.qdoc where it always did, but the documentation for the Qt namespace functions declared in QtGui is now appears in qtextdocument.cpp where it belongs. Change-Id: Ic5888875c3b8310a3dba244475e2a6c3bc0c1808 Task-number: QTBUG-67267 Reviewed-by: Topi Reiniƶ --- src/gui/text/qtextdocument.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/gui/text/qtextdocument.h') diff --git a/src/gui/text/qtextdocument.h b/src/gui/text/qtextdocument.h index 64e39d4648..33c0b48683 100644 --- a/src/gui/text/qtextdocument.h +++ b/src/gui/text/qtextdocument.h @@ -70,17 +70,15 @@ class QTextCursor; template class QVector; -#ifndef Q_CLANG_QDOC namespace Qt { Q_GUI_EXPORT bool mightBeRichText(const QString&); Q_GUI_EXPORT QString convertFromPlainText(const QString &plain, WhiteSpaceMode mode = WhiteSpacePre); -#ifndef QT_NO_TEXTCODEC +#if !defined(QT_NO_TEXTCODEC) || defined(Q_CLANG_QDOC) Q_GUI_EXPORT QTextCodec *codecForHtml(const QByteArray &ba); #endif } -#endif class Q_GUI_EXPORT QAbstractUndoItem { -- cgit v1.2.3