summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kdecore/kdebug.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/kdecore/kdebug.cpp b/kdecore/kdebug.cpp
index 4985e51a3..e673d4173 100644
--- a/kdecore/kdebug.cpp
+++ b/kdecore/kdebug.cpp
@@ -352,7 +352,10 @@ kdbgstream &kdbgstream::form(const char *format, ...)
kdbgstream::~kdbgstream() {
if (!output.isEmpty()) {
fprintf(stderr, "ASSERT: debug output not ended with \\n\n");
- fprintf(stderr, "%s", kdBacktrace().latin1());
+ TQString backtrace = kdBacktrace();
+ if (backtrace.ascii() != NULL) {
+ fprintf(stderr, "%s", backtrace.latin1());
+ }
*this << "\n";
}
}
@@ -376,7 +379,7 @@ kdbgstream& kdbgstream::operator << (TQChar ch)
output += "\\x" + TQString::number( ch.unicode(), 16 ).rightJustify(2, '0');
else {
output += ch;
- if (ch == (QChar)'\n') flush();
+ if (ch == QChar('\n')) flush();
}
return *this;
}
@@ -415,7 +418,7 @@ kdbgstream& kdbgstream::operator << (const TQWidget* widget)
return *this;
}
output += string;
- if (output.at(output.length() -1 ) == (QChar)'\n')
+ if (output.at(output.length() -1 ) == QChar('\n'))
{
flush();
}