View | Details | Raw Unified
Collapse All | Expand All

(-) //depot/qt/3/src/xml/qsvgdevice.cpp (-22 / +23 lines)
 Lines 6349-6355    Link Here 
		    cur = tag->prev;
		    cur = tag->prev;
		    if ( !cur ) {
		    if ( !cur ) {
#ifdef QT_CHECK_RANGE
#ifdef QT_CHECK_RANGE
			qWarning( "QTextEdit::optimParseTags: no left-tag for '<" + tag->tag + ">' in line %d.", tag->line + 1 );
			qWarning( "QTextEdit::optimParseTags: no left-tag for '<%s>' in line %d.", tag->tag.ascii(), tag->line + 1 );
#endif
#endif
			return; // something is wrong - give up
			return; // something is wrong - give up
		    }
		    }
 Lines 6372-6378    Link Here 
				    break;
				    break;
				} else if ( !cur->leftTag ) {
				} else if ( !cur->leftTag ) {
#ifdef QT_CHECK_RANGE
#ifdef QT_CHECK_RANGE
				    qWarning( "QTextEdit::optimParseTags: mismatching %s-tag for '<" + cur->tag + ">' in line %d.", cur->tag[0] == '/' ? "left" : "right", cur->line + 1 );
				    qWarning( "QTextEdit::optimParseTags: mismatching %s-tag for '<%s>' in line %d.", cur->tag[0] == '/' ? "left" : "right", cur->tag.ascii(), cur->line + 1 );
#endif
#endif
				    return; // something is amiss - give up
				    return; // something is amiss - give up
				}
				}
 Lines 1043-1050    Link Here 
	return FALSE;
	return FALSE;
    if ( !sqlCursor()->canInsert() ) {
    if ( !sqlCursor()->canInsert() ) {
#ifdef QT_CHECK_RANGE
#ifdef QT_CHECK_RANGE
	qWarning("QDataTable::insertCurrent: insert not allowed for " +
	qWarning("QDataTable::insertCurrent: insert not allowed for %s",
		 sqlCursor()->name() );
		 sqlCursor()->name().latin1() );
#endif
#endif
	endInsert();
	endInsert();
	return FALSE;
	return FALSE;
 Lines 1117-1132    Link Here 
	return FALSE;
	return FALSE;
    if ( sqlCursor()->primaryIndex().count() == 0 ) {
    if ( sqlCursor()->primaryIndex().count() == 0 ) {
#ifdef QT_CHECK_RANGE
#ifdef QT_CHECK_RANGE
	qWarning("QDataTable::updateCurrent: no primary index for " +
	qWarning("QDataTable::updateCurrent: no primary index for %s",
		 sqlCursor()->name() );
		 sqlCursor()->name().latin1() );
#endif
#endif
	endUpdate();
	endUpdate();
	return FALSE;
	return FALSE;
    }
    }
    if ( !sqlCursor()->canUpdate() ) {
    if ( !sqlCursor()->canUpdate() ) {
#ifdef QT_CHECK_RANGE
#ifdef QT_CHECK_RANGE
	qWarning("QDataTable::updateCurrent: updates not allowed for " +
	qWarning("QDataTable::updateCurrent: updates not allowed for %s",
		 sqlCursor()->name() );
		 sqlCursor()->name().latin1() );
#endif
#endif
	endUpdate();
	endUpdate();
	return FALSE;
	return FALSE;
 Lines 1191-1198    Link Here 
	return FALSE;
	return FALSE;
    if ( sqlCursor()->primaryIndex().count() == 0 ) {
    if ( sqlCursor()->primaryIndex().count() == 0 ) {
#ifdef QT_CHECK_RANGE
#ifdef QT_CHECK_RANGE
	qWarning("QDataTable::deleteCurrent: no primary index " +
	qWarning("QDataTable::deleteCurrent: no primary index %s",
		 sqlCursor()->name() );
		 sqlCursor()->name().latin1() );
#endif
#endif
	return FALSE;
	return FALSE;
    }
    }
 Lines 234-240    Link Here 
	db->open();
	db->open();
#ifdef QT_CHECK_RANGE
#ifdef QT_CHECK_RANGE
	if ( !db->isOpen() )
	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
#endif
    }
    }
    return db;
    return db;
 Lines 686-692    Link Here 
    if ( !d->driver ) {
    if ( !d->driver ) {
#ifdef QT_CHECK_RANGE
#ifdef QT_CHECK_RANGE
	qWarning( "QSqlDatabase: %s driver not loaded", type.latin1() );
	qWarning( "QSqlDatabase: %s driver not loaded", type.latin1() );
	qWarning( "QSqlDatabase: available drivers: " + drivers().join(" ") );
	qWarning( "QSqlDatabase: available drivers: %s", drivers().join(" ").latin1() );
#endif
#endif
	d->driver = new QNullDriver();
	d->driver = new QNullDriver();
	d->driver->setLastError( QSqlError( "Driver not loaded", "Driver not loaded" ) );
	d->driver->setLastError( QSqlError( "Driver not loaded", "Driver not loaded" ) );
 Lines 273-279    Link Here 
	if ( field )
	if ( field )
	    newSort.append( *field, desc );
	    newSort.append( *field, desc );
	else
	else
	    qWarning( "QSqlIndex::fromStringList: unknown field: '" + f + "'" );
	    qWarning( "QSqlIndex::fromStringList: unknown field: '%s'", f.latin1());
    }
    }
    return newSort;
    return newSort;
}
}
 Lines 298-304    Link Here 
	    return i;
	    return i;
    }
    }
#ifdef QT_CHECK_RANGE
#ifdef QT_CHECK_RANGE
    qWarning( "QSqlRecord::position: unable to find field " + name );
    qWarning( "QSqlRecord::position: unable to find field %s", name.latin1() );
#endif
#endif
    return -1;
    return -1;
}
}
 Lines 313-319    Link Here 
    checkDetach();
    checkDetach();
    if ( !sh->d->contains( i ) ) {
    if ( !sh->d->contains( i ) ) {
#ifdef QT_CHECK_RANGE
#ifdef QT_CHECK_RANGE
	qWarning( "QSqlRecord::field: index out of range: " + QString::number( i ) );
	qWarning( "QSqlRecord::field: index out of range: %d", i );
#endif
#endif
	return 0;
	return 0;
    }
    }
 Lines 344-350    Link Here 
{
{
    if ( !sh->d->contains( i ) ) {
    if ( !sh->d->contains( i ) ) {
#ifdef QT_CHECK_RANGE
#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
#endif // QT_CHECK_RANGE
	return 0;
	return 0;
    }
    }
 Lines 680-686    Link Here 
    if ( code != -1 )
    if ( code != -1 )
	qWarning( "%s\n\tError code %d - %s", msg, code, strerror( code ) );
	qWarning( "%s\n\tError code %d - %s", msg, code, strerror( code ) );
    else
    else
	qWarning( msg );
	qWarning( "%s", msg );
#endif
#endif
#else
#else
    Q_UNUSED( msg );
    Q_UNUSED( msg );
 Lines 978-984    Link Here 
		// ### catch references to embedded .svg files
		// ### catch references to embedded .svg files
		QPixmap pix;
		QPixmap pix;
		if ( !pix.load( href ) ) {
		if ( !pix.load( href ) ) {
		    qWarning( "QSvgDevice::play: Couldn't load image "+href );
		    qWarning( "QSvgDevice::play: Couldn't load image %s", href.latin1() );
		    break;
		    break;
		}
		}
		pt->drawPixmap( QRect( x1, y1, w, h ), pix );
		pt->drawPixmap( QRect( x1, y1, w, h ), pix );
 Lines 1024-1031    Link Here 
                break;
                break;
	    }
	    }
	case InvalidElement:
	case InvalidElement:
	    qWarning( "QSvgDevice::play: unknown element type " +
	    qWarning( "QSvgDevice::play: unknown element type %s",
		      node.nodeName() );
		      node.nodeName().latin1() );
	    break;
	    break;
	};
	};
 Lines 1111-1117    Link Here 
{
{
    QRegExp reg( QString::fromLatin1("([+-]?\\d*\\.*\\d*[Ee]?[+-]?\\d*)(em|ex|px|%|pt|pc|cm|mm|in|)$") );
    QRegExp reg( QString::fromLatin1("([+-]?\\d*\\.*\\d*[Ee]?[+-]?\\d*)(em|ex|px|%|pt|pc|cm|mm|in|)$") );
    if ( reg.search( str ) == -1 ) {
    if ( reg.search( str ) == -1 ) {
	qWarning( "QSvgDevice::parseLen: couldn't parse " + str );
	qWarning( "QSvgDevice::parseLen: couldn't parse %s ", str.latin1() );
	if ( ok )
	if ( ok )
	    *ok = FALSE;
	    *ok = FALSE;
	return 0.0;
	return 0.0;
 Lines 1140-1146    Link Here 
	else if ( u == "pc" )
	else if ( u == "pc" )
	    dbl *= m.logicalDpiX() / 6.0;
	    dbl *= m.logicalDpiX() / 6.0;
	else
	else
	    qWarning( "QSvgDevice::parseLen: Unknown unit " + u );
	    qWarning( "QSvgDevice::parseLen: Unknown unit %s",  u.latin1() );
    }
    }
    if ( ok )
    if ( ok )
	*ok = TRUE;
	*ok = TRUE;