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

in qmetaobjectpublisher.cpp (707 str) message.value(KEY_METHOD).toInt(-1) value contains method name and toInt(-1) function always returns -1

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Fixed
    • Affects Version/s: 5.12.3
    • Fix Version/s: 5.14
    • Component/s: WebChannel
    • Labels:
      None
    • Platform/s:
      All

      Description

      void QMetaObjectPublisher::handleMessage(const QJsonObject &message, QWebChannelAbstractTransport *transport)

      { ... /// message == \{"type":6,"object":"core","method":"receiveText","args":["123"],"id":3}

       

      QVariant result = invokeMethod(object,
      message.value(KEY_METHOD).toInt(-1), 
      message.value(KEY_ARGS).toArray());

      ...

      /// standalone project from https://code.qt.io/cgit/qt/qtwebchannel.git/

        Attachments

        1. 2020-04-15_17-17-05.png
          2020-04-15_17-17-05.png
          13 kB
        2. 2020-04-15_17-17-47.png
          2020-04-15_17-17-47.png
          7 kB
        3. 2020-04-16_13-35-07.png
          2020-04-16_13-35-07.png
          25 kB
        4. 2020-04-16_13-38-53.png
          2020-04-16_13-38-53.png
          50 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            milianw Milian Wolff
            Reporter:
            igor_konovalov Абдолбана Раздыгоева
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes