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

use of EXTRA_NAMESPACE with qt6_add_protobuf ends up in front of Timestamp

    XMLWordPrintable

Details

    • Linux/X11
    • 5
    • e4b4086c8 (dev), 0fd92f2ff (6.7)
    • Foundation Sprint 106, Foundation Sprint 107

    Description

      I build several libraries of qtprotobuf-generated classes.

      I see that google/protobuf/timestamp.proto is now included in QtProtobufWellKnownTypes, that's great! (is descriptor.proto going to make it in anytime soon?)

      I used to include timestamp.proto in one of my libraries (because QtProtobufWellKnownTypes didn't) and so my EXTRA_NAMESPACE (=SSProto) would end up in front of that generated class, like this: SSProto::google::Protobuf:Timestamp.

      However, in spite of the fact that I have removed timestamp.proto from the library I create, the generated code for my other .proto files (that `import "google/protobuf/timestamp.proto"`) still prepend that class name with my EXTRA_NAMESPACE. This is curious because I have never had that issue with any.proto, but that's wrapped enough that maybe it's a totally different issue.

      Complication: I'm using EXTRA_NAMESPACE in order to avoid a symbol conflict when loading a plugin that links to the standard protobuf library. I'm afraid (haven't tried it, since I can't get my app to compile yet) that the google::Protobuf::Timestamp class in QtProtobufWellKnownTypes will clash with something generated using the standard protobuf generator. Is that an unfounded fear?

      Attachments

        For Gerrit Dashboard: QTBUG-124413
        # Subject Branch Project Status CR V

        Activity

          People

            tatiana.borisova Tatiana Borisova
            glenm Glen Mabey
            Vladimir Minenko Vladimir Minenko
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes