A very common implementation pattern for QObject subclasses is to declare its child QObjects as data members of type “pointer to child.” Raise your hand No, keep your hand on your computer input device 🙂 Nod if you have ever seen code like this (and maybe even written code like this yourself): A fairly common […]
Blog Archives
C/C++ Debugging Tools An Overview of Debugging Tools for C and C++ Applications
In this blog on debugging and profiling, I would like to give you an overview of the debugging tools that exist for C and C++ applications. Automated Testing The first thing you need to do is make sure your code is properly tested. This, in itself, is not debugging, but it enables you to make […]
Can’t the Compiler Do That? Customized C/C++ Tooling with Clang LibTooling
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 […]
Kann das nicht der Compiler machen? Maßgeschneidertes C/C++ Tooling mit Clang
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 […]
How to build Qt with the Address Sanitizer on Windows
Some time ago, I wrote about how to build C++ projects with ASAN on Windows. Now, if you happen to deal with Qt projects you may want to take this one step further and sanitize Qt itself. Why bother with a sanitized Qt build? Let’s have a closer look on why having a sanitized Qt […]
How to Build C++ Projects with the Address Sanitizer on Windows memory bug detection via compiler extension
Memory bugs are tricky. Leaks have a clear impact on performance, and quickly become hard to spot when heap allocated objects move too much. Memory access bugs, on the other hand, make your program crash right away, if you’re lucky. In less desirable cases, they may end up corrupting random objects on the heap, and […]
Fix Qt Creator code highlighting on Windows/MSVC projects how to configure your projects to get code highlighting and code navigation back
Have you ever noticed code highlighting disappearing in Qt Creator for some projects, without any apparent reason? Can’t get Ctrl+Click to work on any class name or function name anymore? Maybe you have ignored it at first, got used to it, and decided it’s just one of those things that just “happen sometimes”; or maybe […]
How to use static analysis to improve performance
It’s usually said “only improve performance where a profiler tells you to“. I don’t completely agree. Take a big C++ library like Qt: can you profile all classes and all code paths ? It would take a couple of years to accomplish and analyse the results. It’s expensive: It usually only happens if the speed-up […]