generic: misc cleanups

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2016-04-30 00:30:19 +00:00
parent 795dbcc1fd
commit 344cd812dc
3 changed files with 5 additions and 12 deletions

View file

@ -80,7 +80,7 @@ check_symbol_exists(posix_madvise "sys/mman.h" HAVE_MADVISE)
check_symbol_exists(getgrouplist "unistd.h;grp.h" HAVE_GETGROUPLIST)# kdecore/fakes.c check_symbol_exists(getgrouplist "unistd.h;grp.h" HAVE_GETGROUPLIST)# kdecore/fakes.c
check_function_exists(backtrace HAVE_BACKTRACE) # kdecore, kio check_function_exists(backtrace HAVE_BACKTRACE) # kdecore, kio
check_function_exists(fdatasync HAVE_FDATASYNC) # kdecore, kate check_function_exists(fdatasync HAVE_FDATASYNC) # kdecore, kate
check_function_exists(mmap HAVE_MMAP) # kdecore check_function_exists(mmap HAVE_MMAP) # kdecore
check_function_exists(sendfile HAVE_SENDFILE) # kioslave check_function_exists(sendfile HAVE_SENDFILE) # kioslave

View file

@ -696,14 +696,14 @@ static QString maybeDemangledName(char *name)
} }
#endif #endif
QString kRealBacktrace(int levels) QString kBacktrace(int levels)
{ {
QString s; QString s;
#ifdef HAVE_BACKTRACE #ifdef HAVE_BACKTRACE
void* trace[256]; void* trace[256];
int n = backtrace(trace, 256); int n = backtrace(trace, 256);
if (!n) if (!n)
return s; return s;
char** strings = backtrace_symbols (trace, n); char** strings = backtrace_symbols (trace, n);
if ( levels != -1 ) if ( levels != -1 )

View file

@ -72,13 +72,6 @@ KDECORE_EXPORT QDebug kDebugStream(QtMsgType level, int area, const char *file =
*/ */
KDECORE_EXPORT QDebug kDebugDevNull(); KDECORE_EXPORT QDebug kDebugDevNull();
/**
* @internal
* The actual backtrace.
*/
KDECORE_EXPORT QString kRealBacktrace(int);
/** /**
* \relates KGlobal * \relates KGlobal
* Returns a backtrace. * Returns a backtrace.
@ -89,9 +82,9 @@ KDECORE_EXPORT QString kRealBacktrace(int);
* @return a backtrace * @return a backtrace
*/ */
#if !defined(KDE_NO_DEBUG_OUTPUT) #if !defined(KDE_NO_DEBUG_OUTPUT)
inline QString kBacktrace(int levels=-1) { return kRealBacktrace(levels); } KDECORE_EXPORT QString kBacktrace(int levels=-1);
#else #else
static inline QString kBacktrace(int=-1) { return QString(); } inline QString kBacktrace(int=-1) { return QString(); };
#endif #endif
/** /**