Are you a victim of premature pessimisation? Here’s a short definition from Herb Sutter: Premature pessimization is when you write code that is slower than it needs to be, usually by asking for unnecessary extra work, when equivalently complex code would be faster and should just naturally flow out of your fingers. Despite how amazing today’s […]
C++ Get the RSS Feed
Content related to C++
Very explicit operator bool Is the Safe Bool Idiom still useful in C++11 / C++14?
From time to time I scroll through Qt-related forums and mailing lists, and whenever possible I try to help fellow developers out. The other day a StackOverflow thread caught my attention: a developer was asking “What is the purpose of operator RestrictedBool in QScopedPointer?” Indeed, looking at QScopedPointer‘s implementation, one notices the strange RestrictedBool usage. […]
Faster than Fast String Search in Qt
Is your code burning a lot of cycles hunting for strings? Maybe you need to find the proper charset nestled in a chunk of HTML, or look for the dimensions in an XPM image file, or locate the email attachment boundaries in a block of MIME. If you string search a lot and performance is […]
QRegion will be iterable in Qt 5.8 - seamless integration with C++11 range-for
A novel solution to an old problem The QRegion class specifies a clip region for a painter. You can also query a QPaintEvent for the region() to limit the paint operations necessary in partial repaints. A region can be anything from a simple rectangle to a bitmap mask, but virtually all code that inspects a […]
KDAB contributions to Qt 5.6
Qt 5.6 has just been released! Packed with incredible new features, 5.6 is also the first long term support release of Qt: it will be supported for the next 3 years, giving developers a solid foundation for their current and upcoming projects. Once more, KDAB is confirmed to be the largest independent contributor to Qt, […]
KDAB at CppCon 2016
Washington, USA 2016-09-18 2016-09-23 Washington, September 18-23 Check it out http://cppcon.org/, get it in your diary. Why not contribute, folks? We’ll be there in more ways than one, including this 2 day training Programming with Qt Widgets. We’ll be bringing you updates as the year progresses.
What is GammaRay? 3 reasons to start using it today
What is GammaRay? For starters, it’s a powerful electromagnetic wave, as well as a way to treat cancer. It’s also an under-appreciated German speed metal band. And it’s what gives Dr. Bruce Banner his big green alter ego. But Qt aficionados will know the GammaRay that we’re talking about is an uber-powerful Qt debugger and introspection tool. If you’re […]
Highlights of CppCon 2015
Oh my, how time flies by! One month ago, I had the pleasure to travel to Bellevue, Washington, to attend CppCon 2015. It was a blast, and as a C++ developer, easily the best conference I ever attended. Below, I try to summarize my personal highlights of the talks I attended live. Note however that there were up […]
How to integrate OpenGL code with Qt Quick 2 applications (part 1)
The Qt World Summit was a rocking blast! More than 800 delegates, two days packed with sessions (and an additional training day presented by KDAB). Many old faces, lots of new ones, and a packed programme of sessions with terrific technical content. Yours truly also happened to give a talk, “Integrating OpenGL with Qt Quick […]
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 […]