13 February, 2021

I have been looking into extending the coordinate-based timezone lookup system we have in KItinerary, in order to ready it for being moved to KDE Frameworks. The first step however is finding suitable boundary data files for this, next to the timezone ones.

Country Subdivision Boundaries

The existing code uses the IANA timezone boundaries to implement not only timezone lookup but also an almost complete country lookup. There’s however limitations with this, and there’s use cases for which an even higher level of detail would be desirable:

  • IANA timezone areas aren’t a strict superset of country areas, there’s one notable exception with Asia/Bangkok also being used in northern Vietnam.
  • Country subdivisions are essential parts of an address in some countries (e.g. USA).
  • Public holidays can depend on in which subdivision you are (e.g. Germany).
  • Subdivisions allow better guesses of the local language in multi-lingual countries (e.g. Belgium, Switzerland).

So, ideally we’d want a coordinate lookup not only for the timezone but also the country subdivision (ISO 3166-2), the country (ISO 3166-1) follows from that reliably in all cases then.

Boundary Polygons

The Z-order curve used by the existing timezone lookup code is generated by a QGIS script and needs either a Shapefile or a GeoJSON file with the boundary polygons as input.

We’d also want something that matches the resolution of the timezone boundaries as closely as possible. This isn’t so much about the high level of precision, we need to considerably reduce that for efficient storage anyway, but about avoiding artifacts along the borders caused by different levels of detail. And it goes without saying that we also need this as proper Open Data under a suitable license.

Unfortunately with those requirements it gets hard to find ready-made datasets for this, so DIY to the rescue!

Building Boundary Polygons

We don’t have to start from scratch, we can look at the timezone boundary builder as a starting point. Our problem is even considerably easier, as we don’t have to puzzle together our polygons from various pieces of OSM data, we just need to extract the right boundaries from OSM.

Its approach of using Overpass for retrieving the needed data unfortunately didn’t work reliably for me, repeatedly resulting in timeouts and throttling. So I ended up with working with a full offline OSM copy again instead.

The code for this is here. It generates Shapefile and GeoJSON of both ISO 3166-1 and ISO 3166-2 boundaries from OSM data and performs a few sanity checks on it.

Screenshot of QGIS showing ISO 3166-1 and ISO 3166-2 areas.
ISO 3166-1 (green) and ISO 3166-2 (blue) areas shown in QGIS.


You can find the current versions of the generated data here, the same license as for OSM data applies:

While the country boundaries looks reasonably complete and correct, you can spot a few issues in the subdivision data. This can for example have one of the following reasons:

  • There are gaps in the boundaries in the OSM data. The GDAL tools used for generating the GeoJSON and Shapefile output silently discard such boundaries. Examples: IR-18, IR-30, KR-42.
  • Other forms of continuity issues in the border line. This case can be much harder to spot as it is not necessarily visually distinguishable from a correct boundary polygon on the OSM website. It is however also silently discarded by the GDAL tools. Example: BR-PR.
  • The ISO 3166-2 tag is missing on the corresponding OSM boundary. Example: CN-ZJ (already fixed).

Fixing those issues upstream in the OSM data would be by far the easiest way to complete the boundary data extracts. This is probably best done by people on the ground in the respective countries though, messing with a sensitive subject like land borders from halfway around the world doesn’t seem like a good idea. The good news however is that a lot of issues found just two weeks ago are already fixed.


Even if not perfect yet, this gives us enough data to continue exploring efficient coordinate-based lookup. While I’m quite sure the Z-order curve approach will technically hold up, I’m not sure how well it scales with the ten-fold increase in different areas. We still want to keep the result small enough for shipping in mobile apps after all.

There are just a few days left before Plasma 5.21 is released, so get ready! And check out all this cool stuff too. Train doesn’t stop!

New Features

Kate’s project plugin now offers you the ability to switch git branches right there in the main UI (Waqar Ahmed, Kate 21.04):

Plasma’s Audio Volume applet now offers you the opportunity to change a device’s audio profile right there in the applet, without having to go elsewhere (Kai Use Broulik, Plasma 5.22):

Bugfixes & Performance Improvements

Kate no longer sometimes creates a new document when closing tabs with a middle-click (Jan Paul Batrina,c Kate 21.04)

Dolphin no longer crashes when viewing large folders in Tree view (Felix Ernst, Dolphin 21.04)

QML-based apps that override the theme no longer crash when that theme is Breeze (David Redondo, Plasma 5.21)

Neither Plasma nor the whole session will crash when dragging a file over a Task Manager entry in the Plasma Wayland session (David Edmundson, Plasma 5.21)

Fixed a bug that could cause widgets to sometimes be irremovable from a panel (Niccolò Venerandi, Plasma 5.21)

Non-Task-Manager panel applets once again respect Fitts’ law regarding their click targets (Niccolò Venerandi, Plasma 5.21)

The buttons in Plasma’s “new screen connected” OSD once again work (David Redondo, Plasma 5.21)

KRunner’s Locations runner now works again (Alexander Lohnau, Plasma 5.21)

Plasma no longer sometimes crashes when deleting an activity (Willyanto, Plasma 5.21)

Disk monitoring widgets now show the correct information for current throughput and no longer display “Total Uploaded” when they should be displaying “Upload Rate” (David Redondo, Plasma 5.21)

Discover is now substantially faster to launch (Aleix Pol Gonzalez, Plasma 5.21)

Fedora’s Anaconda installer now works in the Plasma Wayland session (Vlad Zahorodnii, Plasma 5.21)

Discover no longer sometimes shows bogus extra sources in its “Sources” menu when viewing the details page for a Flatpak app (Aleix Pol Gonzalez, Plasma 5.21)

KWin now detects hot-plugged VR headsets (Xaver Hugl, Plasma 5.21)

Reducing the screen brightness to the lowest level such that it turns off the backlight no longer causes the backlight to flicker back on for a moment before turning off again (Kai Uwe Broulik, Plasma 5.21)

Scrollbars in Breeze-GTK-themed GTK apps no longer display stepper arrows when they shouldn’t (Jan Blackquill, Plasma 5.21)

Discover’s “Write a review” sheet is no longer almost unusably narrow (me: Nate Graham, Plasma 5.21.1)

It’s now possible to immediately apply newly-downloaded wallpapers whose names include a space (Dan Leinir Turthra Jensen, Frameworks 5.79)

When comparing two files in the move/copy overwrite dialog, size differences larger than 2 GiB are no longer erroneously described as being 16 EiB (!!!) (Méven Car, Frameworks 5.80)

Konsole no longer crashes when searching for new appearance settings using the Get New [thing] dialog (Alexander Lohnau, Frameworks 5.80)

Slightly improved the launch speed of all Kirigami-using apps (Arjen Hiemstra, Frameworks 5.80)

The few remaining settings pages that open in standalone windows now look good again (Ismael Asensio and me: Nate Graham, Frameworks 5.80):

User Interface Improvements

Gwenview now allows you to change the quality/compression level for other lossy image formats, such as WEBP, AVIF, HEIF, and HEIC (me: Nate Graham, Gwenview 21.04)

Kate now enables by default the feature to cut or copy the current line when nothing is selected and you use the cut or copy action (Alexander Lohnau, Kate 21.04)

Resizing Dolphin’s window now re-arranges the icons using a single smooth animation, not a weird two-part animation (Felix Ernst, Dolphin 21.04)

Hitting the escape key while in Okular’s full-screen view now returns to the windowed view (Michael Augaitis, Okular 21.04)

The new Wayland-specific keyboard layout applet now has text that scales with the thickness of the panel it’s located on (Andrey Butirsky, Plasma 5.21)

System Settings’ Window Decorations page now uses the fancy shiny new QML-based Get New [thing] window instead of the old funky QWidgets one (Alexander Lohnau, Plasma 5.22)

System Settings’ Virtual Desktops page now supports the “Highlight changed settings” feature (Cyril Rossi, Plasma 5.22)

You can now configure the Disks & Devices applet to play a sound when a device can be safely removed (me: Nate Graham, Plasma 5.22)

Web Presence (ooh, let’s try out a new section)

Carl Schwan overhauled Kate’s website to use our fancy modern new theme:

Niccolò Venerandi published part two in his video series about how to create a plasma theme:

Leszek Lesner published a video about kio-fuse, which makes it easier to interact with remote files:

How You Can Help

Have a look at to discover ways to be part of a project that really matters. Each contributor makes a huge difference in KDE; you are not a number or a cog in a machine! You don’t have to already be a programmer, either. I wasn’t when I got started. Try it, you’ll like it! We don’t bite!

Finally, consider making a tax-deductible donation to the KDE e.V. foundation.


12 February, 2021

I figure if we can write about “first quarter” of the year, then “first octant” also makes sense. So here’s the first six weeks of KDE-on-FreeBSD-in-2021 in a daemon-approved nutshell.

The kde@ team is a half-dozen people or so, some of whom are committers, some channel updates through Tobias or myself. The things I describe below are not my work, but our collective efforts over an octant.

KDE Software Updates

  • The KDE release service has maintainence releases and regular releases, so we landed 20.12.1 and 20.12.2 when they came out. Similarly, Plasma Desktop 5.20.5 landed as well. These releases affect lots of ports.
  • One part of the Calligra suite still updates regularly: Calligra Plan. The latest release is in editors/calligraplan.
  • New Kirigami-based applications deskutils/calindori and deskutils/kongress from the KDE community.
  • net-im/ruqola updated. This is a client, but it doesn’t have real releases (yet). It has been updated to a tag.
  • devel/kdevelop (a C, C++, PHP and Python IDE) and associated ports updated, like devel/okteta (a raw-file viewer).
  • Speaking of development tools, textproc/kdiff3 can be amazingly useful, and it was updated to version 1.8.5.
  • devel/qca saw a new release and had LibreSSL compatibility added downstream; I’ve since submitted a MR upstream.
  • An upstream patch for x11-themes/plasma5-kde-gtk-config was applied, to avoid debugging output from breaking some scripts.
  • graphics/kcolorpicker is a dependency for Spectacle and others, and was updated to a recent release. There is interesting “quasi competitive development” to be seen between Spectacle and KSnip.
  • audio/amarok has been updated to follow recent tags of the Qt5 port.
  • sysutils/kio-fuse was updated to 5.0.0. This bit of software bridges KDE’s virtual filesystem (KIO) to not-aware applications. When a KIO path pointing outside of the local filesystem is handed off to another application, the KIO path is FUSE-mounted and then the “local” path to the FUSE mount is handed off, instead. One MR upstream to fix some build and install issues. I should write up a little something about how to use it.

Not-KDE Software Updates

The kde@ team maintains a bunch of software that isn’t from the KDE community; sometimes it’s Qt-based, sometimes it is build-infrastructure, and sometimes it is just cool stuff.

  • Matrix clients net-im/nheko and net-im/quaternion and supporting libraries updated. With net-im/neochat as well there is a strong collection of clients available.
  • The nifty fractal viewer (Mandelbrot and others) graphics/fractgen has been updated and patches upstreamed.
  • For local-area chat (e.g. in an office or a coffee place, remember those?) there is net-im/beebeep, an autodiscovering encrypted local-LAN-only chat.
  • The sheet-music-writing application audio/musescore was updated multiple times.
  • For web things (not the desktop!), www/cutelyst is a Qt-based framework for static or dynamic sites.
  • For information about (personal) contacts, devel/libphonenumber is used in several places in KDE and received a couple of updates.
  • For sound support, audio/libsndfile and audio/libsamplerate got updates (samplerate switched to CMake as a build system, too).
  • graphics/poppler is the basis for lots of document viewers, and was updated to the february release.
  • multimedia/libxine is used for a lot of video work and received a big update with ImageMagick7 support.
  • devel/cmake supports the build of our entire stack, and has regular releases, so that always triggers lots of rebuilds. There were three updates in six weeks.
  • GNOME software is also maintained by kde@, so deskutils/gnome-sound-recorder and graphics/evince got some attention, too. As did mail/evolution, deskutils/gnome-maps and most of the rest of the GNOME 3.38.3 release.
  • Somewhat controversially, librsvg has been (re)written in Rust and is now a dependency for some things higher in the stack. FreeBSD Ports have graphics/librsvg2-rust now.
  • For all your weird video manipulations – in this time of video meetings, all your kitten filters – graphics/opencv was updated to version 4.
  • Low-level things like net/glib-networking, devel/json-glib, devel/glib20 all got minor fixes for the FreeBSD ports system.

Infrastructure Updates

It’s not just the packaging of individual libraries or applications, but also the maintainence of the infrastructure that builds the packages; that’s the FreeBSD ports system and sometimes we work on that, too (usually it is in other capable hands).

  • For users of portupgrade, the FreeBSD Qt ports are more robust while upgrading; there’s less chance of ending up with an old qmake while building a newer Qt Core.
  • A handful of KDE applications don’t have regular releases – not from the KDE release service, and not on their own. For these admittedly rare cases, we have build some FreeBSD ports magic: KDE_INVENT. Setting this variable to a 40-character commit hash and a KDE Invent category name will fetch from KDE’s GitLab instance. In general we hope this is hardly used, since we ought to be packaging released software (but, e.g. ruqola doesn’t have releases). This is a convenience we hope we do not need to use much.


11 February, 2021

Another day, another blog about some of KDAB’s utility classes. Now it’s the turn of KDSingleApplication, a class that helps implement applications that follow the single-instance policy.

What is a single-instance policy?

Single-instance policy refers to those applications that want to spawn a unique instance for a given user session. Even when launched multiple times, such applications will not spawn a number of separate instances. Instead, the existing instance will be notified, somehow, and some action will be taken by that instance. Typically, its window will be shown (if hidden) and raised to the foreground.

This mechanism works even when the application is launched indirectly, like from a file manager when opening a file type associated with the application. In this case, the new instance (launched by the file manager) will simply tell the existing instance to open the selected file, and then the new instance will immediately quit.

The problem is: on most operating systems we do normally get a new instance every time we launch an application! Therefore, some logic is needed to honor a single-instance policy. KDSingleApplication implements such logic.

Talk is cheap, show us the code

KDSingleApplication is a redesign of QtSingleApplication and other similar code that lives around in a few repositories.

The biggest advantage of KDSingleApplication over the old solutions is that it does not replace QCoreApplication/QGuiApplication/QApplication by inheriting from them. Such an inheritance is, generally speaking, a symptom of bad design. Unless we modify the solution’s own code, we cannot control which application class we’re using. Moreover, we cannot use the solution and another custom subclass of the application class. This is useful in some scenarios, because there can be only one application object!

KDSingleApplication instead complements your application object. You’re simply supposed to create an application object (of whatever kind is necessary) and then create a KDSingleApplication object:

int main(int argc, char **argv)
    QApplication app(argc, argv);
    KDSingleApplication kdsa;

After that, we will need to check whether our instance is the main (“primary”) instance, or a “secondary” one. The idea is that primary instances can receive arbitrary messages from the secondary instances and act on them in application-specific ways (open a file, show and raise the application’s main window, and so on).

The check looks like this:

    if (kdsa.isPrimaryInstance()) {
        /* primary: listen to messages */
        QObject::connect(&kdsa, &KDSingleApplication::messageReceived, 
                         /* handle messages from the secondary instances */);
    } else {
        /* secondary: send message to the primary */
        kdsa.sendMessage("some message to the primary");
        /* quit */
        return 0;

The example shipped with KDSingleApplication illustrates the handling of messages in more detail.

You can download KDSingleApplication from its GitHub repository:; it is distributed under the MIT license. Yes, for various practical reasons, KDSingleApplication lives in its own repository. Nonetheless, enjoy!

About KDAB

If you like this blog and want to read similar articles, consider subscribing via our RSS feed.

Subscribe to KDAB TV for similar informative short video content.

KDAB provides market leading software consulting and development services and training in Qt, C++ and 3D/OpenGL. Contact us.

The post KDSingleApplication: a class for single-instance policy applications appeared first on KDAB.


9 February, 2021

We have recently gotten the question of how to build and test Qt WebEngine 5.15.3 a lot, so I would like to provide the details and potential problem of a mixed version build here.

The Fiduciary License Agreement (FLA) for KDE is a document with a long history; it has served us across two, maybe three major Qt and KDE versions, across probably two changes in version control systems, and a host of changes in the world and the KDE community. This week I started to update the document for the current situation.

The FLA can be found on the KDE e.V. website on the forms page, with some background and a list of signatories as well.

On my blog, I wrote about the FLA in 2020 (here about the FLA and here about SPDX) and also in 2009 (here about licensing and here when it launched). I’ll repeat some of the background information today, then describe what is being updated.


The FLA is a mechanism for assigning copyright – generally copyright over a piece of software – to a fiduciary. Someone you trust. The fiduciary is expected to Do The Right Thing with the copyright that is assigned to it. Unlike a Copyright License Agreement (or Assignment) which some software projects use, the FLA is carefully constructed to keep everything Free Software and to circumscribe what the fiducary may do. In addition, the FLA ensures that you, the original copyright holder, can continue to do all the Free Software things that you could originally do with your software.

So what’s the point?

Well, unlike a CLA, the FLA was written with preserving-your-Software-Freedom in mind (the FSFE spearheaded this approach) so that you can continue to use your code and release it under whatever license you like, while the fiduciary can also do that, but in a restricted (preserving Freedom) fashion. This allows centralizing – to the fiduciary – some decisions about the software that may be needed in the longer term.

Recent Changes

The FLA text is stored in a git repository so the full history of the document is right there. It’s written in English, but marked up in LaTeX which may be a bit daunting; I’m not going to bother changing the format, though, since textual changes are still obvious enough.

Here’s some trivial changes:

  • Cleaned up leftover files and typo’s,
  • Made some spilling consistent.

And here’s the important bits:

  • No longer refers to a specific version control system (it was SVN, then a specific git server, now it’s more general),
  • Allows you to assign by KDE identity name (so there’s less emphasis on a specific email address),
  • Supports company-wide assignments (for FLAs signed by employers that want to assign the work of their employees).

The new version is not yet on the KDE e.V. website; there are some administrative hurdles to be taken that will tide us over until Akademy.

How to Help

People already have! Nicolás Alvarez has added CI so that PDFs are built from the LaTeX sources, and Kevin Ottens had some layout improvements.

Since the FLA text lives in KDE Invent, it is open to merge requests. I’m working on the text when I have time. There is one relevant branch: update-1.3.6 which is for all the current round of updates, and one associated issue (number 1). I’d be happy for people to chase down things like the URL for REUSE guidelines, fixing links to Techbase (which should be the community wiki now), highlighting places where kdelibs4 is described as the latest-and-greatest .. document maintainence is a lot like software maintainence in that regard, there is plenty of not-so-charming work to do.


Once the text is done, then the next hurdles are:

  • (big one) Updating the FLA and FRP require a motion at the general assembly of KDE e.V. – that is, the meeting which we usually have at Akademy. Akademy 2021 will be online, so we’ll have to have the virtual ducks in a row way before then.
  • (little one) Updating the KDE e.V. website with the newer version of the PDFs. While I’m at it, I’d like to reduce the tangle of webpages and redirects around the FLA.
  • (social) If you signed an older version of the FLA, it may be worthwhile to revisit that decision and sign the updated version to clarify your intentions.

If you are a KDE contributor (of artwork, code or documentation) and have not signed it at all, feel free: but double-check the document and remember that it is optional.

This is a guest blog post by Felgo, an official Qt Technology and Service Partner.

Qt makes it easy to develop applications for Desktop, Mobile and Embedded platforms, all from a single code base. No other solution offers to build native cross-platform apps for all these platforms at once. But since the rise of mobile and smart devices in all kinds of shapes and sizes, bridging the gap between platforms has become even harder. By solving a lot of common problems in many real-life projects, Felgo built a variety of higher-level APIs and development tools on top of Qt that help you save time and worries. Read on to learn how to overcome these challenges from the development to the release.

Kdenlive 20.12.2, part of our monthly bugfix release, is now available and fixes several important issues. Among the changes:

  • Fix copying an effect from a track to another
  • Several fixes/improvements for the newly added subtitle feature:
    • Implement copy/paste
    • Fix broken resize
    • Fix subtitles encoding issue happening on some systems
    • Improve timeline integration (track can now be highlighted and items resized with standard shortcuts)
    • Various crash fixes
    • Windows: Subtitle with special characters like äöü are now correct viewed after re-loading the project file.
  • Fix crash when trying to group/ungroup items while performing a drag operation
  • Fix timeline click not working after a speed change operation
  • Fix effect keyframes sometimes broken on image / title clips
  • Fix speed change resetting audio channel
  • Make playlist proxy clips work again
  • Fix rendering issues on some systems, like slowmotion effect not working
  • Fix UI translations not working or only partially
  • Fix clips with mix sometimes cannot be cut or behaving incorrectly

The downloads are available as usual from our Download page.

Full log
  • Allow resizing unselected subtitles. Commit.
  • Remove env variable breaking UI translation. Commit.
  • Fix clip with mix transition cannot be cut in some circumstances. Commit.
  • Ensure all track tags have the same width if more than 10 tracks. Commit.
  • Fix rendering uses wrong locale, resulting in broken slowmotion in render and possibly other issues on some locales. Commit.
  • Expose proxy info in playlist clip properties (to allow delete, etc). Commit.
  • Fix proxied playlists rendering blank and missing sound. Commit.
  • Fix playlist proxies broken. Commit.
  • Fixed issue where changing speed resets audio channel of clip to channel 1. Commit.
  • Ensure color/image/title clips parent producer always has out set as the longest duration of its timeline clips. Commit.
  • Ensure clips have an “unnamed” label if name is empty. Commit.
  • Effect keyframe minor fixes (improve hover color and allow pasting param to keyframe 0). Commit.
  • Re-enable audio playback on reverse speed. Commit.
  • Fix changing speed breaks timeline focus. Commit.
  • Ensure a group/ungroup operation cannot be performed while dragging / resizing a group. Commit.
  • Cleanup monitor overlay toolbars and switch to QtQuick2 only. Commit.
  • Improve show/hide monitor toolbar (ensure it doesn’t stay visible when mouse exits monitor). Commit.
  • Correctly disable subtitle widget buttons when no subtitle is selected, add button tooltips. Commit.
  • Fix lift value incorrect on click. Commit. Fixes bug #431676
  • Update render target when saving project under a new name. Commit.
  • Improve and fix ressource manager, add option to add license attribution. Commit.
  • Fix some crashes on subtitle track action. Commit.
  • Set range for zoome of avfilter.zoompan to 1-10 (effect doesn’t support. Commit.
  • Improve subtitle track integration: add context menu, highlight on active. Commit.
  • Fix incorrect arguments parsing on app restart. Commit.
  • Fix build. Commit.
  • Attempt to fix subtitle encoding issue. Commit.
  • Fix recent regression (crash moving clip in timeline). Commit.
  • Fix subtitles not displayed on project opening. Commit.
  • Update copyright year to 2021. Commit.
  • Fix disabled clip regression (color and opacity changes were not applied anymore). Commit.
  • Fix compilation. Commit.
  • Delete equalizer.xml. Commit.
  • Delete eq.xml. Commit.
  • Delete selectivecolor.xml. Commit.
  • Delete unsharp.xml. Commit.
  • Dragging an effect from a track to another should properly activate icon and create an undo entry. Commit.
  • Always keep timeline cursor visible when seeking with keyboard, not only when “follow playhead when playing is enabled”. Commit.
  • Fix broken Freesound login and import. Commit.
  • Fix regression in subtitle resize. Commit.
  • Fix clips incorrectly resized on move with mix. Commit.
  • Fix grouped clips independently resized when resizing the group. Commit.
  • Implement missing subtitle copy/paste. Commit. Fixes bug #430843
Dear digiKam fans and users, Just a few words to inform the community that 7.2.0-rc is out and ready to test six month later the 7.2.0 beta1 release. After integrating the student codes working on faces management while this summer, we have stabilized code about the usability and the performances improvements of faces tagging, faces detection, and faces recognition, already presented in July with 7.0.0 release announcement. One very important point introduced with this release is the new Online Release Downloader to help users with stable and pre-release updates, fully automatized, providing a release notes, and with the options to use debug or optimized application versions.


8 February, 2021

Autocrypt support is now in Kontact! This has been several weeks of work. Autocrypt makes it easier for you to use encrypted messages, as is handles key transfer for you automatically.

There are several parts involved in supporting Autocrypt. First, Autocrypt uses Protected Headers, implemented already. Within Autocrypt I found some issues and fixed them. Than I began implementing the receiving of Autocrypt messages. The key concept of Autocrypt is to always send the public key within each email, so the receivers are always able to answer encrypted. The first step was extraction of the key and saving it to disk. Because Autocrypt sends keys unverified at the moment, I decided to not import the Autocrypt keys into the users' keyrings, but keep them separately in json files under ~/.local/share/autocrypt.

After having all data of processed mails stored. I started to implement the sending part of Autocrypt. While implementing I learned that GnuPG does not like to handle two different keyrings anymore. I solved this by creating a temporary keyrings with all keys needed to encrypt a mail. This is certainly not perfect but works for now. There is room for improvement, of course. But as I needed to touch the code of KeyResolver I found out that contact preferences have been disabled for around 2 years, because back then Akonadi locked sometimes during search queries. I think this is not a problem anymore, so I will enable it again pim/messagelib!35. Hopefully with the feedback will ensure that it now just works, or we'll receive more informative failure reports that help to fix the issue.

For testing I used a mail address with an underscore and could reproduce #370385, and then made a journey into akonadi-search. It took a while before I understand the issue, because mail addresses in From or To header can be found correctly. In the end I found a fix: pim/akonadi-search!5. It would be helpful got get feedback from people who know Xapian to improve this code, because for me it feels like poking around in the dark.

Back from the journey, I needed to add Autocrypt support into identities, so you can now enable Autocrypt on an identity basis. I think the complete part is ready for enthusiasts to enable it. This as an experimental feature for now, and you need to enable it in the configuration file by hand. So if you ride the master branch you can enable it by setting Autocrypt = true for each identity in ~/.config/emailidentities. At the moment I cannot tell if this will be stable enough to show users the Autocrypt checkbox in the next release 21.04.

What is working so far?

  • Syncing Autocrypt storage while reading mails
  • sending mails to users that only have Autocrypt keys
  • Adding your key to the Autocrypt header and adding a Gossip header if needed

I tried to implement it in a way that will not break existing workflows. If there is at least one valid key of an user in your keyring, this will be preferred and Autocrypt does not kicks in. A valid key is a key that is neither expired, nor revoked nor disabled and suitable for encryption. Only if no valid key is found, a valid key is searched within Autocrypt storage. This ensures that existing encrypted communication is as safe as before.

What is missing?

  • Creating and processing Setup messages
  • A way to transfer your private key material between your devices
  • Detecting if an Autocrypt key is available while writing the mail. Currently the recipient is displayed as if no encryption would be possible
  • You need to request encryption explicitly
  • No support for prefer-encrypt preferences
  • signatures of mails cannot be verified against an Autocrypt key

I hope you enjoy Autocrypt support in Kontact. The next steps are to finish the missing parts and refactor the crypto support in Kontact. This work I do is supported by funding from nlnet to improve mail encryption.