summaryrefslogtreecommitdiffstats
path: root/opensuse/core/tdelibs/no-debug-by-default.diff
diff options
context:
space:
mode:
Diffstat (limited to 'opensuse/core/tdelibs/no-debug-by-default.diff')
-rw-r--r--opensuse/core/tdelibs/no-debug-by-default.diff40
1 files changed, 20 insertions, 20 deletions
diff --git a/opensuse/core/tdelibs/no-debug-by-default.diff b/opensuse/core/tdelibs/no-debug-by-default.diff
index 5b1440970..75aed886d 100644
--- a/opensuse/core/tdelibs/no-debug-by-default.diff
+++ b/opensuse/core/tdelibs/no-debug-by-default.diff
@@ -1,8 +1,6 @@
-Index: kdecore/kdebug.cpp
-===================================================================
---- kdecore/kdebug.cpp.orig
-+++ kdecore/kdebug.cpp
-@@ -170,7 +170,7 @@ static KStaticDeleter<kDebugPrivate> pcd
+--- tdecore/kdebug.cpp.orig 2011-12-11 18:54:28.986987249 +0100
++++ tdecore/kdebug.cpp 2011-12-11 19:00:22.478987207 +0100
+@@ -170,7 +170,7 @@
static KStaticDeleter<KDebugDCOPIface> dcopsd;
static KDebugDCOPIface* kDebugDCOPIface = 0;
@@ -11,22 +9,23 @@ Index: kdecore/kdebug.cpp
{
if ( !kDebug_data )
{
-@@ -205,40 +205,46 @@ static void kDebugBackend( unsigned shor
+@@ -205,41 +205,46 @@
if ( KGlobal::_instance )
kDebug_data->aAreaName = KGlobal::instance()->instanceName();
}
+}
- int nPriority = 0;
-- QString aCaption;
+- TQString aCaption;
-
- /* Determine output */
+-
+static short kDebugAreaOutput(unsigned short nLevel, unsigned int nArea)
+{
+ kDebugInitBackend (nArea);
-
++
+ /* Determine output */
- QString key;
+ TQString key;
switch( nLevel )
{
case KDEBUG_INFO:
@@ -53,7 +52,8 @@ Index: kdecore/kdebug.cpp
break;
}
-- short nOutput = kDebug_data->config ? kDebug_data->config->readNumEntry(key, 2) : 2;
+- // if no output mode is specified default to no debug output
+- short nOutput = kDebug_data->config ? kDebug_data->config->readNumEntry(key, 4) : 4;
+ return kDebug_data->config ? kDebug_data->config->readNumEntry(key, 4) : 4;
+}
+
@@ -69,14 +69,14 @@ Index: kdecore/kdebug.cpp
+
+ short nOutput = kDebugAreaOutput(nLevel, nArea);
- // If the application doesn't have a QApplication object it can't use
+ // If the application doesn't have a TQApplication object it can't use
// a messagebox.
-@@ -247,6 +253,32 @@ static void kDebugBackend( unsigned shor
+@@ -248,6 +253,32 @@
else if ( nOutput == 4 && nLevel != KDEBUG_FATAL )
return;
+ int nPriority = 0;
-+ QString aCaption;
++ TQString aCaption;
+ switch( nLevel )
+ {
+ case KDEBUG_INFO:
@@ -104,10 +104,10 @@ Index: kdecore/kdebug.cpp
const int BUFSIZE = 4096;
char buf[BUFSIZE];
if ( !kDebug_data->aAreaName.isEmpty() ) {
-@@ -314,13 +346,25 @@ static void kDebugBackend( unsigned shor
+@@ -315,13 +346,25 @@
}
- kdbgstream &perror( kdbgstream &s) { return s << QString::fromLocal8Bit(strerror(errno)); }
+ kdbgstream &perror( kdbgstream &s) { return s << TQString(TQString::fromLocal8Bit(strerror(errno))); }
-kdbgstream kdDebug(int area) { return kdbgstream(area, KDEBUG_INFO); }
-kdbgstream kdDebug(bool cond, int area) { if (cond) return kdbgstream(area, KDEBUG_INFO); else return kdbgstream(0, 0, false); }
+kdbgstream kdDebug(int area) { return kdbgstream(area, KDEBUG_INFO, kDebugAreaEnabled(KDEBUG_INFO, area)); }
@@ -134,7 +134,7 @@ Index: kdecore/kdebug.cpp
kdbgstream kdFatal(int area) { return kdbgstream("FATAL: ", area, KDEBUG_FATAL); }
kdbgstream kdFatal(bool cond, int area) { if (cond) return kdbgstream("FATAL: ", area, KDEBUG_FATAL); else return kdbgstream(0,0,false); }
-@@ -331,9 +375,10 @@ kdbgstream::kdbgstream(kdbgstream &str)
+@@ -332,9 +375,10 @@
}
void kdbgstream::flush() {
@@ -144,15 +144,15 @@ Index: kdecore/kdebug.cpp
- kDebugBackend( level, area, output.local8Bit().data() );
+ if (print)
+ kDebugBackend( level, area, output.local8Bit().data() );
- output = QString::null;
+ output = TQString::null;
}
-@@ -349,7 +394,7 @@ kdbgstream &kdbgstream::form(const char
+@@ -350,7 +394,7 @@
}
kdbgstream::~kdbgstream() {
- if (!output.isEmpty()) {
+ if (print && !output.isEmpty()) {
fprintf(stderr, "ASSERT: debug output not ended with \\n\n");
- fprintf(stderr, "%s", kdBacktrace().latin1());
- *this << "\n";
+ TQString backtrace = kdBacktrace();
+ if (backtrace.ascii() != NULL) {