Tuesday, 25 August 2015

GSoC 2015 Wrap Up Report

So the Google Summer of Code '15 is coming to an end. It has been a very memorable summer and this certainly qualifies to be the biggest project I have ever undertaken.

My work over the summer was to port the Amarok code-base to use Qt5/KF5 as much as possible because it was tough to port the entire base under the GSoC time-frame. I have ported a considerable portion of the code-base and now I will be continuing the project along with the community to see it to the end :)

I started my work by porting the CMake files and as soon as it was complete, I moved on to the porting of the C++ part. The current aim is to make Amarok compile while it's dependent on KF5::KDELibs4Support. I faced many problems along the way mainly because there are still parts of KF5 that need better documentation. I have mentioned about these problems in my previous posts.

Right now I am focusing on adding more information to the Amarok porting wiki page. Myriam helped me in creating different tables for each target that is created during the compilation. These tables contain all the relevant information regarding the files that are built for that target. The most important information is about the TODOs & the FIXMEs in a file. I have had to disable parts of the code-base and I will be documenting each of these in the porting wiki page so that they are not forgotten.

Also, I had been pushing all my commits to a repository containing Amarok's clone. I won't be pushing my future commits there and instead, I have now pushed all the commits to the kf5 branch of Amarok code-base that can be accessed in the kf5 head here.

I would like to thank Mark Kretschmann, Myriam Schweingruber, Amarok community and the KDE community in general for giving me this awesome opportunity and helping me in the project along the way.


Thursday, 6 August 2015

GSoC 2015 Week #7-10 with Amarok

I haven't posted here for quite some time and a lot has happened over the last few weeks. Blame my habit of procrastination for not posting more frequently ;)

  • Ported from KAction to QAction, KMenu to QMenu with the help of the porting scripts.
  • Added KF5::GlobalAccel, KF5::KIO components, Qt5::Sql, Qt5::Quick, Qt5::ScriptTools, KF5::PlasmaQuick, KF5::NotifyConfig and KF5::Archive components.
  • KGlobal::mainComponent().aboutData() is replaced with KAboutData::applicationData() which contains information such as authors, license, etc.
  • KGlobalAccel::setGlobalShortcut is used instead of setGlobalShortcut to set global shortcuts.
  • QApplication::type() no longer exists and hence the macro QApplication::qApp is used by casting in src/PluginManager.cpp and other files.
  • In TrayIcon.cpp a QMap has been created mapping each QString to its corresponding QAction which is done in KActionCollection and hence the calls to actionCollection()->action is replaced by calls to a function defined in the class itself.
  • KGlobalSettings::CompletionPopup is replaced with KCompletion::CompletionPopup.

Now after all this, I was getting linking errors during the linking of amaroklib and hence I decided that it was high time to port the code in src/context but during the port of the code in src/context, I realized that it is going to take a LOT of time to complete. We may have to move to QML as Plasma 5 only supports QML for the widgets. So Mark suggested to leave it aside for the moment. To get around it, I tried to disable the compilation of src/context and the files that depend on the stuff in src/context. Well I should have guessed that it won't work (The effect was similar to the fall of dominoes; for each file that was disabled, I had to disable one or more file that depended on it) and later I had to comment out the code that was causing the linking errors. I have appropriately marked out each commented piece of code (with "FIXME: disabled temporarily for KF5 porting") so that it can be re-enabled later and we won't have to deal with obscure bugs due to their absence.

Apart from this, I had to remove the second argument of the KPluginInfo constructor ( KPluginInfo( const QString & filename, const char* resource = 0 ) has changed to KPluginInfo (const QString &filename) ). I am still unsure whether this change is correct or not.

Sadly, over the last week I messed up my system and I had to repeat quite a bit of the work but that didn't take much of my time. The port seems to be proceeding nicely and I am now reading about QNetworkAccessManager to replace QHttp that is no longer present in Qt5 API.

Cheers !!!