[Development] Breaking up QtPlatformSupport

Thiago Macieira thiago.macieira at intel.com
Mon Mar 12 11:24:41 CET 2012


On segunda-feira, 12 de março de 2012 09.31.11, Jørgen Lind wrote:
> > This will be hard to do with qmake, so the easier way out is to remove the
> > .a altogether and use .pri files only. That requires moving the Wayland
> > platform plugin back into qtbase.
> 
> Pretty please with sugar on top, do NOT do this. I understand that you
> only see the "Wayland" side of things, But there are loads of people
> interested in not having their plugin in the Qt source code. Using the
> pri approach is STUPID! The hacks you will force upon people is just
> not nice! We have been there, and we don't want to go back. Lets just
> keep/"add again" the -l flags, and let configure figure out if their going
> to be included or not.
> 
> Building platform plugins outside the Qt source tree IS a usecase we'r
> going to support. Not only because of QtWayland but because there might
> be someone developing ie. an ios plugin that they don't want to have inside
> QtBase. People might have special HW that where they just write a plugin
> to do special ioctl to controll the display. We don't want all plugins to
> be in QtBase but more importantly we can expect all plugins to be in
> QtBase.

Building plugins outside of QtBase will continue to be permitted, provided 
they don't use QtPlatformSupport. That library is just convenience for us. 
There is absolutely no public API there. If there are things needed by many 
plugins, we should consider making proper, public API instead.

Anyway, either way this library will be gone. The most likely solution is that 
we will break it up into many smaller .a libraries.

Adding -l flags does not work because of the way qmake works. When you write:

	QT += platformsupport-private
	LIBS += -lfoo

or when you write:

	LIBS += -lfoo
	QT += platformsupport-private

This will always add to the command line:

	-lfoo -lQtPlatformSupport

which is the wrong order. It needs to be the other way around.

Writing:

	LIBS += -lQtPlatformSupport -lfoo
	QT += platformsupport-private

produces:

	-lQtPlatformSupport -lfoo -lQtPlatformSupport

which is even worse: not only does it not solve anything, it's wrong by not 
adding the proper library infix, version or debug status.

As far as I can see, there's no way to do that with standard qmake options. 
We'd need to remove the library from "QT", which means we lose the -I 
(include) options too.

And before anyone suggests "fixing the bug" note where the bug is: it is NOT a 
bug in qmake. The bug is that QtPlatformSupport fails to declare the libraries 
that it requires, so qmake cannot add them properly.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120312/fe0741ac/attachment.sig>


More information about the Development mailing list