Re: KF5 Conversion problems
- Date: Sun, 11 Mar 2018 11:45:03 -0400
- From: Michael Pyne <mpyne@xxxxxxx>
- Subject: Re: KF5 Conversion problems
On Sun, Mar 11, 2018 at 08:40:56PM +0700, Robin Atwood wrote:
> On Sunday 11 March 2018, Michael Pyne wrote:
> > > Yes, but the problem is the /usr/include/kdialog.h when it should be
> > > finding /usr/include/KF5/KDELibs4Support/kdialog.h. I have
> > > find_package(Qt5 Widgets... already.
> > Sounds like 2 problems I think.
> > First you need to fix the kdialog.h include in your software (or help
> > us identify where it is broken in the KF5 build system). Is your build
> > system already looking for KF5::KDELibs4Support, and marking your build
> > target as depending on that library?
> > Even with this incorrect kdialog, you would think it would still find
> > the right QDialog though. That's why it sounds like there's 2 problems.
> > I think the issue here is that there is no longer a QtGui/QDialog. The
> > right path would be in QtWidgets/QDialog with Qt5. It's better (and now
> > recommended) just to use a '#include <QDialog>' (and in general,
> > #include <QClassname>).
> I added KF5::KDE4Support to the target link libraries and that problem went
> away. This raises the problem: how do I know which link libraries I need? Is
> there a list of dependencies somewhere?
I don't know of anything quite that direct.
https://community.kde.org/Frameworks/Porting_Notes is the best
reference, but you should also look at the kde-dev-scripts git
repository (part of our "KDE SDK" offerings), under the kf5/ directory,
where a bunch of auto-migration scripts can be found.
Easier to automate the migration to the extent possible, then use the
Porting_Notes wiki page to get guidance on the rest. There will
undoubtedly still be a few mysteries to solve after that, especially if
you decide to also start migrating over to some of the new Qt5-based
features in the process. But between those two resources you can get
most, if not all, of a working migration completed.
- Michael Pyne