Header cleanup / Link interface (was kdewidgets: fix build)

David Faure faure at kde.org
Fri Jul 19 18:11:32 UTC 2013


On Friday 19 July 2013 17:40:26 wojtask w wrote:
> there is a difference between "kf5/kdewidgets" and "kf5/stagging/kwidgets"

Oh, oops.

> But on the other hand I don't understand what "kdewidgets" is (my fix may
> be wrong).

It's the Qt designer plugin which makes all the kde widgets available in 
QtDesigner.

So I stand correct, it should indeed link to kde4support. Your fix is correct.
 
> BTW:
> I'm working on task "Find out what should be part of the link interface and
> what should not be".
>
> Before this task I want to cleanup public headers in tier1, tier2 and
> stagging.
> I have a question :)
> 1. What is preferred <QtCore/QString> or <QString>?

Both work, so it doesn't really matter.

The qt4 theory was "always use QtCore/QString in public headers so that the 
include path doesn't have to contain QtCore, for crappy build systems" (not 
qmake, not cmake, so stuff like hand-written Makefiles or MSVC projects).

However the qt4-to-qt5 porting taught us that this created problems 
(QtGui/QLabel became QtWidgets/QLabel == additional porting, for an issue that 
wouldn't happen if we just used <QLabel>).

So I don't know ;)

If you want to make it consistent, let's just do like Qt does....
Oh great -- they do something different: #include <QtCore/qstring.h>

Adding k-f-d to the CC. What do you guys think? Major search/replace, to 
follow Qt style?

> 2. It is good idea to use forward class declaration where it is possible?

Yes.

> 3. We have situation
> 
> a) framework A (public header use QObject and QWidget)
> -> LINK_PUBLIC only to Qt5::Widgets? or both Qt5::Core and Qt5::Widgets?

I don't know if deps become part of it. I guess not, but I'm no expert.
Stephen? Alex?

> b) framework B (public header use QObject and QWidget and classes from
> frameworkA)
> -> LINK_PUBLIC same as in framework A plus KF5::FrameworkA? or only to
> KF5::FrameworkA because Qt5::Core and Qt5::Widgets are linked in frameworkA?
> 
> in short LINK_PUBLIC libraries are propagated and LINK_PRIVATE are not? :)

Good questions. But I don't know anything about this myself :)

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5



More information about the Kde-frameworks-devel mailing list