GSoC 21 KMyMoney: Replacing member functions of WebPriceQuote

Suraj Kumar Mahto suraj.mahto49 at gmail.com
Fri Jul 30 09:29:17 BST 2021


Hello, I am unable to figure out why I can't access public members(
https://invent.kde.org/surajsloth/alkimia/-/blob/gsoc21/src/alkonlinequotesource.cpp#L195)
of AlkOnlineQuoteSource::Private in kmymoney (kequitypriceupdatedlg.cpp)
for an AlkOnlineQuoteSource object.

Regards
Suraj Kumar Mahto

On Mon, Jul 12, 2021 at 8:18 PM Ralf Habacker <ralf.habacker at freenet.de>
wrote:

> Am 10.07.21 um 19:43 schrieb Suraj Kumar Mahto:
> > Hello,
> >
> https://invent.kde.org/office/kmymoney/-/blob/master/kmymoney/dialogs/kequitypriceupdatedlg.cpp#L274
> > <
> https://invent.kde.org/office/kmymoney/-/blob/master/kmymoney/dialogs/kequitypriceupdatedlg.cpp#L274
> >
> > Here |kmm-online-source is of type QString but AlkOnlineQuoteSource ctor
> > accepts const AlkOnlineQuoteSource& as argument(other ctors either
> > accepts no argument or more than one argument). For that should I write
> > a new ctor for that use case or modify the existing one or am I missing
> > something else?
>
> You should use the the constructor with two parameters and provide the
> currently used profile as second parameter
>
>
>  AlkOnlineQuoteSource onlineSource(inv.value("kmm-online-source"),
> AlkOnlineQuotesProfileManager::instance().profiles().first());
>
>
> You need to ensure, that the used profile has been added to the
> AlkOnlineQuoteProfileManager. I suggest to do this in the KMyMoneyApp
> constructor
>
> https://invent.kde.org/office/kmymoney/-/blob/master/kmymoney/kmymoney.cpp#L1336
>
> as
>
> KMyMoneyApp::KMyMoneyApp(QWidget* parent) :
>     KXmlGuiWindow(parent),
>     d(new Private(this))
> {
> +  AlkOnlineQuotesProfileManager::instance().addProfile(new
> AlkOnlineQuotesProfile("kmymoney5",
> AlkOnlineQuotesProfile::Type::KMyMoney5, "kmymoney-quotes.knsrc"));
> +  AlkOnlineQuotesProfileManager::instance().setWebPageEnabled(true);
>
> Ralf
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-finance-apps/attachments/20210730/ac0f031e/attachment-0001.htm>


More information about the Kde-finance-apps mailing list