Effective Qt
summary
Q_FOREACH unconditionally copies its container and therefore causes deep copies for non-Qt STL containers; never use Q_FOREACH with std::vector. Qt containers can use realloc for types declared trivially relocatable via Q_DECLARE_TYPEINFO/Q_MOVABLE_TYPE, yielding fewer allocations and faster moves. QString handling matters: prefer QStringBuilder for concatenation and use QStringLiteral when the toolchain supports compile‑time UTF‑16 to avoid runtime decoding; otherwise use tr() or fromLatin1 appropriately.
AI-written summary · about
chapters (5)
- 0:00Start
- 19:00The Compiler Cannot Tell!
- 23:30Class Author
- 36:45Four Strings to a Bow
- 52:08f QString Literal Hello World
related talks
55mStringViews, StringViews everywhere!
01h 00mSTL Features And Implementation Techniques
01h 02mImplicit Conversions Considered Harmful
04m(don't) Copy Paste All The Things
01h 02mBack to Basics: Almost Always Vector
01h 04mBack to Basics: Move Semantics
58mUnderstanding and Mastering C++'s Complexity
01h 05mC++11 in the Wild: Techniques from a Real Codebase
