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

List:       kde-frameworks-devel
Subject:    Re: D26127: Simplify cppType method: Return Early, Use a Map and Assert.
From:       Tomaz Canabrava <tcanabrava () kde ! org>
Date:       2019-12-23 23:55:52
Message-ID: CACk01_zG+buMXMZRtAN9287X1ScyY7d+u_7NUCv5VOzhRaVbfQ () mail ! gmail ! com
[Download RAW message or body]

doing that as we speak.

On Mon, Dec 23, 2019 at 9:52 PM Kevin Ottens <noreply@phabricator.kde.org>
wrote:

> ervin added a comment. View Revision <https://phabricator.kde.org/D26127>
>
> In D26127#582398 <https://phabricator.kde.org/D26127#582398>, @tcanabrava
> <https://phabricator.kde.org/p/tcanabrava/> wrote:
>
> In D26127#582296 <https://phabricator.kde.org/D26127#582296>, @ervin
> <https://phabricator.kde.org/p/ervin/> wrote:
>
> Those data structure look really similar to the ones you introduced in
> param() for D26126 <https://phabricator.kde.org/D26126>. It looks like
> we'll end up with a Q_GLOBAL_STATIC or such instead of code duplication.
>
> it's similar but the values are different, the other one is for
> parameters, this one for return types, so on the other one we have const
> QList<QUrl> & and here is just QList<QUrl>.
> I tougth in a way to make them both be the same, but I couldn't find a
> way, since some elements will not have the const & in both cases, like
> int, uint, double, I prefered to keep the maps separated.
>
> Well sure, it can't be shared "as is", clearly there's a richer type
> missing to tie it all together. This could actually be the start of a
> domain model in that application.
>
> *REPOSITORY*
> R237 KConfig
>
> *REVISION DETAIL*
> https://phabricator.kde.org/D26127
>
> *To: *tcanabrava, ervin
> *Cc: *ervin, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham,
> bruns
>

[Attachment #3 (text/html)]

<div dir="ltr">doing that as we speak.<br></div><br><div class="gmail_quote"><div \
dir="ltr" class="gmail_attr">On Mon, Dec 23, 2019 at 9:52 PM Kevin Ottens &lt;<a \
href="mailto:noreply@phabricator.kde.org">noreply@phabricator.kde.org</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"><table><tbody><tr><td>ervin added a comment. \
</td><td><a style="text-decoration:none;padding:4px 8px;margin:0px 8px \
8px;float:right;color:rgb(70,76,92);font-weight:bold;border-radius:3px;background-colo \
r:rgb(247,247,249);background-image:linear-gradient(rgb(255,255,255),rgb(241,240,241));display:inline-block;border:1px \
solid rgba(71,87,120,0.2)" href="https://phabricator.kde.org/D26127" \
target="_blank">View Revision</a></td></tr></tbody></table><br><div><div><blockquote \
style="border-left:3px solid \
rgb(140,152,184);color:rgb(107,116,140);font-style:italic;margin:4px 0px \
12px;padding:8px 12px;background-color:rgb(248,249,252)"> <div \
style="font-style:normal;padding-bottom:4px">In <a \
href="https://phabricator.kde.org/D26127#582398" \
style="background-color:rgb(231,231,231);border-color:rgb(231,231,231);border-radius:3px;padding:0px \
4px;font-weight:bold;color:black;text-decoration:none" \
target="_blank">D26127#582398</a>, <a \
href="https://phabricator.kde.org/p/tcanabrava/" \
style="color:rgb(25,85,141);background-color:rgb(241,247,255);border:1px solid \
transparent;border-radius:3px;font-weight:bold;padding:0px 4px" \
target="_blank">@tcanabrava</a> wrote:</div> <div \
style="margin:0px;padding:0px;border:0px none;color:rgb(107,116,140)"><blockquote \
style="border-left:3px solid \
rgb(140,152,184);color:rgb(107,116,140);font-style:italic;margin:4px 0px \
12px;padding:8px 12px;background-color:rgb(248,249,252)"> <div \
style="font-style:normal;padding-bottom:4px">In <a \
href="https://phabricator.kde.org/D26127#582296" \
style="background-color:rgb(231,231,231);border-color:rgb(231,231,231);border-radius:3px;padding:0px \
4px;font-weight:bold;color:black;text-decoration:none" \
target="_blank">D26127#582296</a>, <a href="https://phabricator.kde.org/p/ervin/" \
style="color:rgb(25,85,141);background-color:rgb(241,247,255);border:1px solid \
transparent;border-radius:3px;font-weight:bold;padding:0px 4px" \
target="_blank">@ervin</a> wrote:</div> <div style="margin:0px;padding:0px;border:0px \
none;color:rgb(107,116,140)"><p>Those data structure look really similar to the ones \
you introduced in param() for <a href="https://phabricator.kde.org/D26126" \
style="background-color:rgb(231,231,231);border-color:rgb(231,231,231);border-radius:3px;padding:0px \
4px;font-weight:bold;color:black;text-decoration:none" target="_blank">D26126</a>. It \
looks like we&#39;ll end up with a Q_GLOBAL_STATIC or such instead of code \
duplication.</p></div> </blockquote>

<p>it&#39;s similar but the values are different, the other one is for parameters, \
this one for return types, so on the other one we have <tt \
style="background:rgb(235,235,235) none repeat scroll 0% 0%;font-size:13px">const \
QList&lt;QUrl&gt; &amp;</tt> and here is just <tt style="background:rgb(235,235,235) \
none repeat scroll 0% 0%;font-size:13px">QList&lt;QUrl&gt;</tt>.<br>  I tougth in a \
way to make them both be the same, but I couldn&#39;t find a way, since some elements \
will not have the <tt style="background:rgb(235,235,235) none repeat scroll 0% \
0%;font-size:13px">const &amp;</tt> in both cases, like int, uint, double, I prefered \
to keep the maps separated.</p></div> </blockquote>

<p>Well sure, it can&#39;t be shared &quot;as is&quot;, clearly there&#39;s a richer \
type missing to tie it all together. This could actually be the start of a domain \
model in that application.</p></div></div><br><div><strong>REPOSITORY</strong><div><div>R237 \
KConfig</div></div></div><br><div><strong>REVISION DETAIL</strong><div><a \
href="https://phabricator.kde.org/D26127" \
target="_blank">https://phabricator.kde.org/D26127</a></div></div><br><div><strong>To: \
</strong>tcanabrava, ervin<br><strong>Cc: </strong>ervin, kde-frameworks-devel, \
LeGast00n, GB_2, michaelh, ngraham, bruns<br></div></blockquote></div>



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

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