-
Task
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.10.0 RC
-
None
-
-
Foundation PM Staging
Since qtbase/589bfddc7c44a92e7e3f98a1e73871793c153ab7 QWinRegistryKey is-a QObject, which turned the ex-value-class into a hybrid value/polymorphic class with unclear semantics: swap() doesn't swap the d-pointers (it couldn't, QObject doesn't allow this, since the d-pointer is tied to the public' class' identity (d->q_ptr), the move-SMFs don't call the base class' ones (which are deleted), ...
Besides, all users of the class now pay for the Private allocation, and every user of QtCore pays for the QObject meta data overhead in the executable (last measured at just under 2KiB/class: https://codereview.qt-project.org/c/qt/qtbase/+/395356).
And all that, it seems, just to add a valueChanged() signal to it.
Suggest to port to a more traditional notification pattern here (list of callbacks). It's probably not much more code, looking at connectNotify(), and gives clear semantics to use in move SMFs and swap().
- resulted from
-
QTBUG-135190 Review qtbase/src/corelib/kernel
-
- In Progress
-
- split to
-
QTBUG-140725 QWinRegistryKey inconsistent handling of data members in swap()/move-SMFs
-
- Open
-