Commit Graph

2081 Commits

Author SHA1 Message Date
Rym Bouabid
6ca8b61b6b Revamp Local Fortune Server Example: Revisit the documentation
Remove "Example" from the title.
Add \examplecategory {Connectivity}.

Task-number: QTBUG-117064
Pick-to: 6.6 6.5
Change-Id: I53c106f3429d5fe31ca7a8e8b821e4c1cafdda64
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-26 22:40:15 +02:00
Rym Bouabid
deec34c2fb Revamp Local Fortune Server Example: Declare sendFortune() as a method
Declare sendFortune() as a method because it's used in the connect()
overload taking a pointer-to-member-function, so it doesn't need help
from moc.

Q_OBJECT is not needed anymore as the "Server" class doesn't contain
signals and slots anymore.
Use Q_DECLARE_TR_FUNCTIONS Macro to allow tr() calls.

Task-number: QTBUG-117064
Pick-to: 6.6 6.5
Change-Id: Id197cb4c9f9df2102b769d028d8a0cae91e5c492
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-26 19:58:26 +02:00
Rym Bouabid
f77c7e1bf5 Revamp Local Fortune Server Example: Fix includes
Fix include order to respect the Coding Conventions.

Add needed includes to avoid Transitive includes.

Remove uneeded classes.

Remove QT_{BEGIN,END}_NAMESPACE because these are private Qt macros that
should not be used in the examples.

Task-number: QTBUG-117064
Pick-to: 6.6 6.5
Change-Id: Ie98d4fbddb18d5578e2651bdb4850527ff984582
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-26 19:58:26 +02:00
Rym Bouabid
7b63372c2f Revamp Local Fortune Client Example: Revisit the documentation
Remove "Example" from the title.
Add \examplecategory {Connectivity}.

Task-number: QTBUG-117036
Pick-to: 6.6 6.5
Change-Id: I3103669d1613e9832190b00cbe13f34ca5683ae1
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-26 19:58:25 +02:00
Rym Bouabid
ba98644180 Revamp Subscription example: Cretae QString using a Literal operator
Create QString at compile time using the literal operator""s instead of
using pointer to characters. This way, no conversion or allocation will
occur at runtime.

Task-number: QTBUG-117425
Pick-to: 6.6 6.5
Change-Id: I2a19d4fe1150aad7908d0c2a7215099bc0814e8d
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-22 21:02:45 +02:00
Rym Bouabid
9ed067e719 Revamp Subscription example: Fix includes
Add needed includes and remove uneeded includes.

Task-number: QTBUG-117425
Pick-to: 6.6 6.5
Change-Id: Iec4cc7a862aa164742e502f33447fa939dfb53ae
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-22 21:02:45 +02:00
Rym Bouabid
ed72a5d9e1 Revamp Bindable Subscription ex: Cretae QString using a Literal operator
Create QString at compile time using the literal operator""s instead of
using pointer to characters. This way, no conversion or allocation will
occur at runtime.

Task-number: QTBUG-117422
Pick-to: 6.6 6.5
Change-Id: I92eed0a371bf6383ddb1e938646029f1c24242bf
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-22 21:02:45 +02:00
Rym Bouabid
a69be76a30 Revamp Bindable Subscription ex: Fix includes
Reorder the includes following the coding conventions.

Remove unneeded includes.

Add needed includes to avoid Transitive includes.

Task-number: QTBUG-117422
Pick-to: 6.6 6.5
Change-Id: Iaf2b939bc160312de8aa4035da03b648cf76f17d
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-22 21:02:45 +02:00
Rym Bouabid
a0bd124a56 Revamp MIME Type Browser Ex: Revisit documentation
Remove "Example" from the title.
Add \examplecategory {Data Processing & I/O}.

Task-number: QTBUG-117146
Pick-to: 6.6 6.5
Change-Id: I6004f6708299886d6423325a551a9fd03a4a57df
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-22 20:21:23 +02:00
Rym Bouabid
e6c8c16afb Revamp MIME Type Browser Ex: Replace QObject by Q_DECLARE_TR_FUNCTIONS
When declaring MimetypeModel class, use Q_DECLARE_TR_FUNCTIONS Macro
instead of Q_OBJECT as we only need to call tr() functions.

Task-number: QTBUG-117146
Pick-to: 6.6 6.5
Change-Id: Ic7afd4a806d57ba2a651ebe129f3a91f35764354
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-22 20:21:23 +02:00
Rym Bouabid
00d8d566c6 Revamp MIME Type Browser Ex: Fix includes
Fix include order to respect the Coding Conventions.

Remove QT_{BEGIN,END}_NAMESPACE because these are private Qt macros that
should not be used in the examples.

Task-number: QTBUG-117146
Pick-to: 6.6 6.5
Change-Id: Iba7a4726180ec97d9654ed3b934baca8c1df0b5c
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-22 20:21:22 +02:00
Rym Bouabid
81857ad5c3 Revamp MIME Type Browser Ex: Fix too long lines
Fix code lines that do not respect the 100 characters limit rule.

Task-number: QTBUG-117146
Pick-to: 6.6 6.5
Change-Id: I9833e9a25a09833b3e0384c95af8a422d5aa4582
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-22 20:21:22 +02:00
Kai Köhne
f2ec221bd6 Make examples/bindableproperties a proper project
Both executables (subscription, bindablesubscription) are documented
as one project. Make sure that e.g. Qt Creator can also load this
project.

Fixes: QTBUG-117109
Pick-to: 6.5 6.6 6.6.0
Change-Id: I3912f2f76379940b02f3a57a7a55440a30366755
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-09-22 11:24:16 +02:00
Kai Köhne
802db7b523 Move rsslisting documentation to common dir
Move the rsslisting example documentation to examples/network/doc,
as it is done for all the other examples.

Fixes: QTBUG-117215
Pick-to: 6.5 6.6
Change-Id: If83202825afe8c69cb7fda0f84ca4832cf3d60e7
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-09-21 19:29:20 +00:00
Nicholas Bennett
e7847a3258 Docs: Update Links to Android Notifier Example
Added to the list of important links on the Android Platform home page.

Task-number: QTBUG-116780
Pick-to: 6.2 6.5 6.6 6.6.0
Change-Id: Id65a73d56bff0b288ebb1da098f6dbd8cbbe606e
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2023-09-21 17:28:43 +00:00
Rym Bouabid
badb0818f5 Revamp Local Fortune Client Example: Create QString instead of char *
Create QString at compile time using the literal operator""s instead of
using pointer to characters. This way, no conversion or allocation will
occur at runtime.

Task-number: QTBUG-117036
Pick-to: 6.6 6.5
Change-Id: I9942ef8efa38de9ac5975799249a65fcb4c966c9
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-20 20:36:31 +02:00
Rym Bouabid
b83736be05 Revamp Local Fortune Client Example: Fix include order
Fix include order to respect the Coding Conventions.

Include individual headers instead of "generic" headers.

Remove QT_{BEGIN,END}_NAMESPACE because these are private Qt macros that
should not be used in the examples.

Task-number: QTBUG-117036
Pick-to: 6.6 6.5
Change-Id: I33f9c54098824bfcfacac7c2f624554e105a291a
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-20 20:36:31 +02:00
Friedemann Kleint
62eaaeb4f5 hellogl2 example: Decouple mainwindow from window
The circular dependency cannot be ported to the corresponding Python
example.

Task-number: PYSIDE-2206
Pick-to: 6.6 6.5
Change-Id: I031b3fffdd7bd677d2fc55e132975a65f66ad128
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-09-18 22:45:36 +02:00
Friedemann Kleint
6f8398c8eb hellogl2 example: Streamline code
- Shorten menu code, add keyboard shortcuts and a quit action.
- Avoid calls to setLayout().
- Pass a parent to message boxes.
- Use the current screen for size calculation and consider
  availableGeometry().
- Prevent closing by the Escape key in docked mode.
- Split the dockUndock() function into dock()/undock() for clarity

Pick-to: 6.6 6.5
Change-Id: I007da3bff86ee3f2dc8f87379e5d2ba2f0f6f3d7
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-09-18 22:45:36 +02:00
Edward Welbourne
ccd59b2d4f Check input and output converters do support the relevant directions
It was previously possible to select an input-only converter for
output or an output-only converter for input. Also add a comment to
explain why failure to probe for the auto output converter isn't an
error, where failure to probe for the auto input converter is.

Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: I17dfbbee7d8b5a9629e66d0e1a6a4014b01a7262
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
2023-09-15 21:53:36 +02:00
Edward Welbourne
b9787a3985 Replace the image to illustrate the Serialization Converter
The old image wasted a log of space, was poorly legible and showed
little more than the cbordump example's illustration shows. Make
explicit that we get an initial CBOR file from savegame, show how it
can be converted to and from XML (idempotently) and still find space
to show the same thing as before. All more legibly and in a smaller
file.

Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: Ifc599d0dd646f136ccd2860ca927186d478b0fb9
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
2023-09-15 21:53:36 +02:00
Rym Bouabid
dcc0844056 Revamp Wait Conditions Example: Revisit the documentation
Change the title.

Remove the first \brief as there are two briefs in the document
so that the new title makes sense with the second brief in
"All Qt Examples" doc page.

Task-number: QTBUG-108860
Pick-to: 6.6 6.5
Change-Id: I1dec2ad107e3f9ff9b4203960ba54ae6d0d8c7b6
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Jaishree Vyas <jaishree.vyas@qt.io>
2023-09-13 20:45:18 +02:00
Rym Bouabid
0132ad0fde Revamp Shared Memory Example: Revisit the documentation
Remove "Example" from the title.
Extend the \brief.

Task-number: QTBUG-108858
Pick-to: 6.6 6.5
Change-Id: Ie8bd0c808503861027f80493c430e8ac1baada5f
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-13 20:45:17 +02:00
Rym Bouabid
976f30dc59 Revamp Shared Memory Example: Change the used QSharedMemory constructor
Use QSharedMemory(const QNativeIpcKey &key) constructor to port away
from the deprecated QSharedMemory(const QString &) constructor.

Task-number: QTBUG-108858
Pick-to: 6.6
Change-Id: I05615100f77f571fe32a3cf627c3df46baaa7f7a
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-13 20:45:17 +02:00
Rym Bouabid
0a62d4e4c0 Revamp Shared Memory Example: Fix formatting of the dialog.h header
"dialog.h" has inconsitent indentation.

Task-number: QTBUG-108858
Pick-to: 6.6 6.5
Change-Id: Id029d5ec63f3831e5ffcfe2b61d7e86896d4afb5
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-13 20:45:17 +02:00
Rym Bouabid
70815d31fe Revamp Semaphores example: Revisit the documentation
Change the title.

Remove the first \brief as there are two briefs in the document
so that the new title makes sense with the second brief in
"All Qt Examples" doc page.

Task-number: QTBUG-108859
Pick-to: 6.6 6.5
Change-Id: I8b0370c9a85179e172918231ae48a3c52845bf21
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-13 20:45:17 +02:00
Rym Bouabid
8643b52467 Revamp Shared Memory Example: Fix include order
Fix include order to respect the Coding Conventions.

Task-number: QTBUG-108858
Pick-to: 6.6 6.5
Change-Id: Ifecf7c60ca7135104631587b25e907cb1d39e25b
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-13 20:45:17 +02:00
Rym Bouabid
c4a1c171a3 Revamp Semaphores example: Replace const by constexpr when applicable
Replace const by constexpr when the value of the variable can be
calculated at compile-time.

Fixes: QTBUG-108859
Pick-to: 6.6 6.5
Change-Id: I4abf5162d521fc5dca0286a6254f86c57a473367
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-13 20:45:17 +02:00
Rym Bouabid
2a2275756b Revamp Mandelbrot example: Declare slots as methods instead
Declare zoom as a method because it's never used as a slot.

Declare updatePixmap as a method because it's used as a slot
as pointer-to-member-function, so it doesn't need help from moc.

Q_OBJECT is not needed anymore as the MandelbrotWidget class
doesn't contain signals ans slots anymore. It's replaced by
Q_DECLARE_TR_FUNCTIONS because we are using tr() function.

Fixes: QTBUG-108861
Pick-to: 6.6 6.5 6.6.0
Change-Id: I9a1d66711cdc9f0ca5a1bc6645f7e0ed3395645c
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-13 20:45:17 +02:00
Rym Bouabid
73a1ae6ea9 Revamp Mandelbrot example: Revisit the documentaton
Remove "Example" from the title.

Edit the link (title) to the documentation of Mandelbrot in QThread
documentation.

Delete the foreach related sentence as we are trying to port away from
this Qt pseudo-keyword.

Task-number: QTBUG-108861
Pick-to: 6.6 6.5 6.6.0
Change-Id: I6d04f24ac9c1fa1efe30a947c2da2ec7475edc80
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-13 20:45:16 +02:00
Rym Bouabid
7903a52d46 Revamp Mandelbrot example: Add const/constexpr when applicable
Add const in front of local variables when applicable.

Replace const by constexpr when the value of the variable can be
calculated at compile-time.

Task-number: QTBUG-108861
Pick-to: 6.6 6.5 6.6.0
Change-Id: I2cd1bc97aaa07d6d564731d9ccddba9a74e96fef
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-13 20:45:16 +02:00
Rami Potinkara
bbf0022d99 Update mobile example categories for Qt 6.6
Add mobile example category tags for the chosen examples.
Add for the ones that work best for both, Android and iOS.
Remove from the ones that do not work for both (at least yet).

Added
- hellogles3
Removed
- qtandroidnotifier (not iOS)

Fixes: QTBUG-116780
Pick-to: 6.6
Change-Id: Icb4c7ba1f22d4e67089a565071d83cdf8ec95896
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-09-12 00:44:11 +00:00
Edward Welbourne
e67f030600 Make \brief of Saving a Game to File actually brief
Specifically, prune it to fit on a single line.
Much of what it was saying was implicit in its context already.
It also neglected to mention CBOR's part in the story.

Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: I161a345cbbea8b706490fcbbadecd01b8946af31
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2023-09-11 17:56:51 +02:00
Topi Reinio
c46551e203 Doc: Fix documentation issues
Fix the following QDoc warnings:

* warning: Can't link to 'QRhiWidget::sampleConut'
* warning: Can't link to '`Q_NODISCARD_CTOR'
* warning: Invalid '\relates' (already a member of 'QEventLoopLocker')
* warning: Unknown command '\relatesalso'
* warning: Undocumented parameter 'separator' in QLocale::name()
* warning: clang couldn't find function when parsing \fn void QRhiWidget::framePresented()

In QAtomicPointer, work around the issue of QDoc not supporting
multiple \relates command for a single topic by adding a see-also
link to the global qYieldCpu() function.

Document the qvariant_cast() overload taking an rvalue reference.

Change-Id: I2528eee666149a97a14be059bbed537636d7aa0d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-09-11 15:56:10 +00:00
Rym Bouabid
36c2a9c514 Revamp Mandelbrot example: Fix too long lines
Fix code lines that do not respect the 100 characters limit rule.

Task-number: QTBUG-108861
Pick-to: 6.6 6.5
Change-Id: Idbc148b77b52a359d972233c977bbf2ccf9fcd24
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-11 15:05:47 +02:00
Rym Bouabid
ae0d545d31 Revamp Mandelbrot example: Use a Literal operator to create QString
Create QString at compile time using the literal operator""s instead of
using pointers to characters. This way, no conversion or allocation will
occur at runtime.

Task-number: QTBUG-108861
Pick-to: 6.6 6.5
Change-Id: I4fb51d74abbbfa08fb9fddfa90d8afcebd82a7e2
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-11 15:05:47 +02:00
Rym Bouabid
a4d7a4ccb3 Revamp Mandelbrot example: Fix Includes
Reorder the includes following the coding conventions.

Remove unneeded includes.

Add needed includes to avoid Transitive includes.

QGestureEvent is passed by a pointer in the gestureEvent method in
mandelbrotwidget.h. So, we do not really need to include the header.
Instead, forward-declare QGestureEvent class in a namespace.

Task-number: QTBUG-108861
Pick-to: 6.6 6.5
Change-Id: I48cfd663bf98350281ef7f31e6c0ef3e301a08ca
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-11 15:05:47 +02:00
Edward Welbourne
e53d0220da Turn Directions enum into an enum class in serialization converter
Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: Ie1f8ea5e2575427528c19875db7a8e4e27200aec
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-08 18:17:37 +02:00
Edward Welbourne
ad63118071 Turn Converter::Direction into a QFlags enum
This lets us testFlag() instead of using raw bit-field operations.

Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: I2c26e9a24728e81baa42cf14c75271a015460913
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-08 18:17:37 +02:00
Edward Welbourne
77fdd21cbf Serialization converter example: const-ify the Converter type
Its methods act on their parameters without changing the converter, so
can all be const. Its instances thus have no non-const members to
exercise, so can always be const.

Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: Ifcdb2f2159c2cfcd7998dd118aa327a32d299ccf
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-09-08 18:17:37 +02:00
Edward Welbourne
eaebb5c4d2 Separate streaming dumper and converter in the convert example
The two were in the same files but mostly unrelated to one another -
aside from the converter defaulting to the dumper for output.
Furthermore, the dumper actually uses QDebug and QTextStream, not
QDataStream; rename it to reflect this reality.

Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: Id65c120c319b555039f7fd186ed262f35ff5260a
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-09-08 18:17:37 +02:00
Edward Welbourne
d8517fb1ab corelib/serialization examples: clang-tidy and coding style clean-up
I overrode clang-tidy where it uglified or obfuscated and did some
clean-up provoked or made possible by its changes. Konrad pointed out,
in review, a constructor that could be = default; it could, in fact,
vanish entirely as a result.

Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: I9b7744a3abaa29e6f9e0689d0f6985bfd88cd0fd
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
2023-09-08 18:17:37 +02:00
Edward Welbourne
319b2e0e86 corelib/serialization examples: use string literals more
A couple more compilation units could use Qt::StringLiterals. Prefer
QL1SV for the code constants, to keep code small. Convert fpToString()
to take QL1SV instead of const char *, with suffix empty by default.
Also rearranged some spacing, some if it suggested by clang-tidy.

Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: I03d810d52afcd4a760d18f2553914b75af716b74
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2023-09-08 18:17:36 +02:00
Ahmad Samir
09b852b1d8 examples/: compile with QT_NO_CONTEXTLESS_CONNECT
Examples are usually a good way to get to know a new codebase, do not
teach developers who are new to Qt about the 3-arg connect() to begin
with.

Drive-by changes:
- `this` can't be implicitly captured with [=] in a lambda, instead
  capture by reference
- Update docs related to the sqlbrowser example; the overloaded signal
  it mentions has been removed in Qt6
- In the sqlbrowser example, rename addConnection() (no-arg) overload to
  openNewConnectionDialog, suggested in code review

Change-Id: I30c9f35bda4ac2f460d767ab7f84422ae3ed09f7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-09-08 19:17:36 +03:00
Safiyyah Moosa
a1d308a316 Doc: Add \examplecategory for qtconcurrent
Task-number: QTBUG-116071
Pick-to: 6.5 6.6
Change-Id: I7413a0d8085eec38e6480f6aa21c85620ca68f54
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2023-09-07 15:05:04 +02:00
Andreas Eliasson
ebd87ce2e5 Doc: Fix qdoc full stop warning in briefs
Add a full stop to the briefs to clear the following qdoc warnings:

* multistreamclient.qdoc: '\brief' statement does not end with
  a full stop.
* multistreamserver.qdoc: '\brief' statement does not end with
  a full stop.

Change-Id: If0e58bc100a595f3ee00c79c31ac19f8d9ee3ad9
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-09-05 21:14:59 +00:00
Edward Welbourne
40b07ee887 Minor tidies in example's XML converter
Make a local variable more local, set a variable only once its new
value is known to be valid.

Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: Ib6aa16e8c834f89c6ccc0715f20b0e5f0a7f3b6d
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
2023-09-05 22:41:35 +02:00
Edward Welbourne
d631f88804 Exploit C++17 init-statements in if to simplify a loop
The serialization converter example's text converter's loadFile() can
be made tidier by making the conditions within its loop into a chain.

Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: Ic82355eab7380a0c671b3805ca140958bb1c5af5
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
2023-09-05 22:41:35 +02:00
Edward Welbourne
833ed75b65 Update datastream converter to use Qt_6_0 instead of Qt_5_0
It was added in 5.12 and we've had a few upates since then.

Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: Iacb5368d4baa7d25f981bb0b8bd8d68b5461e17d
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-05 16:50:53 +02:00
Edward Welbourne
670f66eed3 Core serialization examples: spacing-only clang-format changes
Marc disagreed with clang-format on some, which are thus excluded.

Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: I1402274635dba866a8160a68211874cb11dcfa61
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-09-05 16:40:47 +02:00