2 Copyright (c) 2006 Paolo Capriotti <p.capriotti@gmail.com>
3 (c) 2006 Maurizio Monge <maurizio.monge@kdemail.net>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
11 // throw exception: used by boost
23 void throw_exception(std::exception
const &) {
24 kError() << "[bug] boost exception";
29 std::ostream
&operator <<(std::ostream
&os
, const QString
& s
) {
30 os
<< s
.toAscii().constData();
35 void __attribute__ ((used
))
39 pstr(const QString
& s
) {
40 kDebug() << "\"" << s
<< "\"";
43 QString
qPrintf(const char* fmt
, ...) {
47 int l
= vsnprintf(NULL
, 0, fmt
, ap
)+1;
50 char *str
= (char*)alloca(l
);
51 //char *str = (char*)malloc(l);
53 vsnprintf(str
, l
, fmt
, ap
);
67 QString
prettyTypeName(const char* name
) {
70 const char* res
= abi::__cxa_demangle(name
, NULL
, NULL
, &s
);