summaryrefslogtreecommitdiffstats
path: root/qt-ui/preferences.cpp
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2013-10-14 07:19:13 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-10-14 13:14:09 -0700
commit080b1bcc5ab38e2cd866e0672ff7ec960ebcef50 (patch)
tree4bbc34ddf3351f114a9e4f9a4aebf66dcccbc48f /qt-ui/preferences.cpp
parent291ce1d9ac77f25f155cd671577170608affd257 (diff)
downloadsubsurface-080b1bcc5ab38e2cd866e0672ff7ec960ebcef50.tar.gz
Enable file selection dialog for preferences
This enabled a file selection dialog for selecting default log file under the preferences. [Dirk Hohndel: added missing declaration to .h file] Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/preferences.cpp')
-rw-r--r--qt-ui/preferences.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/qt-ui/preferences.cpp b/qt-ui/preferences.cpp
index e188cdba7..e5ddc558d 100644
--- a/qt-ui/preferences.cpp
+++ b/qt-ui/preferences.cpp
@@ -1,6 +1,7 @@
#include "preferences.h"
#include <QSettings>
#include <QDebug>
+#include <QFileDialog>
PreferencesDialog* PreferencesDialog::instance()
{
@@ -193,3 +194,9 @@ void PreferencesDialog::buttonClicked(QAbstractButton* button)
#undef SB
+
+void PreferencesDialog::on_chooseFile_clicked()
+{
+ QFileInfo fi(system_default_filename());
+ ui.defaultfilename->setText(QFileDialog::getOpenFileName(this, tr("Open Default Log File"), fi.absolutePath(), tr("XML Files (*.xml)")));
+}