From 080b1bcc5ab38e2cd866e0672ff7ec960ebcef50 Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Mon, 14 Oct 2013 07:19:13 +0300 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/preferences.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'qt-ui/preferences.cpp') 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 #include +#include 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)"))); +} -- cgit v1.2.3-70-g09d2