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

Add support for custom (QVector<MyType>) Q_DECLARE_METATYPE in the repc

    XMLWordPrintable

Details

    • User Story
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 5.14.0
    • Remote Objects
    • None

    Description

      Hi,

      In my current app I want to replicate a simple list of enums:

      // MyRemoteObject.rep
        ENUM FeatureEnum{ Feature1, Feature2, Feature3  }
        PROP(QVector<FeatureEnum> enabledFeatured SOURCEONLYSETTER)
      

      Currently it only works when I add:

          // Must use using alias otherwise  the <> create errors
          using QVectorFeatureEnum = QVector<MyRemoteObject::FeatureEnum>;
          Q_DECLARE_METATYPE(QVectorFeatureEnum )
      

      to the generated rep files. This should be done automatically for custom QVector types or by embedding the Q_DECLARE_METATYPE code from above into the MyRemoteObject.rep file.

      Currently only custom c++ imports are working with the repc. So the question is can we code that the repc recognizes QVector<FeatureEnum> automatically and inserts the necessary code by himself or do we code that the repc recognizes Q_DECLARE_METATYPE and using statements?

      Cheers

      Attachments

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

        Activity

          People

            bstottle Brett Stottlemyer
            kelteseth Elias Steurer
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes