Review Request 115459: Introduce runtime platform support in KWindowSystem

Andrius da Costa Ribas andriusmao at gmail.com
Thu Feb 6 02:09:35 UTC 2014



> On Feb. 6, 2014, 1:14 a.m., Alexander Richardson wrote:
> > src/kwindowsystem.cpp, line 342
> > <https://git.reviewboard.kde.org/r/115459/diff/2-3/?file=242085#file242085line342>
> >
> >     The non-MSVC macro has a return statement, I think this one needs it as well

Why is this conditioned to Q_CC_MSVC in first place? if it's  because of the variadic macros, gcc accepts __VA_ARGS__ too (the other way is a gcc extension), otherwise if it's because of the Xcb case, then it should be conditioned to the OS, not the compiler.


- Andrius da Costa


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


On Feb. 5, 2014, 4:55 p.m., Martin Gräßlin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/115459/
> -----------------------------------------------------------
> 
> (Updated Feb. 5, 2014, 4:55 p.m.)
> 
> 
> Review request for KDE Frameworks, kdewin and Alexander Richardson.
> 
> 
> Repository: kwindowsystem
> 
> 
> Description
> -------
> 
> Introduce runtime platform support in KWindowSystem
> 
> This is a change similar to the one in KWindowInfo, but with variation
> to the pattern due to the static container.
> 
> There is now a generic implementation of KWindowSystem which is
> completely windowing system platform independent. This implementation
> delegates all methods into a KWindowSystemPrivate class.
> 
> Each windowing system platform implementation needs to provide a
> subclass (e.g. KWindowSystemPrivateX11) and provide all the methods
> which are delegated. Note that there are no virtual methods defined,
> instead the d-pointer gets casted into the proper type. Thus if a
> method is not provided it will end in a compile error.
> 
> To make use of a platform implementation it needs to be included in
> the ctor of KWindowSystemStaticContainer and the PlatformImplementation
> enum needs to be extended by a value for the platform. This is used in
> the D macro to cast and delegate correctly.
> 
> There is a dummy implementation for all not supported windowing system
> platforms.
> 
> This change also includes some API changes:
> * KWindowSystem::windows() returns a copy instead of const-ref
> * All methods are provided, there is no longer X11 specific methods
> * private methods and enums are removed
> 
> NOTE: This change breaks the implementation for Windows and Mac OS!
> They are currently excluded from build.
> 
> 
> Diffs
> -----
> 
>   src/CMakeLists.txt 23133d581944a8373b9b753b300d97054b7d6f18 
>   src/kwindowinfo.cpp c706b29b306b65c992a178d490819b76e1aeca84 
>   src/kwindowsystem.h d288e1ab7c49f68482c94285c2aab695f08f3524 
>   src/kwindowsystem.cpp PRE-CREATION 
>   src/kwindowsystem_p.h PRE-CREATION 
>   src/kwindowsystem_p_x11.h PRE-CREATION 
>   src/kwindowsystem_x11.cpp 8d841cbcec41dc2d4df381338803902badf3f35e 
> 
> Diff: https://git.reviewboard.kde.org/r/115459/diff/
> 
> 
> Testing
> -------
> 
> Unit tests still succeed for X11, but they are not complete, though the most important aspects are tested.
> 
> 
> Thanks,
> 
> Martin Gräßlin
> 
>

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


More information about the Kde-frameworks-devel mailing list