kcrash.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
#ifndef __KCRASH_H
00023
#define __KCRASH_H
00024
00025
#include <qstring.h>
00026
00036 class KCrash
00037 {
00038
private:
00039
static const char *appName;
00040
static const char *appPath;
00041
static bool safer;
00042
00043
public:
00048
static void defaultCrashHandler (
int signal);
00049
00054 typedef void (*HandlerType)(
int);
00055
00067
static void setCrashHandler (HandlerType handler = defaultCrashHandler);
00068
00073 static HandlerType crashHandler() {
return _crashHandler; }
00074
00082
static void setEmergencySaveFunction (HandlerType saveFunction = (HandlerType)0);
00087 static HandlerType emergencySaveFunction() {
return _emergencySaveFunction; }
00088
00092 static void setSafer(
bool on ) { safer = on; }
00093
00099 static void setApplicationPath (
QString path) { appPath = qstrdup(path.
local8Bit().data()); }
00100
00101
00107 static void setApplicationName (
QString name) { appName = qstrdup(name.local8Bit().data()); }
00108
00109
00110
protected:
00114
static HandlerType _crashHandler;
00118
static HandlerType _emergencySaveFunction;
00119 };
00120
00121
#endif
00122
This file is part of the documentation for kdecore Library Version 3.2.3.