[Kmymoney-devel] WebPriceQuote object
Alvaro Soliverez
asoliverez at gmail.com
Wed Sep 16 01:33:11 CEST 2009
On Mon, Sep 14, 2009 at 7:51 AM, Alvaro Soliverez <asoliverez at gmail.com>wrote:
>
>
> On Sun, Sep 13, 2009 at 11:26 PM, Fernando Vilas <fvilas at iname.com> wrote:
>
>> Hi,
>>
>> I have made some progress on getting quotes working again, but I have a
>> few
>> questions that hopefully can be answered by someone who understands this
>> object better than I do.
>>
>> There are several code paths for non-interactive executables, controlled
>> by
>> checking "if (! kapp)". kapp is always true, whether it is set to false
>> in
>> main() in kmymoney2/kmymoneytest.cpp or not. In the interest of
>> simplicity
>> and testability, I would like to remove these paths, leaving only the path
>> followed when kapp is true. This also fixes the "fix for windows" warning
>> in
>> WebPriceQuote::launchNative(). Any objections, or things I should
>> consider?
>>
>> WebPriceQuote::launchNative() has a branch for executing a local file.
>> There
>> is a separate class for handling the Perl Finance::Quote script, so I
>> don't
>> really know how to test this branch. Does anyone have an example, or
>> would
>> you suggest removing this branch, and creating a class similar to the one
>> for
>> Finance::Quote if/when more scripts are added?
>>
>> WebPriceQuote::download() and related functions are private, and a
>> reimplementation of parts of KIO::NetAccess. Before I change the code to
>> just
>> call KIO::NetAccess::download(), does the original reason for the
>> reimplementation still make sense? So far, I have commented out the bulk
>> of
>> WebPriceQuote::download(), and just call the NetAccess version internally.
>>
>> As of right now, things seems to be working, both in the test driver, and
>> the
>> main app. The test driver retrieves from Yahoo (US, UK, Currency), and
>> Finance::Quote, but fails on the Globe & Mail and MSN. I have not built
>> tests
>> for the remaining sources, but I probably will, just to make things easier
>> in
>> the future.
>>
>> If you want to see the changes, I can send a patch, or go ahead and commit
>> the
>> changes. Don't forget to define PERFORM_ONLINE_TESTS, to see these tests.
>>
>>
> Thomas may have the best info about this.
> @Thomas, do you remember why any of these decisions were made at the time?
> Were you involved in any of this back then?
> I know there are some things in reports which I would have done
> differently, so this might be the case.
>
> If Thomas doesn't remember, Fernando, you can reassess, make sure the test
> cases cover enough of the practical cases and go with your solution.
>
> Regards,
> Alvaro
>
I guess no one is left who has worked in the original code. My take on this
would be, if what you are doing will cut cruft out of the code, then go
ahead. It is a fairly simple testcase, albeit with multiple providers, and
there is always time to restore some of the code later if you find a big
problem.
So, go ahead and commit it.
I think that was the functionality I was missing to start testing KMM4 for
everyday use. :p
Regards,
Alvaro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kmymoney-devel/attachments/20090915/9abb2e58/attachment.htm
More information about the KMyMoney-devel
mailing list