--- sql/qdatatable.cpp (revision 658213) +++ sql/qdatatable.cpp (working copy) @@ -1043,8 +1043,8 @@ bool QDataTable::insertCurrent() return FALSE; if ( !sqlCursor()->canInsert() ) { #ifdef QT_CHECK_RANGE - qWarning("QDataTable::insertCurrent: insert not allowed for " + - sqlCursor()->name() ); + qWarning("QDataTable::insertCurrent: insert not allowed for %s", + sqlCursor()->name().latin1() ); #endif endInsert(); return FALSE; @@ -1117,16 +1117,16 @@ bool QDataTable::updateCurrent() return FALSE; if ( sqlCursor()->primaryIndex().count() == 0 ) { #ifdef QT_CHECK_RANGE - qWarning("QDataTable::updateCurrent: no primary index for " + - sqlCursor()->name() ); + qWarning("QDataTable::updateCurrent: no primary index for %s", + sqlCursor()->name().latin1() ); #endif endUpdate(); return FALSE; } if ( !sqlCursor()->canUpdate() ) { #ifdef QT_CHECK_RANGE - qWarning("QDataTable::updateCurrent: updates not allowed for " + - sqlCursor()->name() ); + qWarning("QDataTable::updateCurrent: updates not allowed for %s", + sqlCursor()->name().latin1() ); #endif endUpdate(); return FALSE; @@ -1191,8 +1191,8 @@ bool QDataTable::deleteCurrent() return FALSE; if ( sqlCursor()->primaryIndex().count() == 0 ) { #ifdef QT_CHECK_RANGE - qWarning("QDataTable::deleteCurrent: no primary index " + - sqlCursor()->name() ); + qWarning("QDataTable::deleteCurrent: no primary index %s", + sqlCursor()->name().latin1() ); #endif return FALSE; } --- sql/qsqldatabase.cpp (revision 658213) +++ sql/qsqldatabase.cpp (working copy) @@ -234,7 +234,8 @@ QSqlDatabase* QSqlDatabaseManager::datab db->open(); #ifdef QT_CHECK_RANGE if ( !db->isOpen() ) - qWarning("QSqlDatabaseManager::database: unable to open database: " + db->lastError().databaseText() + ": " + db->lastError().driverText() ); + qWarning("QSqlDatabaseManager::database: unable to open database: %s: %s", + db->lastError().databaseText().latin1(), db->lastError().driverText().latin1() ); #endif } return db; @@ -686,7 +687,7 @@ void QSqlDatabase::init( const QString& if ( !d->driver ) { #ifdef QT_CHECK_RANGE qWarning( "QSqlDatabase: %s driver not loaded", type.latin1() ); - qWarning( "QSqlDatabase: available drivers: " + drivers().join(" ") ); + qWarning( "QSqlDatabase: available drivers: %s", drivers().join(" ").latin1() ); #endif d->driver = new QNullDriver(); d->driver->setLastError( QSqlError( "Driver not loaded", "Driver not loaded" ) ); --- sql/qsqlindex.cpp (revision 658213) +++ sql/qsqlindex.cpp (working copy) @@ -273,7 +273,7 @@ QSqlIndex QSqlIndex::fromStringList( con if ( field ) newSort.append( *field, desc ); else - qWarning( "QSqlIndex::fromStringList: unknown field: '" + f + "'" ); + qWarning( "QSqlIndex::fromStringList: unknown field: '%s'", f.latin1()); } return newSort; } --- sql/qsqlrecord.cpp (revision 658213) +++ sql/qsqlrecord.cpp (working copy) @@ -298,7 +298,7 @@ int QSqlRecord::position( const QString& return i; } #ifdef QT_CHECK_RANGE - qWarning( "QSqlRecord::position: unable to find field " + name ); + qWarning( "QSqlRecord::position: unable to find field %s", name.latin1() ); #endif return -1; } @@ -313,7 +313,7 @@ QSqlField* QSqlRecord::field( int i ) checkDetach(); if ( !sh->d->contains( i ) ) { #ifdef QT_CHECK_RANGE - qWarning( "QSqlRecord::field: index out of range: " + QString::number( i ) ); + qWarning( "QSqlRecord::field: index out of range: %d", i ); #endif return 0; } @@ -344,7 +344,7 @@ const QSqlField* QSqlRecord::field( int { if ( !sh->d->contains( i ) ) { #ifdef QT_CHECK_RANGE - qWarning( "QSqlRecord::field: index out of range: " + QString::number( i ) ); + qWarning( "QSqlRecord::field: index out of range: %d", i ); #endif // QT_CHECK_RANGE return 0; } --- tools/qgdict.cpp (revision 658213) +++ tools/qgdict.cpp (working copy) @@ -843,11 +843,11 @@ void QGDict::statistics() const QString line; line.fill( '-', 60 ); double real, ideal; - qDebug( line.ascii() ); + qDebug( "%s", line.ascii() ); qDebug( "DICTIONARY STATISTICS:" ); if ( count() == 0 ) { qDebug( "Empty!" ); - qDebug( line.ascii() ); + qDebug( "%s", line.ascii() ); return; } real = 0.0; @@ -868,7 +868,7 @@ void QGDict::statistics() const while ( b-- ) *pbuf++ = '*'; *pbuf = '\0'; - qDebug( buf ); + qDebug( "%s", buf ); i++; } qDebug( "Array size = %d", size() ); @@ -876,7 +876,7 @@ void QGDict::statistics() const qDebug( "Real dist = %g", real ); qDebug( "Rand dist = %g", ideal ); qDebug( "Real/Rand = %g", real/ideal ); - qDebug( line.ascii() ); + qDebug( "%s", line.ascii() ); #endif // QT_DEBUG } --- tools/qglobal.cpp (revision 658213) +++ tools/qglobal.cpp (working copy) @@ -680,7 +680,7 @@ void qSystemWarning( const char* msg, in if ( code != -1 ) qWarning( "%s\n\tError code %d - %s", msg, code, strerror( code ) ); else - qWarning( msg ); + qWarning( "%s", msg ); #endif #else Q_UNUSED( msg ); --- tools/qcstring.h (revision 658213) +++ tools/qcstring.h (working copy) @@ -161,7 +161,11 @@ public: QCString copy() const; - QCString &sprintf( const char *format, ... ); + QCString &sprintf( const char *format, ... ) +#if defined(Q_CC_GNU) && !defined(__INSURE__) + __attribute__ ((format (printf, 2, 3))) +#endif + ; int find( char c, int index=0, bool cs=TRUE ) const; int find( const char *str, int index=0, bool cs=TRUE ) const; --- tools/qgcache.cpp (revision 658213) +++ tools/qgcache.cpp (working copy) @@ -638,7 +638,7 @@ void QGCache::statistics() const #if defined(QT_DEBUG) QString line; line.fill( '*', 80 ); - qDebug( line.ascii() ); + qDebug( "%s", line.ascii() ); qDebug( "CACHE STATISTICS:" ); qDebug( "cache contains %d item%s, with a total cost of %d", count(), count() != 1 ? "s" : "", tCost ); @@ -659,7 +659,7 @@ void QGCache::statistics() const lruList->dumps != 1 ? "have" : "has", lruList->dumpCosts ); qDebug( "Statistics from internal dictionary class:" ); dict->statistics(); - qDebug( line.ascii() ); + qDebug( "%s", line.ascii() ); #endif } --- xml/qsvgdevice.cpp (revision 658213) +++ xml/qsvgdevice.cpp (working copy) @@ -1,3 +1,5 @@ +#ifndef XML_QSVGDEVICE.CPP +#define XML_QSVGDEVICE.CPP /**************************************************************************** ** $Id: qt/qsvgdevice.cpp 3.3.8 edited Jan 11 14:46 $ ** @@ -978,7 +980,7 @@ bool QSvgDevice::play( const QDomNode &n // ### catch references to embedded .svg files QPixmap pix; if ( !pix.load( href ) ) { - qWarning( "QSvgDevice::play: Couldn't load image "+href ); + qWarning( "QSvgDevice::play: Couldn't load image %s", href.latin1() ); break; } pt->drawPixmap( QRect( x1, y1, w, h ), pix ); @@ -1024,8 +1026,8 @@ bool QSvgDevice::play( const QDomNode &n break; } case InvalidElement: - qWarning( "QSvgDevice::play: unknown element type " + - node.nodeName() ); + qWarning( "QSvgDevice::play: unknown element type %s", + node.nodeName().latin1() ); break; }; @@ -1111,7 +1113,7 @@ double QSvgDevice::parseLen( const QStri { QRegExp reg( QString::fromLatin1("([+-]?\\d*\\.*\\d*[Ee]?[+-]?\\d*)(em|ex|px|%|pt|pc|cm|mm|in|)$") ); if ( reg.search( str ) == -1 ) { - qWarning( "QSvgDevice::parseLen: couldn't parse " + str ); + qWarning( "QSvgDevice::parseLen: couldn't parse %s ", str.latin1() ); if ( ok ) *ok = FALSE; return 0.0; @@ -1140,7 +1142,7 @@ double QSvgDevice::parseLen( const QStri else if ( u == "pc" ) dbl *= m.logicalDpiX() / 6.0; else - qWarning( "QSvgDevice::parseLen: Unknown unit " + u ); + qWarning( "QSvgDevice::parseLen: Unknown unit %s", u.latin1() ); } if ( ok ) *ok = TRUE; @@ -1586,3 +1588,4 @@ void QSvgDevice::applyTransform( QDomEle } #endif // QT_NO_SVG +#endif // XML_QSVGDEVICE.CPP --- widgets/qheader.cpp (revision 658213) +++ widgets/qheader.cpp (working copy) @@ -1873,10 +1873,8 @@ void QHeader::setUpdatesEnabled( bool en bool QHeader::reverse () const { -#if 0 +#if 1 return ( orient == Qt::Horizontal && QApplication::reverseLayout() ); -#else - return FALSE; #endif }