Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. VS Plugin: How to set default qrc compression level
Forum Updated to NodeBB v4.3 + New Features

VS Plugin: How to set default qrc compression level

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
5 Posts 2 Posters 1.5k Views 2 Watching
  • 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.
  • A Offline
    A Offline
    Asperamanca
    wrote on last edited by
    #1

    I noticed a "compiler is out of heap space" error message, and found out that all my qrc files have a command line including the '-no-compress' option.

    This seems to be a default behavior of the plugin - at least, when I import a .pro file, the included qrc file has that option set.

    Does anyone have an idea what purpose this serves? And how to change the default behavior?

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi

      I dont know about VS plugin but normally you do
      http://doc.qt.io/qt-5/qmake-variable-reference.html#qmake-resource-flags
      (which you most likely already know)

      I would guess on that no compression is default as resources is very often used for images and compressing PNG or JPG would likely just burn cpu for very little gain. Purely guessing though.

      A 1 Reply Last reply
      0
      • mrjjM mrjj

        Hi

        I dont know about VS plugin but normally you do
        http://doc.qt.io/qt-5/qmake-variable-reference.html#qmake-resource-flags
        (which you most likely already know)

        I would guess on that no compression is default as resources is very often used for images and compressing PNG or JPG would likely just burn cpu for very little gain. Purely guessing though.

        A Offline
        A Offline
        Asperamanca
        wrote on last edited by
        #3

        @mrjj said in VS Plugin: How to set default qrc compression level:

        Hi

        I dont know about VS plugin but normally you do
        http://doc.qt.io/qt-5/qmake-variable-reference.html#qmake-resource-flags
        (which you most likely already know)

        I thought there might me a flag for this. Since I was concerned with a VS solution, not a qmake project, I didn't look into this. I might use it to get the correct default compression level when I import a .pro file, which is good. It won't help me when adding qrc files to an existing solution, I suppose.

        @mrjj said in VS Plugin: How to set default qrc compression level:

        I would guess on that no compression is default as resources is very often used for images and compressing PNG or JPG would likely just burn cpu for very little gain. Purely guessing though.

        That's a risky assumption. My PNG files have large areas of same colors, and are very well compressible by ZIP or anything like it. I also believe that there's a reason why the default for the qrc command is compression level 2.

        mrjjM 1 Reply Last reply
        0
        • A Asperamanca

          @mrjj said in VS Plugin: How to set default qrc compression level:

          Hi

          I dont know about VS plugin but normally you do
          http://doc.qt.io/qt-5/qmake-variable-reference.html#qmake-resource-flags
          (which you most likely already know)

          I thought there might me a flag for this. Since I was concerned with a VS solution, not a qmake project, I didn't look into this. I might use it to get the correct default compression level when I import a .pro file, which is good. It won't help me when adding qrc files to an existing solution, I suppose.

          @mrjj said in VS Plugin: How to set default qrc compression level:

          I would guess on that no compression is default as resources is very often used for images and compressing PNG or JPG would likely just burn cpu for very little gain. Purely guessing though.

          That's a risky assumption. My PNG files have large areas of same colors, and are very well compressible by ZIP or anything like it. I also believe that there's a reason why the default for the qrc command is compression level 2.

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by mrjj
          #4

          @Asperamanca

          • That's a risky assumption
            Yeah, there are many use cases where compressing would benefit.
            I was think about icons (64x64) etc where zipping gains very little.
            Also docs says
            "Resources are compressed by default (in the ZIP format). It is possible to turn off compression. This can be useful if your resources already contain a compressed format, such as .png files."

          Anyway, i think its either an oversight or a bug. if default it will compress why then add no compress when importing.

          I assume we talk about the new Addin ?
          https://code.qt.io/cgit/qt-labs/vstools.git

          Sorry i cant be of more help. Hopefully someone else know how to do it :)

          A 1 Reply Last reply
          0
          • mrjjM mrjj

            @Asperamanca

            • That's a risky assumption
              Yeah, there are many use cases where compressing would benefit.
              I was think about icons (64x64) etc where zipping gains very little.
              Also docs says
              "Resources are compressed by default (in the ZIP format). It is possible to turn off compression. This can be useful if your resources already contain a compressed format, such as .png files."

            Anyway, i think its either an oversight or a bug. if default it will compress why then add no compress when importing.

            I assume we talk about the new Addin ?
            https://code.qt.io/cgit/qt-labs/vstools.git

            Sorry i cant be of more help. Hopefully someone else know how to do it :)

            A Offline
            A Offline
            Asperamanca
            wrote on last edited by
            #5

            @mrjj said in VS Plugin: How to set default qrc compression level:

            @Asperamanca

            I assume we talk about the new Addin ?
            https://code.qt.io/cgit/qt-labs/vstools.git

            The latest official version: 2.1.1, yes.
            I've now put it to the support. I just like to ask in the forums first, in case the reason / solution is obvious (and I just don't see it).

            1 Reply Last reply
            0

            • Login

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