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

Protobuf: Use actual type instead of typedef for properties

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 6.11
    • Protocol Buffers
    • None
    • All
    • 3

      Qt's tooling gets confused, as it doesn't know the typedef for nested messages , like in the chat example:

      class FileMessage : public QProtobufMessage
      {
          Q_PROTOBUF_OBJECT
          QML_VALUE_TYPE(fileMessage)
          Q_PROPERTY(chat::FileMessage::Continuation *continuation_p READ continuation_p WRITE setContinuation_p SCRIPTABLE false)
          Q_PROPERTY(chat::FileMessage::Continuation continuation READ continuation WRITE setContinuation)
      public:
          using Continuation = FileMessage_QtProtobufNested::Continuation;
      
          const FileMessage_QtProtobufNested::Continuation &continuation() const &;
          FileMessage_QtProtobufNested::Continuation &mutContinuation() &;
      }

      To see the issue run qtgrpc_chat_client_qmllint:

      Warning: /Users/ddob/Qt/qt6/qtgrpc/examples/grpc/chat/client/ChatMessages/FileContinuat
      ionDelegate.qml:18:26: Type "chat::FileMessage::Continuation" of property "continuation
      " not found. This is likely due to a missing dependency entry or a type not being expos
      ed declaratively. [unresolved-type]
              to: root.message.continuation.count

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

            tatiana.borisova Tatiana Borisova
            dennisoberst Dennis Oberst
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes