summaryrefslogtreecommitdiffstats
path: root/tdecore
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-05 18:38:23 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-05 18:38:23 -0600
commit4b3606f910373fb4b9d653049b6c08a809aebf47 (patch)
treea6fde62522edc2a9672e7024c18b31b988362401 /tdecore
parenta07501e296ac9e3a89574a88640a7f726eb8e3e0 (diff)
downloadtdelibs-4b3606f910373fb4b9d653049b6c08a809aebf47.tar.gz
tdelibs-4b3606f910373fb4b9d653049b6c08a809aebf47.zip
Rename KCrash to avoid conflicts with KDE4
Diffstat (limited to 'tdecore')
-rw-r--r--tdecore/kaboutdata.cpp2
-rw-r--r--tdecore/kapplication.cpp6
-rw-r--r--tdecore/kcrash.cpp30
-rw-r--r--tdecore/kcrash.h2
4 files changed, 20 insertions, 20 deletions
diff --git a/tdecore/kaboutdata.cpp b/tdecore/kaboutdata.cpp
index fd7cce483..8db37e58f 100644
--- a/tdecore/kaboutdata.cpp
+++ b/tdecore/kaboutdata.cpp
@@ -266,7 +266,7 @@ TDEAboutData::internalProgramName() const
return mProgramName;
}
-// KCrash should call as few things as possible and should avoid e.g. malloc()
+// TDECrash should call as few things as possible and should avoid e.g. malloc()
// because it may deadlock. Since i18n() needs it, when TDELocale is available
// the i18n() call will be done here in advance.
void
diff --git a/tdecore/kapplication.cpp b/tdecore/kapplication.cpp
index 773c5550c..25dc61e15 100644
--- a/tdecore/kapplication.cpp
+++ b/tdecore/kapplication.cpp
@@ -1646,10 +1646,10 @@ void TDEApplication::parseCommandLine( )
if (!nocrashhandler && args->isSet("crashhandler"))
{
// set default crash handler / set emergency save function to nothing
- KCrash::setCrashHandler(KCrash::defaultCrashHandler);
- KCrash::setEmergencySaveFunction(NULL);
+ TDECrash::setCrashHandler(TDECrash::defaultCrashHandler);
+ TDECrash::setEmergencySaveFunction(NULL);
- KCrash::setApplicationName(TQString(args->appName()));
+ TDECrash::setApplicationName(TQString(args->appName()));
}
#ifdef Q_WS_X11
diff --git a/tdecore/kcrash.cpp b/tdecore/kcrash.cpp
index 420ff177c..05f502311 100644
--- a/tdecore/kcrash.cpp
+++ b/tdecore/kcrash.cpp
@@ -57,17 +57,17 @@
#include <X11/Xlib.h>
#endif
-KCrash::HandlerType KCrash::_emergencySaveFunction = 0;
-KCrash::HandlerType KCrash::_crashHandler = 0;
-const char *KCrash::appName = 0;
-const char *KCrash::appPath = 0;
-bool KCrash::safer = false;
+TDECrash::HandlerType TDECrash::_emergencySaveFunction = 0;
+TDECrash::HandlerType TDECrash::_crashHandler = 0;
+const char *TDECrash::appName = 0;
+const char *TDECrash::appPath = 0;
+bool TDECrash::safer = false;
// This function sets the function which should be called when the
// application crashes and the
// application is asked to try to save its data.
void
-KCrash::setEmergencySaveFunction (HandlerType saveFunction)
+TDECrash::setEmergencySaveFunction (HandlerType saveFunction)
{
_emergencySaveFunction = saveFunction;
@@ -83,7 +83,7 @@ KCrash::setEmergencySaveFunction (HandlerType saveFunction)
// This function sets the function which should be responsible for
// the application crash handling.
void
-KCrash::setCrashHandler (HandlerType handler)
+TDECrash::setCrashHandler (HandlerType handler)
{
#ifdef Q_OS_UNIX
if (!handler)
@@ -116,7 +116,7 @@ KCrash::setCrashHandler (HandlerType handler)
}
void
-KCrash::defaultCrashHandler (int sig)
+TDECrash::defaultCrashHandler (int sig)
{
#ifdef Q_OS_UNIX
// WABA: Do NOT use kdDebug() in this function because it is much too risky!
@@ -148,10 +148,10 @@ KCrash::defaultCrashHandler (int sig)
if (appName)
{
#ifndef NDEBUG
- fprintf(stderr, "[kcrash] KCrash: crashing... crashRecursionCounter = %d\n", crashRecursionCounter);
- fprintf(stderr, "[kcrash] KCrash: Application Name = %s path = %s pid = %d\n", appName ? appName : "<unknown>" , appPath ? appPath : "<unknown>", getpid());
+ fprintf(stderr, "[kcrash] TDECrash: crashing... crashRecursionCounter = %d\n", crashRecursionCounter);
+ fprintf(stderr, "[kcrash] TDECrash: Application Name = %s path = %s pid = %d\n", appName ? appName : "<unknown>" , appPath ? appPath : "<unknown>", getpid());
#else
- fprintf(stderr, "[kcrash] KCrash: Application '%s' crashing...\n", appName ? appName : "<unknown>");
+ fprintf(stderr, "[kcrash] TDECrash: Application '%s' crashing...\n", appName ? appName : "<unknown>");
#endif
const char * argv[24]; // don't forget to update this
@@ -254,7 +254,7 @@ static int write_socket(int sock, char *buffer, int len);
static int read_socket(int sock, char *buffer, int len);
static int openSocket();
-void KCrash::startDrKonqi( const char* argv[], int argc )
+void TDECrash::startDrKonqi( const char* argv[], int argc )
{
int socket = openSocket();
if( socket < -1 )
@@ -277,7 +277,7 @@ void KCrash::startDrKonqi( const char* argv[], int argc )
int len = strlen( argv[ i ] ) + 1; // include terminating \0
if( pos + len > BUFSIZE )
{
- fprintf( stderr, "[kcrash] BUFSIZE in KCrash not big enough!\n" );
+ fprintf( stderr, "[kcrash] BUFSIZE in TDECrash not big enough!\n" );
startDirectly( argv, argc );
return;
}
@@ -315,9 +315,9 @@ void KCrash::startDrKonqi( const char* argv[], int argc )
}
// If we can't reach tdeinit we can still at least try to fork()
-void KCrash::startDirectly( const char* argv[], int )
+void TDECrash::startDirectly( const char* argv[], int )
{
- fprintf( stderr, "[kcrash] KCrash cannot reach tdeinit, launching directly.\n" );
+ fprintf( stderr, "[kcrash] TDECrash cannot reach tdeinit, launching directly.\n" );
pid_t pid = fork();
if (pid <= 0)
{
diff --git a/tdecore/kcrash.h b/tdecore/kcrash.h
index d6941b825..0ea938bfe 100644
--- a/tdecore/kcrash.h
+++ b/tdecore/kcrash.h
@@ -34,7 +34,7 @@
* be called by the default crash handler, giving the application a chance
* to save its data.
*/
-class TDECORE_EXPORT KCrash
+class TDECORE_EXPORT TDECrash
{
private: // ;o)
static const char *appName;