summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@qt.io>2021-02-26 14:21:48 +0100
committerPaul Wicking <paul.wicking@qt.io>2021-04-07 11:51:25 +0200
commite28b65f868d3f3fe430208dc29bfb9982e82ef48 (patch)
tree87c20f8e11e1b9679f426adafdd75943f3de4a4b
parent37801c6c537ef8e79094b405e64481a0246330a0 (diff)
Doc: Fix various documentation issues
- Document QIODeviceBase - Document QPointerEvent::points - Fix linking issues Task-number: QTBUG-90662 Change-Id: Ib123d5708953b22e01f95c82626b39a49fff95b2 Reviewed-by: Nico Vertriest <nico.vertriest@qt.io> (cherry picked from commit 00e10f62b55626097e94a2d70a9214c0062fbcd5)
-rw-r--r--examples/widgets/doc/src/addressbook-tutorial.qdoc6
-rw-r--r--src/corelib/io/qiodevice.cpp12
-rw-r--r--src/corelib/tools/qmargins.cpp3
-rw-r--r--src/gui/image/qimagereader.cpp4
-rw-r--r--src/gui/kernel/qevent.cpp6
-rw-r--r--src/gui/text/qtextdocumentwriter.cpp5
6 files changed, 25 insertions, 11 deletions
diff --git a/examples/widgets/doc/src/addressbook-tutorial.qdoc b/examples/widgets/doc/src/addressbook-tutorial.qdoc
index 563b6a2be9..53acb82b1a 100644
--- a/examples/widgets/doc/src/addressbook-tutorial.qdoc
+++ b/examples/widgets/doc/src/addressbook-tutorial.qdoc
@@ -842,7 +842,7 @@
If \c fileName is not empty, we create a QFile object, \c file, with
\c fileName. QFile works with QDataStream as QFile is a QIODevice.
- Next, we attempt to open the file in \l{QIODevice::}{WriteOnly} mode.
+ Next, we attempt to open the file in \l{QIODeviceBase::}{WriteOnly} mode.
If this is unsuccessful, we display a QMessageBox to inform the user.
\snippet tutorials/addressbook/part6/addressbook.cpp saveToFile() function part2
@@ -869,7 +869,7 @@
\image addressbook-tutorial-part6-load.png
If \c fileName is not empty, again, we use a QFile object, \c file, and
- attempt to open it in \l{QIODevice::}{ReadOnly} mode. Similar to our
+ attempt to open it in \l{QIODeviceBase::}{ReadOnly} mode. Similar to our
implementation of \c saveToFile(), if this attempt is unsuccessful, we
display a QMessageBox to inform the user.
@@ -939,7 +939,7 @@
choose a location for the file. Using the file name chosen, we create an
instance of QFile to write to.
- We attempt to open the file in \l{QIODevice::}{WriteOnly} mode. If this
+ We attempt to open the file in \l{QIODeviceBase::}{WriteOnly} mode. If this
process fails, we display a QMessageBox to inform the user about the
problem and return. Otherwise, we pass the file as a parameter to a
QTextStream object, \c out. Like QDataStream, the QTextStream class
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index 5c8c0e6a27..0bea68acc5 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -290,10 +290,18 @@ QIODevicePrivate::~QIODevicePrivate()
*/
/*!
+ \class QIODeviceBase
+ \inheaderfile QIODevice
+ \inmodule QtCore
+ \brief Base class for QIODevice that provides flags describing the mode in
+ which a device is opened.
+*/
+
+/*!
\enum QIODeviceBase::OpenModeFlag
- This enum is used with open() to describe the mode in which a device
- is opened. It is also returned by openMode().
+ This enum is used with QIODevice::open() to describe the mode in which a
+ device is opened. It is also returned by QIODevice::openMode().
\value NotOpen The device is not open.
\value ReadOnly The device is open for reading.
diff --git a/src/corelib/tools/qmargins.cpp b/src/corelib/tools/qmargins.cpp
index 5b3c04d11e..8a6e50ca24 100644
--- a/src/corelib/tools/qmargins.cpp
+++ b/src/corelib/tools/qmargins.cpp
@@ -508,10 +508,9 @@ QDebug operator<<(QDebug dbg, const QMargins &m)
Returns \c true if all margins are very close to 0; otherwise returns
false.
- \sa qFuzzyIsNull
+ \sa {<QtGlobal>::}{qFuzzyIsNull}
*/
-
/*!
\fn qreal QMarginsF::left() const
diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp
index 611cbb1df1..fccf67b428 100644
--- a/src/gui/image/qimagereader.cpp
+++ b/src/gui/image/qimagereader.cpp
@@ -769,7 +769,7 @@ bool QImageReader::decideFormatFromContent() const
otherwise left unchanged.
If the device is not already open, QImageReader will attempt to
- open the device in \l QIODevice::ReadOnly mode by calling
+ open the device in \l {QIODeviceBase::}{ReadOnly} mode by calling
open(). Note that this does not work for certain devices, such as
QProcess, QTcpSocket and QUdpSocket, where more logic is required
to open the device.
@@ -799,7 +799,7 @@ QIODevice *QImageReader::device() const
/*!
Sets the file name of QImageReader to \a fileName. Internally,
QImageReader will create a QFile object and open it in \l
- QIODevice::ReadOnly mode, and use this when reading images.
+ {QIODeviceBase::}{ReadOnly} mode, and use this when reading images.
If \a fileName does not include a file extension (e.g., .png or .bmp),
QImageReader will cycle through all supported extensions until it finds
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index edf00928eb..adc1029754 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -253,6 +253,12 @@ QInputEvent::~QInputEvent()
*/
/*!
+ \fn const QList<QEventPoint> &QPointerEvent::points() const
+
+ Returns a list of points in this pointer event.
+*/
+
+/*!
\fn QPointingDevice::PointerType QPointerEvent::pointerType() const
Returns the type of point that generated the event.
diff --git a/src/gui/text/qtextdocumentwriter.cpp b/src/gui/text/qtextdocumentwriter.cpp
index 31dfb9436f..74db049aa6 100644
--- a/src/gui/text/qtextdocumentwriter.cpp
+++ b/src/gui/text/qtextdocumentwriter.cpp
@@ -182,7 +182,7 @@ QByteArray QTextDocumentWriter::format () const
unchanged.
If the device is not already open, QTextDocumentWriter will attempt to
- open the device in \l QIODevice::WriteOnly mode by calling open().
+ open the device in \l {QIODeviceBase::}{WriteOnly} mode by calling open().
\note This will not work for certain devices, such as QProcess,
QTcpSocket and QUdpSocket, where some configuration is required before
@@ -211,7 +211,8 @@ QIODevice *QTextDocumentWriter::device () const
/*!
Sets the name of the file to be written to \a fileName. Internally,
QTextDocumentWriter will create a QFile and open it in \l
- QIODevice::WriteOnly mode, and use this file when writing the document.
+ {QIODeviceBase::}{WriteOnly} mode, and use this file when writing the
+ document.
\sa fileName(), setDevice()
*/