Unsolved VS Plugin: How to set default qrc compression level
-
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?
-
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.
-
@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.
-
- 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.gitSorry i cant be of more help. Hopefully someone else know how to do it :)
- That's a risky assumption
-
@mrjj said in VS Plugin: How to set default qrc compression level:
I assume we talk about the new Addin ?
https://code.qt.io/cgit/qt-labs/vstools.gitThe 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).