summaryrefslogtreecommitdiffstats
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
parenta07501e296ac9e3a89574a88640a7f726eb8e3e0 (diff)
downloadtdelibs-4b3606f910373fb4b9d653049b6c08a809aebf47.tar.gz
tdelibs-4b3606f910373fb4b9d653049b6c08a809aebf47.zip
Rename KCrash to avoid conflicts with KDE4
-rw-r--r--kate/data/gdb.xml2
-rw-r--r--kded/kded.cpp2
-rw-r--r--kded/tdebuildsycoca.cpp6
-rw-r--r--kinit/tdelauncher_main.cpp2
-rw-r--r--libtdescreensaver/main.cpp2
-rw-r--r--tdecore/kaboutdata.cpp2
-rw-r--r--tdecore/kapplication.cpp6
-rw-r--r--tdecore/kcrash.cpp30
-rw-r--r--tdecore/kcrash.h2
-rw-r--r--tdeio/bookmarks/kbookmarkimporter_crash.cc30
-rw-r--r--tdeio/bookmarks/kbookmarkimporter_crash.h12
-rw-r--r--tdeio/tdeio/slavebase.cpp2
12 files changed, 49 insertions, 49 deletions
diff --git a/kate/data/gdb.xml b/kate/data/gdb.xml
index 85f9383ff..9826756d7 100644
--- a/kate/data/gdb.xml
+++ b/kate/data/gdb.xml
@@ -21,7 +21,7 @@ v1.0:
<IncludeRules context="oneliners" />
</context>
<context name="oneliners" attribute="Normal" lineEndContext="#pop">
- <StringDetect attribute="Crash" context="#stay" String="[KCrash Handler]" />
+ <StringDetect attribute="Crash" context="#stay" String="[TDECrash Handler]" />
<StringDetect String="Thread" firstNonSpace="true" context="thread" />
<StringDetect String="[Current thread" firstNonSpace="true" context="thread" />
</context>
diff --git a/kded/kded.cpp b/kded/kded.cpp
index 1cd64b3e7..f54c4730c 100644
--- a/kded/kded.cpp
+++ b/kded/kded.cpp
@@ -450,7 +450,7 @@ tqWarning("Last DCOP call before KDED crash was from application '%s'\n"
void Kded::installCrashHandler()
{
- KCrash::setEmergencySaveFunction(crashHandler);
+ TDECrash::setEmergencySaveFunction(crashHandler);
}
void Kded::recreate()
diff --git a/kded/tdebuildsycoca.cpp b/kded/tdebuildsycoca.cpp
index 81bff9613..87fdc0ba7 100644
--- a/kded/tdebuildsycoca.cpp
+++ b/kded/tdebuildsycoca.cpp
@@ -759,9 +759,9 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
}
#endif
- KCrash::setCrashHandler(KCrash::defaultCrashHandler);
- KCrash::setEmergencySaveFunction(crashHandler);
- KCrash::setApplicationName(TQString(appName));
+ TDECrash::setCrashHandler(TDECrash::defaultCrashHandler);
+ TDECrash::setEmergencySaveFunction(crashHandler);
+ TDECrash::setApplicationName(TQString(appName));
// this program is in tdelibs so it uses tdelibs as catalog
TDELocale::setMainCatalogue("tdelibs");
diff --git a/kinit/tdelauncher_main.cpp b/kinit/tdelauncher_main.cpp
index dc0c02dd7..b4e26eded 100644
--- a/kinit/tdelauncher_main.cpp
+++ b/kinit/tdelauncher_main.cpp
@@ -105,7 +105,7 @@ extern "C" KDE_EXPORT int kdemain( int argc, char**argv )
launcher->dcopClient()->setDefaultObject( name );
launcher->dcopClient()->setDaemonMode( true );
- KCrash::setEmergencySaveFunction(sig_handler);
+ TDECrash::setEmergencySaveFunction(sig_handler);
signal( SIGHUP, sig_handler);
signal( SIGPIPE, SIG_IGN);
signal( SIGTERM, sig_handler);
diff --git a/libtdescreensaver/main.cpp b/libtdescreensaver/main.cpp
index cd8e2d392..50a61f938 100644
--- a/libtdescreensaver/main.cpp
+++ b/libtdescreensaver/main.cpp
@@ -100,7 +100,7 @@ KDE_EXPORT int main(int argc, char *argv[])
TDEApplication app;
- KCrash::setCrashHandler( crashHandler );
+ TDECrash::setCrashHandler( crashHandler );
TDEGlobal::locale()->insertCatalogue("klock");
TDEGlobal::locale()->insertCatalogue("tdescreensaver");
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;
diff --git a/tdeio/bookmarks/kbookmarkimporter_crash.cc b/tdeio/bookmarks/kbookmarkimporter_crash.cc
index b2871eecd..f49879124 100644
--- a/tdeio/bookmarks/kbookmarkimporter_crash.cc
+++ b/tdeio/bookmarks/kbookmarkimporter_crash.cc
@@ -40,12 +40,12 @@
typedef TQMap<TQString, TQString> ViewMap;
// KDE 4.0: remove this BC keeping stub
-void KCrashBookmarkImporter::parseCrashLog( TQString /*filename*/, bool /*del*/ )
+void TDECrashBookmarkImporter::parseCrashLog( TQString /*filename*/, bool /*del*/ )
{
;
}
-ViewMap KCrashBookmarkImporterImpl::parseCrashLog_noemit( const TQString & filename, bool del )
+ViewMap TDECrashBookmarkImporterImpl::parseCrashLog_noemit( const TQString & filename, bool del )
{
static const int g_lineLimit = 16*1024;
@@ -88,12 +88,12 @@ ViewMap KCrashBookmarkImporterImpl::parseCrashLog_noemit( const TQString & filen
return views;
}
-TQStringList KCrashBookmarkImporter::getCrashLogs()
+TQStringList TDECrashBookmarkImporter::getCrashLogs()
{
- return KCrashBookmarkImporterImpl::getCrashLogs();
+ return TDECrashBookmarkImporterImpl::getCrashLogs();
}
-TQStringList KCrashBookmarkImporterImpl::getCrashLogs()
+TQStringList TDECrashBookmarkImporterImpl::getCrashLogs()
{
TQMap<TQString, bool> activeLogs;
@@ -127,7 +127,7 @@ TQStringList KCrashBookmarkImporterImpl::getCrashLogs()
activeLogs[ret] = true;
}
- TQDir d( KCrashBookmarkImporterImpl().findDefaultLocation() );
+ TQDir d( TDECrashBookmarkImporterImpl().findDefaultLocation() );
d.setSorting( TQDir::Time );
d.setFilter( TQDir::Files );
d.setNameFilter( "konqueror-crash-*.log" );
@@ -154,10 +154,10 @@ TQStringList KCrashBookmarkImporterImpl::getCrashLogs()
return crashFiles;
}
-void KCrashBookmarkImporterImpl::parse()
+void TDECrashBookmarkImporterImpl::parse()
{
TQDict<bool> signatureMap;
- TQStringList crashFiles = KCrashBookmarkImporterImpl::getCrashLogs();
+ TQStringList crashFiles = TDECrashBookmarkImporterImpl::getCrashLogs();
int count = 1;
for ( TQStringList::Iterator it = crashFiles.begin(); it != crashFiles.end(); ++it )
{
@@ -185,29 +185,29 @@ void KCrashBookmarkImporterImpl::parse()
}
}
-TQString KCrashBookmarkImporter::crashBookmarksDir()
+TQString TDECrashBookmarkImporter::crashBookmarksDir()
{
- static KCrashBookmarkImporterImpl *p = 0;
+ static TDECrashBookmarkImporterImpl *p = 0;
if (!p)
- p = new KCrashBookmarkImporterImpl;
+ p = new TDECrashBookmarkImporterImpl;
return p->findDefaultLocation();
}
-void KCrashBookmarkImporterImpl::setShouldDelete( bool shouldDelete )
+void TDECrashBookmarkImporterImpl::setShouldDelete( bool shouldDelete )
{
m_shouldDelete = shouldDelete;
}
-void KCrashBookmarkImporter::parseCrashBookmarks( bool del )
+void TDECrashBookmarkImporter::parseCrashBookmarks( bool del )
{
- KCrashBookmarkImporterImpl importer;
+ TDECrashBookmarkImporterImpl importer;
importer.setFilename( m_fileName );
importer.setShouldDelete( del );
importer.setupSignalForwards( &importer, this );
importer.parse();
}
-TQString KCrashBookmarkImporterImpl::findDefaultLocation( bool ) const
+TQString TDECrashBookmarkImporterImpl::findDefaultLocation( bool ) const
{
return locateLocal( "tmp", "" );
}
diff --git a/tdeio/bookmarks/kbookmarkimporter_crash.h b/tdeio/bookmarks/kbookmarkimporter_crash.h
index f4fc9af32..ab3e43aea 100644
--- a/tdeio/bookmarks/kbookmarkimporter_crash.h
+++ b/tdeio/bookmarks/kbookmarkimporter_crash.h
@@ -34,12 +34,12 @@
* A class for importing all crash sessions as bookmarks
* @deprecated
*/
-class TDEIO_EXPORT_DEPRECATED KCrashBookmarkImporter : public TQObject
+class TDEIO_EXPORT_DEPRECATED TDECrashBookmarkImporter : public TQObject
{
Q_OBJECT
public:
- KCrashBookmarkImporter( const TQString & fileName ) : m_fileName(fileName) {}
- ~KCrashBookmarkImporter() {}
+ TDECrashBookmarkImporter( const TQString & fileName ) : m_fileName(fileName) {}
+ ~TDECrashBookmarkImporter() {}
void parseCrashBookmarks( bool del = true );
static TQString crashBookmarksDir( );
static TQStringList getCrashLogs(); // EMPTY!
@@ -57,10 +57,10 @@ protected:
* A class for importing all crash sessions as bookmarks
* @since 3.2
*/
-class TDEIO_EXPORT KCrashBookmarkImporterImpl : public KBookmarkImporterBase
+class TDEIO_EXPORT TDECrashBookmarkImporterImpl : public KBookmarkImporterBase
{
public:
- KCrashBookmarkImporterImpl() : m_shouldDelete(false) { }
+ TDECrashBookmarkImporterImpl() : m_shouldDelete(false) { }
void setShouldDelete(bool);
virtual void parse();
virtual TQString findDefaultLocation(bool forSaving = false) const;
@@ -68,7 +68,7 @@ public:
private:
bool m_shouldDelete;
TQMap<TQString, TQString> parseCrashLog_noemit( const TQString & filename, bool del );
- class KCrashBookmarkImporterImplPrivate *d;
+ class TDECrashBookmarkImporterImplPrivate *d;
};
#endif
diff --git a/tdeio/tdeio/slavebase.cpp b/tdeio/tdeio/slavebase.cpp
index e979f530b..8b6ee3903 100644
--- a/tdeio/tdeio/slavebase.cpp
+++ b/tdeio/tdeio/slavebase.cpp
@@ -170,7 +170,7 @@ SlaveBase::SlaveBase( const TQCString &protocol,
#ifdef Q_OS_UNIX
if (!getenv("TDE_DEBUG"))
{
- KCrash::setCrashHandler( sigsegv_handler );
+ TDECrash::setCrashHandler( sigsegv_handler );
signal(SIGILL,&sigsegv_handler);
signal(SIGTRAP,&sigsegv_handler);
signal(SIGABRT,&sigsegv_handler);