Make saveFile(char *, size) make an immediate copy of the data also for the case where we use a save file dialog. Previously it would make a copy after the file dialog was closed, but at that point the content pointer may be stale if the calling code did not keep it alive. This makes the behavior for the two save code paths be identical: a copy of the data will be made right away, before the function returns. This is also the only behavior which makes sense, since the function has no way of communicating to the caller when it is done with the data. Pick-to: 6.7 6.6 Change-Id: I890a4897f20251e9abbf90d0a4b96d8ba12d3740 Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io> Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io> (cherry picked from commit 4b324202433365ff43f623903beefc4286345839) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Description
Languages
C++
84.3%
HTML
4.9%
C
3.9%
CMake
3.6%
Objective-C++
2%
Other
0.8%