On Mon, Jan 13, 2014 at 10:11 PM, Rodrigo Severo < [email protected]> wrote:
> Pre-configured imports in Import Dive Log File for CSV files should also > be cleared when the field separator > is changed by the user. > Signed-off-by:Rodrigo Severo <[email protected]> > --- > qt-ui/divelogimportdialog.cpp | 6 ++++++ > qt-ui/divelogimportdialog.h | 1 + > 2 files changed, 7 insertions(+) > > diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp > index ebf7508..765690a 100644 > --- a/qt-ui/divelogimportdialog.cpp > +++ b/qt-ui/divelogimportdialog.cpp > @@ -37,6 +37,7 @@ DiveLogImportDialog::DiveLogImportDialog(QStringList > *fn, QWidget *parent) : > 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->CSVSeparator, SIGNAL(currentIndexChanged(const > QString&)), this, SLOT(unknownImports(const QString&))); > } > > DiveLogImportDialog::~DiveLogImportDialog() > @@ -107,6 +108,11 @@ void DiveLogImportDialog::unknownImports(int arg1) > unknownImports(); > } > > +void DiveLogImportDialog::unknownImports(const QString & arg1) > +{ > + unknownImports(); > +} > + > void DiveLogImportDialog::unknownImports() > { > ui->knownImports->setCurrentIndex(0); > diff --git a/qt-ui/divelogimportdialog.h b/qt-ui/divelogimportdialog.h > index d8cedab..87563f4 100644 > --- a/qt-ui/divelogimportdialog.h > +++ b/qt-ui/divelogimportdialog.h > @@ -23,6 +23,7 @@ private slots: > void on_knownImports_currentIndexChanged(int index); > void unknownImports(int); > void unknownImports(bool); > + void unknownImports(const QString &); > Didn't liked it. Why not promote unknownImports() to a slot, remove the unknownImports(const QString& ) and connect like this: connect(ui->CSVSeparator, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(unknownImports())); The signal parameters doesn't need to exists on the Slots parameters, this simplifies code since the only thing you are doing on the const QString& arg1 version is to call the one without string. > private: > void unknownImports(); > -- > 1.8.3.2 > > _______________________________________________ > subsurface mailing list > [email protected] > http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface >
_______________________________________________ subsurface mailing list [email protected] http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface
