[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-finance-apps
Subject:    Re: GSoC 21 KMyMoney: Replacing member functions of WebPriceQuote
From:       Suraj Kumar Mahto <suraj.mahto49 () gmail ! com>
Date:       2021-07-10 17:55:20
Message-ID: CAEDvbQCbpjHCr5UrOuMb3X=pRqHM4ExzxdP0RO-UOt79t2pChA () mail ! gmail ! com
[Download RAW message or body]

Hello,
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?

I will surely publish my week 3-4-5 blog by tomorrow.

Regards
Suraj Kumar Mahto

On Sat, Jul 10, 2021 at 11:30 AM Thomas Baumgart <thb@net-bembel.de> wrote:

> On Freitag, 9. Juli 2021 21:07:36 CEST Suraj Kumar Mahto wrote:
>
> > >
> > > While writing the getter and setter for m_idSelector which is of type
> enum
> > > and defined in alkonlinequotesource.cpp whereas the declarations of the
> > > getters and setters are in alkonlinequotesource.h therefore I can't
> declare
> > > the function of type idSelector (enum). What should I do for that case?
> > >
> >
> > The solution I thought was to shift all the declarations to the header
> file
> > or shift the enum declaration to public in the header file or somewhere
> > else. Though, I am unsure about both.
>
> I would move the definition of the enum to public in AlkOnlineQuoteSource.
> After all, you use it in the public interface (getter and setter) and
> therefore
> it needs to be there.
>
> Check AlkValue::RoundingMethod how the definition can look like.
> You can use the definitions in AlkOnlineQuoteSource::Private without
> problems
> as they are publicly available.
>
> Hope that helps.
>
> --
>
> Regards
>
> Thomas Baumgart
>
> https://www.signal.org/       Signal, the better WhatsApp
> -------------------------------------------------------------
> Programmers never die: They just GOSUB without RETURN.
> -------------------------------------------------------------
>

[Attachment #3 (text/html)]

<div dir="ltr"><div><div>Hello,<br><a \
href="https://invent.kde.org/office/kmymoney/-/blob/master/kmymoney/dialogs/kequitypri \
ceupdatedlg.cpp#L274">https://invent.kde.org/office/kmymoney/-/blob/master/kmymoney/dialogs/kequitypriceupdatedlg.cpp#L274</a><br></div>Here \
<code><span style="font-family:arial,sans-serif">kmm-online-source is of type QString \
but AlkOnlineQuoteSource ctor accepts const AlkOnlineQuoteSource&amp; 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?<br><br></span></code></div><div><code><span \
style="font-family:arial,sans-serif">I will surely publish my week 3-4-5 blog by \
tomorrow.<br></span></code></div><div><code><span \
style="font-family:arial,sans-serif"><br></span></code></div><code><span \
style="font-family:arial,sans-serif">Regards<br>Suraj Kumar \
Mahto</span><br></code></div><br><div class="gmail_quote"><div dir="ltr" \
class="gmail_attr">On Sat, Jul 10, 2021 at 11:30 AM Thomas Baumgart &lt;<a \
href="mailto:thb@net-bembel.de">thb@net-bembel.de</a>&gt; 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">On Freitag, 9. Juli 2021 21:07:36 CEST Suraj Kumar \
Mahto wrote:<br> <br>
&gt; &gt;<br>
&gt; &gt; While writing the getter and setter for m_idSelector which is of type \
enum<br> &gt; &gt; and defined in alkonlinequotesource.cpp whereas the declarations \
of the<br> &gt; &gt; getters and setters are in alkonlinequotesource.h therefore I \
can&#39;t declare<br> &gt; &gt; the function of type idSelector (enum). What should I \
do for that case?<br> &gt; &gt;<br>
&gt; <br>
&gt; The solution I thought was to shift all the declarations to the header file<br>
&gt; or shift the enum declaration to public in the header file or somewhere<br>
&gt; else. Though, I am unsure about both.<br>
<br>
I would move the definition of the enum to public in AlkOnlineQuoteSource.<br>
After all, you use it in the public interface (getter and setter) and therefore<br>
it needs to be there.<br>
<br>
Check AlkValue::RoundingMethod how the definition can look like.<br>
You can use the definitions in AlkOnlineQuoteSource::Private without problems<br>
as they are publicly available.<br>
<br>
Hope that helps.<br>
<br>
-- <br>
<br>
Regards<br>
<br>
Thomas Baumgart<br>
<br>
<a href="https://www.signal.org/" rel="noreferrer" \
                target="_blank">https://www.signal.org/</a>           Signal, the \
                better WhatsApp<br>
-------------------------------------------------------------<br>
Programmers never die: They just GOSUB without RETURN.<br>
-------------------------------------------------------------<br>
</blockquote></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic