Get rid of last non-standard piece in Linux FileDialog getter

This commit is contained in:
Ilya Fedin 2023-09-29 21:55:54 +04:00 committed by John Preston
parent 90fb59348c
commit 70f22293cf
2 changed files with 18 additions and 25 deletions

View File

@ -17,29 +17,4 @@ bool UnsafeShowOpenWith(const QString &filepath) {
}
} // namespace File
namespace FileDialog {
bool Get(
QPointer<QWidget> parent,
QStringList &files,
QByteArray &remoteContent,
const QString &caption,
const QString &filter,
::FileDialog::internal::Type type,
QString startFile) {
if (parent) {
parent = parent->window();
}
return ::FileDialog::internal::GetDefault(
parent,
files,
remoteContent,
caption,
filter,
type,
startFile);
}
} // namespace FileDialog
} // namespace Platform

View File

@ -43,5 +43,23 @@ inline void InitLastPath() {
::FileDialog::internal::InitLastPathDefault();
}
inline bool Get(
QPointer<QWidget> parent,
QStringList &files,
QByteArray &remoteContent,
const QString &caption,
const QString &filter,
::FileDialog::internal::Type type,
QString startFile) {
return ::FileDialog::internal::GetDefault(
parent,
files,
remoteContent,
caption,
filter,
type,
startFile);
}
} // namespace FileDialog
} // namespace Platform