summaryrefslogtreecommitdiffstats
path: root/examples/corelib/serialization/convert/debugtextdumper.h
Commit message (Collapse)AuthorAgeFilesLines
* Eliminate duplicate overrides of Converter methods in exampleEdward Welbourne2023-11-011-3/+0
| | | | | | | | | | | | | | | | | The Out-only converters shouldn't need to implement loadFile(), as it shouldn't be called - a converter is not used for input unless it says it supports input. At the same time, provide the "ground state" implementations for optionsHelp(), outputOptions() and probeFile() to save the trivial implementations the need to duplicate one another. In the process, make the handling of loadFile()'s outputConverter more consistent among those that do implement it. Always set outputConverter if it's initially null (the caller does assert this). Pick-to: 6.6 6.5 Task-number: QTBUG-111228 Change-Id: I856d12c791d1f8e0accdb7dd1412d493117b2302 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Turn Converter::Direction into a QFlags enumEdward Welbourne2023-09-081-1/+1
| | | | | | | | | 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>
* Serialization converter example: const-ify the Converter typeEdward Welbourne2023-09-081-7/+8
| | | | | | | | | | | | 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>
* Separate streaming dumper and converter in the convert exampleEdward Welbourne2023-09-081-0/+22
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>