Getting Includes Right

Elvis Angelaccio elvis.angelaccio at kdemail.net
Sat Apr 30 17:26:45 BST 2016


2016-04-30 18:14 GMT+02:00 Allen Winter <winter at kde.org>:
> On Saturday, April 30, 2016 05:37:27 PM Elvis Angelaccio wrote:
>> 2016-04-30 17:16 GMT+02:00 Allen Winter <winter at kde.org>:
>> >
>> > Howdy,
>> >
>> > Frederik sent me bug https://bugs.kde.org/show_bug.cgi?id=362363 for Krazy about
>> > how to include Qt headers in KDE code, as described at https://community.kde.org/Policies/Library_Code_Policy#Getting_.23includes_right
>> >
>> > I believe with K5 we decided that #include <QFoo> is correct and we should
>> > not be using #include <QtModule/QFoo> any longer.
>> >
>> > If so, I can edit the wiki accordingly.  I just wanted to double-check the policy.
>>
>>
>> What about something like #include <QtConcurrent/QtConcurrentRun> ?
>>
>> AFAIK it's currently not possible to just #include <QtConcurrentRun>.
>> Yet krazy complains about this (e.g. in [1]).
>>
>> Should this be fixed at the Qt level? (this looks like an
>> inconsistency on their side)
>> Should we just add //krazy:exclude comments?
>>
>> Or maybe krazy could just ignore QtConcurrent includes?
>>
> I can do that if needed. but smells more like something in the buildsystem
> isn't picking up the path to the QtConcurrent includes.  No idea if
> the problem is in Qt, ECM or the ark CMakeLists.txt.

It appears it was a bug in the ark CMakeLists.txt. We were not linking
to Qt5::Concurrent..
Sorry for the noise and kudos to krazy!


>
>
>> [1]: http://ebn.kde.org/krazy/reports/kde-4.x/kdeutils/ark/index.html
>
>




More information about the kde-core-devel mailing list