• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KDEUI

  • kdeui
  • util
kxerrorhandler.h
Go to the documentation of this file.
1/*
2
3 Copyright (c) 2003 Lubos Lunak <l.lunak@kde.org>
4
5 Permission is hereby granted, free of charge, to any person obtaining a
6 copy of this software and associated documentation files (the "Software"),
7 to deal in the Software without restriction, including without limitation
8 the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 and/or sell copies of the Software, and to permit persons to whom the
10 Software is furnished to do so, subject to the following conditions:
11
12 The above copyright notice and this permission notice shall be included in
13 all copies or substantial portions of the Software.
14
15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21 DEALINGS IN THE SOFTWARE.
22
23*/
24
25#ifndef KXERRORHANDLER_H
26#define KXERRORHANDLER_H
27
28#include <QtGui/QWidget>
29#include <QtGui/QWidgetList>
30
31#ifdef Q_WS_X11
32
33#include <kdeui_export.h>
34#include <QtGui/QX11Info>
35#include <X11/Xlib.h>
36
37class KXErrorHandlerPrivate;
62class KDEUI_EXPORT KXErrorHandler
63 {
64 public:
69 explicit KXErrorHandler( Display* dpy = QX11Info::display());
76 explicit KXErrorHandler( int (*handler)( Display*, XErrorEvent* ), Display* dpy = QX11Info::display());
83#ifndef KDE_NO_DEPRECATED
84 explicit KXErrorHandler( bool (*handler)( int request, int error_code, unsigned long resource_id ), Display* dpy = QX11Info::display()) KDE_DEPRECATED;
85#endif
94 bool error( bool sync ) const;
100 XErrorEvent errorEvent() const;
106 static QByteArray errorMessage( const XErrorEvent& e, Display* dpy = QX11Info::display());
107 ~KXErrorHandler();
108 private:
109 void addHandler();
110 int handle( Display* dpy, XErrorEvent* e );
111 bool (*user_handler1)( int request, int error_code, unsigned long resource_id );
112 int (*user_handler2)( Display*, XErrorEvent* );
113 int (*old_handler)( Display*, XErrorEvent* );
114 static int handler_wrapper( Display*, XErrorEvent* );
115 static KXErrorHandler** handlers;
116 static int pos;
117 static int size;
118 Q_DISABLE_COPY( KXErrorHandler )
119 KXErrorHandlerPrivate * const d;
120 };
121
122#endif // Q_WS_X11
123
124#endif
KXErrorHandler
This class simplifies handling of X errors.
Definition: kxerrorhandler.h:63
kdeui_export.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal