[Kmymoney-devel] Review Request: CSVImporter Plugin for KMyMoney
Allan Anderson
aganderson at ukonline.co.uk
Mon Aug 30 19:27:52 CEST 2010
> On 2010-08-29 23:38:39, Alvaro Soliverez wrote:
> > /trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/csvimporterdlg.h, line 46
> > <http://reviewboard.kde.org/r/5162/diff/1/?file=34757#file34757line46>
> >
> > we usually subclass the ui class, to work on it directly. Since you have to define it anyway, you save a lot of work.
>
> Allan Anderson wrote:
> I'm happy to do what you suggest, but, as I'm trying to learn, I like to know why! When you say, '"...you save a lot of work.", is this still the case when one uses QtDesigner and QtCreator to produce the UIs? I gather you don't use them.
>
> Do you mean for it to be similar to the way I wrote RedefineDlg?
>
> Alvaro Soliverez wrote:
> Yes, just like you defined RedefineDlg.
> The tool you use doesn't have anything to do with that, but I can tell from the amount of crap that got inserted into the ui files that you used Qt Designer for the interface. ;)
>
> Having a thousand calls to ui-> certainly doesn't make sense if subclassing is an option.
>
>
OK, thanks, and yes, now I see what you mean. Whilst I haven't yet totally got my head around it, I've done the necessary to both CsvImporterDlg and InvestmentDlg. I need to sit in a dark corner for a while.
Strangely, it uncovered the same bug in both classes that was there all along but not showing itself. All OK now.
> On 2010-08-29 23:38:39, Alvaro Soliverez wrote:
> > /trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/csvimporterdlg.h, line 56
> > <http://reviewboard.kde.org/r/5162/diff/1/?file=34757#file34757line56>
> >
> > If this can't be calculated dynamically, then a comment should be added that this number has to be increased when adding a new type of column
It's used initially to size an array for the column/field types. Once the file has been read in, I use the actual value.
> On 2010-08-29 23:38:39, Alvaro Soliverez wrote:
> > /trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/csvimporterdlg.h, line 58
> > <http://reviewboard.kde.org/r/5162/diff/1/?file=34757#file34757line58>
> >
> > if you subclass it, you don't need this one
Yes, that's gone.
> On 2010-08-29 23:38:39, Alvaro Soliverez wrote:
> > /trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/csvimporterdlg.h, line 173
> > <http://reviewboard.kde.org/r/5162/diff/1/?file=34757#file34757line173>
> >
> > unless there is a good reason, this class is complex enough to live in its own file.
> >
> > Also, IO suggest that it outputs data to csv. Isn't this import only?
Ok, and yes, you're right, there is no csv output, but 'IO' is self explanatory, whereas 'I' isn't! <BG> I'll find a better name.
- Allan
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/5162/#review7280
-----------------------------------------------------------
On 2010-08-26 21:40:39, Allan Anderson wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/5162/
> -----------------------------------------------------------
>
> (Updated 2010-08-26 21:40:39)
>
>
> Review request for kmymoney.
>
>
> Summary
> -------
>
> This is the revised version of the kmymoney csvimporter, which was originally submitted for me by Cristian. I was unable to find a way to update that, possibly because I was not the original submitter.
>
> Apart from addressing the original criticisms, I've added further improvements and spent quite a bit of time tightening its error checking.
>
> As well as the needed files, I've included csvimporterrc. This is not *needed* by the importer, as it will create one. However, as the user may wish to supplement the common basic transaction types , in order to cope with his own bank file layout idiosyncrasies, it may serve as an illustration or example. Where it should reside, I don't know. I would also wish to include some basic instructions, but in what form, and where?
>
> Apart from functioning as a plugin, it also can produce QIF files if required.
>
>
> Diffs
> -----
>
> /trunk/extragear/office/kmymoney/kmymoney/plugins/CMakeLists.txt 1168455
> /trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/CMakeLists.txt PRE-CREATION
> /trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/convdate.h PRE-CREATION
> /trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/convdate.cpp PRE-CREATION
> /trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/csvdatetest.h PRE-CREATION
> /trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/csvdatetest.cpp PRE-CREATION
> /trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/csvimporterdlg.h PRE-CREATION
> /trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/csvimporterdlg.cpp PRE-CREATION
> /trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/csvimporterdlg.ui PRE-CREATION
> /trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/csvimporterplugin.h PRE-CREATION
> /trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/csvimporterplugin.cpp PRE-CREATION
> /trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/csvimporterrc PRE-CREATION
> /trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/investmentdlg.h PRE-CREATION
> /trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/investmentdlg.cpp PRE-CREATION
> /trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/investmentdlg.ui PRE-CREATION
> /trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/kmm_csvimport.desktop PRE-CREATION
> /trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/kmm_csvimport.rc PRE-CREATION
> /trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/redefinedlg.h PRE-CREATION
> /trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/redefinedlg.cpp PRE-CREATION
> /trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/redefinedlgdecl.ui PRE-CREATION
>
> Diff: http://reviewboard.kde.org/r/5162/diff
>
>
> Testing
> -------
>
> I've run Krazy2 and astyle against it, also unit test.
>
> Operationally, I've imported CSV files of checking/savings accounts from a number of UK and other banks. Also, investment account CSV files from a UK and a US investment institution.
>
>
> Thanks,
>
> Allan
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kmymoney-devel/attachments/20100830/364ca019/attachment-0001.htm
More information about the KMyMoney-devel
mailing list