Request to review proposal for GSoC project

Aroonav Mishra aroonav11 at gmail.com
Sun Mar 15 11:51:12 UTC 2015


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.


INTRODUCTION:
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.

PROJECT GOALS:
1. Compiling amarok with Qt5.
2. The port from kdelibs4 to KF5.
3. The port of the plasma widgets to plasma 5 including the port of
important plasma widgets of the context view to plasma 5
4. The testing framework needs to be adapted and the port has to be tested.

IMPLEMENTATION:
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).

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.
Example:
CMakeLists.txt
    Old code Snippet:
        macro_optional_find_package( LibLastFm )
        set( LIBLASTFM_MIN_VERSION "1.0.0" )
        if( LIBLASTFM_FOUND )
            macro_ensure_version( ${LIBLASTFM_MIN_VERSION}
${LIBLASTFM_VERSION} LIBLASTFM_FOUND )
        endif( LIBLASTFM_FOUND )
    New code Snippet:
        # MacroOptionalFindPackage.cmake doesnt exist anymore from CMake
2.8.6 and is rendered unnecessary by the usage of the
        # CMAKE_DISABLE_FIND_PACKAGE. Hence find_package is used instead of
macro_optional_find_package.
        find_package( LibLastFm )
        set( LIBLASTFM_MIN_VERSION "1.0.0" )
        if( LIBLASTFM_FOUND )
        # MacroEnsureVersion.cmake has been removed and VERSION_LESS or
VERSION_GREATER is used instead.
            if ( ${LIBLASTFM_MIN_VERSION} VERSION_LESS ${LIBLASTFM_VERSION}
)
                set( {LIBLASTFM_FOUND TRUE )
            endif()
        endif( LIBLASTFM_FOUND )

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.
Example:
shared/FileTypeResolver.cpp:
    Old code snippet:
        QString fn = QFile::decodeName( fileName );
        QString suffix = QFileInfo( fn ).suffix();
        KMimeType::Ptr mimetype = KMimeType::findByPath( fn );
    New code snippet:
        QString fn = QFile::decodeName( fileName );
        QString suffix = QFileInfo( fn ).suffix();
        /* As KMimeType is deprecated we have to port to QMimeType instead
*/
        QMimeType mimetype = KMimeType::findByPath( fn );

src/covermanager/CoverFoundDialog.cpp:
    Old code snippet:
        const QImage &image = item->bigPix();
        const QString &ext = KMimeType::extractKnownExtension(
saveUrl.path() ).toLower();
    New code snippet:
        const QImage &image = item->bigPix();
        /* KMimeType::extractKnownExtension(fileName) has changed to
db.suffixForFileName(fileName) due to depreciation of KMimeType. */
        const QString &ext = db.suffixForFileName( saveUrl.path()
).toLower();

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.
Example:
src/amarokurls/ContextUrlRunner.cpp
    Old code snippet:
        foreach( const QString &appletPluginName, appletList )
        {
            cont->addApplet( appletPluginName, -1 );
        }
    New code snippet:
        /* The position arguement of addApplet is not supported anymore */
        foreach( const QString &appletPluginName, appletList )
        {
            cont->addApplet( appletPluginName );
        }

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)
Example:
tests/scanner/TestGenericScanManager.cpp
    Old code snippet:
        #else
            QSKIP( "Collection scanner only crashes in debug build.",
SkipAll );
        #endif
    New code snippet:
    /* The QSKIP macro has changed its API in Qt5 and hence a wrapper macro
was created(QSKIP_PORTING) which takes two arguements and
    discards one in Qt5 */
        #else
            QSKIP_PORTING( "Collection scanner only crashes in debug
build.", SkipAll );
        #endif


WORK DONE:
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).
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.
As this is a huge patch I will need to break them into parts to make it
easy for review.

TENTATIVE TIMELINE:
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.
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.

Target 0            : Porting of the build system to be able to compile
amarok with Qt5 (Bugs to be solved before 25 May)
Target 1(2 weeks)   : Remove dependencies of kdelibs4 from the codebase.

Target 2(1.5 week)  : Porting of the "Wikipedia" to plasma 5.
Target 3(1.5 week)  : Porting of the "Lyrics" to plasma 5.
Target 4(1.5 week)  : Porting of the "Current Track/Now playing" to plasma
5.

Target 5(1.5 weeks) : Porting of the testing framework needs to be
completed.
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.
Target 7(1 week)    : Cleaning up the code, fixing bugs, writing
documentation.

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.

OTHER OBLIGATIONS:
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.

ABOUT ME:
My name is Aroonav Mishra (IRC nick: roguedragon, Email ID:
aroonav11 at gmail.com) and I am currently a sophomore studying in IIIT
Bhubaneswar, India.
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/amarok-devel/attachments/20150315/27e5f923/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: port_cmake.patch
Type: text/x-patch
Size: 1844438 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/amarok-devel/attachments/20150315/27e5f923/attachment-0001.bin>


More information about the Amarok-devel mailing list