On Tue, Jan 14, 2014 at 12:16 PM, Dirk Hohndel <[email protected]> wrote:

>
> Rodrigo - can you submit a patch with the suggested change, please?
>

Tomaz,


Is that it?


Rodrigo
From 60083667974964406b44958d222685ed855f6ca5 Mon Sep 17 00:00:00 2001
From: Rodrigo Severo <[email protected]>
Date: Tue, 14 Jan 2014 15:49:05 -0200
Subject: [PATCH] Pre-configured imports for CSV files should also be cleared
 when the field separator is set

Pre-configured imports in Import Dive Log File for CSV files should also be cleared when the
field separator is changed by the user.

Promoted DiveLogImportDialog::unknownImports to slot as per Canabrava's suggestion and
Hohndel's request.

Signed-off-by:Rodrigo Severo <[email protected]>
---
 qt-ui/divelogimportdialog.cpp | 31 +++++++++++--------------------
 qt-ui/divelogimportdialog.h   |  5 +----
 2 files changed, 12 insertions(+), 24 deletions(-)

diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp
index 2a7166a..7934902 100644
--- a/qt-ui/divelogimportdialog.cpp
+++ b/qt-ui/divelogimportdialog.cpp
@@ -27,16 +27,17 @@ DiveLogImportDialog::DiveLogImportDialog(QStringList *fn, QWidget *parent) :
 	ui->CSVSeparator->addItem(";");
 	ui->knownImports->setCurrentIndex(1);
 
-	connect(ui->CSVDepth, SIGNAL(valueChanged(int)), this, SLOT(unknownImports(int)));
-	connect(ui->CSVTime, SIGNAL(valueChanged(int)), this, SLOT(unknownImports(int)));
-	connect(ui->CSVTemperature, SIGNAL(valueChanged(int)), this, SLOT(unknownImports(int)));
-	connect(ui->temperatureCheckBox, SIGNAL(clicked(bool)), this, SLOT(unknownImports(bool)));
-	connect(ui->CSVpo2, SIGNAL(valueChanged(int)), this, SLOT(unknownImports(int)));
-	connect(ui->po2CheckBox, SIGNAL(clicked(bool)), this, SLOT(unknownImports(bool)));
-	connect(ui->CSVcns, SIGNAL(valueChanged(int)), this, SLOT(unknownImports(int)));
-	connect(ui->cnsCheckBox, SIGNAL(clicked(bool)), this, SLOT(unknownImports(bool)));
-	connect(ui->CSVstopdepth, SIGNAL(valueChanged(int)), this, SLOT(unknownImports(int)));
-	connect(ui->stopdepthCheckBox, SIGNAL(clicked(bool)), this, SLOT(unknownImports(bool)));
+	connect(ui->CSVDepth, SIGNAL(valueChanged(int)), this, SLOT(unknownImports()));
+	connect(ui->CSVTime, SIGNAL(valueChanged(int)), this, SLOT(unknownImports()));
+	connect(ui->CSVTemperature, SIGNAL(valueChanged(int)), this, SLOT(unknownImports()));
+	connect(ui->temperatureCheckBox, SIGNAL(clicked(bool)), this, SLOT(unknownImports()));
+	connect(ui->CSVpo2, SIGNAL(valueChanged(int)), this, SLOT(unknownImports()));
+	connect(ui->po2CheckBox, SIGNAL(clicked(bool)), this, SLOT(unknownImports()));
+	connect(ui->CSVcns, SIGNAL(valueChanged(int)), this, SLOT(unknownImports()));
+	connect(ui->cnsCheckBox, SIGNAL(clicked(bool)), this, SLOT(unknownImports()));
+	connect(ui->CSVstopdepth, SIGNAL(valueChanged(int)), this, SLOT(unknownImports()));
+	connect(ui->stopdepthCheckBox, SIGNAL(clicked(bool)), this, SLOT(unknownImports()));
+	connect(ui->CSVSeparator, SIGNAL(currentIndexChanged(int)), this, SLOT(unknownImports()));
 }
 
 DiveLogImportDialog::~DiveLogImportDialog()
@@ -97,16 +98,6 @@ void DiveLogImportDialog::on_knownImports_currentIndexChanged(int index)
 	ui->CSVSeparator->blockSignals(false);
 }
 
-void DiveLogImportDialog::unknownImports(bool arg1)
-{
-	unknownImports();
-}
-
-void DiveLogImportDialog::unknownImports(int arg1)
-{
-	unknownImports();
-}
-
 void DiveLogImportDialog::unknownImports()
 {
 	ui->knownImports->setCurrentIndex(0);
diff --git a/qt-ui/divelogimportdialog.h b/qt-ui/divelogimportdialog.h
index d8cedab..7c37790 100644
--- a/qt-ui/divelogimportdialog.h
+++ b/qt-ui/divelogimportdialog.h
@@ -21,12 +21,9 @@ public:
 private slots:
 	void on_buttonBox_accepted();
 	void on_knownImports_currentIndexChanged(int index);
-	void unknownImports(int);
-	void unknownImports(bool);
-
-private:
 	void unknownImports();
 
+private:
 	bool selector;
 	QStringList fileNames;
 	Ui::DiveLogImportDialog *ui;
-- 
1.8.3.2

_______________________________________________
subsurface mailing list
[email protected]
http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to