diff options
| author | Tatiana Borisova <tatiana.borisova@qt.io> | 2024-12-04 16:40:28 +0100 |
|---|---|---|
| committer | Marc Mutz <marc.mutz@qt.io> | 2024-12-27 15:55:53 +0000 |
| commit | cfd3c84184c7be2e1e3c4a8be51a1a45cb61a18e (patch) | |
| tree | 55e8b07c3e1dcea3285634e2a46ee12caa7575f1 /src/tools/uic/cpp/cppwriteinitialization.cpp | |
| parent | 6e8274a2271e0826a316a51a1294bb30b76c56df (diff) | |
[QTextStream] Add operator bool() to QTextStream class
- Add operator bool() that checks whether the associated stream has
no error status. This operator makes it possible to use streams
and functions that return references to streams as loop conditions:
`while (stream >> text)`.
- Add testcase for testing the new operator.
- Update existing testcases that use or can use the status of stream
operations.
[ChangeLog][QtCore][QTextStream] Added implicit conversion to bool,
returning `status() == Ok`.
Task-number: QTBUG-52189
Change-Id: I21cbe02ec194078304bcfe606a6f2f572dd09c84
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/tools/uic/cpp/cppwriteinitialization.cpp')
0 files changed, 0 insertions, 0 deletions
