summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/gui/graphicsview
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2021-11-29 13:43:16 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2021-11-30 16:34:01 +0100
commit064c3d35e6809672323e8d912e9140ddd0ad48cd (patch)
tree2efc99f7fb086cbc9d84dd0f721ffa99746bb224 /tests/benchmarks/gui/graphicsview
parentdafed13eb563cb3060787468f1ea0f6ca5f39703 (diff)
Don't allocate an OCIDateTime object unless we're going to use it
The QOCIDateTime destructor carefully checks that dateTime is non-null before tidying it away, but the constructor allocated it independently of whether it was used, leaving it in a still-not-constructed state if the date-time it was to represent was invalid. Only allocate if the date-time is valid; and check against null when an OCIDateTime is being converted back to QDateTime. Add warnings if either allocation or construction fails. Incidentally use static_cast<> instead of C-casting (and split a long line) in the other place that allocates an OCIDateTime descriptor. Pick-to: 6.2 5.15 Task-number: QTBUG-98471 Change-Id: Idd5531d9f7101878802cb9a3a016d3fd80903543 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'tests/benchmarks/gui/graphicsview')
0 files changed, 0 insertions, 0 deletions