Today I want to share 13 mistakes regarding signals, slots and connect statements and how to find them at compile time with clazy, our open-source static-analyzer for Qt. Clazy is a compiler plugin which generates warnings related to Qt. You can read more about it in our previous blog posts: How to use static analysis […]
Author Archives: Sérgio Martins
Clazy Results Visualizer for Qt Web UI to view clazy and gcc warnings
Clazy is a clang plugin which extends the compiler with over 50 warnings related to Qt best practices ranging from unneeded memory allocations to API misuse. It’s an opensource project spawned by KDAB’s R&D efforts for better C++ tooling. Today, we’re proud to announce a Clazy Web UI to view all warnings emitted by Clazy, […]
clazy 1.2 released presenting 5 new Qt compile-time checks
In the previous episode we presented how to uncover 32 Qt best practices at compile time with clazy. Today it’s time to show 5 more and other new goodies present in the freshly released clazy v1.2. New checks 1. connect-not-normalized Warns when the content of SIGNAL(), SLOT(), Q_ARG() and Q_RETURN_ARG() is not normalized. Using normalized […]
Uncovering 32 Qt best practices at compile time with clazy Generating compile-time warnings and automatic refactoring for Qt best practices
In a previous blog post we introduced clazy, a clang plugin which makes the compiler understand Qt semantics, allowing you to get compile-time warnings about Qt best practices ranging from unneeded memory allocations to misuse of API, including fix-its for automatic refactoring. Today we’ll do a round-up and present the checks related to connect statements, […]
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 […]
KDAB contributions to Qt 5.4: qmllint
One type of bug I see very often comes down to syntax errors in QML and JavaScript files. Most of the time these errors are simple typos; however, they creep in, go unnoticed by continuous integration and sometimes reach production — especially on delayed loaded components. I like fixing bugs, but what I love even […]