mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 02:50:46 -06:00
Move all settings logic to the preferences dialog
Read and write the settings only from the preferences dialog. Remove all the copies of some settings which were stored in nearly every dialog class individually. Simplify the settings dialog code by removing all those not really needed slots.
This commit is contained in:
@@ -5,12 +5,12 @@
|
||||
#include "ExportCsvDialog.h"
|
||||
#include "ui_ExportCsvDialog.h"
|
||||
#include "sqlitedb.h"
|
||||
#include "PreferencesDialog.h"
|
||||
|
||||
ExportCsvDialog::ExportCsvDialog(DBBrowserDB* db, const QString& deflocation, QWidget* parent)
|
||||
ExportCsvDialog::ExportCsvDialog(DBBrowserDB* db, QWidget* parent)
|
||||
: QDialog(parent),
|
||||
ui(new Ui::ExportCsvDialog),
|
||||
pdb(db),
|
||||
defaultLocation(deflocation)
|
||||
pdb(db)
|
||||
{
|
||||
// Create UI
|
||||
ui->setupUi(this);
|
||||
@@ -32,7 +32,7 @@ void ExportCsvDialog::accept()
|
||||
QString fileName = QFileDialog::getSaveFileName(
|
||||
this,
|
||||
tr("Choose a filename to export data"),
|
||||
defaultLocation,
|
||||
PreferencesDialog::getSettingsValue("db", "defaultlocation").toString(),
|
||||
tr("Text files(*.csv *.txt)"));
|
||||
|
||||
// Only if the user hasn't clicked the cancel button
|
||||
|
||||
Reference in New Issue
Block a user