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

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

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • P2: Important
    • None
    • None
    • Core: Object Model
    • None

    Description

      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.

      Attachments

        Issue Links

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

          Activity

            People

              thiago Thiago Macieira
              mmutz Marc Mutz
              Vladimir Minenko Vladimir Minenko
              Alex Blasche Alex Blasche
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes