[Kmymoney-devel] WebPriceQuote object

Fernando Vilas fvilas at iname.com
Mon Sep 14 04:26:20 CEST 2009


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.

-- 
Thanks,
Fernando Vilas
fvilas at iname.com


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kmymoney-devel/attachments/20090913/e82c3769/attachment.sig 


More information about the KMyMoney-devel mailing list