diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2021-05-02 02:27:51 +0200 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2021-05-16 17:22:30 +0200 |
commit | 5a1c3c29aca08e2add63bf294dc6dd0eb26cba4b (patch) | |
tree | ce23d5f9421870075fbfbc0e6e0c2610976c6824 /src/corelib/io/qurl.cpp | |
parent | 97228214bd63f37563669049bfa13d33efa97c48 (diff) |
QSaveFile: code tidies
Turn a cast into a call to QFlags::toInt(), plus a cast.
This is in preparation for a future patch that will remove the
implicit conversion. So why not casting directly? Because we don't
know if the QFlags is backed by int or uint, so using the wrong
cast won't compile; and we MUST pass unsigned because of the %x
specifier. Granted, one could've used a static_assert, but I prefer
a more flexible and idiomatic solution.
Change-Id: I32a3e0ed69b925e8d56268ec84d9e668ca540188
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qurl.cpp')
0 files changed, 0 insertions, 0 deletions