Rename the JSON Save Game Example to Saving a Game to File
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ö <topi.reinio@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This commit is contained in:
parent
0ec1024ff8
commit
32500a76a0
@ -202,7 +202,7 @@ manifestmeta.thumbnail.attributes = "imageUrl:qthelp\://org.qt-project.qtdoc.$Q
|
|||||||
|
|
||||||
manifestmeta.thumbnail.names = "QtCore/Contiguous Cache Example" \
|
manifestmeta.thumbnail.names = "QtCore/Contiguous Cache Example" \
|
||||||
"QtCore/Custom Type 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 Semaphores" \
|
||||||
"QtCore/Producer and Consumer using Wait Conditions" \
|
"QtCore/Producer and Consumer using Wait Conditions" \
|
||||||
"QtConcurrent/Word Count" \
|
"QtConcurrent/Word Count" \
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
/*!
|
/*!
|
||||||
\example serialization/savegame
|
\example serialization/savegame
|
||||||
\examplecategory {Data Processing & I/O}
|
\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.
|
\brief How to save and load a game using Qt's JSON or CBOR classes.
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
In addition, CBOR can add a "tag" to extend the meaning of the type. The
|
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.
|
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
|
\section1 The CBOR Classes
|
||||||
|
|
||||||
|
@ -73,8 +73,7 @@
|
|||||||
A valid JSON document is either an array or an object, so a document always starts
|
A valid JSON document is either an array or an object, so a document always starts
|
||||||
with a square or curly bracket.
|
with a square or curly bracket.
|
||||||
|
|
||||||
\sa {JSON Save Game Example}
|
\sa {Saving and Loading a Game}
|
||||||
|
|
||||||
|
|
||||||
\section1 The JSON Classes
|
\section1 The JSON Classes
|
||||||
|
|
||||||
@ -82,5 +81,4 @@
|
|||||||
\l{Implicit Sharing}{implicitly shared classes}.
|
\l{Implicit Sharing}{implicitly shared classes}.
|
||||||
|
|
||||||
JSON support in Qt consists of these classes:
|
JSON support in Qt consists of these classes:
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
@ -32,7 +32,7 @@ using namespace QtCbor;
|
|||||||
conversions.
|
conversions.
|
||||||
|
|
||||||
\sa QCborValue, QCborMap, QJsonArray, QList, {Parsing and displaying CBOR data},
|
\sa QCborValue, QCborMap, QJsonArray, QList, {Parsing and displaying CBOR data},
|
||||||
{Convert Example}, {JSON Save Game Example}
|
{Convert Example}, {Saving and Loading a Game}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -181,7 +181,7 @@ QDataStream &operator>>(QDataStream &ds, QCborSimpleType &st)
|
|||||||
|
|
||||||
\sa QCborStreamReader, QCborValue, QCborParserError,
|
\sa QCborStreamReader, QCborValue, QCborParserError,
|
||||||
{Parsing and displaying CBOR data}, {Convert Example},
|
{Parsing and displaying CBOR data}, {Convert Example},
|
||||||
{JSON Save Game Example}
|
{Saving and Loading a Game}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -49,7 +49,7 @@ using namespace QtCbor;
|
|||||||
|
|
||||||
\sa QCborArray, QCborValue, QJsonDocument, QVariantMap,
|
\sa QCborArray, QCborValue, QJsonDocument, QVariantMap,
|
||||||
{Parsing and displaying CBOR data}, {Convert Example},
|
{Parsing and displaying CBOR data}, {Convert Example},
|
||||||
{JSON Save Game Example}
|
{Saving and Loading a Game}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -152,7 +152,7 @@ static_assert(int(QCborStreamReader::Invalid) == CborInvalidType);
|
|||||||
|
|
||||||
\sa QCborStreamWriter, QCborValue, QXmlStreamReader,
|
\sa QCborStreamWriter, QCborValue, QXmlStreamReader,
|
||||||
{Parsing and displaying CBOR data}, {Convert Example},
|
{Parsing and displaying CBOR data}, {Convert Example},
|
||||||
{JSON Save Game Example}
|
{Saving and Loading a Game}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -177,7 +177,7 @@ Q_DECLARE_TYPEINFO(CborEncoder, Q_PRIMITIVE_TYPE);
|
|||||||
|
|
||||||
\sa QCborStreamReader, QCborValue, QXmlStreamWriter
|
\sa QCborStreamReader, QCborValue, QXmlStreamWriter
|
||||||
{Parsing and displaying CBOR data}, {Convert Example},
|
{Parsing and displaying CBOR data}, {Convert Example},
|
||||||
{JSON Save Game Example}
|
{Saving and Loading a Game}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class QCborStreamWriterPrivate
|
class QCborStreamWriterPrivate
|
||||||
|
@ -192,7 +192,7 @@ Q_DECL_UNUSED static constexpr quint64 MaximumPreallocatedElementCount =
|
|||||||
aspects, its API is identical to QCborValue.
|
aspects, its API is identical to QCborValue.
|
||||||
|
|
||||||
\sa QCborArray, QCborMap, QCborStreamReader, QCborStreamWriter,
|
\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}
|
{Parsing and displaying CBOR data}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
|
|
||||||
You can convert the array to and from text based JSON through QJsonDocument.
|
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}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -44,7 +44,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
and isObject(). The array or object contained in the document can be retrieved using
|
and isObject(). The array or object contained in the document can be retrieved using
|
||||||
array() or object() and then read or manipulated.
|
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}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
|
|
||||||
You can convert the object to and from text based JSON through QJsonDocument.
|
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
|
Multiple iterators can be used on the same object. Existing iterators will however
|
||||||
become dangling once the object gets modified.
|
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
|
/*! \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
|
Multiple iterators can be used on the same object. Existing iterators
|
||||||
will however become dangling if the object gets modified.
|
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
|
/*! \typedef QJsonObject::const_iterator::difference_type
|
||||||
|
@ -59,7 +59,7 @@ using namespace QtMiscUtils;
|
|||||||
|
|
||||||
\brief The QJsonParseError class is used to report errors during JSON parsing.
|
\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}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -96,7 +96,7 @@ static QJsonValue::Type convertFromCborType(QCborValue::Type type) noexcept
|
|||||||
\li \l {QJsonObject}::operator[](const QString & key) const
|
\li \l {QJsonObject}::operator[](const QString & key) const
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
\sa {JSON Support in Qt}, {JSON Save Game Example}
|
\sa {JSON Support in Qt}, {Saving and Loading a Game}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
Loading…
Reference in New Issue
Block a user