79 bool qSysInfo(
int *wordSize,
bool *bigEndian )
81 #if defined(CHECK_NULL) 101 if ( *wordSize != 64 &&
104 #if defined(CHECK_RANGE) 105 qFatal(
"qSysInfo: Unsupported system word size %d", *wordSize );
110 sizeof(
float) != 4 ||
sizeof(
double) != 8 ) {
111 #if defined(CHECK_RANGE) 112 qFatal(
"qSysInfo: Unsupported system data type size" );
121 unsigned char *
p = (
unsigned char *)(&ns);
124 p = (
unsigned char *)(&nl);
125 if ( p[0] == 0x12 && p[1] == 0x34 && p[2] == 0x56 && p[3] == 0x78 )
128 if ( p[0] == 0x78 && p[1] == 0x56 && p[2] == 0x34 && p[3] == 0x12 )
133 if ( be16 != be32 ) {
134 #if defined(CHECK_RANGE) 135 qFatal(
"qSysInfo: Inconsistent system byte order" );
239 static FILE * mac_debug=0;
243 mac_debug=fopen(
"debug.txt",
"a+" );
249 vsprintf( buf, msg, ap );
253 vfprintf( mac_debug, msg, ap );
255 fprintf( mac_debug,
"\n" );
267 mac_debug=fopen(
"debug.txt",
"a+" );
273 vsprintf( buf,
msg, ap );
277 vfprintf( mac_debug,
msg, ap );
279 fprintf( mac_debug,
"\n" );
288 mac_debug=fopen(
"debug.txt",
"a+" );
294 vsprintf( buf,
msg, ap );
298 vfprintf( mac_debug,
msg, ap );
300 fprintf( mac_debug,
"\n" );
310 mac_debug=fopen(
"debug.txt",
"a+" );
316 vsprintf( buf,
msg, ap );
320 vfprintf( mac_debug,
msg, ap );
322 fprintf( mac_debug,
"\n" );
331 mac_debug=fopen(
"debug.txt",
"a+");
337 vsprintf( buf,
msg, ap );
341 vfprintf( mac_debug,
msg, ap );
343 fprintf( mac_debug,
"\n" );
354 mac_debug=fopen(
"debug.txt",
"a+" );
360 vsprintf( buf,
msg, ap );
364 vfprintf( mac_debug,
msg, ap );
366 fprintf( mac_debug,
"\n" );
382 vsprintf( buf, msg, ap );
386 vfprintf(
stderr, msg, ap );
399 vsprintf( buf, msg, ap );
403 vfprintf(
stderr, msg, ap );
415 vsprintf( buf, msg, ap );
419 vfprintf(
stderr, msg, ap );
433 vsprintf( buf, msg, ap );
437 vfprintf(
stderr, msg, ap );
449 vsprintf( buf, msg, ap );
453 vfprintf(
stderr, msg, ap );
456 #if defined(_OS_UNIX_) && defined(DEBUG) 471 vsprintf( buf, msg, ap );
475 vfprintf(
stderr, msg, ap );
478 #if defined(_OS_UNIX_) && defined(DEBUG) 552 qFatal(
"In file %s, line %d: Out of memory", n, l );
560 if ( !obsoleteDict ) {
564 "You are using obsolete functions in the Qt library. Call the function\n" 565 "qSuppressObsoleteWarnings() to suppress obsolete warnings.\n" 572 if ( obsoleteDict->
find(s.
data()) == 0 ) {
586 void qObsolete(
const char *obj,
const char *oldfunc,
const char *newfunc )
593 qDebug(
"%s::%s: This function is obsolete, use %s instead.",
594 obj, oldfunc, newfunc );
596 qDebug(
"%s: This function is obsolete, use %s instead.",
607 qDebug(
"%s::%s: This function is obsolete.", obj, oldfunc );
609 qDebug(
"%s: This function is obsolete.", oldfunc );
684 bool qt_winunicode=
FALSE;
void qDebug(const char *msg,...)
void qObsolete(const char *obj, const char *oldfunc, const char *newfunc)
void msg(const char *fmt,...)
Q_EXPORT bool qSysInfo(int *wordSize, bool *bigEndian)
static bool firstObsoleteWarning(const char *obj, const char *oldfunc)
Q_EXPORT const char * qVersion()
type * find(const char *k) const
void insert(const char *k, const type *d)
bool qt_check_pointer(bool c, const char *n, int l)
void warning(const char *msg,...)
void qWarning(const char *msg,...)
void debug(const char *msg,...)
void(* msg_handler)(QtMsgType, const char *)
static bool si_alreadyDone
const char * data() const
void fatal(const char *msg,...)
static bool suppressObsolete
Q_EXPORT msg_handler qInstallMsgHandler(msg_handler)
static msg_handler handler
void qSuppressObsoleteWarnings(bool suppress)
void qFatal(const char *msg,...)
std::string nl(std::size_t i=1)