![]() Warns when a lambda inside a connect() captures local variables by reference. ![]() With clazy your compiler will get Qt semantics and complain about this mistake. However, it compiles just fine, since it’s valid C++. The above doesn’t make sense, as connect statements should reference at least 1 signal. For example connecting two slots together: connect(obj, &MyObj::mySlot, &MyObj::mySlot2) This check warns when connecting a non- signal to something. ![]() So let’s start the walkthrough! For completeness a few older checks are also included, as they belong to this topic. Today’s instalment is exclusively about signal/slots, since that’s what the newest 1.3 release focused on. How to use static analysis to improve performance.You can read more about it in our previous blog posts: 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.Ĭlazy is a compiler plugin which generates warnings related to Qt.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |