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

QObject::disconnect(s, sig, r, slot) seems to always run normalizeSignature()

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • None
    • Core: Object Model
    • None
    • 8
    • Foundation Sprint 132, Foundation Sprint 133, Foundation Sprint 134, Foundation Sprint 135, Foundation Sprint 136, Foundation Sprint 137, Foundation Sprint 138

      See here:

      bool QObject::disconnect(const QObject *sender, const char *signal,
                               const QObject *receiver, const char *method)
      {
          if (sender == nullptr || (receiver == nullptr && method != nullptr)) {
              qCWarning(lcConnect, "QObject::disconnect: Unexpected nullptr parameter");
              return false;
          }
      
          const char *signal_arg = signal;
          QByteArray signal_name;
          bool signal_found = false;
          if (signal) {
              QT_TRY {
                  signal_name = QMetaObject::normalizedSignature(signal);
                  signal = signal_name.constData();
              } QT_CATCH (const std::bad_alloc &) {
      
      ~~~~
      

      Usually, we try with the signature as given and only if that fails try again after normalization.

      Figure out why it's done differently here and fix, if possible.

        For Gerrit Dashboard: QTBUG-135819
        # Subject Branch Project Status CR V

            mmutz Marc Mutz
            mmutz Marc Mutz
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There is 1 open Gerrit change