Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. --namespace option of rcc seems to be broken

--namespace option of rcc seems to be broken

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 457 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kerndog73
    wrote on last edited by Kerndog73
    #1

    If I pass the --namespace option to rcc, I get this output:

    bool qRegisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *);
    bool qUnregisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *);
    
    int qInitResources();
    int qInitResources()
    {
        int version = 3;
        qRegisterResourceData
            (version, qt_resource_struct, qt_resource_name, qt_resource_data);
        return 1;
    }
    
    int qCleanupResources();
    int qCleanupResources()
    {
        int version = 3;
        qUnregisterResourceData
           (version, qt_resource_struct, qt_resource_name, qt_resource_data);
        return 1;
    }
    
    namespace {
       struct initializer {
           initializer() { QT_RCC_MANGLE_NAMESPACE(qInitResources)(); }
           ~initializer() { QT_RCC_MANGLE_NAMESPACE(qCleanupResources)(); }
       } dummy;
    }
    

    It still uses the QT_RCC_MANGLE_NAMESPACE macro so it doesn't compile.

    This seems like a bug to me. I'm using rcc 5.13.2. Has this been reported or fixed in a future version?

    There doesn't seem to be much of a point in using the option because all it does is reduce the output file size by an insignificant amount. That could be why it's broken, it's unused and untested.

    jsulmJ 1 Reply Last reply
    0
    • K Kerndog73

      If I pass the --namespace option to rcc, I get this output:

      bool qRegisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *);
      bool qUnregisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *);
      
      int qInitResources();
      int qInitResources()
      {
          int version = 3;
          qRegisterResourceData
              (version, qt_resource_struct, qt_resource_name, qt_resource_data);
          return 1;
      }
      
      int qCleanupResources();
      int qCleanupResources()
      {
          int version = 3;
          qUnregisterResourceData
             (version, qt_resource_struct, qt_resource_name, qt_resource_data);
          return 1;
      }
      
      namespace {
         struct initializer {
             initializer() { QT_RCC_MANGLE_NAMESPACE(qInitResources)(); }
             ~initializer() { QT_RCC_MANGLE_NAMESPACE(qCleanupResources)(); }
         } dummy;
      }
      

      It still uses the QT_RCC_MANGLE_NAMESPACE macro so it doesn't compile.

      This seems like a bug to me. I'm using rcc 5.13.2. Has this been reported or fixed in a future version?

      There doesn't seem to be much of a point in using the option because all it does is reduce the output file size by an insignificant amount. That could be why it's broken, it's unused and untested.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Kerndog73 said in --namespace option of rcc seems to be broken:

      Has this been reported or fixed in a future version?

      I don't know. You should check on Qt bug tracker: https://bugreports.qt.io/projects/QTBUG/issues/QTBUG-80648?filter=allopenissues

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      K 1 Reply Last reply
      0
      • jsulmJ jsulm

        @Kerndog73 said in --namespace option of rcc seems to be broken:

        Has this been reported or fixed in a future version?

        I don't know. You should check on Qt bug tracker: https://bugreports.qt.io/projects/QTBUG/issues/QTBUG-80648?filter=allopenissues

        K Offline
        K Offline
        Kerndog73
        wrote on last edited by
        #3

        Reported

        1 Reply Last reply
        2
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          The issue has been fixed for 5.14.1

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved