<div dir="ltr">I have created a proposal for the GSoC project to port amarok to KF5/Qt5/Plasma 5. I have attached a patch whose details are given below. I would love your feedback on ways of improving the proposal.<br><br><br>INTRODUCTION:<br>Amarok still depends on KDE Platform 4, Qt 4 and Plasma 4. I aim to port the amarok codebase to KDE Frameworks 5, Qt 5 and Plasma 5. The port should give pretty big performance benefits because of the port to plasma 5 which uses Qt 5's QtQuick 2 and is faster and more power-efficient.<br><br>PROJECT GOALS:<br>1. Compiling amarok with Qt5.<br>2. The port from kdelibs4 to KF5.<br>3. The port of the plasma widgets to plasma 5 including the port of important plasma widgets of the context view to plasma 5<br>4. The testing framework needs to be adapted and the port has to be tested.<br><br>IMPLEMENTATION:<br>I will explain a few of the changes required for implementation through code snippets below (The files have been indicated and the old and the new code snippets has been indicated).<br><br>1.To port the build system I need to use the code from the extra-cmake-modules package and the macros need to be updated accordingly. The dependencies need to be changed and the warnings need to be removed.<br>Example:<br>CMakeLists.txt<br>    Old code Snippet:<br>        macro_optional_find_package( LibLastFm )<br>        set( LIBLASTFM_MIN_VERSION "1.0.0" )<br>        if( LIBLASTFM_FOUND )<br>            macro_ensure_version( ${LIBLASTFM_MIN_VERSION} ${LIBLASTFM_VERSION} LIBLASTFM_FOUND )<br>        endif( LIBLASTFM_FOUND )<br>    New code Snippet:<br>        # MacroOptionalFindPackage.cmake doesnt exist anymore from CMake 2.8.6 and is rendered unnecessary by the usage of the<br>        # CMAKE_DISABLE_FIND_PACKAGE. Hence find_package is used instead of macro_optional_find_package.<br>        find_package( LibLastFm )<br>        set( LIBLASTFM_MIN_VERSION "1.0.0" )<br>        if( LIBLASTFM_FOUND )<br>        # MacroEnsureVersion.cmake has been removed and VERSION_LESS or VERSION_GREATER is used instead.<br>            if ( ${LIBLASTFM_MIN_VERSION} VERSION_LESS ${LIBLASTFM_VERSION} )<br>                set( {LIBLASTFM_FOUND TRUE )<br>            endif()<br>        endif( LIBLASTFM_FOUND )<br><br>2.A lot of changes need to be made in the code from kdecore, kdeui and kio. This will produce a lot of changes in the code but this should be pretty straightforward.<br>Example:<br>shared/FileTypeResolver.cpp:<br>    Old code snippet:<br>        QString fn = QFile::decodeName( fileName );<br>        QString suffix = QFileInfo( fn ).suffix();<br>        KMimeType::Ptr mimetype = KMimeType::findByPath( fn );<br>    New code snippet:<br>        QString fn = QFile::decodeName( fileName );<br>        QString suffix = QFileInfo( fn ).suffix();<br>        /* As KMimeType is deprecated we have to port to QMimeType instead */<br>        QMimeType mimetype = KMimeType::findByPath( fn );<br><br>src/covermanager/CoverFoundDialog.cpp:<br>    Old code snippet:<br>        const QImage &image = item->bigPix();<br>        const QString &ext = KMimeType::extractKnownExtension( saveUrl.path() ).toLower();<br>    New code snippet:<br>        const QImage &image = item->bigPix();<br>        /* KMimeType::extractKnownExtension(fileName) has changed to db.suffixForFileName(fileName) due to depreciation of KMimeType. */<br>        const QString &ext = db.suffixForFileName( saveUrl.path() ).toLower();<br><br>3.The widgets "Wikipedia", "Current Track/Now playing", and "Lyrics" need to be ported. Before the coding period starts (before 25 May) I will analyze whether it will be realistic to port more widgets apart from these. Code using it has to be ported to QML2, (and the QtQuick API in Qt 5) to benefit from maintenance and performance improvements.<br>Example:<br>src/amarokurls/ContextUrlRunner.cpp<br>    Old code snippet:<br>        foreach( const QString &appletPluginName, appletList )<br>        {<br>            cont->addApplet( appletPluginName, -1 );<br>        }<br>    New code snippet:<br>        /* The position arguement of addApplet is not supported anymore */<br>        foreach( const QString &appletPluginName, appletList )<br>        {<br>            cont->addApplet( appletPluginName );<br>        }<br><br>4.After all the above has been completed I will have to port the testing frameworks. There are many changes to the QTest namespace(one of which has been shown below)<br>Example:<br>tests/scanner/TestGenericScanManager.cpp<br>    Old code snippet:<br>        #else<br>            QSKIP( "Collection scanner only crashes in debug build.", SkipAll );<br>        #endif<br>    New code snippet:<br>    /* The QSKIP macro has changed its API in Qt5 and hence a wrapper macro was created(QSKIP_PORTING) which takes two arguements and<br>    discards one in Qt5 */<br>        #else<br>            QSKIP_PORTING( "Collection scanner only crashes in debug build.", SkipAll );<br>        #endif<br><br><br>WORK DONE:<br>I have already started the work to port the build system of amarok. The patch file of my last commit with git master commit has been attached to the mail (Apply using git am<port_cmake.patch).<br>After applying this patch file on the git master, we will be able to build amarok with Qt5 support. There are at least two bugs introduced by this patch file: (i)Finding of MySQLAmarok by Cmake and (ii)CMake not being able to find some available packages on system. I will be solving these bugs pretty soon.<br>As this is a huge patch I will need to break them into parts to make it easy for review.<br><br>TENTATIVE TIMELINE:<br>Until 25 May: I am unfamiliar with plasma widgets and I will use this time to identify the code that needs to be changed/updated and understand the changes that need to be done to the code base.<br>I will also be solving the bugs in the patch [1] before the actual coding period starts in order to give more time to the porting of the widgets to plasma 5.<br><br>Target 0            : Porting of the build system to be able to compile amarok with Qt5 (Bugs to be solved before 25 May)<br>Target 1(2 weeks)   : Remove dependencies of kdelibs4 from the codebase.<br><br>Target 2(1.5 week)  : Porting of the "Wikipedia" to plasma 5. <br>Target 3(1.5 week)  : Porting of the "Lyrics" to plasma 5.<br>Target 4(1.5 week)  : Porting of the "Current Track/Now playing" to plasma 5.<br><br>Target 5(1.5 weeks) : Porting of the testing framework needs to be completed.<br>Target 6(1 weeks)   : I will use this time to test the port and will aim at removing as many warnings as possible and to resolve any graphical problems(if any) that might have come up. I will also be reviewing the code changes uptil then during this time.<br>Target 7(1 week)    : Cleaning up the code, fixing bugs, writing documentation.<br><br>According to this timeline (including my exams) I will be left with 1 week in my hand which I will keep in reserve in case a target demands more time than anticipated above.<br><br>OTHER OBLIGATIONS:<br>I will have to take a week off in June to appear for exams in my university. I am planning to make up for this time by having started the work well before the actual coding period starts so my exams shouldnt have much effect on the project. Apart from this I assure dedication of at least 42 hours/week during the period of the program.<br><br>ABOUT ME:<br>My name is Aroonav Mishra (IRC nick: roguedragon, Email ID: <a href="mailto:aroonav11@gmail.com">aroonav11@gmail.com</a>) and I am currently a sophomore studying in IIIT Bhubaneswar, India.<br>I consider myself as an experienced C/C++ developer for more than 3 years now. I have previously worked with Qt by creating applications to sharpen my skills in its usage. I have been interested in learning about algorithms, network security, linux kernel and have done projects related to these fields. I have been using Linux system for over 2 years now and I am always awed by the support of the community that is available to anyone needing it. I would love to be a more integral part of the community and would like to start contributing back by completing this project.<br><br></div>