summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDaMichel <mw.pub@welter-4d.de>2016-07-29 18:51:23 +0200
committerDaMichel <mw.pub@welter-4d.de>2016-07-29 18:51:23 +0200
commit44428d4b5eeae78fd9cdedce840f7de2ddc6c6b2 (patch)
treedfdba7a6511de1ff3d1837772b8cfd8f8cfa195d
parent12d2080865958cc07d37dddd28240f40423fb292 (diff)
logging: file selection dialog can freeze. Therefore don't use native dialog?!
-rw-r--r--gui/options-dialog.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/gui/options-dialog.cpp b/gui/options-dialog.cpp
index 8987ba34..9dcb7879 100644
--- a/gui/options-dialog.cpp
+++ b/gui/options-dialog.cpp
@@ -174,7 +174,12 @@ void OptionsDialog::browse_datalogging_file()
QString filename = ui.tracklogging_filenameedit->text();
if (filename.isEmpty())
filename = QDir::currentPath();
- QString newfilename = QFileDialog::getSaveFileName(this, tr("Select Filename"), filename, tr("CSV File (*.csv)"));
+ /* Sometimes this function freezes the app before opening the dialog.
+ Might be related to https://forum.qt.io/topic/49209/qfiledialog-getopenfilename-hangs-in-windows-when-using-the-native-dialog/8
+ and be a known problem. Possible solution is to use the QFileDialog::DontUseNativeDialog flag.
+ Since the freeze is apparently random, I'm not sure it helped.
+ */
+ QString newfilename = QFileDialog::getSaveFileName(this, tr("Select Filename"), filename, tr("CSV File (*.csv)"), nullptr, QFileDialog::DontUseNativeDialog);
if (!newfilename.isEmpty())
ui.tracklogging_filenameedit->setText(newfilename);
}