Tuesday, 23 June 2015

GSoC 2015 Week #4 with Amarok

So the fourth week is over and the mid term evaluations are upon us and I have to say, I didn't even realize how quickly the last four weeks have gone by :)

I had to take the third week off but it didn't affect my project much as I had started working before 25 May.
So some of the major changes to the code-base that I have made over the last few days are as follows:
  • I added KF5::KCMUtils and KF5NewStuff components.
  • Most of the KDialog code has been moved to QDialog which included changes like replacement of setButtons with QDialogButtonBox. Although KDialog is deprecated and this conversion seems unnecessary at this stage of porting, I encountered dependencies on classes in KF5 that now inherits from QDialog instead of KDialog. Due to this some KDialog code in Amarok had to be ported now rather than later.
  • I made a few classes in Amarok to inherit from KPageDialog instead of KDialog to let us use the buttonBox() function in the former which is pretty useful.
  • I removed the definition of slotButtonClicked() slot in deviceconfiguredialog.cpp as there were not any signals connecting to it. The rest of the slotButtonClicked() calls were replaced with QDialog::accept() or QDialog::reject().
  • I discovered a function QDir::toNativeSeparators which is really useful. On moving from KUrl to QUrl, I had to replace the calls to KUrl::addPath(const QString& txt) with u.setPath(u.path() + '/' + txt) [Copied straight from the docs ;)]. Now you can see that we have a '/' in setPath which may or may not be the native separator of the platform. So here the static function QDir::toNativeSeparators comes into use and it will make the separators appropriate (if needed) for the underlying operating system.

Cheers !!!

No comments:

Post a comment