Details
-
Task
-
Resolution: Done
-
P3: Somewhat important
-
None
-
None
-
8
-
9da4c6bfb7 (qt/qtbase/dev) 9da4c6bfb7 (qt/tqtc-qtbase/dev)
-
Team Two Foundation Sprint 52, Team B Foundation Sprint 53
Description
QObject::setObjectName() is typically called with a literal string. This currently means that a temporary QString is created and destroyed for each call of the function, of which there can be as many as one per QObject object. By porting the function to QAnyStringView, we can avoid said temporary QString, and vary the storage independently from the interface type (e.g., the objectName may be stored in a simple malloc'ed buffer, or a u16string (though it's SSO buffer is rather small) or QVLA).