• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

Public Types | Static Public Member Functions | Static Protected Attributes | List of all members
TDECrash Class Reference

#include <tdecrash.h>

Public Types

typedef void(* HandlerType) (int)
 

Static Public Member Functions

static void defaultCrashHandler (int signal)
 
static void setCrashHandler (HandlerType handler=defaultCrashHandler)
 
static HandlerType crashHandler ()
 
static void setEmergencySaveFunction (HandlerType saveFunction=(HandlerType) 0)
 
static HandlerType emergencySaveFunction ()
 
static void setSafer (bool on)
 
static void setApplicationPath (TQString path)
 
static void setApplicationName (TQString name)
 

Static Protected Attributes

static HandlerType _crashHandler = 0
 
static HandlerType _emergencySaveFunction = 0
 

Detailed Description

This class handles segmentation-faults.

By default it displays a message-box saying the application crashed. This default can be overridden by setting a custom crash handler with setCrashHandler(). If a function is specified with setEmergencySaveFunction() it will be called by the default crash handler, giving the application a chance to save its data.

Definition at line 37 of file tdecrash.h.

Member Typedef Documentation

◆ HandlerType

typedef void(* TDECrash::HandlerType) (int)

This function type is a pointer to a crash handler function.

The function's argument is the number of the signal.

Definition at line 55 of file tdecrash.h.

Member Function Documentation

◆ crashHandler()

static HandlerType TDECrash::crashHandler ( )
inlinestatic

Returns the installed crash handler.

Returns
the crash handler

Definition at line 74 of file tdecrash.h.

◆ defaultCrashHandler()

void TDECrash::defaultCrashHandler ( int  signal)
static

The default crash handler.

Parameters
signalthe signal number

Definition at line 119 of file tdecrash.cpp.

◆ emergencySaveFunction()

static HandlerType TDECrash::emergencySaveFunction ( )
inlinestatic

Return the currently set emergency save function.

Returns
the emergency save function

Definition at line 88 of file tdecrash.h.

◆ setApplicationName()

static void TDECrash::setApplicationName ( TQString  name)
inlinestatic

Sets the application name name which should be passed to Dr.

Konqi, our nice crash display application.

Parameters
namethe name of the application, as shown in Dr. Konqi

Definition at line 108 of file tdecrash.h.

◆ setApplicationPath()

static void TDECrash::setApplicationPath ( TQString  path)
inlinestatic

Sets the application path which should be passed to Dr.

Konqi, our nice crash display application.

Parameters
paththe application path.

Definition at line 100 of file tdecrash.h.

◆ setCrashHandler()

void TDECrash::setCrashHandler ( HandlerType  handler = defaultCrashHandler)
static

Install a function to be called in case a SIGSEGV is caught.

Parameters
handlerHandlerType handler can be one of
  • null in which case signal-catching is disabled (by calling signal(SIGSEGV, SIG_DFL))
  • if handler is omitted the default crash handler is installed.
  • an user defined function in the form: static (if in a class) void myCrashHandler(int);
handlerthe crash handler

Definition at line 86 of file tdecrash.cpp.

◆ setEmergencySaveFunction()

void TDECrash::setEmergencySaveFunction ( HandlerType  saveFunction = (HandlerType)0)
static

Installs a function which should try to save the applications data.

It is the crash handler´s responsibility to call this function. Therefore, if no crash handler is set, the default crash handler is installed to ensure the save function is called.

Parameters
saveFunctionthe handler to install

Definition at line 70 of file tdecrash.cpp.

◆ setSafer()

static void TDECrash::setSafer ( bool  on)
inlinestatic

Set whether to start drkonqi without arbitrary disk access.

Definition at line 93 of file tdecrash.h.

Member Data Documentation

◆ _crashHandler

TDECrash::HandlerType TDECrash::_crashHandler = 0
staticprotected

Pointer to the crash handler.

Definition at line 115 of file tdecrash.h.

◆ _emergencySaveFunction

TDECrash::HandlerType TDECrash::_emergencySaveFunction = 0
staticprotected

Pointer to the emergency save function.

Definition at line 119 of file tdecrash.h.


The documentation for this class was generated from the following files:
  • tdecrash.h
  • tdecrash.cpp

tdecore

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

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.9.4
This website is maintained by Timothy Pearson.