[Development] Moving QWindowSystemInterface out of QPA

Girish Ramakrishnan girish at forwardbias.in
Wed Jul 11 17:28:40 CEST 2012


Hi Stephen,

On Wed, Jul 11, 2012 at 8:26 PM, Stephen Kelly <stephen.kelly at kdab.com> wrote:
> On Wednesday, July 11, 2012 20:00:39 you wrote:
>> An alternate approach is to make a header specific to QTestLib which
>> ensures that modules privates are not required.
>
> This is very hacky. I prefer to simply move it from qpa/ to the same location
> as the rest of the public headers.
>

Yes, it's quite hacky but I think this can be improved (see below). I
was only pointing out that there is an alternate solution should we
decide that QWSI is not qpa specific.

> However, a solution acceptable for everyone else which achieves the 'modules
> privates are not required' goal is acceptable for me too.
>
>> This approach keeps
>> QWSI as QPA API and very minor change.
>
> I still don't see what makes it a QPA API, but ok.
>

Public api are for apps. QWSI is designed for qpa backends to forward
the windowing system events to Qt. I don't see a use case for apps to
send windowing system events.

Making QWSI public but internal is non-trivial. It's different from
QStringData (since you mentioned it) because QWSI will be a documented
class and #include <QWindowSystemInterface> will be misleading to app
developers (one of the reasons we marked things as qpa/). There's
already 3 types of apis in Qt (public, private and qpa). Adding more
types is confusing.

>> We can call this forwarding
>> header QTestLibWindowSystemInterface or something. Comments ? (of
>> course, need to have some minor changes to syncqt to not emit warning
>> code etc).
>>
>> https://codereview.qt-project.org/#change,30643
>
> You don't use the name QTestLibWindowSystemInterface in the patch. Is that a
> mistake or does it make the patch more complex?
>

I pushed a new change that is more inline with what I was trying to
say. I was too lazy to make the actual change :) The idea is that
QtTest creates a special forwarding header
QtTest/QWindowSystemInterface. This contains the hack to QtTest and at
the same time all other users of QWSI are forced to add gui-private.

https://codereview.qt-project.org/#patch,all,30643,2

Anyway, I was just hacking away. I will leave the final decision to
the QPA guys :-)

Girish



More information about the Development mailing list