From 2cc458abfb2ab252d34bbdedcecf73ebd19335e5 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Mon, 12 Apr 2021 13:21:51 +0200 Subject: [PATCH 1/6] Document QLocalSocket::socketOptions as a property Change-Id: Ifda55ac7afb3fb30d973a01104b012959ae285ab Reviewed-by: Paul Wicking Reviewed-by: Nico Vertriest --- src/network/socket/qlocalsocket.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/network/socket/qlocalsocket.cpp b/src/network/socket/qlocalsocket.cpp index 39c981c8d4..98c686de63 100644 --- a/src/network/socket/qlocalsocket.cpp +++ b/src/network/socket/qlocalsocket.cpp @@ -454,10 +454,13 @@ QString QLocalSocket::serverName() const } /*! - Returns the socket options as specified by setSocketOptions(), + \property QLocalSocket::socketOptions + \since 6.2 + \brief the socket options. + + Options must be set while the socket is in \l{UnconnectedState} state. \sa connectToServer() - */ QLocalSocket::SocketOptions QLocalSocket::socketOptions() const { @@ -465,12 +468,6 @@ QLocalSocket::SocketOptions QLocalSocket::socketOptions() const return d->socketOptions; } -/*! - \since 6.2 - - Set the socket \a options of the connection. - -*/ void QLocalSocket::setSocketOptions(QLocalSocket::SocketOptions option) { Q_D(QLocalSocket); From 5b94f8874721014a784fd79fcd5e5ea2ba4d28cc Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Mon, 12 Apr 2021 13:25:38 +0200 Subject: [PATCH 2/6] Document parameter correctly, fix qdoc warning Not needed in 6.1, the method is still (incorrectly) marked as \internal there. Change-Id: Idf1d924d8d320eca2388dbd28006eeaf9efedc3a Reviewed-by: Paul Wicking Reviewed-by: Nico Vertriest --- src/widgets/itemviews/qtableview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/itemviews/qtableview.cpp b/src/widgets/itemviews/qtableview.cpp index 4dcd92f29f..b261ee837d 100644 --- a/src/widgets/itemviews/qtableview.cpp +++ b/src/widgets/itemviews/qtableview.cpp @@ -2844,7 +2844,7 @@ QRect QTableView::visualRect(const QModelIndex &index) const /*! \reimp - Makes sure that the given \a item is visible in the table view, + Makes sure that the given \a index is visible in the table view, scrolling if necessary. */ void QTableView::scrollTo(const QModelIndex &index, ScrollHint hint) From 3206840b0e7d6895285122872fa0e7dc038e4865 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Mon, 12 Apr 2021 13:27:22 +0200 Subject: [PATCH 3/6] Fix qdoc warning, \function is not a command Document the size parameter while at it, and rephrase a bit. This introduces a new qdoc warning since QtLiteral is a new namespace without any documentation, but that's for a separate commit. Change-Id: I849d5cdde8b64dbbe7e6a526214d422930091cd4 Reviewed-by: Paul Wicking Reviewed-by: Andrei Golubev Reviewed-by: Nico Vertriest --- src/corelib/text/qbytearray.cpp | 16 +++++++++------- src/corelib/text/qstring.cpp | 16 +++++++++------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/corelib/text/qbytearray.cpp b/src/corelib/text/qbytearray.cpp index 677fc6d6ac..3a0f28f444 100644 --- a/src/corelib/text/qbytearray.cpp +++ b/src/corelib/text/qbytearray.cpp @@ -4767,17 +4767,19 @@ QByteArray QByteArray::toPercentEncoding(const QByteArray &exclude, const QByteA */ /*! - \function QtLiterals::operator""_qba(const char *str, size_t size) + \fn QtLiterals::operator""_qba(const char *str, size_t size) \relates QByteArray \since 6.2 - Literal operator that creates a QByteArray out of a char string literal \a - str. Creating a QByteArray from it is free in this case, and the generated - string data is stored in the read-only segment of the compiled object file. - Duplicate literals may share the same read-only memory. This functionality is - interchangeable with QByteArrayLiteral, but saves typing when many string - literals are present in the code. + Literal operator that creates a QByteArray out of the first \a size characters + in the char string literal \a str. + + The QByteArray is created at compile time, and the generated string data is stored + in the read-only segment of the compiled object file. Duplicate literals may share + the same read-only memory. This functionality is interchangeable with + QByteArrayLiteral, but saves typing when many string literals are present in the + code. The following code creates a QByteArray: \code diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp index 3455daa3ca..a690aac936 100644 --- a/src/corelib/text/qstring.cpp +++ b/src/corelib/text/qstring.cpp @@ -10506,17 +10506,19 @@ QString QString::toHtmlEscaped() const */ /*! - \function QtLiterals::operator""_qs(const char16_t *str, size_t size) + \fn QtLiterals::operator""_qs(const char16_t *str, size_t size) \relates QString \since 6.2 - Literal operator that creates a QString out of a char16_t string literal \a - str. Creating a QString from it is free in this case, and the generated string - data is stored in the read-only segment of the compiled object file. Duplicate - literals may share the same read-only memory. This functionality is - interchangeable with QStringLiteral, but saves typing when many string - literals are present in the code. + Literal operator that creates a QString out of the first \a size characters in + the char16_t string literal \a str. + + The QString is created at compile time, and the generated string data is stored + in the read-only segment of the compiled object file. Duplicate literals may + share the same read-only memory. This functionality is interchangeable with + QStringLiteral, but saves typing when many string literals are present in the + code. The following code creates a QString: \code From f6651d54df51ca65d9e4398512cc7f92b1e8f007 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Mon, 12 Apr 2021 13:40:36 +0200 Subject: [PATCH 4/6] Fix qdoc warning QPixmap doesn't have a devicePixelSize() method, but deviceIndependentSize is a relevant method here. Change-Id: Ie71e6cc88534792a896ea17ec37b1b9737c2f986 Reviewed-by: Paul Wicking Reviewed-by: Nico Vertriest --- src/gui/image/qpixmap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp index 2f9c4fd617..a57e4c1fe2 100644 --- a/src/gui/image/qpixmap.cpp +++ b/src/gui/image/qpixmap.cpp @@ -633,7 +633,7 @@ qreal QPixmap::devicePixelRatio() const high-DPI pixmap rather than a large pixmap (see \l{Drawing High Resolution Versions of Pixmaps and Images}). - \sa devicePixelRatio(), devicePixelSize() + \sa devicePixelRatio(), deviceIndependentSize() */ void QPixmap::setDevicePixelRatio(qreal scaleFactor) { From ae3d4b8f6b42da8c38f5146527bd18cab5bb5a95 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Mon, 12 Apr 2021 14:05:12 +0200 Subject: [PATCH 5/6] Fix qdoc warnings from new QLockFile members Change-Id: I06210fe37a3d90a958064fff48331a34bced2a8b Reviewed-by: Paul Wicking Reviewed-by: Nico Vertriest --- src/corelib/io/qlockfile.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/corelib/io/qlockfile.cpp b/src/corelib/io/qlockfile.cpp index 9dc0102574..032be3b7a1 100644 --- a/src/corelib/io/qlockfile.cpp +++ b/src/corelib/io/qlockfile.cpp @@ -184,14 +184,13 @@ void QLockFile::setStaleLockTime(int staleLockTime) \overload \since 6.2 - Sets \a staleLockTime to be an interval after which a lock file is considered - stale. + Sets the interval after which a lock file is considered stale to \a value. The default value is 30 seconds. If your application typically keeps the file locked for more than 30 seconds (for instance while saving megabytes of data for 2 minutes), you should set a bigger value using setStaleLockTime(). - The value of \a staleLockTime is used by lock() and tryLock() in order + The value of staleLockTime() is used by lock() and tryLock() in order to determine when an existing lock file is considered stale, i.e. left over by a crashed process. This is useful for the case where the PID got reused meanwhile, so one way to detect a stale lock file is by the fact that @@ -212,7 +211,7 @@ int QLockFile::staleLockTime() const return d->staleLockTime; } -/*! \fn std::chrono::milliseconds staleLockTimeAsDuration() const +/*! \fn std::chrono::milliseconds QLockFile::staleLockTimeAsDuration() const \overload \since 6.2 From 742ecf83e5deded30518328de91af1c296a0aeb6 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Mon, 12 Apr 2021 14:07:04 +0200 Subject: [PATCH 6/6] Silence qdoc warnings These are internal APIs, so silence qdoc which seems to get confused by the missing CALLBACK annotation in the implementation. Change-Id: Iddd9f87257843cc3d43597fe7e6c103aa5e1a646 Reviewed-by: Paul Wicking Reviewed-by: Nico Vertriest --- src/corelib/io/qwindowspipereader.cpp | 2 ++ src/corelib/io/qwindowspipewriter.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/src/corelib/io/qwindowspipereader.cpp b/src/corelib/io/qwindowspipereader.cpp index b8ab7c8ffd..b8ea89b8e3 100644 --- a/src/corelib/io/qwindowspipereader.cpp +++ b/src/corelib/io/qwindowspipereader.cpp @@ -307,6 +307,8 @@ void QWindowsPipeReader::startAsyncReadLocked() } /*! + \internal + Thread pool callback procedure. */ void QWindowsPipeReader::waitCallback(PTP_CALLBACK_INSTANCE instance, PVOID context, diff --git a/src/corelib/io/qwindowspipewriter.cpp b/src/corelib/io/qwindowspipewriter.cpp index d711528c8f..4b075549d0 100644 --- a/src/corelib/io/qwindowspipewriter.cpp +++ b/src/corelib/io/qwindowspipewriter.cpp @@ -183,6 +183,7 @@ void QWindowsPipeWriter::startAsyncWriteLocked() } /*! + \internal Thread pool callback procedure. */ void QWindowsPipeWriter::waitCallback(PTP_CALLBACK_INSTANCE instance, PVOID context,