Review Request 115251: Add better runtime detection for X11 usage in KStartupInfo
Martin Gräßlin
mgraesslin at kde.org
Fri Jan 31 21:04:13 UTC 2014
> On Jan. 31, 2014, 9:45 p.m., Alex Merry wrote:
> > src/kstartupinfo.cpp, lines 458-480
> > <https://git.reviewboard.kde.org/r/115251/diff/2/?file=240679#file240679line458>
> >
> > Surely we shouldn't be using KXMessages if we don't have X11?
> >
> > (Also applies to the next bunch of methods)
I decided to not add the check to this method as it takes a Display* as argument. Thus it's the responsibility of the caller to check whether it's on X11. If the caller uses Display* unconditionally it's crashing in the application code before going into this code.
> On Jan. 31, 2014, 9:45 p.m., Alex Merry wrote:
> > src/kstartupinfo.cpp, lines 1249-1251
> > <https://git.reviewboard.kde.org/r/115251/diff/2/?file=240679#file240679line1249>
> >
> > Should this be under a test? Or does the HAVE_X11 need to be there at all?
Here the HAVE_X11 could be removed. It's in an
if (desktop != 0)
block, so won't be entered by e.g. Windows.
> On Jan. 31, 2014, 9:45 p.m., Alex Merry wrote:
> > src/kstartupinfo.cpp, lines 1315-1317
> > <https://git.reviewboard.kde.org/r/115251/diff/2/?file=240679#file240679line1315>
> >
> > Again, does this need HAVE_X11? netwm_def.h actually ends up being used on all platforms.
yep, that also looks like a useless HAVE_X11.
- Martin
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115251/#review48713
-----------------------------------------------------------
On Jan. 27, 2014, 8:31 a.m., Martin Gräßlin wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/115251/
> -----------------------------------------------------------
>
> (Updated Jan. 27, 2014, 8:31 a.m.)
>
>
> Review request for KDE Frameworks.
>
>
> Repository: kwindowsystem
>
>
> Description
> -------
>
> Add better runtime detection for X11 usage in KStartupInfo
>
> Compile time checks for X11 is no longer sufficient. This adds a
> runtime check to all the code paths which look dangerous if executed
> on a non-X11 platform.
>
>
> Diffs
> -----
>
> src/kstartupinfo.cpp 5dbf47cb666fbed17c943491efe93e17f27d581e
>
> Diff: https://git.reviewboard.kde.org/r/115251/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Martin Gräßlin
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140131/d423ded9/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list