From 32500a76a0682744103eca8498ee6d358b7a3cdd Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Fri, 1 Sep 2023 16:34:44 +0200 Subject: [PATCH] Rename the JSON Save Game Example to Saving a Game to File MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Partly because it also saves to CBOR, but also because our guidelines say to avoid using "Example" in the title. Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: Id858475a6b0474228cfe8044e188cc763f56e3a8 Reviewed-by: Topi Reiniƶ Reviewed-by: Marc Mutz --- doc/global/manifest-meta.qdocconf | 2 +- .../corelib/serialization/savegame/doc/src/savegame.qdoc | 2 +- src/corelib/doc/src/cbor.qdoc | 2 +- src/corelib/doc/src/json.qdoc | 4 +--- src/corelib/serialization/qcborarray.cpp | 2 +- src/corelib/serialization/qcborcommon.cpp | 2 +- src/corelib/serialization/qcbormap.cpp | 2 +- src/corelib/serialization/qcborstreamreader.cpp | 2 +- src/corelib/serialization/qcborstreamwriter.cpp | 2 +- src/corelib/serialization/qcborvalue.cpp | 2 +- src/corelib/serialization/qjsonarray.cpp | 2 +- src/corelib/serialization/qjsondocument.cpp | 2 +- src/corelib/serialization/qjsonobject.cpp | 6 +++--- src/corelib/serialization/qjsonparser.cpp | 2 +- src/corelib/serialization/qjsonvalue.cpp | 2 +- 15 files changed, 17 insertions(+), 19 deletions(-) diff --git a/doc/global/manifest-meta.qdocconf b/doc/global/manifest-meta.qdocconf index 0a66e7477d..32b8739215 100644 --- a/doc/global/manifest-meta.qdocconf +++ b/doc/global/manifest-meta.qdocconf @@ -202,7 +202,7 @@ manifestmeta.thumbnail.attributes = "imageUrl:qthelp\://org.qt-project.qtdoc.$Q manifestmeta.thumbnail.names = "QtCore/Contiguous Cache Example" \ "QtCore/Custom Type Example" \ - "QtCore/JSON Save Game Example" \ + "QtCore/Saving and Loading a Game" \ "QtCore/Producer and Consumer using Semaphores" \ "QtCore/Producer and Consumer using Wait Conditions" \ "QtConcurrent/Word Count" \ diff --git a/examples/corelib/serialization/savegame/doc/src/savegame.qdoc b/examples/corelib/serialization/savegame/doc/src/savegame.qdoc index 14d99ccace..46fca15b62 100644 --- a/examples/corelib/serialization/savegame/doc/src/savegame.qdoc +++ b/examples/corelib/serialization/savegame/doc/src/savegame.qdoc @@ -4,7 +4,7 @@ /*! \example serialization/savegame \examplecategory {Data Processing & I/O} - \title JSON Save Game Example + \title Saving and Loading a Game \brief How to save and load a game using Qt's JSON or CBOR classes. diff --git a/src/corelib/doc/src/cbor.qdoc b/src/corelib/doc/src/cbor.qdoc index 1358480b8a..1357d2ac11 100644 --- a/src/corelib/doc/src/cbor.qdoc +++ b/src/corelib/doc/src/cbor.qdoc @@ -36,7 +36,7 @@ In addition, CBOR can add a "tag" to extend the meaning of the type. The container types can contain basic types, string-like types and containers. - \sa {Parsing and displaying CBOR data}, {Convert Example}, {JSON Save Game Example} + \sa {Parsing and displaying CBOR data}, {Convert Example}, {Saving and Loading a Game} \section1 The CBOR Classes diff --git a/src/corelib/doc/src/json.qdoc b/src/corelib/doc/src/json.qdoc index 27959d4714..98ae202cfa 100644 --- a/src/corelib/doc/src/json.qdoc +++ b/src/corelib/doc/src/json.qdoc @@ -73,8 +73,7 @@ A valid JSON document is either an array or an object, so a document always starts with a square or curly bracket. - \sa {JSON Save Game Example} - + \sa {Saving and Loading a Game} \section1 The JSON Classes @@ -82,5 +81,4 @@ \l{Implicit Sharing}{implicitly shared classes}. JSON support in Qt consists of these classes: - */ diff --git a/src/corelib/serialization/qcborarray.cpp b/src/corelib/serialization/qcborarray.cpp index 9cb6406eb8..d79f503bb3 100644 --- a/src/corelib/serialization/qcborarray.cpp +++ b/src/corelib/serialization/qcborarray.cpp @@ -32,7 +32,7 @@ using namespace QtCbor; conversions. \sa QCborValue, QCborMap, QJsonArray, QList, {Parsing and displaying CBOR data}, - {Convert Example}, {JSON Save Game Example} + {Convert Example}, {Saving and Loading a Game} */ /*! diff --git a/src/corelib/serialization/qcborcommon.cpp b/src/corelib/serialization/qcborcommon.cpp index b9a97f7cbc..42955b009f 100644 --- a/src/corelib/serialization/qcborcommon.cpp +++ b/src/corelib/serialization/qcborcommon.cpp @@ -181,7 +181,7 @@ QDataStream &operator>>(QDataStream &ds, QCborSimpleType &st) \sa QCborStreamReader, QCborValue, QCborParserError, {Parsing and displaying CBOR data}, {Convert Example}, - {JSON Save Game Example} + {Saving and Loading a Game} */ /*! diff --git a/src/corelib/serialization/qcbormap.cpp b/src/corelib/serialization/qcbormap.cpp index 39811a2ced..ab4e78ebb9 100644 --- a/src/corelib/serialization/qcbormap.cpp +++ b/src/corelib/serialization/qcbormap.cpp @@ -49,7 +49,7 @@ using namespace QtCbor; \sa QCborArray, QCborValue, QJsonDocument, QVariantMap, {Parsing and displaying CBOR data}, {Convert Example}, - {JSON Save Game Example} + {Saving and Loading a Game} */ /*! diff --git a/src/corelib/serialization/qcborstreamreader.cpp b/src/corelib/serialization/qcborstreamreader.cpp index 8f999c7118..903ef690a0 100644 --- a/src/corelib/serialization/qcborstreamreader.cpp +++ b/src/corelib/serialization/qcborstreamreader.cpp @@ -152,7 +152,7 @@ static_assert(int(QCborStreamReader::Invalid) == CborInvalidType); \sa QCborStreamWriter, QCborValue, QXmlStreamReader, {Parsing and displaying CBOR data}, {Convert Example}, - {JSON Save Game Example} + {Saving and Loading a Game} */ /*! diff --git a/src/corelib/serialization/qcborstreamwriter.cpp b/src/corelib/serialization/qcborstreamwriter.cpp index 2f0de49654..795b7875de 100644 --- a/src/corelib/serialization/qcborstreamwriter.cpp +++ b/src/corelib/serialization/qcborstreamwriter.cpp @@ -177,7 +177,7 @@ Q_DECLARE_TYPEINFO(CborEncoder, Q_PRIMITIVE_TYPE); \sa QCborStreamReader, QCborValue, QXmlStreamWriter {Parsing and displaying CBOR data}, {Convert Example}, - {JSON Save Game Example} + {Saving and Loading a Game} */ class QCborStreamWriterPrivate diff --git a/src/corelib/serialization/qcborvalue.cpp b/src/corelib/serialization/qcborvalue.cpp index a1c56dfca4..1d58f6487d 100644 --- a/src/corelib/serialization/qcborvalue.cpp +++ b/src/corelib/serialization/qcborvalue.cpp @@ -192,7 +192,7 @@ Q_DECL_UNUSED static constexpr quint64 MaximumPreallocatedElementCount = aspects, its API is identical to QCborValue. \sa QCborArray, QCborMap, QCborStreamReader, QCborStreamWriter, - QJsonValue, QJsonDocument, {Convert Example}, {JSON Save Game Example} + QJsonValue, QJsonDocument, {Convert Example}, {Saving and Loading a Game} {Parsing and displaying CBOR data} */ diff --git a/src/corelib/serialization/qjsonarray.cpp b/src/corelib/serialization/qjsonarray.cpp index 96947cf2d0..b4e6631e36 100644 --- a/src/corelib/serialization/qjsonarray.cpp +++ b/src/corelib/serialization/qjsonarray.cpp @@ -40,7 +40,7 @@ QT_BEGIN_NAMESPACE You can convert the array to and from text based JSON through QJsonDocument. - \sa {JSON Support in Qt}, {JSON Save Game Example} + \sa {JSON Support in Qt}, {Saving and Loading a Game} */ /*! diff --git a/src/corelib/serialization/qjsondocument.cpp b/src/corelib/serialization/qjsondocument.cpp index 1ba4b5952c..ac4ae4876d 100644 --- a/src/corelib/serialization/qjsondocument.cpp +++ b/src/corelib/serialization/qjsondocument.cpp @@ -44,7 +44,7 @@ QT_BEGIN_NAMESPACE and isObject(). The array or object contained in the document can be retrieved using array() or object() and then read or manipulated. - \sa {JSON Support in Qt}, {JSON Save Game Example} + \sa {JSON Support in Qt}, {Saving and Loading a Game} */ diff --git a/src/corelib/serialization/qjsonobject.cpp b/src/corelib/serialization/qjsonobject.cpp index d4f702e46e..c1dfabe95f 100644 --- a/src/corelib/serialization/qjsonobject.cpp +++ b/src/corelib/serialization/qjsonobject.cpp @@ -43,7 +43,7 @@ QT_BEGIN_NAMESPACE You can convert the object to and from text based JSON through QJsonDocument. - \sa {JSON Support in Qt}, {JSON Save Game Example} + \sa {JSON Support in Qt}, {Saving and Loading a Game} */ /*! @@ -851,7 +851,7 @@ QJsonObject::const_iterator QJsonObject::constFindImpl(T key) const Multiple iterators can be used on the same object. Existing iterators will however become dangling once the object gets modified. - \sa QJsonObject::const_iterator, {JSON Support in Qt}, {JSON Save Game Example} + \sa QJsonObject::const_iterator, {JSON Support in Qt}, {Saving and Loading a Game} */ /*! \typedef QJsonObject::iterator::difference_type @@ -1121,7 +1121,7 @@ QJsonObject::const_iterator QJsonObject::constFindImpl(T key) const Multiple iterators can be used on the same object. Existing iterators will however become dangling if the object gets modified. - \sa QJsonObject::iterator, {JSON Support in Qt}, {JSON Save Game Example} + \sa QJsonObject::iterator, {JSON Support in Qt}, {Saving and Loading a Game} */ /*! \typedef QJsonObject::const_iterator::difference_type diff --git a/src/corelib/serialization/qjsonparser.cpp b/src/corelib/serialization/qjsonparser.cpp index 8d86639833..0a2be759c9 100644 --- a/src/corelib/serialization/qjsonparser.cpp +++ b/src/corelib/serialization/qjsonparser.cpp @@ -59,7 +59,7 @@ using namespace QtMiscUtils; \brief The QJsonParseError class is used to report errors during JSON parsing. - \sa {JSON Support in Qt}, {JSON Save Game Example} + \sa {JSON Support in Qt}, {Saving and Loading a Game} */ /*! diff --git a/src/corelib/serialization/qjsonvalue.cpp b/src/corelib/serialization/qjsonvalue.cpp index f21faa25f6..29da9058f2 100644 --- a/src/corelib/serialization/qjsonvalue.cpp +++ b/src/corelib/serialization/qjsonvalue.cpp @@ -96,7 +96,7 @@ static QJsonValue::Type convertFromCborType(QCborValue::Type type) noexcept \li \l {QJsonObject}::operator[](const QString & key) const \endlist - \sa {JSON Support in Qt}, {JSON Save Game Example} + \sa {JSON Support in Qt}, {Saving and Loading a Game} */ /*!