Git commit 93a87bc816bba1a5c09642981d4a0b3cab6b873b by Thomas Baumgart. Committed on 08/09/2018 at 10:08. Pushed by tbaumgart into branch '5.0'. Fix appending of file extension on export Only append the necessary file extension when the focus leaves the field and not on every key pressure. Harmonize behavior of CSV and QIF exporter. BUG: 395985 FIXED-IN: 5.0.2 M +3 -6 kmymoney/plugins/csv/export/csvexportdlg.cpp M +1 -1 kmymoney/plugins/qif/export/kexportdlg.cpp https://commits.kde.org/kmymoney/93a87bc816bba1a5c09642981d4a0b3cab6b873b diff --git a/kmymoney/plugins/csv/export/csvexportdlg.cpp b/kmymoney/plugin= s/csv/export/csvexportdlg.cpp index 4e087b256..660f36ca1 100644 --- a/kmymoney/plugins/csv/export/csvexportdlg.cpp +++ b/kmymoney/plugins/csv/export/csvexportdlg.cpp @@ -145,12 +145,9 @@ void CsvExportDlg::checkData(const QString& accountNam= e) bool okEnabled =3D false; = if (!ui->m_qlineeditFile->text().isEmpty()) { - QString strFile(ui->m_qlineeditFile->text()); - int dot =3D strFile.indexOf('.'); - if (dot !=3D -1) { - strFile.chop(strFile.length() - dot); - } - strFile +=3D QLatin1String(".csv"); + auto strFile(ui->m_qlineeditFile->text()); + if (!strFile.endsWith(QLatin1String(".csv"), Qt::CaseInsensitive)) + strFile.append(QLatin1String(".csv")); ui->m_qlineeditFile->setText(strFile); } QDate earliestDate(QDate(2500, 01, 01)); diff --git a/kmymoney/plugins/qif/export/kexportdlg.cpp b/kmymoney/plugins/= qif/export/kexportdlg.cpp index 1a4ac0048..3e177fe7e 100644 --- a/kmymoney/plugins/qif/export/kexportdlg.cpp +++ b/kmymoney/plugins/qif/export/kexportdlg.cpp @@ -88,7 +88,7 @@ KExportDlg::KExportDlg(QWidget *parent) connect(m_qbuttonCancel, &QAbstractButton::clicked, this, &QDialog::reje= ct); = // connect the change signals to the check slot and perform initial check - connect(m_qlineeditFile, SIGNAL(textChanged(QString)), this, SLOT(checkD= ata())); + connect(m_qlineeditFile, SIGNAL(editingFinished()), this, SLOT(checkData= ())); connect(m_qcheckboxAccount, SIGNAL(toggled(bool)), this, SLOT(checkData(= ))); connect(m_qcheckboxCategories, SIGNAL(toggled(bool)), this, SLOT(checkDa= ta())); connect(m_accountComboBox, SIGNAL(accountSelected(QString)), this, SLOT(= checkData(QString)));