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



No further comments from here. I'll give Ivan chance for him to look over his 
comments as well, but besides that, I'd say shipit.

- Sune Vuorela


On Aug. 2, 2016, 5:47 a.m., Martin Gräßlin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128567/
> -----------------------------------------------------------
> 
> (Updated Aug. 2, 2016, 5:47 a.m.)
> 
> 
> Review request for KDE Frameworks.
> 
> 
> Repository: kwindowsystem
> 
> 
> Description
> -------
> 
> A common pattern for our applications which have to do platform specific
> tasks is to query the used platform with code like:
> if (QX11Info::isPlatformX11()) {
>     // do X11 specific stuff
> } else if 
> (QGuiApplication::platformName().startsWith(QLatin1String("wayland"))) {
>     // do Wayland specific stuff
> }
> 
> The problem with that is that it involves string comparisons and is easy
> to get wrong. E.g. for X11 one should use the QX11Info helper, for
> Wayland one has to compare with startsWith. There is lot of domain
> specific knowledge going into it to make it work correctly and in an
> efficient way.
> 
> This change introduces an enum based API which encapsulates the
> knowledge: it does the proper comparisons and caches the result, so
> that one does not need to do string comparisons again and again.
> 
> So far the implementation supports the platforms X11/XCB and Wayland.
> In addition there are convenient methods to check for a specific
> platform modelled after QX11Info::isPlatformX11.
> 
> Further platforms can be added by the maintainers of the respective
> platforms.
> 
> 
> Diffs
> -----
> 
>   autotests/CMakeLists.txt 65ed8d4da50fd41dd3060576284456c83c3629ab 
>   autotests/helper/CMakeLists.txt PRE-CREATION 
>   autotests/helper/wayland_platform.cpp PRE-CREATION 
>   autotests/kwindowsystem_platform_wayland_test.cpp PRE-CREATION 
>   autotests/kwindowsystemx11test.cpp cdf94e3f6573faea6dfd6038dded3ee1269e2552 
>   src/kwindowsystem.h 551b01f5831e2fbdf0d0ad30f3debf0955da189e 
>   src/kwindowsystem.cpp 4dfcce8bbfeed09f3f6ddec10a1eb5fd2d418313 
> 
> Diff: https://git.reviewboard.kde.org/r/128567/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Martin Gräßlin
> 
>

_______________________________________________
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel

Reply via email to