Helping porting to KF5 - to Aroonav

Aroonav Mishra aroonav11 at gmail.com
Fri Aug 7 18:40:19 UTC 2015


On 6 August 2015 at 20:36, Olivier Churlaud <olivier at churlaud.com> wrote:

> Hi,
>
> this mail is specially specially written for Aroonav, who is porting
> amarok to frameworks.
>
> I would like to help on Amarok for a while, and I think that helping to
> port to frameworks is a good start: it's a good way to see the whole code,
> and understand it's structure.
>
True that.

> So I read the previous mails on the mailing list and your blog. I read
> your last commits.
>
> Now I have some questions:
>  - how can I help you in a efficient way?
>
I guess that a plan (or a log of what everyone is working on can be
maintained on the porting wiki page) would be really nice to divide the
work efficiently but I honestly haven't put in a lot of thought on making a
plan to divide the workload (and I think it will be pretty tough to divide
the work). But right now the biggest concern is the code in src/context on
which the view of the application depends. I think that it will have to be
ported to QML as KF5 only supports widgets in QML. It will be really nice
if someone could pick up the task of porting the code in src/context
correctly. I had to comment out the codes that were dependent on the code
in src/context as they were causing linking errors and these need to be
uncommented as well.

>  - how do you basically work ? Do you take each file and change it so that
> it pass the compilation ? Or do you take all, say KIcon in the code and
> transform it to the corresponding piece of code in frameworks?
>
I have already ported the cmake files and hence there are a lot of errors
that come up when any file is compiled and that file has code dependent on
kdelibs4. I depend on these errors to guide me on what to do next. So what
I do is that, I look at an error and then I look at the porting docs or the
Qt5/KF5 docs on replacing that now erroneous piece of code. This has worked
pretty well for me until now.

It's easier to depend on the errors to guide you on what you have to do
next. So on doing so I might first edit the file in say src/browsers and
then edit a file in src/dialogs and so there is no link in the order in
which I edit the files. I believe that any other approach will take a lot
of your time to yield the same result.

Now there are some pieces of code that can be easily ported. You can easily
grep all the files for each piece of the old code and replace them by it's
correct equivalent. But this is only possible when you can grep the files
for *some *piece of code. I have encountered some pieces of code like code
that needs usage of QUrl::fromUserInput and QUrl::fromLocalFile(Because you
can't put a QString in a QUrl variable). In these cases I can't grep the
code-base and hence I have to completely depend on the errors to indicate
that these need to be used. This is the reason why the commit "Convert KUrl
to QUrl" was incomplete and I still make changes in more recent commits
that are actually part of the conversion of KUrl to QUrl.

We can depend on the really cool porting scripts in kde-dev-scripts/kf5
repository. But we have to careful on using these and we have to check that
the changes made by these scripts are in fact correct. The change from
KIcon to QIcon was the one made by a script.

So in short, right now I mostly depend on errors to make changes
continuously (like from KUrl to QUrl which is still incomplete although a
major part is done) OR I can easily grep some piece of code (if and
whenever possible) and change all its instances OR I depend on the scripts
(if the correct one is available). You have to be the judge on which is the
best way forward when you are porting the code.

> So basically, I'd like to help you, but I would need some directives.
> Since I'm not doing it in a GSoC context or whatever, I don't say I'll do
> lot of job in the next weeks, but I want to help, and give some time to
> Amarok.
>
> Thx for your answers.
>
> Cheers,
> Olivier
>
> --
> Olivier CHURLAUD
> Engineer Student at Ecole Centrale de Lyon
> in Dual Degree at TU Berlin, M.Sc. Elektrotechnik
> @: olivier at churlaud.com
> tel: +49 (0)1575-2931348
> in:  http://linkedin.com/in/olivierchurlaud
> web: http://olivier.churlaud.com
>
> _______________________________________________
> Amarok-devel mailing list
> Amarok-devel at kde.org
> https://mail.kde.org/mailman/listinfo/amarok-devel
>
I hope that I have answered your questions but please feel free to shoot me
a mail if I was not clear.

Cheers,
Aroonav.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/amarok-devel/attachments/20150808/54ae6e39/attachment.html>


More information about the Amarok-devel mailing list