Digikam/CodingSprint2014: Difference between revisions

From KDE Community Wiki
*>Teemu
Line 115: Line 115:
|
|
* Needs Marble code from [https://projects.kde.org/projects/kde/kdeedu/marble/repository/show?rev=kde-frameworks-5 kde-frameworks-5 git branch] to compile.
* Needs Marble code from [https://projects.kde.org/projects/kde/kdeedu/marble/repository/show?rev=kde-frameworks-5 kde-frameworks-5 git branch] to compile.
* We need to detect the Marble version somehow, to avoid linking KF5 build against Qt4 version of Marble. Ideas?
|-
|-
| '''libkgeomap/tests'''
| '''libkgeomap/tests'''

Revision as of 13:28, 22 November 2014

KDE Graphics Coding Sprint 2014

The KDE Graphics coding sprint 2014 will take place at Berlin, Germany, from november 14h to 16th 2014.

KDE Framework Port

Branches Creation

All port code must be stored in dedicated "frameworks" git branch for each project. Branch must be created from master.

$>git checkout master
$>git pull -rebase
$>git checkout -b frameworks
$>git push origin frameworks:frameworks
$>git branch -a
* frameworks
  master
  remotes/origin/HEAD -> origin/master
  remotes/origin/frameworks
  remotes/origin/master


KF5 Repositories list is given below :

KF5/Qt5 Status

Component Cmake port pure Qt5 port pure KF5 port Who Remarks
libkexiv2/src done uncomplete uncomplete Gilles, Laurent
  • It still few C++ auto_ptr warnings.
libkexiv2/tests done uncomplete uncomplete Gilles, Laurent
libkdcraw/src done uncomplete uncomplete Gilles, Laurent, Veaceslav
  • ThreadWeaver and Solid dependencies removed.
  • RActionThreadBase is ported to QThreadPool + QRunnable API instead ThreadWeaver.
  • In second time, KIntNumInput and KDoubleNumInput are deprecated, and we can plan to use Krita Int and Double input widgets to replace RNumInput and add reset button. See bug #284216 for details.
libkdcraw/tests done uncomplete uncomplete Gilles, Laurent, Veaceslav
libkipi/src done uncomplete uncomplete Gilles, Laurent, Mohamed
  • libkipi/version.h file renamed as libkipi_config.h to host only SO version ID shared with kipi plugins.
  • core compile with warnings.
libkipi/test done under process under process Gilles, Laurent, Mohamed
libkface/src done uncomplete uncomplete Gilles, Laurent
  • It still warnings about KGlobal::dirs() which must be ported to QStandardPaths.
libkface/tests done under process under process Gilles, Laurent
libkgeomap/src done uncomplete uncomplete Gilles, Laurent, Teemu
  • Needs Marble code from kde-frameworks-5 git branch to compile.
  • We need to detect the Marble version somehow, to avoid linking KF5 build against Qt4 version of Marble. Ideas?
libkgeomap/tests done uncomplete uncomplete Gilles, Laurent, Teemu
libkgeomap/demo done uncomplete uncomplete Gilles, Laurent, Teemu
  • Needs libkexiv2 from KF5 to compile.
digiKam Software Compilation todo todo todo
Kipi-plugins todo todo todo
digiKam todo todo todo

Recommendations

Porting to KF5 is divided in 3 stages:

1/ Change Cmake files. some Laurent scripts do this stuff. We use now ECM scripts collection from KDE core to manage dependencies and report on the console. Some macros disappear, and are replaced by new ones. For this job, it's recommended to look well all done in Cmake files from libkexiv2 and libkdcraw already ported and polished.

2/ Port c++ code using KDE4Support. This include older classes from Qt4 and KDE4 to make transition faster. This will help to have quickly a code compilable, but this will generate a lots of deprecated warnings. First regression tests must be done at this stage to see if nothing is broken.

3/ Port c++ code to pure Qt5. The goal of KF5 is to reduce KDELibs fingerprint everywhere, when it's possible. Qt API will be used in priority against KF5 API. But sometime, this will be not possible as well, without big changes. A lot of KDE API have migrated to Qt5 (as for ex : KUrl -> QUrl and kDebug ->qDebug). It's sound like KDELibs will become an incubator for new implementations which will move later to Qt. Also, to have the most of code using pure Qt5 will simplify future transitions more easy to do.

Common changes to port code

  • Change all #include "foo.moc" as #include "foo.h" to prevent compilation errors with Qt5. Qt will generate moc_foo.h files instead. Header file of a class declaration must be placed on top of included header files list from implementation file.
  • Debug spaces are now wrapped by qCDebug()/qCWarning()/qCCritical(). New foo_debug.h/.cpp files must be created to declare debug space. See libkface port branch as example. foo_debug.h is not shared, so for shared a library, this header must be only placed as private in implemeentation files, not header files.
  • "KDE4_BUILD_TESTS=ON" cmake flag is replaced by "BUILD_TESTING=ON" to build tests sub-dir.
  • "CMAKE_BUILD_TYPE=debugfull" cmake flag is replaced by "CMAKE_BUILD_TYPE=debug" to build code with debug symbols.

Link to documentation to port code

Scripts to port code

Laurent Montel has written scripts to port CMake and C++ code to KF5/Qt5 and remove kdelibs4support dependency. There are available in this repository.

Scripts must be applied in this order, with a test compilation between each one :

  • Full safe scripts :
    • convert-to-k4aboutdata.pl (first one to apply, this help to compile)
    • adapt_cmakelists_file.pl (to convert CMake scripts, but code must don't be capititalized)
    • remove-kde4support.pl
    • convert-kicon.pl
    • convert-kmenu.pl
    • convert-kshortcut.pl
    • convert-kcolordialog.pl
    • convert-klistwidget.pl
    • convert-kmd5.pl
    • convert-kmenubar.pl
    • convert-ksplashscreen.pl
    • convert-kdebug.pl
  • Less safe scripts :
    • convert-kintnuminput.pl
    • convert-kintspinbox.pl
    • convert-ktextbrowser.pl
    • convert-kfontcombobox.pl
  • Scripts which need to check in-deep all changes :
    • convert-kvbox.pl
    • convert-kdialog.pl
    • convert-kcmdlineargs.pl
    • convert-kdebug-with-argument.sh (this one change kDebug(1556) en qCDebug with some info after to convert)
    • convert-kmimetype.pl
  • Last scripts to apply :
    • clean-forward-declaration.sh (remove forward declaration, to do when all compile fine)
    • clean-includes.sh (try to remove not used includes, not safe to 100%)
    • port_to_autogenerate_export_header.sh (convert to new signal/slot API, not safe to 100%)

Image Editor Model/View Fixes and Finalization

CANVAS : full image dimensions not shown when not viewing at 100% zoom level

CANVAS : image is displayed with wrong magnification after crop

CANVAS : image shifts position in mouse-over mode when changing between Before and After

CANVAS : mouse-over preview mode does not work

CANVAS : unable to zoom out to less than fit to window

Unable to crop due to image corruption into canvas with not X11 based computers

Import Tool Reports Review and Fixes

Database Reports Review and Fixes

Coding Sprint Notes

Next major task is to port digiKam to Qt5. Approx. 10% is already ported by Gilles. Objectives for this coding sprint:

  • Specify timeline for porting digiKam
  • Identify priorities (what should be ported first)
  • Delegate porting tasks to developers (who does what)


Shourya Singh Gupta works on implementing the Kipi tools functionality in the Batch Queue Manager (Tools Settings).

Marcel Wiesweg works on memory consumption in database and the bug with JPEG (and RAW) image preview on high-resolution screens. Also see https://bugs.kde.org/show_bug.cgi?id=205776

He work also to complete the Removable collection support. The goal is to show thumbnails from disconnected media, but not editable as well. A feedback to the user is provided to indicate that items and collection are not available, but users can continue to search and preview collection through database. See bugs https://bugs.kde.org/show_bug.cgi?id=191494 and https://bugs.kde.org/show_bug.cgi?id=114539.

MySQL support is now disabled by default because it's not fully functional and still experimental. MySQL support still fully available of course, but as an optional feature.

Gilles has polished whole libkgeomap public API to be ready for KF5 port. A lots of changes have been applied to reduce binary compatibility issues, especially, if library will be moved somewhere in KDE core to be more easily used by another project as KPhotoAlbum, like it have been done recently about libkface.