[Development] Moving QWindowSystemInterface out of QPA

Girish Ramakrishnan girish at forwardbias.in
Tue Jul 24 17:15:37 CEST 2012


On Mon, Jul 23, 2012 at 4:31 AM,  <lars.knoll at nokia.com> wrote:
>
>
> On 7/19/12 4:45 PM, "ext Girish Ramakrishnan" <girish at forwardbias.in>
> wrote:
>
>>On Thu, Jul 19, 2012 at 7:16 AM,  <lars.knoll at nokia.com> wrote:
>>> On 7/16/12 12:43 PM, "ext Stephen Kelly" <stephen.kelly at kdab.com> wrote:
>>>
>>>>On Sunday, July 15, 2012 14:24:18 Holger Hans Peter Freyther wrote:
>>>>> On Tue, Jul 10, 2012 at 11:53:33AM +0200, Thiago Macieira wrote:
>>>>> > We have only two choices:
>>>>> >
>>>>> > 1) make QWindowSystemInterface a proper, public API class
>>>>>
>>>>> I think QWindowSystemInterface in its current form would be
>>>>> a rather incomplete and limited API.
>>>>
>>>>The point you have to keep in mind is that it can be extended: There are
>>>>no
>>>>virtual methods on it, and no reason to add any, and it doesn't have a
>>>>virtual
>>>>destructor, so it is not designed to be subclassed (actually it should
>>>>be
>>>>a
>>>>namespace instead of a class).
>>>>
>>>>So whether the API doesn't offer enough for you is beside the point -
>>>>the
>>>>point (and the problem) is that it appears in public headers.
>>>
>>> Yes, and we should fix that. QTestLib uses three methods from QWSI. That
>>> doesn't sound like a good enough reason to make around 30 methods
>>>public.
>>>
>>> The class in it's current state is somewhat messy, and we might want to
>>>or
>>> need to change the signatures of methods in there in the future.
>>>
>>
>>https://codereview.qt-project.org/#change,30541 is actually
>>integrating. Do you want us to revert it?
>
> I talked this through with Paul here, and we both agree that QWSI
> shouldn't be public.
>>
>>The alternate solution was:
>>https://codereview.qt-project.org/#change,30643. Hacky, but prevents
>>QWSI from appearing as a public header.
>
> How about a third solution, that only exposes the three methods that are
> being used by QTestLib? We could turn QWSI into a namespace, and forward
> declare the required methods in qtestkeyboard.h etc.
>

Why didn't I think of that :) This is of course a much simpler
solution. I guess we don't even need QWSI to be a namespace for this,
do we? I just need to forward declare the three methods.

Let me give it a shot.

Girish



More information about the Development mailing list