Commit 50d93a65 authored by Robert Loehning's avatar Robert Loehning Committed by hjk
Browse files

Provide parent to getOpenFileName() and getSaveFileName()



Change-Id: I839de363f426a57a522700df39e4f3b4ebfbb7ea
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent 38d4cc28
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/coreconstants.h> #include <coreplugin/coreconstants.h>
#include <coreplugin/editormanager/editormanager.h> #include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/icore.h>
namespace DiffEditor { namespace DiffEditor {
namespace Internal { namespace Internal {
...@@ -82,13 +83,13 @@ void DiffEditorPlugin::extensionsInitialized() ...@@ -82,13 +83,13 @@ void DiffEditorPlugin::extensionsInitialized()
void DiffEditorPlugin::diff() void DiffEditorPlugin::diff()
{ {
QString fileName1 = QFileDialog::getOpenFileName(0, QString fileName1 = QFileDialog::getOpenFileName(Core::ICore::dialogParent(),
tr("Select First File for Diff"), tr("Select First File for Diff"),
QString()); QString());
if (fileName1.isNull()) if (fileName1.isNull())
return; return;
QString fileName2 = QFileDialog::getOpenFileName(0, QString fileName2 = QFileDialog::getOpenFileName(Core::ICore::dialogParent(),
tr("Select Second File for Diff"), tr("Select Second File for Diff"),
QString()); QString());
if (fileName2.isNull()) if (fileName2.isNull())
......
...@@ -529,7 +529,7 @@ void FakeVimOptionPage::setPlainStyle() ...@@ -529,7 +529,7 @@ void FakeVimOptionPage::setPlainStyle()
void FakeVimOptionPage::openVimRc() void FakeVimOptionPage::openVimRc()
{ {
const QString fileName = QFileDialog::getOpenFileName(); const QString fileName = QFileDialog::getOpenFileName(Core::ICore::dialogParent());
if (!fileName.isNull()) if (!fileName.isNull())
m_ui.lineEditVimRcPath->setText(fileName); m_ui.lineEditVimRcPath->setText(fileName);
} }
......
...@@ -216,8 +216,8 @@ void GeneralSettingsPage::importBookmarks() ...@@ -216,8 +216,8 @@ void GeneralSettingsPage::importBookmarks()
{ {
m_ui->errorLabel->setVisible(false); m_ui->errorLabel->setVisible(false);
QString fileName = QFileDialog::getOpenFileName(0, tr("Import Bookmarks"), QString fileName = QFileDialog::getOpenFileName(Core::ICore::dialogParent(),
QDir::currentPath(), tr("Files (*.xbel)")); tr("Import Bookmarks"), QDir::currentPath(), tr("Files (*.xbel)"));
if (fileName.isEmpty()) if (fileName.isEmpty())
return; return;
...@@ -238,8 +238,8 @@ void GeneralSettingsPage::exportBookmarks() ...@@ -238,8 +238,8 @@ void GeneralSettingsPage::exportBookmarks()
{ {
m_ui->errorLabel->setVisible(false); m_ui->errorLabel->setVisible(false);
QString fileName = QFileDialog::getSaveFileName(0, tr("Save File"), QString fileName = QFileDialog::getSaveFileName(Core::ICore::dialogParent(),
QLatin1String("untitled.xbel"), tr("Files (*.xbel)")); tr("Save File"), QLatin1String("untitled.xbel"), tr("Files (*.xbel)"));
QLatin1String suffix(".xbel"); QLatin1String suffix(".xbel");
if (!fileName.endsWith(suffix)) if (!fileName.endsWith(suffix))
......
...@@ -1038,8 +1038,8 @@ void ProjectExplorerPlugin::loadAction() ...@@ -1038,8 +1038,8 @@ void ProjectExplorerPlugin::loadAction()
dir = isProject ? fn : QFileInfo(fn).absolutePath(); dir = isProject ? fn : QFileInfo(fn).absolutePath();
} }
QString filename = QFileDialog::getOpenFileName(0, tr("Load Project"), QString filename = QFileDialog::getOpenFileName(Core::ICore::dialogParent(),
dir, tr("Load Project"), dir,
d->m_projectFilterString); d->m_projectFilterString);
if (filename.isEmpty()) if (filename.isEmpty())
return; return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment