<div dir="ltr"><div><div>Hello, I am unable to figure out why I can't access public members(<a href="https://invent.kde.org/surajsloth/alkimia/-/blob/gsoc21/src/alkonlinequotesource.cpp#L195">https://invent.kde.org/surajsloth/alkimia/-/blob/gsoc21/src/alkonlinequotesource.cpp#L195</a>) of AlkOnlineQuoteSource::Private in kmymoney (kequitypriceupdatedlg.cpp) for an AlkOnlineQuoteSource object.<br><br></div>Regards<br></div>Suraj Kumar Mahto<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 12, 2021 at 8:18 PM Ralf Habacker <<a href="mailto:ralf.habacker@freenet.de">ralf.habacker@freenet.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Am 10.07.21 um 19:43 schrieb Suraj Kumar Mahto:<br>
> Hello,<br>
> <a href="https://invent.kde.org/office/kmymoney/-/blob/master/kmymoney/dialogs/kequitypriceupdatedlg.cpp#L274" rel="noreferrer" target="_blank">https://invent.kde.org/office/kmymoney/-/blob/master/kmymoney/dialogs/kequitypriceupdatedlg.cpp#L274</a><br>
> <<a href="https://invent.kde.org/office/kmymoney/-/blob/master/kmymoney/dialogs/kequitypriceupdatedlg.cpp#L274" rel="noreferrer" target="_blank">https://invent.kde.org/office/kmymoney/-/blob/master/kmymoney/dialogs/kequitypriceupdatedlg.cpp#L274</a>><br>
> Here |kmm-online-source is of type QString but AlkOnlineQuoteSource ctor<br>
> accepts const AlkOnlineQuoteSource& as argument(other ctors either<br>
> accepts no argument or more than one argument). For that should I write<br>
> a new ctor for that use case or modify the existing one or am I missing<br>
> something else?<br>
<br>
You should use the the constructor with two parameters and provide the<br>
currently used profile as second parameter<br>
<br>
<br>
AlkOnlineQuoteSource onlineSource(inv.value("kmm-online-source"),<br>
AlkOnlineQuotesProfileManager::instance().profiles().first());<br>
<br>
<br>
You need to ensure, that the used profile has been added to the<br>
AlkOnlineQuoteProfileManager. I suggest to do this in the KMyMoneyApp<br>
constructor<br>
<a href="https://invent.kde.org/office/kmymoney/-/blob/master/kmymoney/kmymoney.cpp#L1336" rel="noreferrer" target="_blank">https://invent.kde.org/office/kmymoney/-/blob/master/kmymoney/kmymoney.cpp#L1336</a><br>
<br>
as<br>
<br>
KMyMoneyApp::KMyMoneyApp(QWidget* parent) :<br>
KXmlGuiWindow(parent),<br>
d(new Private(this))<br>
{<br>
+ AlkOnlineQuotesProfileManager::instance().addProfile(new<br>
AlkOnlineQuotesProfile("kmymoney5",<br>
AlkOnlineQuotesProfile::Type::KMyMoney5, "kmymoney-quotes.knsrc"));<br>
+ AlkOnlineQuotesProfileManager::instance().setWebPageEnabled(true);<br>
<br>
Ralf<br>
</blockquote></div>