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 […]
C++ Get the RSS Feed
Content related to C++
Heaptrack Version 1.2.0 Released Maintenance release of the fast Linux heap memory profiler
We have just released version 1.2.0 of Heaptrack, the fast heap memory profiler for C++/Linux applications. A bit of Background The Heaptrack fast heap memory profiler allows you to track all heap memory allocations at run-time. Afterwards, you can use the accompanying GUI tool to find optimization opportunities in your code by analyzing the recorded […]
Meeting C++ 2020 November 12 - 14
The Schedule, Talks and Speakers are now online for this ever growing ‘partly virtual ‘event for the European C++ community. KDAB is proud to be a Gold sponsor this year. This year’s online conference features eleven talks in one track. On November 14th you can see a talk from KDAB’s Marc Mutz: Partially-Formed Objects […]
Creating Python bindings for Qt libraries
Python is a handy all-purpose language. It can make you very productive within a short time period and has powerful expressiveness for data manipulation and processing. Yet, it’s not a great fit for lots of tasks. C++ is far better at achieving anything that needs bare metal performance, deterministic timing, or low-level access. Thankfully, some […]
How to declare a qHash overload
Today’s blog post is about something that should be simple and apparently it causes trouble: how to declare a qHash overload for a custom datatype. This is necessary when we want to use custom datatypes as keys in a QHash. From the documentation: A QHash’s key type has additional requirements other than being an assignable […]
VS Code for Qt Applications – Part 2 A Technical Guide
This 3-part blog series shows in detail how to get up to speed with a Qt project using Visual Studio Code. Part 2 shows how to get a complete setup for qmake and CMake projects, with a deeper look at the Qt side.
Qt, range-based for loops and structured bindings Part 1
Qt has a long history. The first stable version was released before the first version of C++ was standardized and long before the different C++ compiler vendors started shipping usable implementations of the C++ standard library. Because of this, Qt often followed (and still follows) some design idioms that feel unnatural to the usual C++ […]
Getting rid of “volatile” in (some of) Qt
The upcoming version of the C++ Standard (C++2a) is proposing to deprecate certain usages of the volatile keyword, by adopting the P1152 proposal (Deprecating volatile). Despite the somewhat “flamboyant” title, the actual deprecated parts are very limited and indeed the paper limits the deprecation to somehow language/library corner cases and/or dangerous antipatterns. For instance certain […]
Qt World Summit 2019 talk videos are online
Did you miss the past Qt World Summit? Were you there, but you couldn’t attend that talk or two that you really wanted to see because the conference was so, so packed with awesome content? Fear no more! We are glad to announce that the talks at the past Qt World Summit 2019 in Berlin […]
A little hidden gem: QStringIterator
A few days ago Marc Mutz, colleague of mine at KDAB and also author in this blog, spotted this function from Qt’s source code (documentation): Apart from the mistake of considering empty strings not uppercase, which can be easily fixed, the loop in the body looks innocent enough. How would we figure out if a […]