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

Provide parent to getOpenFileName() and getSaveFileName()

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