From 9a75b154bf0732aa3a501b6e31e566e06c5f8a31 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 2 Mar 2012 02:11:59 -0600 Subject: Undo prior accidental commit --- src/tools/qglobal.cpp | 86 +++++++++++++++++++++++++-------------------------- 1 file changed, 43 insertions(+), 43 deletions(-) (limited to 'src/tools/qglobal.cpp') diff --git a/src/tools/qglobal.cpp b/src/tools/qglobal.cpp index e7183a4..47986e1 100644 --- a/src/tools/qglobal.cpp +++ b/src/tools/qglobal.cpp @@ -63,12 +63,12 @@ 3.0.5's \c QT_VERSION is 0x030005. */ -const char *tqVersion() +const char *qVersion() { return QT_VERSION_STR; } -bool tqSharedBuild() +bool qSharedBuild() { #ifdef QT_SHARED return TRUE; @@ -94,12 +94,12 @@ static bool si_bigEndian; *wordSize. The \a *bigEndian is set to TRUE if this is a big-endian machine, or to FALSE if this is a little-endian machine. - In debug mode, this function calls tqFatal() with a message if the + In debug mode, this function calls qFatal() with a message if the computer is truly weird (i.e. different endianness for 16 bit and 32 bit integers); in release mode it returns FALSE. */ -bool tqSysInfo( int *wordSize, bool *bigEndian ) +bool qSysInfo( int *wordSize, bool *bigEndian ) { #if defined(QT_CHECK_NULL) Q_ASSERT( wordSize != 0 ); @@ -124,14 +124,14 @@ bool tqSysInfo( int *wordSize, bool *bigEndian ) *wordSize != 32 && *wordSize != 16 ) { // word size: 16, 32 or 64 #if defined(QT_CHECK_RANGE) - tqFatal( "qSysInfo: Unsupported system word size %d", *wordSize ); + qFatal( "qSysInfo: Unsupported system word size %d", *wordSize ); #endif return FALSE; } if ( sizeof(Q_INT8) != 1 || sizeof(Q_INT16) != 2 || sizeof(Q_INT32) != 4 || sizeof(Q_ULONG)*8 != si_wordSize || sizeof(float) != 4 || sizeof(double) != 8 ) { #if defined(QT_CHECK_RANGE) - tqFatal( "qSysInfo: Unsupported system data type size" ); + qFatal( "qSysInfo: Unsupported system data type size" ); #endif return FALSE; } @@ -154,7 +154,7 @@ bool tqSysInfo( int *wordSize, bool *bigEndian ) if ( be16 != be32 ) { // strange machine! #if defined(QT_CHECK_RANGE) - tqFatal( "qSysInfo: Inconsistent system byte order" ); + qFatal( "qSysInfo: Inconsistent system byte order" ); #endif return FALSE; } @@ -321,7 +321,7 @@ int qWinVersion() } else if ( osver.dwMinorVersion == 2 ) { winver = Qt::WV_2003; } else { - tqWarning("Untested Windows version detected!"); + qWarning("Untested Windows version detected!"); winver = Qt::WV_NT_based; } } @@ -346,7 +346,7 @@ Qt::WindowsVersion qt_winver = (Qt::WindowsVersion)qWinVersion(); *****************************************************************************/ /*! - \fn void tqDebug( const char *msg, ... ) + \fn void qDebug( const char *msg, ... ) \relates QApplication @@ -358,7 +358,7 @@ Qt::WindowsVersion qt_winver = (Qt::WindowsVersion)qWinVersion(); Example: \code - tqDebug( "my window handle = %x", myWidget->id() ); + qDebug( "my window handle = %x", myWidget->id() ); \endcode Under X11, the text is printed to stderr. Under Windows, the text @@ -367,15 +367,15 @@ Qt::WindowsVersion qt_winver = (Qt::WindowsVersion)qWinVersion(); \warning The internal buffer is limited to 8196 bytes (including the '\0'-terminator). - \warning Passing (const char *)0 as argument to tqDebug might lead + \warning Passing (const char *)0 as argument to qDebug might lead to crashes on certain platforms due to the platforms printf implementation. - \sa tqWarning(), tqFatal(), qInstallMsgHandler(), + \sa qWarning(), qFatal(), qInstallMsgHandler(), \link debug.html Debugging\endlink */ /*! - \fn void tqWarning( const char *msg, ... ) + \fn void qWarning( const char *msg, ... ) \relates QApplication @@ -390,7 +390,7 @@ Qt::WindowsVersion qt_winver = (Qt::WindowsVersion)qWinVersion(); void f( int c ) { if ( c > 200 ) - tqWarning( "f: bad argument, c == %d", c ); + qWarning( "f: bad argument, c == %d", c ); } \endcode @@ -400,15 +400,15 @@ Qt::WindowsVersion qt_winver = (Qt::WindowsVersion)qWinVersion(); \warning The internal buffer is limited to 8196 bytes (including the '\0'-terminator). - \warning Passing (const char *)0 as argument to tqWarning might lead + \warning Passing (const char *)0 as argument to qWarning might lead to crashes on certain platforms due to the platforms printf implementation. - \sa tqDebug(), tqFatal(), qInstallMsgHandler(), + \sa qDebug(), qFatal(), qInstallMsgHandler(), \link debug.html Debugging\endlink */ /*! - \fn void tqFatal( const char *msg, ... ) + \fn void qFatal( const char *msg, ... ) \relates QApplication @@ -423,7 +423,7 @@ Qt::WindowsVersion qt_winver = (Qt::WindowsVersion)qWinVersion(); int divide( int a, int b ) { if ( b == 0 ) // program error - tqFatal( "divide: cannot divide by zero" ); + qFatal( "divide: cannot divide by zero" ); return a/b; } \endcode @@ -434,10 +434,10 @@ Qt::WindowsVersion qt_winver = (Qt::WindowsVersion)qWinVersion(); \warning The internal buffer is limited to 8196 bytes (including the '\0'-terminator). - \warning Passing (const char *)0 as argument to tqFatal might lead + \warning Passing (const char *)0 as argument to qFatal might lead to crashes on certain platforms due to the platforms printf implementation. - \sa tqDebug(), tqWarning(), qInstallMsgHandler(), + \sa qDebug(), qWarning(), qInstallMsgHandler(), \link debug.html Debugging\endlink */ @@ -465,7 +465,7 @@ static void mac_default_handler( const char *msg ) #endif -void tqDebug( const char *msg, ... ) +void qDebug( const char *msg, ... ) { char buf[QT_BUFFER_LENGTH]; va_list ap; @@ -516,7 +516,7 @@ void debug( const char *msg, ... ) } } -void tqWarning( const char *msg, ... ) +void qWarning( const char *msg, ... ) { char buf[QT_BUFFER_LENGTH]; va_list ap; @@ -568,7 +568,7 @@ void warning( const char *msg, ... ) } } -void tqFatal( const char *msg, ... ) +void qFatal( const char *msg, ... ) { char buf[QT_BUFFER_LENGTH]; va_list ap; @@ -646,7 +646,7 @@ void fatal( const char *msg, ... ) This function does nothing when Qt is built with \c QT_NO_DEBUG defined. */ -void tqSystemWarning( const char* msg, int code ) +void qSystemWarning( const char* msg, int code ) { #ifndef QT_NO_DEBUG #if defined(Q_OS_WIN32) @@ -666,7 +666,7 @@ void tqSystemWarning( const char* msg, int code ) 0, NULL ); - tqWarning( "%s\n\tError code %d - %s", msg, code, QString::fromUcs2(string).latin1() ); + qWarning( "%s\n\tError code %d - %s", msg, code, QString::fromUcs2(string).latin1() ); }, { FormatMessageA( FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM, NULL, @@ -676,14 +676,14 @@ void tqSystemWarning( const char* msg, int code ) 0, NULL ); - tqWarning( "%s\n\tError code %d - %s", msg, code, (const char*)string ); + qWarning( "%s\n\tError code %d - %s", msg, code, (const char*)string ); } ); LocalFree( (HLOCAL)string ); #else if ( code != -1 ) - tqWarning( "%s\n\tError code %d - %s", msg, code, strerror( code ) ); + qWarning( "%s\n\tError code %d - %s", msg, code, strerror( code ) ); else - tqWarning( "%s", msg ); + qWarning( "%s", msg ); #endif #else Q_UNUSED( msg ); @@ -719,12 +719,12 @@ void tqSystemWarning( const char* msg, int code ) \endcode If \c b is zero, the Q_ASSERT statement will output the following - message using the tqWarning() function: + message using the qWarning() function: \code ASSERT: "b != 0" in div.cpp (9) \endcode - \sa tqWarning(), \link debug.html Debugging\endlink + \sa qWarning(), \link debug.html Debugging\endlink */ @@ -748,7 +748,7 @@ void tqSystemWarning( const char* msg, int code ) Q_CHECK_PTR( a ); \endcode - \sa tqWarning(), \link debug.html Debugging\endlink + \sa qWarning(), \link debug.html Debugging\endlink */ @@ -764,7 +764,7 @@ void tqSystemWarning( const char* msg, int code ) bool qt_check_pointer( bool c, const char *n, int l ) { if ( c ) - tqWarning( "In file %s, line %d: Out of memory", n, l ); + qWarning( "In file %s, line %d: Out of memory", n, l ); return TRUE; } @@ -775,7 +775,7 @@ static bool firstObsoleteWarning(const char *obj, const char *oldfunc ) if ( !obsoleteDict ) { // first time func is called obsoleteDict = new QAsciiDict; #if defined(QT_DEBUG) - tqDebug( + qDebug( "You are using obsolete functions in the Qt library. Call the function\n" "qSuppressObsoleteWarnings() to suppress obsolete warnings.\n" ); @@ -793,44 +793,44 @@ static bool firstObsoleteWarning(const char *obj, const char *oldfunc ) static bool suppressObsolete = FALSE; -void tqSuppressObsoleteWarnings( bool suppress ) +void qSuppressObsoleteWarnings( bool suppress ) { suppressObsolete = suppress; } -void tqObsolete( const char *obj, const char *oldfunc, const char *newfunc ) +void qObsolete( const char *obj, const char *oldfunc, const char *newfunc ) { if ( suppressObsolete ) return; if ( !firstObsoleteWarning(obj, oldfunc) ) return; if ( obj ) - tqDebug( "%s::%s: This function is obsolete, use %s instead.", + qDebug( "%s::%s: This function is obsolete, use %s instead.", obj, oldfunc, newfunc ); else - tqDebug( "%s: This function is obsolete, use %s instead.", + qDebug( "%s: This function is obsolete, use %s instead.", oldfunc, newfunc ); } -void tqObsolete( const char *obj, const char *oldfunc ) +void qObsolete( const char *obj, const char *oldfunc ) { if ( suppressObsolete ) return; if ( !firstObsoleteWarning(obj, oldfunc) ) return; if ( obj ) - tqDebug( "%s::%s: This function is obsolete.", obj, oldfunc ); + qDebug( "%s::%s: This function is obsolete.", obj, oldfunc ); else - tqDebug( "%s: This function is obsolete.", oldfunc ); + qDebug( "%s: This function is obsolete.", oldfunc ); } -void tqObsolete( const char *message ) +void qObsolete( const char *message ) { if ( suppressObsolete ) return; if ( !firstObsoleteWarning( "Qt", message) ) return; - tqDebug( "%s", message ); + qDebug( "%s", message ); } @@ -886,7 +886,7 @@ void tqObsolete( const char *message ) } \endcode - \sa tqDebug(), tqWarning(), tqFatal(), \link debug.html Debugging\endlink + \sa qDebug(), qWarning(), qFatal(), \link debug.html Debugging\endlink */ QtMsgHandler qInstallMsgHandler( QtMsgHandler h ) -- cgit v1.2.1