This video will give you an overview of many debugging techniques and tools for C/C++ applications. This includes unit testing and other types of automated testing, code coverage, static code analysis, logging, assertions, tracing, debuggers, Gammaray, valgrind, sanitizers, and more.
Once again, the theme of the day is how to speed up Qt development with Visual Studio Code. In part 2 of this blog series, we walked through how to get a complete setup for your qmake and CMake projects, with a deeper look at the Qt side. This time, I will share a few […]
These are some really cool or obfuscated code snippets for your amusement. We didn't want to rate them, so the order doesn't mean anything at all :) Just to make sure that there's no misunderstanding: This code really is/was in the Qt or KDE repositories. From Kivio, main.cpp From Qt 2.2.1 (src/canvas/qcanvas.cpp) Writing code that […]
A debugger is, without a doubt, a very useful tool to have. However, sometimes you debug just one step too far and wish you had a time machine to go back. Now, such a time machine does actually exist on Linux. It's called 'rr,' was developed by Mozilla to debug Firefox, and is far from just a toy.
If you ever need to create a project around a single C++ file (or just a few C++ files) in CMake, as you might for quick test cases, you might find it tedious to write a CMakeLists.txt file by hand every time. To make this easier, I've written a script called cmake-project that you can […]
In 2019, I optimized QStringList::removeDuplicates() by using std::pmp::unordered_set with a std::pmr::monotonic_buffer_resource, when available. The class that I wrote to encapsulate this optimization has since been re-implemented three times. The latest iteration has recently landed in KDToolBox. If you have code that looks a bit like this: then you should read on. Before my change, the […]
As described in our previous blog posts, you can use Visual Studio Code as an IDE for C++ projects. It works particularly well with CMake-based projects. Unfortunately, with build systems not supported natively by VS Code, you need to manually configure include paths and compilation definitions, for the code model to work properly. Since the […]
This video compares the multithreading facilities in Qt with those provided by the C++ standard library. Which one has a semaphore class? A thread pool implementation? A movable lock guard? Which one has the most convenient condition variable API?
KDSoap 2.0.0 was just released! What is KDSoap? KDSoap is a tool for creating client applications for web services, without the need for any further component such as a dedicated web server. This tool makes it possible to interact with applications which have APIs that can be exported as SOAP objects. The web service then […]
(Apologies for the clickbait in the post title! But I'd really like people who are searching for solutions to read this.) Between Qt 5.14 and Qt 5.15, my colleague, Marc Mutz, and I submitted a series of patches to Qt that added "range constructors" to the Qt containers. This brought Qt containers one step closer […]
Years after its creation, C++ is still, and certainly was in 2021, considered by some to be one of the most powerful languages on the planet. For this video we gathered an international panel of C++ experts to give you insights about the C++ language: where it's going and how it got there.
After many struggles with using git LFS on repositories that need to store big files, I decided to spend some time on checking the status of the built-in partial clone functionality that could possibly let you achieve the same (as of git 2.30). TL;DR: The building blocks are there, but server-side support is spotty and […]
In the previous blog post of this series, we discussed KDToolBox::QtHasher, a helper class that allows us to use unordered associative containers datatypes which have a qHash() overload but not a std::hash specialization. The majority of Qt value classes indeed are lacking such a specialization, even if they do provide a qHash() overload. For our […]
This talk argues that C++ is excellent for embedded development, going beyond being a "superset of C" with stricter typing, automatic resource management, generic programming, and performance improvements over equivalent C code. It aims to demystify C++ myths that have become self-fulfilling prophecies, showcasing code demonstrating how C++ helps C developers create more robust, efficient software.
Note: This is the English translation of the article first published in German Intro The ESE Congress is one of the lead events for Embedded Software Engineering in Germany. This year it was held digitally for the first time, so that participation was also possible via video. Over five days, there were 3 keynotes and […]
Almost all embedded devices interact with the physical world, requiring solutions for handling various measurement values including sensor differences, unit systems (metric vs imperial), and overlapping units. This talk examines arithmetical operation validity and shows how modern C++ language features make this transparent and runtime-optimal, motivated by a project where inconsistent measurement handling caused subtle bugs.
Another day, another blog post about KDToolBox, KDAB's collection of miscellaneous useful C++ classes and stuff. Today, we'll talk about ways to throttle your signal/slots connections -- in other words, how to activate a slot less often than the emission rate of the signal it's connected to. The usual reason why you may want something […]
In the previous blog post about qHash, we explained: how to declare an overload of qHash for your own datatypes, how to hash Qt datatypes for which Qt does not provide a qHash overload, and why you can't use a type from the Standard Library (or just another library) as a key in QHash (newsflash: […]
Learn how to create custom document templates in Qt Creator through these four videos. This first episode creates a simple class template based on the "C++ class" template, explains macro usage, and shows how macros expand into class names from the "new file" dialog.
Einleitung Der ESE Kongress ist die Leitveranstaltung für Embedded Software Engineering in Deutschland. In diesem Jahr fand er erstmals digital statt, so dass die Teilnahme auch per Video möglich war. An fünf Tagen gab es 3 Keynotes und 96 Fachvorträge aus allen Bereichen der Embedded Softwareentwicklung. Anton Kreuzkamp von KDAB sprach über maßgeschneidertes Code-Refactoring mit […]