WSL/SLF GitLab Repository

Commit 92fdb5b6 authored by Michael Reisecker's avatar Michael Reisecker
Browse files

Remove more instances of "DontUseNativeDialog"

Cf. updated issue 872 for the problem this brings, but it should at
least be consistent
parent f8656fe1
......@@ -129,9 +129,7 @@ void Logger::saveLog()
start_path = QDir::currentPath();
const QString date = QDateTime::currentDateTime().toString(Qt::DateFormat::ISODate).replace(":", "-");
const QString file_name = QFileDialog::getSaveFileName(this, tr("Save Log"), start_path + "/inishell_log_" + date + ".html",
tr("HTML files") + " (*.html *.htm);;" + tr("Text Files") + " (*.log *.txt *.dat);;" + tr("All Files") + " (*)", nullptr,
QFileDialog::DontUseNativeDialog); //native is all but smooth on GNOME
//QTBUG: https://bugreports.qt.io/browse/QTBUG-67866?focusedCommentId=408617&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-408617
tr("HTML files") + " (*.html *.htm);;" + tr("Text Files") + " (*.log *.txt *.dat);;" + tr("All Files") + " (*)", nullptr);
if (file_name.isNull())
return;
......
......@@ -268,9 +268,11 @@ void MainWindow::saveIniAs()
if (start_path.isEmpty())
start_path = QDir::currentPath();
//QFileDialog::DontUseNativeDialog is required to get rid of a bug, but then the mounts on macOS do not work (cf. issue 872):
//QTBUG: https://bugreports.qt.io/browse/QTBUG-67866?focusedCommentId=408617&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-408617
const QString filename( QFileDialog::getSaveFileName(this, tr("Save INI file"),
start_path + "/" + ini_filename_->text(),
"INI files (*.ini *.INI);;All files (*)", nullptr, QFileDialog::DontUseNativeDialog) );
"INI files (*.ini *.INI);;All files (*)", nullptr) );
if (filename.isNull()) //user cancelled out from the file picker
return;
bool perform_close = saveIni(filename);
......@@ -295,8 +297,7 @@ void MainWindow::openIni()
start_path = QDir::currentPath();
const QString path( QFileDialog::getOpenFileName(this, tr("Open INI file"), start_path,
"INI files (*.ini);;All files (*)", nullptr,
QFileDialog::DontUseNativeDialog | QFileDialog::DontConfirmOverwrite) );
"INI files (*.ini);;All files (*)", nullptr, QFileDialog::DontConfirmOverwrite) );
if (path.isNull()) //cancelled
return;
openIni(path);
......
......@@ -1158,8 +1158,7 @@ void PreviewWindow::openFile()
start_path = QDir::currentPath();
const QString path = QFileDialog::getOpenFileName(this, tr("Open INI file in preview"), start_path,
"INI files (*.ini);;All files (*)", nullptr,
QFileDialog::DontUseNativeDialog | QFileDialog::DontConfirmOverwrite);
"INI files (*.ini);;All files (*)", nullptr, QFileDialog::DontConfirmOverwrite);
if (path.isNull()) //cancelled
return;
addIniTab(path);
......@@ -1187,8 +1186,7 @@ void PreviewWindow::saveFileAs()
if (proposed_name.endsWith("*"))
proposed_name.chop(2);
const QString file_name = QFileDialog::getSaveFileName(this, tr("Save INI file"),
start_path + "/" + proposed_name, "INI files (*.ini *.INI);;All files (*)",
nullptr, QFileDialog::DontUseNativeDialog);
start_path + "/" + proposed_name, "INI files (*.ini *.INI);;All files (*)", nullptr);
if (file_name.isNull()) //cancelled
return;
writeIniToFile(file_name);
......
Supports Markdown
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