Rename Convert Example to Serialization Converter

The old name didn't say what sort of thing it was converting; and our
guidelines for examples discourage using the word Example in the
title. Also reword the description of the tool in the command-line
parser and an assertion.

Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: I6f52f5227362b4b807c8aabfd2103287af42bca0
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
This commit is contained in:
Edward Welbourne 2023-09-01 16:40:26 +02:00
parent 33b714c64a
commit a9c47dde50
9 changed files with 11 additions and 11 deletions

View File

@ -5,7 +5,7 @@
\example serialization/convert
\examplecategory {Data Processing & I/O}
\meta tag {network}
\title Convert Example
\title Serialization Converter
\brief The Convert example demonstrates how to convert between different
serialization formats.

View File

@ -91,7 +91,7 @@ int main(int argc, char *argv[])
outputFormats.prepend("auto"_L1);
QCommandLineParser parser;
parser.setApplicationDescription("Qt file format conversion tool"_L1);
parser.setApplicationDescription("Qt serialization format conversion tool"_L1);
parser.addHelpOption();
QCommandLineOption inputFormatOption(QStringList{ "I"_L1, "input-format"_L1 });
@ -154,9 +154,9 @@ int main(int argc, char *argv[])
const Converter *outconv = prepareConverter(parser.value(outputFormatOption),
Converter::Direction::Out, &output);
// now finally perform the conversion
// Now finally perform the conversion:
QVariant data = inconv->loadFile(&input, outconv);
Q_ASSERT_X(outconv, "Converter Tool",
Q_ASSERT_X(outconv, "Serialization Converter",
"Internal error: converter format did not provide default");
outconv->saveFile(&output, data, parser.values(optionOption));
return EXIT_SUCCESS;

View File

@ -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}, {Saving and Loading a Game}
\sa {Parsing and displaying CBOR data}, {Serialization Converter}, {Saving and Loading a Game}
\section1 The CBOR Classes

View File

@ -32,7 +32,7 @@ using namespace QtCbor;
conversions.
\sa QCborValue, QCborMap, QJsonArray, QList, {Parsing and displaying CBOR data},
{Convert Example}, {Saving and Loading a Game}
{Serialization Converter}, {Saving and Loading a Game}
*/
/*!

View File

@ -180,7 +180,7 @@ QDataStream &operator>>(QDataStream &ds, QCborSimpleType &st)
validating a CBOR stream.
\sa QCborStreamReader, QCborValue, QCborParserError,
{Parsing and displaying CBOR data}, {Convert Example},
{Parsing and displaying CBOR data}, {Serialization Converter},
{Saving and Loading a Game}
*/

View File

@ -48,7 +48,7 @@ using namespace QtCbor;
will not undo.
\sa QCborArray, QCborValue, QJsonDocument, QVariantMap,
{Parsing and displaying CBOR data}, {Convert Example},
{Parsing and displaying CBOR data}, {Serialization Converter},
{Saving and Loading a Game}
*/

View File

@ -151,7 +151,7 @@ static_assert(int(QCborStreamReader::Invalid) == CborInvalidType);
a the QIDOevice that now has more data available (see setDevice()).
\sa QCborStreamWriter, QCborValue, QXmlStreamReader,
{Parsing and displaying CBOR data}, {Convert Example},
{Parsing and displaying CBOR data}, {Serialization Converter},
{Saving and Loading a Game}
*/

View File

@ -176,7 +176,7 @@ Q_DECLARE_TYPEINFO(CborEncoder, Q_PRIMITIVE_TYPE);
\endlist
\sa QCborStreamReader, QCborValue, QXmlStreamWriter
{Parsing and displaying CBOR data}, {Convert Example},
{Parsing and displaying CBOR data}, {Serialization Converter},
{Saving and Loading a Game}
*/

View File

@ -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}, {Saving and Loading a Game}
QJsonValue, QJsonDocument, {Serialization Converter}, {Saving and Loading a Game}
{Parsing and displaying CBOR data}
*/