Review Request 126887: Fix crash if KWindowSystem::mapViewport is called without a QCoreApplication

Martin Gräßlin mgraesslin at kde.org
Tue Jan 26 08:30:02 UTC 2016


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

Review request for KDE Frameworks.


Repository: kwindowsystem


Description
-------

NETRootInfo can be used without requiring a QCoreApplication. But there
are calls into KWindowSytem to check whether viewports are used. This
creates a static container and tries to move it to the main thread of
the QCoreApplication. If we don't have a QCoreApplication this crashes.

This change ensures that it's possible to call into mapViewport even
if there is no QCoreApplication. It will return false as also no plugin
will be loadable.

The change comes with a new auto test which simulates the condition
of calling into mapViewport without a QCoreApplication.


Diffs
-----

  autotests/CMakeLists.txt bf83d1446348aa1985f0c27275ae8b3013b86dbd 
  autotests/dontcrashmapviewport.cpp PRE-CREATION 
  autotests/netrootinfotestwm.cpp d0be10690a5ec099549b9eeae6cdea4100d13949 
  src/kwindowsystem.cpp 9ef273f7679f34e7c9f986b55e39e4f8420490c1 

Diff: https://git.reviewboard.kde.org/r/126887/diff/


Testing
-------


Thanks,

Martin Gräßlin

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


More information about the Kde-frameworks-devel mailing list