Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-140671

Port QWinRegistryKey away from QObject again

XMLWordPrintable

    • Windows
    • 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().

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            cnn Qt Core & Network
            mmutz Marc Mutz
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes