mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mingw-cross-env-list] Qt 4.7.0 rc1 - qgif and qjpeg plugin build co


From: Garth Dahlstrom
Subject: Re: [Mingw-cross-env-list] Qt 4.7.0 rc1 - qgif and qjpeg plugin build config bug?
Date: Tue, 14 Sep 2010 17:11:38 -0400

Thanks Mark,
I didn't notice that in the doc till you mentioned it... there it is step 5b looking right at me, dough!  

My only reason for trying to... erm... fix it.. was that there are a couple of Q_IMPORT_PLUGIN statements for qgif and qjpeg that have been in our codebase since Qt 4.5.x or maybe earlier.  

Sounds like I can just add a version check around those defs in project and cpp files for < rc1 and all should be good.

Thanks again,

-G

On Sep 14, 2010 4:48 PM, "Mark Brand" <address@hidden> wrote:
 Hi Garth,

I noticed that neither qgif or qjpeg plugins were built as part of my recent update of Qt from beta1 -> rc1.

That is correct and it is a feature of the Qt build system since rc1. There is a brief note about this in the tutorial <mingw-cross-env-dir>doc/index.html.

Details are in the commit message:

http://qt.gitorious.org/qt/qt/commit/802dc404d1af9a08fdc23ef32e2fbc77f138f70a

To make a long story short, these are built-in now, not plugins, so you don't have to do anything special for static linking your applications. Or did you have a specific reason for wanting these to be plugins?


After some digging around I noticed that pkg/qt-everywhere-opensource-src-4.7.0-rc1/src/plugins/imageformats/imageformats.pro has a few changes that don't make a lot of sense to me, specifically these 3 lines

!contains(QT_CONFIG, no-jpeg):!contains(QT_CONFIG, jpeg):SUBDIRS +=jpeg
!contains(QT_CONFIG, no-gif):!contains(QT_CONFIG, gif):SUBDIRS += gif
!contains(QT_CONFIG, no-mng):!contains(QT_CONFIG, mng):SUBDIRS +=mng

If I'm reading them right, they say only build JPEG, GIF and MNG support if neither "no-X" nor "X" are specified in the QT_CONFIG?

Not quite right. These control only whether the respective *plugin* is built. The meanings of the flags follow this pattern:
   no-jpeg: no jpeg support
   jpeg: jpeg support built into QtGui
   otherwise: jpeg support as plugin

Over in <QTDIR>src/gui/image/image.pri you will find complementary logic that controls whether the *built-in* image handler is built.


The same lines in beta1 used to be exclude "no-X" only:

!contains(QT_CONFIG, no-jpeg):SUBDIRS += jpeg
!contains(QT_CONFIG, no-gif):SUBDIRS += gif
!contains(QT_CONFIG, no-mng):SUBDIRS += mng

For now I'll just patch over the new imageformats.pro with the old to get them to build, probably not the best approach though.

If you do that, you'll probably end up with the built-in support and also the plugins, which is probably not what you want.

The configure script does not offer an option for selecting between plugin and built-in. The choice is made on the basis of static vs shared. If you really want to have plugins in static Qt, it might be better to hack the configure script or just remove "jpeg" from CONFIG in mkspecs/qconfig.pri after configure.

regards,

Mark


reply via email to

[Prev in Thread] Current Thread [Next in Thread]