Skip to content

Welcome to Planet KDE

This is a feed aggregator that collects what the contributors to the KDE community are writing on their respective blogs, in different languages

Saturday, 4 February 2023

While we hammer away at polishing up Plasma 5.27, features and user interface changes are starting to land for Plasma 6! We took a big bite out of the 15-minute bugs, too. Goodies for everyone!

New Features

System Settings’ Default Applications page now lets you choose your preferred application for a much wider variety of file types! (Méven Car, Plasma 6.0. Link):

System Settings main window showing "Default Applications" page with large list of URL protocols and file formats that you can choose your preferred app for, including "Web browser," "Email client," "Dialer," "Image viewer," "Music player," "Video player," "Text editor," PDF viewer," File manager," Terminal emulator," "Archive manager," and "Map"
You can still override these broad mappings with per-file-type mappings in the File Associations page, of course. And when you do so, those overrides will be displayed here!

Throughout Kirigami-based apps, standard list items with elided text now display a tooltip on hover showing the full text (Ivan Tkachenko, Frameworks 5.103. Link)

User Interface Improvements

Elisa now increments a song’s play count when it finishes playing, not when it starts (Frisco Smit, Elisa 23.04. Link)

The accent color picking UI has been condensed to it takes up less space, which opens up room for us to add other settings there in the future, such as day/night color scheme switching, which is in progress! (Tanbir Jishan, Plasma 6.0. Link):

System Settings main window showing Colors page with accent color choosing user interface that fits entirely on one row, with a combobox on the left showing "Custom accent color" and a row of dots beside it, with a purple dot selected

The OSD that appears when you switch audio devices now also shows the battery level of the new audio device you switched to (if that device has a battery and reports battery info, of course) (Kai Uwe Broulik, Plasma 6.0. Link):

OSD showing an image of a headset beside the text "My headset (70% battery)"

Framed views with rounded corners in QtQuick-based software no longer have tiny “korners”-style visual glitches in the corners (Ivan Tkachenko, Frameworks 5.103. Link):

Close-up view of a rounded corner in a framed scrollable view of a Qt-Quick-based user interface that shows perfect roundned both inside and outside the frame

Significant Bugfixes

(This is a curated list of e.g. HI and VHI priority bugs, Wayland showstoppers, major regressions, etc.)

Using a keyboard shortcut to close a window by dragging it around no longer causes it to leave a ghostly non-interactive shadow of itself hanging around (Marco Martin, Plasma 5.27. Link)

Upgrades of Flatpak runtimes with have a new version available are once again marked as such appropriately in Discover, rather than being listed as a “refresh” of the existing version (though that’s still possible too) (Aleix Pol Gonzalez, Plasma 5.27. Link)

Viewing System Settings’ Application Style page no longer sometimes causes the CPU usage to spike when certain 3rd-party application styles are installed (Fushan Wen, Plasma 6.0. Link)

Fixed two issues with Plasma panel widget pop-up placement that could cause popups to be inappropriately centered on their panels when using a multi-monitor setup or when the panel is not maximized to take up all available space on its screen edge (Niccolò Venerandi, Frameworks 5.103. Link)

Spectacle’s “Copy to clipboard right after taking a screenshot” feature once again works in the Plasma Wayland session (David Redondo, Frameworks 5.103. Link)

In QtQuick-based software, it’s no longer possible to drag things around in scrollable views that shouldn’t be draggable, like items in sidebars and lists (Marco Martin, Frameworks 5.103. Link)

Fixed a ton of little miscellaneous glitches with scrollbars in QtQuick-based software (Ivan Tkachenko, Frameworks 5.103. Link)

Other bug-related information of interest:

Automation & Systematization

Updated the included documentation for System Settings’ Global Themes, Colors, Cursors, Desktop Session, Plasma Search, Task Switcher, Screen Edges, General behavior pages! (Natalie Clarius, Plasma 5.27. Link 1, link 2, link 3, link 4, link 5, link 6, link 7, link 8, link 9)

Added documentation for Aurorae window decorations! (Natalie Clarius. Link)

…And everything else

This blog only covers the tip of the iceberg! If you’re hungry for more, check out https://planet.kde.org, where you can find more news from other KDE contributors.

How You Can Help

Please test the Plasma 5.27 beta! Bug reports filed against the beta version (5.26.90) get looked at and prioritized. It really helps. And of course, if you’re a developer, fixing those bugs is massively impactful too. You might also want to check out our 15-Minute Bug Initiative. Working on these issues makes a big difference quickly!

Otherwise, visit https://community.kde.org/Get_Involved 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!

And finally, KDE can’t work without financial support, so consider making a donation today!

Friday, 3 February 2023

Sunset, Witch Wells Arizona
Sunset, Witch Wells Arizona

Another busy week!

In the snap world, I have been busy trying to solve the problem of core20 snaps needing security updates and focal is no longer supported in KDE Neon. So I have created a ppa at https://launchpad.net/~scarlettmoore/+archive/ubuntu/kf5-5.99-focal-updates/+packages

Which of course presents more work, as kf5 5.99.0 requires qt5 5.15.7. Sooo this is a WIP.

Snapcraft kde-neon-extension is moving along as I learn the python ways of formatting, and fixing some issues in my tests.

In the Debian world, I am sad to report Mycroft-AI has gone bust, however the packaging efforts are not in vain as the project has been forked to https://github.com/orgs/OpenVoiceOS/repositories and should be relatively easy to migrate.

I have spent some time verifying the libappimage in buster is NOT vulnerable with CVE-2020-25265 as the code wasn’t introduced yet.

Skanpage, plasma-bigscreen both have source uploads so the can migrate to testing to hopefully make it into bookworm!

As many of you know, I am seeking employment. I am a hard worker, that thrives on learning new things. I am a self starter, knowledge sponge, and eager to be an asset to < insert your company here > !

Meanwhile, as interview processes are much longer than I remember and the industry exploding in layoffs, I am coming up short on living expenses as my unemployment lingers on. Please consider donating to my gofundme. Thank you for your consideration.

I still have a ways to go to cover my bills this month, I will continue with my work until I cannot, I hate asking, but please consider a donation. Thank you!

GoFundMe

Let’s go for my web review for the week 2023-05.


The AI Crowd is Mad

Tags: tech, ai, machine-learning, gpt

A few interesting points in there. Too much hype and important points are glanced over, we’d all benefit from them being more actively explored.

https://proofinprogress.com/posts/2023-02-01/the-ai-crowd-is-mad.html


Meta Was Scraping Sites for Years While Fighting the Practice - Bloomberg

Tags: tech, facebook

Oh the irony! Are we surprised? No not really… apparently who wields the tool makes it acceptable or not.

https://www.bloomberg.com/news/articles/2023-02-02/meta-was-scraping-sites-for-years-while-fighting-the-practice


Merchant: Big Tech is using layoffs to crush worker power - Los Angeles Times

Tags: tech, work, hr, business

Looks like an attempt to sow fear in the workers at Big Tech. Hopefully it’ll lead instead to a better organization of the workers across the industry and people leaving Big Tech altogether to join less toxic environments.

https://www.latimes.com/business/technology/story/2023-01-30/column-how-big-tech-is-using-mass-layoffs-to-bring-workers-to-heel


The Transformer Family Version 2.0 | Lil’Log

Tags: tech, ai, machine-learning

Very nice summary of the architecture in the latest trend of transformer models. Long but comprehensive, a good way to start diving in the topic.

https://lilianweng.github.io/posts/2023-01-27-the-transformer-family-v2/


Writing a Custom SQLite Function (in C) - Part 1

Tags: tech, sqlite

An interesting but sometimes forgotten possibility for extending SQLite. Keep in mind this can lead to bad coupling between the software and the DB though which could carry interesting challenges around upgrades for instance.

https://www.openmymind.net/Writing-A-Custom-Sqlite-Function-Part-1/


Undefined behavior, and the Sledgehammer Principle | The Pasture

Tags: tech, programming, c, c++

Excellent conclusion to the recent turmoil around undefined behaviors. The way they are currently used as definitely a problem, they shouldn’t be ignored in your code (although that’s admittedly not that easy). There’s hopefully a path forward.

https://thephd.dev/c-undefined-behavior-and-the-sledgehammer-guideline


Data for Decisions - Max Countryman

Tags: tech, data, knowledge, decision-making

Too often forgotten. Data is indeed a mean to an end. It’s not outright knowledge and will require work to be useful. It better be aligned with your needs if you want to use it for decision making.

https://www.maxcountryman.com/articles/data-for-decisions


My critique of “the Spotify Model”: Part 1 | by Jason Yip | Jan, 2023 | Medium

Tags: tech, agile

OK, this is the best critique of the “Spotify Model” I’ve seen around. There’s been plenty of unfair criticism thrown at this “model” (never aimed to be something you fully replicate though, hence the complaints I think). This one is properly balanced and doesn’t just throw everything in the garbage bin, it takes the model bits by bits and try to highlight where the limits are. Very constructive.

https://jchyip.medium.com/my-critique-of-the-spotify-model-part-1-197d335ef7af


I’m Now a Full-Time Professional Open Source Maintainer

Tags: tech, foss, business

Interesting business model. Could be a new path for at least some maintainers to be sustainably funded. Still a lot of unknowns though… probably worth keeping an eye on it.

https://words.filippo.io/full-time-maintainer/


Estimating Square Roots in Your Head

Tags: mathematics

Interesting method to estimate square roots. I didn’t know about it, quite clever.

https://gregorygundersen.com/blog/2023/02/01/estimating-square-roots/



Bye for now!

After the announcement upstream, Fedora’s @kde-sig follows up by making KDE Gear 22.12.2 available on Fedora 37.

As per Fedora’s policy, the software will first land on updates-testing and after receiving feedback and karma it will land on the updates repository.

If you want to help, make sure to follow the instructions on the update. You only need to run:

sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-17c31eabf7

Feel free to join us at our Matrix room!.

There has been plenty of activity around KDE Itinerary since the last summary post two month ago, including work to leverage train onboard APIs and improved event support.

New Features

Extended event support

While transport-related tickets are most often in focus when talking about Itinerary, it can also handle other bookings relevant on the road, such as hotel reservations and event tickets. In particular the handling of events received a number of updates.

Data import and data extraction:

  • Opening an event URL from Mobilizon with Itinerary will import the corresponding event. This doesn’t even use ActivityPub yet, supporting that eventually will give us even more event details and will allow automatic updates.
  • Generic iCal data without semantic annotation can now also be imported directly.
  • There’s new and/or improved data extractors for Eventim, Indico, Kinoheld, Meetup and Pretix.

Displaying event information in the app:

  • Seat reservations are now shown in the full level of detail when available.
Screenshot of the event page seat information section.
Event details page showing seat information.
  • Event websites and descriptions are shown on the event details page.
  • Apple Wallet event tickets are now rendered correctly also when containing image assets that are outside the specified sizes, by applying downscaling or tiling.
Screenshot of an event ticket in Apple Wallet pass format.
Apple Wallet event ticket with image assets needing scaling and tiling.

Improved barcode scanner

Importing tickets by scanning their barcodes has been available for some time, but didn’t always work reliably under poor light conditions. For those cases the barcode scanner now allows to turn on a torch light if available (which is the case on most phones).

Screenshot of the barcode scanner page showing the torch light action in the center.
Torch light action on the barcode scanner page.

Events

After three years there will be an in-person FOSDEM again, starting tomorrow, with the KDE stand in building K as usual.

FOSDEM 2023

On Saturday 13:35 in room AW1.126 there will be a talk about how we make use of public transport and ticket barcode data in Itinerary, as part of the Railways and Open Transport track.

That’s not the only upcoming event though, Itinerary will also be present at the FOSSGIS-Konferenz on March 15-18 in Berlin with a talk about how we use OSM data (in German).

FOSSGIS-Konferenz 2023

Distribution

To address the persisting problem of Google blocking updates to Itinerary in the app store due to the health certificate feature there’s now a plan to move that feature to a separate app. That would then of course not be available in the Google store, but would be limited to free platforms.

Infrastructure Work

Onboard API

Several train and bus operators offer Wi-Fi on their vehicles, and often this comes together with a portal website showing current journey information. The latter is typically power by some form of onboard API which reports the current speed and position of the vehicle as well as information about the route and possible disruptions.

Work has started on a new library to make use of this. For this we are monitoring which Wi-Fi network we are currently connected to, and if it’s one we know the onboard API for continuous updates of the current position and journey are retrieved.

While Wi-Fi names differ from operator to operator there’s only a few vendors of onboard information systems, so we can often cover many operators with the same code. Still we have to look at each operator and add the necessary configuration. That’s where we again need help from everyone traveling, please note Wi-Fi names and capture communication between the portal website and its backend when encountering such systems!

So far we have CD Railjet, DB ICE, FlixBus coaches, SNCF Inoui and Thalys covered.

Two screenshots showing a map with the current train position, speed and heading, and a schematic display of the journey with delays.
Onboard live status showing the current position, speed, heading and journey.

Showing this information in the app is straightforward and can be useful, but the real value comes from using this for further assistance features:

  • Are you on the right train? That’s not always as obvious as one might think, considering for example multi-set trains that split up along the way.
  • Are we there yet? That is obvious for the traveler, but it’s tricky for the app. Especially disruptions shortly before arrival can get lost, as the online routing services we query for this simply might not have that information fast enough. This then results in not getting further updates on the estimated arrival time, and no support in finding an alternative for a missed connection.

And that’s not even all that can be done here, there’s already suggestions to use this data to assist with connecting to the right Wi-Fi when detecting a corresponding access point, or to extend the same approach to airport and train station Wi-Fi systems.

Finding traveler names

There are a few ticket barcode formats that predate Unicode and as such only contain ASCII transliterations of passenger names. Flight boarding passes are the most prominent example, being even limited to a maximum of 20 uppercase ASCII letters.

Unless your name happens to be compatible with those restrictions, that leads to more or less mutilated and truncated spellings. And that’s not only a cosmetic issue, it makes merging data from different sources much harder.

Often the properly spelled name is found in the same document containing the bardoe though. For this case we now have a new component in the extractor that uses names found in barcodes and then searches for their proper spelling in PDF documents and Apple Wallet passes.

While this tends to produce good results on many airline documents it is still limited to Latin scripts. It’s probably possible to extend that to other scripts using ICU’s transliteration capabilities, but we’d need enough sample documents for those cases for testing first.

Software accessibility

Itinerary’s accessibility with assistive tools such as screen readers has a lot of room for improvements to put it mildly. With KDE having made software accessibility an explicit goal and with the recent work on using the AT-SPI interface also for automated testing it’s high time we change that.

A number of improvements have been implemented already, both in the app as well as in underlying libraries, to improve the structure exposed over AT-SPI and to add textual information to icon-only elements. But there is still a long way to go.

Static extractor builds

For use in e.g. Nextcloud we have the ability to do a full static build of the travel document extractor, as that significantly simplifies server-side deployment.

This used to be done with a custom Docker image manually and now has been redone as a Gitlab job on KDE’s CI infrastructure. While at it, a few more things were improved:

  • Static linking against zlib, so the extractor is independent of the zlib version installed on the target system.
  • Switch the build job to CentOS 7, which reduces the required glibc version down to just 2.17.
  • Set search paths for translation catalogs automatically, so deployment requires no further step than unpacking the archive generated by the CI job in an arbitrary location.

Further improvements are being worked on, such as making KI18n use embeded iso-codes caches, something that would also benefit e.g. Android APKs.

Fixes & Improvements

Travel document extractor

  • Improved extractors for MÁV, Trenitalia, NH and Premier Inn hotels as well as the caesar-data and onepagebooking booking engines.
  • Fix determining the year of travel from context for RCT2 tickets that don’t contain the year.
  • Improve merging of different reservations for the same train trip when there are slight variations in arrival time or destination spelling.

Public transport data

  • Support new GBFS v2.3 vehicle and propulsion types such as cargo bikes and hybrid engines.
  • Fix filtering of floating vehicles by distance. This makes rental bikes show up on the station map correctly again.

Indoor map

Rendering engine improvements:

  • Support rendering icons using real-world rather than screen sizes. Sizes can be specified explicitly in the MapCSS style or taken from OSM tag values.
  • Support MapCSS tag setting expressions. This allows styles to overwrite OSM tag values and have those values considered in the subsequent style evaluation.
  • Consider pen width when computing polyline bounding boxes. This fixes interacting with near horizontal or near vertical ways.
  • Kate can now highlight MapCSS styles.
  • Don’t search for the next opening time arbitrarily into the future. This fixes a potential infinite loop in certain “always closed” opening hours expressions.

Map content improvements:

  • Override suspicious layer tags on building elements. Those can exist in the OSM data due to optimizations for the general outdoor renderer but result in wrong stacking orders in the indoor view, with building (background) elements covering foreground details.
  • Show building and room entrances, barrier blocks and trees.
  • Also consider the building tag for determining the element name.
  • Show element description texts when available.
  • Handle more tagging variants for disused/closed amenities/shops.
  • Floor level topology fixes in OSM for major railways stations in Brussels, Vienna and Dresden.
Screenshot of the map of the ground floor of Warszawa Centralna with building parts correctly layered in the background.
Warszawa Centralna with correct building part layering..

Itinerary app

  • Continue the transition to the Kirigami Mobile Forms UI component, the generic ticket and program membership pages use those as well now.
  • Determine proper time ranges for the map view on non-transit elements (events, hotels, restaurants, etc). This is necessary for opening hours to be taken into account on the map display.
  • Also allow reverse geo coding in the place editor, that is look up the address based on an already available geographic coordinate.
  • Fix too aggressive merging of generic Apple Wallet passes.
  • Do not accept rotation gestures on the location picker map, making it behave more predictably on touch interactions.

How you can help

Feedback and travel document samples are very much welcome, and there are plenty of other things that can be done without traveling as well. The KDE Itinerary workboard or the more specialized indoor map workboard show what’s on the todo list, and are a good place for collecting new ideas. For questions and suggestions, please feel free to join us on the KDE PIM mailing list or in the #kontact channel on Matrix.

Thursday, 2 February 2023

Over 120 individual programs plus dozens of programmer libraries and feature plugins are released simultaneously as part of KDE Gear.

Today they all get new bugfix source releases with updated translations, including:

  • dolphin: Don't recurse into symlinks when counting directory contents (Commit, fixes bug #434125)
  • kdeconnect: Fix ssh authentication using pubkey on recent openssh versions (Commit, fixes bug #443155)
  • libkdegames: Fix finding knewstuff themes (Commit, fixes bug #464288)

Distro and app store packagers should update their application packages.

Wednesday, 1 February 2023

This is a non-comprehensive list of all of the major work I’ve done for KDE this month of January. I think I got a lot done this month! I also was accepted as a KDE Developer near the start of the month, so I’m pretty happy about that.

Sorry that it’s pretty much only text, a lot of this stuff isn’t either not screenshottable or I’m too lazy to attach an image. Next month should be better!

Custom icon theme in Tokodon

I threw all of the custom icons we use in Tokodon into a proper custom icon theme, which should automatically match your theme and includes a dark theme variant. In the future, I’d like to recolor these better and eventually upstream them into Breeze.

See the merge request.

KXMLGUI tooltips

As part of cleaning up some KDE games-related stuff, I also looked into the issue of duplicate “What’s This?” tooltips. This also fixes that visual bug where you can close normal tooltips that don’t have “What’s This?” information to actually open.

See the merge request.

KBlocks background changes

This one isn’t merged yet, but in the future - KBlock themes authors will be able to specify where to pin the background instead of having it stretched by default.

See the merge request.

Kirigami “About KDE” dialog

I added something that’s been wanted for a while, Kirigami’s own “About KDE” dialog! It’s currently sitting in Add-ons, but will most likely be moved in the future. If you would like to suggest what we do about the About pages/windows in KDE, please check out the proposal.

Kirigami Add-on&rsquo;s About KDE dialog
Kirigami Add-on’s About KDE dialog

See the merge request.

Media improvements in Tokodon

I did a lot of work improving media in Tokodon this month, including fixing the aspect ratios scaling correctly, video support (not merged yet) and other miscellaneous fixes. I also caught a bunch of blurhash bugs along with making the timeline fixed-width so images aren’t absurdly sized on a typical desktop display.

Tokodon on a large display
Tokodon on a large display

See the media layout fixes, three attachment fix, and the video support merge requests.

Krita.org dark theme

I’m starting to get involved in improving the KDE websites, and currently working on the new Krita.org website and adding a proper dark theme to it.

Krita.org in the dark
Krita.org in the dark

See the work-in-progress merge request.

Gwenview MPRIS fixes

Not merged yet (due to MPRIS bugginess in general?) but I cracked a shot at improving the MPRIS situation with Gwenview. Notably, slideshow controls no longer “hang around” until a slideshow is actually happening.

See the open merge request.

CMake Package Installer

I worked a little on solving the kdesrc-build issue of manual package lists, and created cmake-package-installer. It parses your CMake log and installs the relevant packages for you. I want to start looking into hooking this into kdesrc-build!

See the repository.

KDE Wiki improvements

I made some misc changes to the Community Wiki this month, mostly centered around fixing some long-standing formatting issues I’ve noticed. The homepage should be more descriptive, important pages no longer misformatted (or just missing?) and the Get Involved/Development page should be better organized.

Misc Qt patches

I cherry-picked a Qt6 commit fixing video playback in QML, which should appear in the next Qt KDE Patch collection update, mostly for use in Tokodon when video support lands. I also submitted an upstream Qt patch fixing WebP loading, meant for NeoChat where I see the most WebP images.

See the GStreamer cherry-pick and the WebP patch.

Window Decoration KCM overhaul

This isn’t merged yet (but it’s close!) so it barely misses the mark for January, but I’ll include it anyway. I’m working on making the Window Decoration KCM frameless and give it a new look that matches the other KCMs.

New Window Decoration KCM
New Window Decoration KCM

See the merge request.

Tuesday, 31 January 2023

Flatpak applications are based on runtimes such as KDE or Gnome Runtimes. Both of these runtimes are actually based on Freedesktop SDK which contains essential libraries and services such as Wayland or D-Bus.

Recently there were a lot of discussion about supply chain attacks, so it might be interesting to ask how Freedesktop SDK was built. The answer can be found in freedesktop-sdk repository:

sources:
- kind: ostree
  url: freedesktop-sdk:releases/
  gpg-key: keys/freedesktop-sdk.gpg
  track: runtime/org.freedesktop.Sdk.PreBootstrap/x86_64/21.08
  ref: 0ecba7699760ffc05c8920849856a20ebb3305da9f1f0377ddb9ca5600be710b

So it is built using an older version of Freedesktop SDK image. There is now an approved merge request that completely reworks bootstrapping of Freedesktop SDK. It uses another intermediate docker image freedesktop-sdk-binary-seed that bridges the gap between freedesktop-sdk and live-bootstrap.

So what is this live-bootstrap? If you look at parts.rst you’ll see that it is a build chain that starts with 256 byte hex assembler that can build itself from its source and also 640-byte trivial shell that can read list of commands from the file and executes them. Then it proceeds building 130 (as of the moment of writing) other components and in the process builds GCC, Python, Guile, Perl and lots of other supporting packages. Furthermore, each component is built reproducibly (and this is checked using SHA256 hash).

Some caveat: at the moment freedesktop-sdk-binary-seed still uses older binary of rustc to build rustc but in principle one could leverage mrustc to build it. Or possibly rust-gcc will become more capable in future versions and will be able to bootstrap rustc.

So unless your flatpak application uses rust, it will soon be buildable from sub 1 KiB binary seed.

QCoro 0.8.0 Release Announcement

This is a rather small release with only two new features and one small improvement.

Big thank you to Xstrahl Inc. who sponsored development of new features included in this release and of QCoro in general.

And as always, thank you to everyone who reported issues and contributed to QCoro. Your help is much appreciated!

The original release announcement on qcoro.dvratil.cz.

Improved QCoro::waitFor()

Up until this version, QCoro::waitFor() was only usable for QCoro::Task<T>. Starting with QCoro 0.8.0, it is possible to use it with any type that satisfies the Awaitable concept. The concept has also been fixed to satisfies not just types with the await_resume(), await_suspend() and await_ready() member functions, but also types with member operator co_await() and non-member operator co_await() functions.

QCoro::sleepFor() and QCoro::sleepUntil()

Working both on QCoro codebase as well as some third-party code bases using QCoro it’s clear that there’s a usecase for a simple coroutine that will sleep for specified amount of time (or until a specified timepoint). It is especially useful in tests, where simulating delays, especially in asynchronous code is common.

Previously I used to create small coroutines like this:

QCoro::Task<> timer(std::chrono::milliseconds timeout) {
    QTimer timer;
    timer.setSingleShot(true);
    timer.start(timeout);
    co_await timer;
}

Now we can do the same simply by using QCoro::sleepFor().

Read the documentation for QCoro::sleepFor() and QCoro::sleepUntil() for more details.

QCoro::moveToThread()

A small helper coroutine that allows a piece of function to be executed in the context of another thread.

void App::runSlowOperation(QThread *helperThread) {
    // Still on the main thread
    ui->statusLabel.setText(tr("Running"));

    const QString input = ui->userInput.text();

    co_await QCoro::moveToThread(helperThread);
    // Now we are running in the context of the helper thread, the main thread is not blocked

    // It is safe to use `input` which was created in another thread
    doSomeComplexCalculation(input);

    // Move the execution back to the main thread
    co_await QCoro::moveToThread(this->thread());
    // Runs on the main thread again
    ui->statusLabel.setText(tr("Done"));
}

Read the documentation for QCoro::moveToThread for more details.

Full changelog

See changelog on Github

Git support in Kate landed almost 2 years ago but so far it is undocumented. I am writing this article in order to fill this gap and hopefully make more people aware of the git related features that Kate has.

To be able to use git functionality you need to enable at least two plugins

  • Project plugin (commit / status / branch compare / stashing / file history)
  • Documents Plugin (file history)
  • Git blame (git blame support)

Once the project plugin is enabled and you are in a git repository, you will have the git toolview in your left sidebar:

image

null

The toolview shows git status of the git repository of the currently open document. There are 4 "top level" nodes as you can see. Staged refers to the files that are staged and will be committed if you run git commit ... **Modified **refers to the files that you were already present in your repository but you changed them. **Conflict **refers to the files that have conflicts. Finally, **Untracked **files are those files which your repository doesn't know about.

On the right edge, you can see +1, -2 (numstat) which basically shows you the number of changes in each file.

To be able to Stage/Unstage a file, you can just double click on a file and it will get staged if it was unstaged or unstaged if it was staged. But this can be tedious if you have a lot of files to stage so you can use the context menu (right click menu) to stage/unstaged many files at once:

null

null

null

null

  • Stage Selected Files will stage all the files in the selection
  • Remove Selected Files will remove all the files!
  • Stage All will all stage all the files
  • Unstage All will all unstage all the files
  • Discard All will discard all your changes!!
  • Show Diff will open a diff of all the files under that node.
  • Show in External Git Diff Tool will open your configured git diff-tool. See https://git-scm.com/docs/git-difftool
  • Open at HEAD will open the file and show you its contents as they are currently committed i.e., at HEAD. This can be useful if you have many changes in your file and you want to see what the unmodified file looks like

Each top level node shows the number of files in it on the right side. For e.g., in the above screenshot it is 117 for the Untracked node.

Once you have staged a file, you can commit it either from the gui or command line as you wish. If you want to commit via the gui just click the Commit button at the top. Which will show you the following dialog:

null

Nothing much to say about it. There are two checkboxes at the bottom left corner.

  • Amend will amend the commit instead of adding a new one

  • Sign Off just adds a sign off message in the commit description

Once you click commit changes will be committed asynchronously and you will see a message about it in the Output toolview at the bottom

null

Once you have committed the changes, you can push them from the gui via the button with up arrow.

null

The command displayed in the line edit will be executed as is to push the changes. Similarly you can pull in the changes with the button with down arrow.

Sometimes the git status can be slightly out of date. In that case you can manually trigger a refresh by clicking the button at top right corner:

null

In addition to the basic stuff, there are some more features that can be access from the hamburger menu under the refresh button:

null

  • Refresh - refreshes git status

  • Amend Last Commit opens the commit dialog with 'amend' mode checked and last commit already loaded

  • Checkout Branch allows you to change current branch or create a new branch

  • Delete allows you to delete branches.

  • Compare Branch With can be used to compare current branch with a branch of your choice

  • Open Commit will open the specified commit in the Commit toolview. You can then browse all the changed files in that commit.

  • Stash offers git stash functionality

Current Branch

Current branch can be seen in the bottom right corner in the statusbar. The shown branch will be refreshed on changing the file and will always correspond to the repository the current file belongs to. This features is only available in current master (23.04 unreleased)

null

If you click the branch, it will allow you to change the branch or create a new one.

Commit Toolview

Commit toolview is useful to browse the changes inside a commit. It lists all the changed files in a commit on the left side in the below screenshot along with the number of changes in each file. On clicking a file, the diff of that file for the selected commit will be shown.

null

File History

You can browse the git history of a file by either right clicking in the Project tree or the Documents plugin tree and selecting Show File Git History

null

Once you click that, a new toolview will open with a list of commits particular to that file.

null

Clicking a commit will show the diff for that commit.

If you want to see all the changes in the commit, right click and select Show Full Commit. This will open the selected commit in Commit toolview which I showed above. (23.04 unreleased)

Staging Lines and Hunks

Lines and hunks can be staged from the diff viewer. Simply click "Show diff" on any file in the Git Widget and you will see the following.

null

You can then right click on a line and then stage that particular line or hunk.

Git Blame

If you have enabled the git blame plugin, it will show the git blame for each line as you click the line:

null

If you click on the blame, you will see a popup which shows the details of that commit. You can also open that commit in the Commit toolview if you want to explore the changes in that commit.

Comments?

A matching thread for this can be found here on r/KDE.