QFileDialog::getOpenFileContent: default new parent parameter

Amends 7c5cf8cae054954975a3e262f7fe3cd9897d67f4, which
removed the old function that didn't have any parent parameter
from the API, and added a new one with the parent parameter in
its stead.
However, to make sure that the new function is source compatible
with existing code, the parent parameter must be defaulted to
nullptr (which it already is in the new version of
saveFileContent).

Found during header review.

Change-Id: I3e734905be9788ae1b206c7a65328e604667f5e4
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit bed7788402fe0cab9eb36d37e9fff9e65b3fbfe6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Volker Hilsheimer 2024-01-24 13:17:26 +01:00 committed by Qt Cherry-pick Bot
parent 799139c519
commit 67272100fb

View File

@ -214,7 +214,7 @@ public:
static void getOpenFileContent(const QString &nameFilter,
const std::function<void(const QString &, const QByteArray &)> &fileContentsReady,
QWidget *parent);
QWidget *parent= nullptr);
static void saveFileContent(const QByteArray &fileContent,
const QString &fileNameHint,