This class simplifies handling of X errors.
It shouldn't be necessary to use with Qt classes, as the toolkit should handle X errors itself, so this class will be mainly used with direct Xlib usage, and some lowlevel classes like NETWinInfo.
The usual usage is to create a KXErrorHandler instance right before starting operations that might cause X errors, and checking if there was an error by calling error() after the operations are finished. The handlers may be nested, but must be destroyed in reverse order they were created.
There's no need to do X sync before creating an instance, every instance will handle only errors for request issued after the instance was created. Errors for older requests will be passed to previous error handler. When checking for error by calling error() at the end, it is necessary to sync with X, to catch all errors that were caused by requests issued before the call to error(). This can be done by passing true to error() to cause KDELIBS4SUPPORT_DEPRECATED explicit XSync(), however, if the last X request needed a roundtrip (e.g. XGetWindowAttributes(), XGetGeometry(), etc.), it is not required to do an KDELIBS4SUPPORT_DEPRECATED explicit sync.
- Lubos Lunak email@example.com@firstname.lastname@example.org@m.g Handler for X errors
Definition at line 59 of file kxerrorhandler.h.