summaryrefslogtreecommitdiffstats
path: root/src/corelib/doc
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/doc')
-rw-r--r--src/corelib/doc/qtcore.qdocconf2
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp1
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_kernel_qobject.cpp16
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_tools_qbytearray.cpp15
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_tools_qhash.cpp16
-rw-r--r--src/corelib/doc/src/dontdocument.qdoc4
-rw-r--r--src/corelib/doc/src/qtcore-index.qdoc2
-rw-r--r--src/corelib/doc/src/resource-system.qdoc4
8 files changed, 29 insertions, 31 deletions
diff --git a/src/corelib/doc/qtcore.qdocconf b/src/corelib/doc/qtcore.qdocconf
index 15b1925e51..2b9adabc3a 100644
--- a/src/corelib/doc/qtcore.qdocconf
+++ b/src/corelib/doc/qtcore.qdocconf
@@ -26,7 +26,7 @@ qhp.QtCore.subprojects.classes.sortPages = true
tagfile = ../../../doc/qtcore/qtcore.tags
-depends += activeqt qtdbus qtgui qtwidgets qtnetwork qtdoc qtmacextras qtquick qtlinguist qtdesigner qtconcurrent qtxml qmake qtwinextras qtqml
+depends += activeqt qtdbus qtgui qtwidgets qtnetwork qtdoc qtmacextras qtquick qtlinguist qtdesigner qtconcurrent qtxml qmake qtwinextras qtqml qtcmake
headerdirs += ..
diff --git a/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp b/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp
index eb75a29ca2..a540b88247 100644
--- a/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp
+++ b/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp
@@ -50,6 +50,7 @@
//! [0]
label->setAlignment(Qt::AlignLeft | Qt::AlignTop);
+label->setAlignment({ });
//! [0]
diff --git a/src/corelib/doc/snippets/code/src_corelib_kernel_qobject.cpp b/src/corelib/doc/snippets/code/src_corelib_kernel_qobject.cpp
index 1966f8195a..43bcc22720 100644
--- a/src/corelib/doc/snippets/code/src_corelib_kernel_qobject.cpp
+++ b/src/corelib/doc/snippets/code/src_corelib_kernel_qobject.cpp
@@ -71,7 +71,7 @@ QTimer *timer = qobject_cast<QTimer *>(obj);
// timer == (QObject *)obj
QAbstractButton *button = qobject_cast<QAbstractButton *>(obj);
-// button == 0
+// button == nullptr
//! [3]
@@ -144,7 +144,7 @@ class MyObject : public QObject
Q_OBJECT
public:
- MyObject(QObject *parent = 0);
+ MyObject(QObject *parent = nullptr);
protected:
void timerEvent(QTimerEvent *event) override;
@@ -322,7 +322,7 @@ QObject::connect: Cannot queue arguments of type 'MyType'
//! [26]
-disconnect(myObject, 0, 0, 0);
+disconnect(myObject, nullptr, nullptr, nullptr);
//! [26]
@@ -332,7 +332,7 @@ myObject->disconnect();
//! [28]
-disconnect(myObject, SIGNAL(mySignal()), 0, 0);
+disconnect(myObject, SIGNAL(mySignal()), nullptr, nullptr);
//! [28]
@@ -342,7 +342,7 @@ myObject->disconnect(SIGNAL(mySignal()));
//! [30]
-disconnect(myObject, 0, myReceiver, 0);
+disconnect(myObject, nullptr, myReceiver, nullptr);
//! [30]
@@ -391,7 +391,7 @@ class MyClass : public QObject
Q_OBJECT
public:
- MyClass(QObject *parent = 0);
+ MyClass(QObject *parent = nullptr);
~MyClass();
enum Priority { High, Low, VeryHigh, VeryLow };
@@ -467,7 +467,7 @@ QObject::connect(socket, &QTcpSocket::connected, [=] () {
//! [46]
//! [47]
-disconnect(myObject, &MyObject::mySignal(), 0, 0);
+disconnect(myObject, &MyObject::mySignal(), nullptr, nullptr);
//! [47]
//! [48]
@@ -505,7 +505,7 @@ class MyClass : public QWidget
Q_OBJECT
public:
- MyClass(QWidget *parent = 0);
+ MyClass(QWidget *parent = nullptr);
~MyClass();
bool event(QEvent* ev) override
diff --git a/src/corelib/doc/snippets/code/src_corelib_tools_qbytearray.cpp b/src/corelib/doc/snippets/code/src_corelib_tools_qbytearray.cpp
index b1dc392140..9c07a2e92c 100644
--- a/src/corelib/doc/snippets/code/src_corelib_tools_qbytearray.cpp
+++ b/src/corelib/doc/snippets/code/src_corelib_tools_qbytearray.cpp
@@ -422,7 +422,20 @@ text.data(); // returns "Qt is great!"
QByteArray::fromBase64("PHA+SGVsbG8/PC9wPg==", QByteArray::Base64Encoding); // returns "<p>Hello?</p>"
QByteArray::fromBase64("PHA-SGVsbG8_PC9wPg==", QByteArray::Base64UrlEncoding); // returns "<p>Hello?</p>"
-//! [44]
+//! [44bis]
+
+//! [44ter]
+void process(const QByteArray &);
+
+if (auto result = QByteArray::fromBase64Encoding(encodedData))
+ process(*result);
+//! [44ter]
+
+//! [44quater]
+auto result = QByteArray::fromBase64Encoding(encodedData);
+if (result.decodingStatus == QByteArray::Base64DecodingStatus::Ok)
+ process(result.decoded);
+//! [44quater]
//! [45]
QByteArray text = QByteArray::fromHex("517420697320677265617421");
diff --git a/src/corelib/doc/snippets/code/src_corelib_tools_qhash.cpp b/src/corelib/doc/snippets/code/src_corelib_tools_qhash.cpp
index 9813cc98d5..a140175956 100644
--- a/src/corelib/doc/snippets/code/src_corelib_tools_qhash.cpp
+++ b/src/corelib/doc/snippets/code/src_corelib_tools_qhash.cpp
@@ -119,22 +119,6 @@ hash.insert("plenty", 2000);
//! [9]
-//! [10]
-QList<int> values = hash.values("plenty");
-for (int i = 0; i < values.size(); ++i)
- cout << values.at(i) << Qt::endl;
-//! [10]
-
-
-//! [11]
-QHash<QString, int>::iterator i = hash.find("plenty");
-while (i != hash.end() && i.key() == "plenty") {
- cout << i.value() << Qt::endl;
- ++i;
-}
-//! [11]
-
-
//! [12]
QHash<QString, int> hash;
...
diff --git a/src/corelib/doc/src/dontdocument.qdoc b/src/corelib/doc/src/dontdocument.qdoc
index 19ca7db299..5fe05997cc 100644
--- a/src/corelib/doc/src/dontdocument.qdoc
+++ b/src/corelib/doc/src/dontdocument.qdoc
@@ -29,7 +29,7 @@
\dontdocument (QMacAutoReleasePool QIncompatibleFlag QGenericAtomicOps QAtomicTraits
QAtomicOps QBasicAtomicInteger QBasicAtomicPointer QBasicMutex QInternal
QArgument QReturnArgument QArrayData QTypedArrayData QStaticByteArrayData
- QByteRef QStaticStringData QListSpecialMethods QListData QScopedPointerDeleter
+ QStaticStringData QListSpecialMethods QListData QScopedPointerDeleter
QScopedPointerArrayDeleter QScopedPointerPodDeleter QScopedPointerObjectDeleteLater
QMetaTypeId2 QObjectData QObjectUserData QMapNodeBase QMapNode QMapDataBase
QMapData QHashData QHashNode QArrayDataPointer QTextStreamManipulator
@@ -37,5 +37,5 @@
QCborValueRef qfloat16 QDeferredDeleteEvent QSpecialInteger QLittleEndianStorageType
QBigEndianStorageType QFactoryInterface QFutureWatcherBase QJsonValuePtr
QJsonValueRefPtr QLinkedListNode QAbstractConcatenable QStringBuilderCommon
- QTextCodec::ConverterState QThreadStorageData)
+ QTextCodec::ConverterState QThreadStorageData QTextStreamManipulator)
*/
diff --git a/src/corelib/doc/src/qtcore-index.qdoc b/src/corelib/doc/src/qtcore-index.qdoc
index 40a6584af0..5838d13914 100644
--- a/src/corelib/doc/src/qtcore-index.qdoc
+++ b/src/corelib/doc/src/qtcore-index.qdoc
@@ -56,7 +56,7 @@
\include module-use.qdocinc using qt module
\quotefile overview/using-qt-core.cmake
- See also the \l[QtDoc]{Building with CMake} overview.
+ See also the \l{Build with CMake} overview.
\section2 Building with qmake
diff --git a/src/corelib/doc/src/resource-system.qdoc b/src/corelib/doc/src/resource-system.qdoc
index 69ec5e556b..f9ef317799 100644
--- a/src/corelib/doc/src/resource-system.qdoc
+++ b/src/corelib/doc/src/resource-system.qdoc
@@ -189,13 +189,13 @@
XML file to indicate a file should be most compressed, regardless of
which algorithms \c rcc supports.
- \li \c{zstd}: use the \l{Zstandard}{https://zstd.net} library to compress
+ \li \c{zstd}: use the \l{https://zstd.net}{Zstandard} library to compress
contents. Valid compression levels range from 1 to 19, 1 is least
compression (least CPU time) and 19 is the most compression (most CPU
time). The default level is 14. A special value of 0 tells the \c{zstd}
library to choose an implementation-defined default.
- \li \c{zlib}: use the \l{zlib}{https://zlib.net} library to compress
+ \li \c{zlib}: use the \l{https://zlib.net}{zlib} library to compress
contents. Valid compression levels range from 1 to 9, with 1the least
compression (least CPU time) and 9 the most compression (most CPU time).
The special value 0 means "no compression" and should not be used. The