From e827fec40f13fa3ce96d8af4f545a3456df550c8 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 16 Mar 2017 11:38:52 +0100 Subject: [PATCH] doc: Add class qualifiers to parameter types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change supplies several missing class qualifiers for parameter types and function return types. Change-Id: I569026e4da0948902fcc13557003d3748b85dd82 Reviewed-by: Topi Reiniƶ --- src/corelib/kernel/qobject.cpp | 2 +- src/corelib/tools/qsharedpointer.cpp | 6 ++++- src/gui/image/qimage.cpp | 4 +-- src/gui/text/qtextdocument.cpp | 4 +++ src/network/access/qhstspolicy.cpp | 18 ++++++++++--- src/network/access/qnetworkaccessmanager.cpp | 4 ++- src/plugins/styles/mac/qmacstyle.qdoc | 28 ++++++++++---------- src/widgets/kernel/qlayoutitem.cpp | 4 +-- 8 files changed, 46 insertions(+), 24 deletions(-) diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index aa228af21a..232133c39c 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -5024,7 +5024,7 @@ bool QObjectPrivate::disconnect(const QObject *sender, int signal_index, void ** */ /*! - Create a copy of the handle to the connection + Create a copy of the handle to the \a other connection */ QMetaObject::Connection::Connection(const QMetaObject::Connection &other) : d_ptr(other.d_ptr) { diff --git a/src/corelib/tools/qsharedpointer.cpp b/src/corelib/tools/qsharedpointer.cpp index 7f1e9ed798..cc129595e4 100644 --- a/src/corelib/tools/qsharedpointer.cpp +++ b/src/corelib/tools/qsharedpointer.cpp @@ -503,11 +503,15 @@ */ /*! - \fn QSharedPointer::QSharedPointer(std::nullptr_t, Deleter) + \fn QSharedPointer::QSharedPointer(std::nullptr_t, Deleter deleter) \since 5.8 Creates a QSharedPointer that is null. This is equivalent to the QSharedPointer default constructor. + + The \a deleter parameter specifies the custom deleter for this + object. The custom deleter is called, instead of the operator + delete(), when the strong reference count drops to 0. */ /*! diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 423185494c..209d011e7b 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -2134,8 +2134,8 @@ QImage QImage::convertToFormat(Format format, const QVector &colorTable, Q /*! \since 5.9 - Changes the \a format of the image without changing the data. Only - works between formats of the same depth. + Changes the format of the image to \a format without changing the + data. Only works between formats of the same depth. Returns \c true if successful. diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp index db0650d154..15ce60fb4a 100644 --- a/src/gui/text/qtextdocument.cpp +++ b/src/gui/text/qtextdocument.cpp @@ -74,6 +74,8 @@ QT_BEGIN_NAMESPACE Q_CORE_EXPORT Q_DECL_CONST_FUNCTION unsigned int qt_int_sqrt(unsigned int n); /*! + \fn bool Qt::mightBeRichText(const QString& text) + Returns \c true if the string \a text is likely to be rich text; otherwise returns \c false. @@ -144,6 +146,8 @@ bool Qt::mightBeRichText(const QString& text) /*! + \fn QString Qt::convertFromPlainText(const QString &plain, Qt::WhiteSpaceMode mode) + Converts the plain text string \a plain to an HTML-formatted paragraph while preserving most of its look. diff --git a/src/network/access/qhstspolicy.cpp b/src/network/access/qhstspolicy.cpp index ab4695480b..46c9c22510 100644 --- a/src/network/access/qhstspolicy.cpp +++ b/src/network/access/qhstspolicy.cpp @@ -103,9 +103,15 @@ QHstsPolicy::QHstsPolicy() : d(new QHstsPolicyPrivate) } /*! - Constructs QHstsPolicy with \a expiry (in UTC): - - \a host data is interpreted according to \a mode; - - \a flags selects options to apply to this policy. + \enum QHstsPolicy::PolicyFlag + + \value IncludeSubDomains Indicates whether a policy must include subdomains +*/ + +/*! + Constructs QHstsPolicy with \a expiry (in UTC); \a flags is a value indicating + whether this policy must also include subdomains, \a host data is interpreted + according to \a mode. \sa QUrl::setHost(), QUrl::ParsingMode, QHstsPolicy::PolicyFlag */ @@ -213,4 +219,10 @@ bool QHstsPolicy::isExpired() const return !d->expiry.isValid() || d->expiry <= QDateTime::currentDateTimeUtc(); } +/*! + \fn void QHstsPolicy::swap(QHstsPolicy &other) + + Swaps this policy with the \a other policy. +*/ + QT_END_NAMESPACE diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp index 6dabe13228..dce256b7e5 100644 --- a/src/network/access/qnetworkaccessmanager.cpp +++ b/src/network/access/qnetworkaccessmanager.cpp @@ -781,7 +781,9 @@ bool QNetworkAccessManager::isStrictTransportSecurityStoreEnabled() const /*! \since 5.9 - Adds HTTP Strict Transport Security policies contained in \a knownHosts into HSTS cache. + Adds HTTP Strict Transport Security policies into HSTS cache. + \a knownHosts contains the known hosts that have QHstsPolicy + information. \note An expired policy will remove a known host from the cache, if previously present. diff --git a/src/plugins/styles/mac/qmacstyle.qdoc b/src/plugins/styles/mac/qmacstyle.qdoc index fcbc813844..30b3d7775f 100644 --- a/src/plugins/styles/mac/qmacstyle.qdoc +++ b/src/plugins/styles/mac/qmacstyle.qdoc @@ -87,7 +87,7 @@ /*! - \enum QMacStyle::WidgetSizePolicy + \enum QStyleHelper::WidgetSizePolicy \value SizeSmall \value SizeLarge @@ -123,7 +123,7 @@ \reimp */ -/*! \fn int QMacStyle::pixelMetric(PixelMetric metric, const QStyleOption *opt, const QWidget *widget) const +/*! \fn int QMacStyle::pixelMetric(QStyle::PixelMetric metric, const QStyleOption *opt, const QWidget *widget) const \reimp */ @@ -131,7 +131,7 @@ \reimp */ -/*! \fn int QMacStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w, QStyleHintReturn *hret) const +/*! \fn int QMacStyle::styleHint(QStyle::StyleHint sh, const QStyleOption *opt, const QWidget *w, QStyleHintReturn *hret) const \reimp */ @@ -139,11 +139,11 @@ \reimp */ -/*! \fn QPixmap QMacStyle::standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt, const QWidget *widget) const +/*! \fn QPixmap QMacStyle::standardPixmap(QStyle::StandardPixmap standardPixmap, const QStyleOption *opt, const QWidget *widget) const \reimp */ -/*! \fn void QMacStyle::setWidgetSizePolicy(const QWidget *widget, WidgetSizePolicy policy) +/*! \fn void QStyleHelper::setWidgetSizePolicy(const QWidget *widget, QStyleHelper::WidgetSizePolicy policy) \obsolete @@ -151,41 +151,41 @@ or Qt::WA_MacNormalSize instead. */ -/*! \fn QMacStyle::WidgetSizePolicy QMacStyle::widgetSizePolicy(const QWidget *widget, const QStyleOption *opt = 0) +/*! \fn QStyleHelper::WidgetSizePolicy QStyleHelper::widgetSizePolicy(const QWidget *widget, const QStyleOption *opt) \obsolete Call QWidget::testAttribute() with Qt::WA_MacMiniSize, Qt::WA_MacSmallSize, or Qt::WA_MacNormalSize instead. */ -/*! \fn void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p, const QWidget *w) const +/*! \fn void QMacStyle::drawPrimitive(QStyle::PrimitiveElement pe, const QStyleOption *opt, QPainter *p, const QWidget *w) const \reimp */ -/*! \fn void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter *p, const QWidget *w) const +/*! \fn void QMacStyle::drawControl(QStyle::ControlElement ce, const QStyleOption *opt, QPainter *p, const QWidget *w) const \reimp */ -/*! \fn QRect QMacStyle::subElementRect(SubElement sr, const QStyleOption *opt, const QWidget *widget) const +/*! \fn QRect QMacStyle::subElementRect(QStyle::SubElement sr, const QStyleOption *opt, const QWidget *widget) const \reimp */ -/*! \fn void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, const QWidget *widget) const +/*! \fn void QMacStyle::drawComplexControl(QStyle::ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, const QWidget *widget) const \reimp */ -/*! \fn QStyle::SubControl QMacStyle::hitTestComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, const QPoint &pt, const QWidget *widget) const +/*! \fn QStyle::SubControl QMacStyle::hitTestComplexControl(QStyle::ComplexControl cc, const QStyleOptionComplex *opt, const QPoint &pt, const QWidget *widget) const \reimp */ -/*! \fn QRect QMacStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex *opt, SubControl sc, const QWidget *widget) const +/*! \fn QRect QMacStyle::subControlRect(QStyle::ComplexControl cc, const QStyleOptionComplex *opt, QStyle::SubControl sc, const QWidget *widget) const \reimp */ -/*! \fn QSize QMacStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt, const QSize &csz, const QWidget *widget) const +/*! \fn QSize QMacStyle::sizeFromContents(QStyle::ContentsType ct, const QStyleOption *opt, const QSize &csz, const QWidget *widget) const \reimp */ @@ -197,7 +197,7 @@ \reimp */ -/*! \fn QIcon QMacStyle::standardIcon(StandardPixmap standardIcon, const QStyleOption *opt, const QWidget *widget) const +/*! \fn QIcon QMacStyle::standardIcon(QStyle::StandardPixmap standardIcon, const QStyleOption *opt, const QWidget *widget) const \reimp */ diff --git a/src/widgets/kernel/qlayoutitem.cpp b/src/widgets/kernel/qlayoutitem.cpp index 0bdac43c56..5c4fc20687 100644 --- a/src/widgets/kernel/qlayoutitem.cpp +++ b/src/widgets/kernel/qlayoutitem.cpp @@ -400,8 +400,8 @@ int QLayoutItem::minimumHeightForWidth(int w) const /*! - Returns the preferred height for this layout item, given the width - \a w. + Returns the preferred height for this layout item, given the + width, which is not used in this default implementation. The default implementation returns -1, indicating that the preferred height is independent of the width of the item. Using