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: Fixed
    • Icon: P2: Important P2: Important
    • 6.11
    • None
    • Core: Object Model
    • None
    • 8
    • 0090ad0fa (dev)
    • Foundation Sprint 132, Foundation Sprint 133, Foundation Sprint 134, Foundation Sprint 135, Foundation Sprint 136, Foundation Sprint 137, Foundation Sprint 138, Foundation Sprint 139

      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.

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

            ahmad.samir Ahmad Samir
            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:
              Resolved:

                There are no open Gerrit changes