forked from pool/virtualbox
48 lines
2.6 KiB
Diff
48 lines
2.6 KiB
Diff
|
Index: b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.cpp
|
||
|
===================================================================
|
||
|
--- a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.cpp
|
||
|
+++ b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.cpp
|
||
|
@@ -16,6 +16,7 @@
|
||
|
*/
|
||
|
|
||
|
/* Qt includes: */
|
||
|
+#include <QApplication>
|
||
|
#include <QHeaderView>
|
||
|
#include <QMenu>
|
||
|
#ifdef VBOX_WS_WIN
|
||
|
@@ -295,7 +296,7 @@ void UIGlobalSettingsExtension::sltAddPa
|
||
|
extensions << QString("*.%1").arg(VBoxExtPackFileExts[i]);
|
||
|
const QString strFilter = tr("Extension package files (%1)").arg(extensions.join(" "));
|
||
|
|
||
|
- const QStringList fileNames = QIFileDialog::getOpenFileNames(strBaseFolder, strFilter, this, strTitle, 0, true, true);
|
||
|
+ const QStringList fileNames = QIFileDialog::getOpenFileNames(strBaseFolder, strFilter, QApplication::activeWindow(), strTitle, 0, true, true);
|
||
|
|
||
|
QString strFilePath;
|
||
|
if (!fileNames.isEmpty())
|
||
|
Index: b/src/VBox/Frontends/VirtualBox/src/widgets/UIFilePathSelector.cpp
|
||
|
===================================================================
|
||
|
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIFilePathSelector.cpp
|
||
|
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIFilePathSelector.cpp
|
||
|
@@ -397,10 +397,10 @@ void UIFilePathSelector::selectPath()
|
||
|
switch (m_enmMode)
|
||
|
{
|
||
|
case Mode_File_Open:
|
||
|
- strSelPath = QIFileDialog::getOpenFileName(strInitDir, m_strFileDialogFilters, parentWidget(), m_strFileDialogTitle); break;
|
||
|
+ strSelPath = QIFileDialog::getOpenFileName(strInitDir, m_strFileDialogFilters, QApplication::activeWindow(), m_strFileDialogTitle); break;
|
||
|
case Mode_File_Save:
|
||
|
{
|
||
|
- strSelPath = QIFileDialog::getSaveFileName(strInitDir, m_strFileDialogFilters, parentWidget(), m_strFileDialogTitle);
|
||
|
+ strSelPath = QIFileDialog::getSaveFileName(strInitDir, m_strFileDialogFilters, QApplication::activeWindow(), m_strFileDialogTitle);
|
||
|
if (!strSelPath.isEmpty() && QFileInfo(strSelPath).suffix().isEmpty())
|
||
|
{
|
||
|
if (m_strFileDialogDefaultSaveExtension.isEmpty())
|
||
|
@@ -411,7 +411,7 @@ void UIFilePathSelector::selectPath()
|
||
|
break;
|
||
|
}
|
||
|
case Mode_Folder:
|
||
|
- strSelPath = QIFileDialog::getExistingDirectory(strInitDir, parentWidget(), m_strFileDialogTitle); break;
|
||
|
+ strSelPath = QIFileDialog::getExistingDirectory(strInitDir, QApplication::activeWindow(), m_strFileDialogTitle); break;
|
||
|
}
|
||
|
|
||
|
/* Do nothing if nothing chosen: */
|