forked from qt-creator/qt-creator
Utils: Pass dialog parent to Utils::* file dialog
Amends 3edc5673b5.
Turns out quite a few potential uses have other parents than
ICore::dialogParent().
Use a nullptr parent to mean ICore::dialogParent() to keep the
caller side simple.
Change-Id: Icfe1daafd710ae273d286679e0c8e2a3a27da552
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -138,23 +138,27 @@ public:
|
||||
#ifdef QT_WIDGETS_LIB
|
||||
static void setDialogParentGetter(const std::function<QWidget *()> &getter);
|
||||
|
||||
static FilePath getOpenFilePath(const QString &caption = {},
|
||||
static FilePath getOpenFilePath(QWidget *parent,
|
||||
const QString &caption,
|
||||
const FilePath &dir = {},
|
||||
const QString &filter = {},
|
||||
QString *selectedFilter = nullptr,
|
||||
QFileDialog::Options options = {});
|
||||
|
||||
static FilePath getSaveFilePath(const QString &caption = {},
|
||||
static FilePath getSaveFilePath(QWidget *parent,
|
||||
const QString &caption,
|
||||
const FilePath &dir = {},
|
||||
const QString &filter = {},
|
||||
QString *selectedFilter = nullptr,
|
||||
QFileDialog::Options options = {});
|
||||
|
||||
static FilePath getExistingDirectory(const QString &caption = {},
|
||||
static FilePath getExistingDirectory(QWidget *parent,
|
||||
const QString &caption,
|
||||
const FilePath &dir = {},
|
||||
QFileDialog::Options options = QFileDialog::ShowDirsOnly);
|
||||
|
||||
static FilePaths getOpenFilePaths(const QString &caption = {},
|
||||
static FilePaths getOpenFilePaths(QWidget *parent,
|
||||
const QString &caption,
|
||||
const FilePath &dir = {},
|
||||
const QString &filter = {},
|
||||
QString *selectedFilter = nullptr,
|
||||
|
||||
Reference in New Issue
Block a user