Improve CSV importer
ClosedPublic

Authored by tbaumgart on Jul 29 2018, 3:04 PM.

Details

Summary
  • Make the CSV importer to run as a modal dialog of the application as

other importers do. This avoids a whole bunch of problems.

  • Combine the Finish and Import button into a single "Import CSV" button

on the last page of the wizard.

  • In case 'Skip setup' is marked on the first page, the wizard stops on

the last page and does not automatically start importing.

BUG: 396759

Test Plan

Tested single file import and web-connect import

Diff Detail

Repository
R261 KMyMoney
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
tbaumgart requested review of this revision.Jul 29 2018, 3:04 PM
tbaumgart created this revision.
wojnilowicz accepted this revision.Jul 29 2018, 3:36 PM
wojnilowicz added inline comments.
kmymoney/plugins/csv/import/csvimporter.cpp
80–81

QString::endsWith can use Qt::CaseSensitivity, so no need for QString::toLower.

kmymoney/plugins/csv/import/csvwizard.cpp
65

Where is that deleted afer finished work?

I see it's not because your change but maybe it wouldn't be difficult to delete it somewhere.

310

Typo.

This revision is now accepted and ready to land.Jul 29 2018, 3:36 PM
tbaumgart updated this revision to Diff 38711.Jul 29 2018, 3:51 PM
  • Changes due to review
tbaumgart requested review of this revision.Jul 29 2018, 3:52 PM
tbaumgart marked 3 inline comments as done.
wojnilowicz accepted this revision.Jul 29 2018, 4:16 PM

It's as good as before.

kmymoney/plugins/csv/import/csvimporter.cpp
80–81

I would check on "filename" and not "f.fileName()" and would do that outside of this conditional.

kmymoney/plugins/csv/import/csvwizard.cpp
72

Isn't this taking ownership of m_wiz, so there is no need to delete it in this class desctructor? Please read more here.

361

Typo as well. I think it should be programmatically.

This revision is now accepted and ready to land.Jul 29 2018, 4:16 PM
tbaumgart marked 3 inline comments as done.Jul 29 2018, 4:51 PM
tbaumgart added inline comments.
kmymoney/plugins/csv/import/csvwizard.cpp
72

Good catch. I was looking for something like that but did not spot it.

tbaumgart edited the summary of this revision. (Show Details)Jul 29 2018, 4:56 PM
This revision was automatically updated to reflect the committed changes.
tbaumgart marked an inline comment as done.