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

    • Bug
    • Resolution: Fixed
    • Not Evaluated
    • 5.14
    • 5.12.3
    • WebChannel
    • None
    • 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-16_13-38-53.png
          2020-04-16_13-38-53.png
          50 kB
        2. 2020-04-16_13-35-07.png
          2020-04-16_13-35-07.png
          25 kB
        3. 2020-04-15_17-17-47.png
          2020-04-15_17-17-47.png
          7 kB
        4. 2020-04-15_17-17-05.png
          2020-04-15_17-17-05.png
          13 kB

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: