KF5/Frameworks patch

Frederik Gladhorn frederik.gladhorn at theqtcompany.com
Wed Aug 26 16:24:25 UTC 2015


Hi Michael,

These can probably now be removed:
// krazy:exclude=qmethods
they warned about using Qt functions where KDE equivalents existed. Luckily 
these are mostly gone in KF5 :)

+# add_subdirectory(tests)
would deserve a warning ;)

+//XXX: A new version of qwt will make this unnecessary
+#define QT_STATIC_CONST static const
that looks scary... but I don't know anything about the code in question...

+//QT5TODO: Uniqueness like KUniqueApplication must now be implemented 
manually via dbus.
sounds like a fun challenge ;)

In simon/src/simonactionsui/runcommandviewprivate.cpp some of the indentation 
was change to 4 spaces which is inconsistent (of course I'd personally go with 
4 spaces everywhere...). The same in some other places. That might make 
porting patches between Qt 4 and 5 versions more difficult.

There are one or two spaces where you add empty lines or spaces, with my 
pedantic hat on, I'd rather see these not in the diff. Considering how tedious 
this kind of porting task is though, I won't complain :)

After looking over the patch, I decided to push it now so that it doesn't get 
lost, there is a kf5 branch in Simon now. I hope I didn't offend anyone with 
doing that :D
https://quickgit.kde.org/?p=simon.git&a=commit&h=3985635a503d3a9711a35cc5323cbdb89ed3d606

I hope you want to continue getting Simon to run with KF5, pure awesome so 
far!

Cheers,
Frederik



On Tuesday, August 04, 2015 10:27:42 PM Michael Abrahams wrote:
> Hello,
> 
> To learn more about the KDE frameworks I decided to port your application
> to KF5.  I think as far as these things go it was relatively
> straightforward.  I had very little to do that was not listed in these
> porting notes.
> 
> https://community.kde.org/Frameworks/Porting_Notes
> 
> This was the result of my attempting changes and running the porting
> scripts until everything compiled and worked successfully.  There were no
> intermediate stages which were successful.  So unfortunately I was not able
> to decompose this into smaller individual patches.
> 
> I am able to build, install and use Simon built with KF5/Frameworks.
> The major issues that remain are:
> 1) The Plasma widget needs to be significantly rewritten. I set USE_PLASMA
> = false for the time being.  Instructions for this are in the porting
> notes.  I am not familiar with QML so I could not do it myself.
> 2) All tests are turned off. I have not checked whether they can be
> compiled.
> 
> 3) Default configuration file locations may not work correctly.  There is a
> lot of code repetition with code like
> QStandardPaths::writableLocation(QStandardPaths::DataLocation) +
> QLatin1Char('/') + "model"));
> 
> and I think it would be better to refactor these calls before verifying
> everything or invoking the Kdelibs4ConfigMigrator.
> 
> 4) Quite a lot of simple additional migrations can be done.  KPushButton
> gives hundreds of warnings and I think it should be easy to port with a
> script.
> 
> I hope this is useful to you.
> 
> Best regards,
> Michael Abrahams
> 
> 
> P.S. have you considered setting up Phabricator? It is a very nice way to
> do code review and task management.  http://phabricator.kde.org



More information about the Kde-speech mailing list