Review Request 115230: Add platform check to KSelectionOwner and KSelectionWatcher

Alex Merry kde at randomguy3.me.uk
Fri Jan 31 20:54:59 UTC 2014



> On Jan. 31, 2014, 6:48 p.m., Alex Merry wrote:
> > Looks like it should be functionally equivalent to the old code (in the presence of X11).
> > 
> > The only thing that gives me pause is explicitly checking the platform plugin name (rather than, say, using the method from QX11Extras), but I guess you do explicitly want XCB rather than XLib (or does it even make a difference?).
> 
> Martin Gräßlin wrote:
>     ever checked the method from QX11Extras? ;-)
>     
>     bool QX11Info::isPlatformX11()
>     {
>         return QGuiApplication::platformName() == QLatin1String("xcb");
>     }

Oh, I know, it's more of a case of "what if they changed the platform plugin name".  Which I admit is a little unlikely.  But since kwindowsystem links to QX11Extras anyway...


- Alex


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115230/#review48700
-----------------------------------------------------------


On Jan. 27, 2014, 8:54 a.m., Martin Gräßlin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/115230/
> -----------------------------------------------------------
> 
> (Updated Jan. 27, 2014, 8:54 a.m.)
> 
> 
> Review request for KDE Frameworks.
> 
> 
> Repository: kwindowsystem
> 
> 
> Description
> -------
> 
> Add platform check to KSelectionOwner and KSelectionWatcher
> 
> These are highly X11 specific classes and don't make any sense on a
> platform other than xcb and were potentially crashy by using QX11Info
> without verifying that the platform is used.
> 
> The implementation will now only create the d-ptr in case that the
> code is running on the xcb platform and ensures that no call to xcb
> is done unconditionally. All methods perform an early return in case
> the d-ptr is null. Non-void methods return a sensible default value
> in this case.
> 
> 
> Diffs
> -----
> 
>   src/kselectionowner.h 512bd5ebc6336c3a07d78dd964599d3f48d8eb33 
>   src/kselectionwatcher.cpp 87e0a9612f2bc6ced3de7c31797411b1eb183d41 
>   src/kselectionwatcher.h 798fe70bfc8175764f3fc3d09de97d971d5e57ad 
>   src/kselectionowner.cpp 3715267e280822ba541196d9c63fd28f58cdc7ee 
> 
> Diff: https://git.reviewboard.kde.org/r/115230/diff/
> 
> 
> Testing
> -------
> 
> unit test is not failing. No test on non-X11, though.
> 
> 
> Thanks,
> 
> Martin Gräßlin
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140131/b33f5a6e/attachment.html>


More information about the Kde-frameworks-devel mailing list