Hi all! I wasn’t able to write last week. So this post has news from last 2 weeks.

digiKam is now fully ported to Qt 5.15 (which is a prerequisite for Qt6). Merge requests that were under review have been merged, namely:

These were all part of porting to Qt5.15.

The real challenge

Last two weeks was the first time I started planning to build digiKam with Qt6. A major problem was that digiKam used Qt Webengine/Qt Webkit to have support of in-built browser for displaying online documents and webservice authorization steps.

Qt Webengine/Qt Webkit modules, as of now, are not available in Qt 6.1.2 and will only be stable with release Qt 6.2, expected to arrive in September 2021. It is not trivial to isolate code that dependeds on this module. I thought about some solutions like building with alpha Qt 6.2 release. It failed. Me and my mentors had a long discussion about the solution and Gilles suggested that writing a dummy API for now is a good solution.

What is a dummy API?

This is WebBrowserDlg class based on QDialog currently used in digiKam to display webcontent using QWebEngine. To be able to build code with Qt6 we have to have this class and functions to be used by clients. For that, we create a class DNoWebDialog and fill it with functions, signals that WebBrowserDlg offers to clients. Then we create empty definitions of those functions and replace the client code that used WebBrowserDlg with DNoWebDialog when no web module is found by CMake.

Also, the CMakeLists.txt files have to be configured to not try to build code with QWebEngine classes when it is not present. Rather build it with out Dummy API. This solves our temporary compilation problem. Also, when Qt 6.2 will be released, then the code will automatically use the real QWebEngine API instead of our own, thus enabling features and support for online documents in digiKam as before.

This was completed in this merge request.

What is next?

digiKam is huge with a lot of CMake files. I am currently porting the cmake files to be able to use Qt6. I have made progress in the dummy API merge request but there are a lot of other targets that need to ported to use Qt6. It will be completed in the next few days. libO2, the library for OAuth authentication used by webservices has it’s separate cmake files. I am currently working on it and it should build easily with Qt6 without hassle.

I would also probably have to build KF5 with Qt6 as well. Some people have already done it in the community. In the coming days, we should be able to build digiKam with Qt6.

Thanks for reading!