Amarok/Development/KF5port: Difference between revisions

From KDE Community Wiki
(→‎General: update for the kf5 branch)
 
(11 intermediate revisions by 3 users not shown)
Line 5: Line 5:
We are still in the first part now i.e the current aim is to let Amarok compile by using KF5::KDELibs4Support(with LOTS and LOTS of depreciated warnings).
We are still in the first part now i.e the current aim is to let Amarok compile by using KF5::KDELibs4Support(with LOTS and LOTS of depreciated warnings).


# Restoring build on Qt5/KF5: Port of cmake files and all code, so everything builds at least again by using KF5::KDELibs4Support. In this part the primary focus is on building it back again.    <span style="background:orange">INCOMPLETE</span>
# Restoring build on Qt5/KF5 [Out of context folder]: Port of cmake files and all code, so everything builds at least again by using KF5::KDELibs4Support. In this part the primary focus is on building it back again.    <span style="background:Green">DONE</span>
# All tests should pass after the above has been done.    <span style="background:salmon">TODO</span>
# Port the context folder to QML  <span style="background:salmon">TODO</span>
# All tests should pass after the above has been done.    <span style="background:orange">IN PROGRESS</span>
# Porting away from KF5::KDELibs4Support.    <span style="background:salmon">TODO</span>
# Porting away from KF5::KDELibs4Support.    <span style="background:salmon">TODO</span>


== General ==
== General ==
The commits containing the ongoing port of Amarok to Qt5/KF5 are present in the [https://projects.kde.org/projects/extragear/multimedia/amarok/repository/show?rev=kf5 kf5 branch].
The commits containing the ongoing port of Amarok to Qt5/KF5 are made to the [https://projects.kde.org/projects/extragear/multimedia/amarok/repository/show?rev=kf5 kf5 branch].
 
== Todo overview ==
* The inclusions of header should be reorganize to follow the rule <QXxxx>, then <KXxxx>, then "Xxxx.h" and follow the alphabetical order.
* While porting to QUrl, a lot of conversion to QString are done with <code>.path()</code> or worse <code>.toDisplayString()</code>. All must be changed to <code>.toLocalFile()</code> if its a local path. The best thing would be to keep them as QUrl.
* While porting some KUrl to QUrl, some methods were <code>method(KUrl)</code> and used as <code>method(myString)</code> with <code>myString</code> being a <code>QString</code>. It doesn't work anymore: now the method is used as <code>method( QUrl(myString) )</code> which is not so nice, although it compiles.
* In the tests, move:
    bool receivedDone = QTest::kWaitForSignal( trackForUrlWorker, SIGNAL(done(ThreadWeaver::Job*)), 1000 );
    QVERIFY( receivedDone );
to
    QSignalSpy spy( itemModel, SIGNAL(allQueriesFinished(bool)) );
    QVERIFY( spy.wait( 5000 ) );
 
== Status ==
The current status of the port of the individual methods can be found here: [[Amarok/Development/KF5port/Status|Status page]]


==New Dependencies ==
==New Dependencies ==
If you would like to build it then you have to install the following development packages (apart from the existing dependencies like Taglib, zlib, googlemock, etc ) containing the following components for your respective system :
If you would like to build it then you have to install the following development packages (apart from the existing dependencies like Taglib, zlib, googlemock, etc ) containing the following components for your respective system :
 
{|class="wikitable"
Qt5::Core
! Dependency !! Version
 
|-
Qt5::DBus
| Extra CMake Modules (ECM) ||1.7.0
 
|-
Qt5::Widgets
| Qt5::Core ||
 
|-
Qt5::Test
| Qt5::DBus ||
 
|-
Qt5::Gui
| Qt5::Widgets ||
 
|-
Qt5::Svg
| Qt5::Test ||
 
|-
Qt5::Script
| Qt5::Gui ||
 
|-
Qt5::Xml
| Qt5::Svg ||
 
|-
Phonon4Qt5
| Qt5::Xml ||
 
|-
KF5::CoreAddons
| Qt5::Script ||
 
|-
KF5::Solid
| Qt5::Sql ||
 
|-
KF5::Codecs
| Qt5::Quick ||
 
|-
KF5::I18n
| Qt5::Qml ||
 
|-
KF5::ThreadWeaver
| Qt5::ScriptTools ||
 
|-
KF5::KDELibs4Support
| Qt5::WebKitWidgets ||
 
|-
KF5::Plasma
| Qca-Qt5 ||
 
|-
KF5::KCMUtils
| Phonon4Qt5 ||
 
|-
KF5::NewStuff
| KF5::CoreAddons ||
|-
| KF5::Solid ||
|-
| KF5::Codecs ||
|-
| KF5::I18n ||
|-
| KF5::ThreadWeaver ||
|-
| KF5::KDELibs4Support ||
|-
| KF5::Codecs ||
|-
| KF5::I18n ||
|-
| KF5::ThreadWeaver ||
|-
| KF5::Plasma ||
|-
| KF5::PlasmaQuick ||
|-
| KF5::KCMUtils ||
|-
| KF5::NewStuff ||
|-
| KF5::TextEditor ||
|-
| KF5::GlobalAccel ||
|-
| KF5::KIO ||
|-
| KF5::NotifyConfig ||
|-
| KF5::Archive ||
|-
| KF5::DNSSD ||
|}


This list has been kept dynamic to avoid pulling unwanted dependencies which means more components will be added when the need arises.
This list has been kept dynamic to avoid pulling unwanted dependencies which means more components will be added when the need arises.


== Extra ==
== Extra ==

Latest revision as of 16:10, 9 November 2015

This page is meant as a guide to port Amarok to Qt5/Frameworks5 and Plasma5.

Stages of port

The broad plan involves the porting of the code-base to compile by using KF5::KDELibs4Support. After this the plan involves porting Amarok away from KF5::KDELibs4Support. We are still in the first part now i.e the current aim is to let Amarok compile by using KF5::KDELibs4Support(with LOTS and LOTS of depreciated warnings).

  1. Restoring build on Qt5/KF5 [Out of context folder]: Port of cmake files and all code, so everything builds at least again by using KF5::KDELibs4Support. In this part the primary focus is on building it back again. DONE
  2. Port the context folder to QML TODO
  3. All tests should pass after the above has been done. IN PROGRESS
  4. Porting away from KF5::KDELibs4Support. TODO

General

The commits containing the ongoing port of Amarok to Qt5/KF5 are made to the kf5 branch.

Todo overview

  • The inclusions of header should be reorganize to follow the rule <QXxxx>, then <KXxxx>, then "Xxxx.h" and follow the alphabetical order.
  • While porting to QUrl, a lot of conversion to QString are done with .path() or worse .toDisplayString(). All must be changed to .toLocalFile() if its a local path. The best thing would be to keep them as QUrl.
  • While porting some KUrl to QUrl, some methods were method(KUrl) and used as method(myString) with myString being a QString. It doesn't work anymore: now the method is used as method( QUrl(myString) ) which is not so nice, although it compiles.
  • In the tests, move:
   bool receivedDone = QTest::kWaitForSignal( trackForUrlWorker, SIGNAL(done(ThreadWeaver::Job*)), 1000 );
   QVERIFY( receivedDone );

to

   QSignalSpy spy( itemModel, SIGNAL(allQueriesFinished(bool)) );
   QVERIFY( spy.wait( 5000 ) );

Status

The current status of the port of the individual methods can be found here: Status page

New Dependencies

If you would like to build it then you have to install the following development packages (apart from the existing dependencies like Taglib, zlib, googlemock, etc ) containing the following components for your respective system :

Dependency Version
Extra CMake Modules (ECM) 1.7.0
Qt5::Core
Qt5::DBus
Qt5::Widgets
Qt5::Test
Qt5::Gui
Qt5::Svg
Qt5::Xml
Qt5::Script
Qt5::Sql
Qt5::Quick
Qt5::Qml
Qt5::ScriptTools
Qt5::WebKitWidgets
Qca-Qt5
Phonon4Qt5
KF5::CoreAddons
KF5::Solid
KF5::Codecs
KF5::I18n
KF5::ThreadWeaver
KF5::KDELibs4Support
KF5::Codecs
KF5::I18n
KF5::ThreadWeaver
KF5::Plasma
KF5::PlasmaQuick
KF5::KCMUtils
KF5::NewStuff
KF5::TextEditor
KF5::GlobalAccel
KF5::KIO
KF5::NotifyConfig
KF5::Archive
KF5::DNSSD

This list has been kept dynamic to avoid pulling unwanted dependencies which means more components will be added when the need arises.

Extra

Some references: