Simplify cppType method: Return Early, Use a Map and Assert.
AbandonedPublic

Authored by tcanabrava on Dec 20 2019, 7:13 PM.

Details

Reviewers
ervin
Test Plan

Recompiled and runned the unittests

Diff Detail

Repository
R237 KConfig
Branch
simplifyCppType
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 20094
Build 20112: arc lint + arc unit
tcanabrava created this revision.Dec 20 2019, 7:13 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptDec 20 2019, 7:13 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
tcanabrava requested review of this revision.Dec 20 2019, 7:13 PM
ervin requested changes to this revision.Dec 23 2019, 5:07 PM
ervin added a subscriber: ervin.

Those data structure look really similar to the ones you introduced in param() for D26126. It looks like we'll end up with a Q_GLOBAL_STATIC or such instead of code duplication.

This revision now requires changes to proceed.Dec 23 2019, 5:07 PM

Those data structure look really similar to the ones you introduced in param() for 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.

ervin added a comment.Dec 23 2019, 8:52 PM

Those data structure look really similar to the ones you introduced in param() for 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.

doing that as we speak.

tcanabrava abandoned this revision.Jan 29 2020, 5:28 PM