Fix a few more build warnings

pull/2/head
Timothy Pearson 12 years ago
parent bad353a20d
commit 083d32559d

@ -6082,10 +6082,10 @@ void bitBlt( QImage* dst, int dx, int dy, const QImage* src,
// - 1 bit, identical palette and byte-aligned area // - 1 bit, identical palette and byte-aligned area
// //
if ( haveSamePalette(*dst,*src) if ( haveSamePalette(*dst,*src)
&& ( dst->depth() != 1 || && ( (dst->depth() != 1) ||
!( (dx&7) || (sx&7) || (!( (dx&7) || (sx&7) ||
((sw&7) && (sx+sw < src->width()) || (((sw&7) && (sx+sw < src->width())) ||
(dx+sw < dst->width()) ) ) ) ) (dx+sw < dst->width()) ) )) ) )
{ {
// easy to copy // easy to copy
} else if ( dst->depth() != 32 ) { } else if ( dst->depth() != 32 ) {
@ -6103,7 +6103,7 @@ void bitBlt( QImage* dst, int dx, int dy, const QImage* src,
// Now assume palette can be ignored // Now assume palette can be ignored
if ( dst->depth() != src->depth() ) { if ( dst->depth() != src->depth() ) {
if ( sw == src->width() && sh == src->height() || dst->depth()==32 ) { if ( ((sw == src->width()) && (sh == src->height())) || (dst->depth()==32) ) {
QImage srcconv = src->convertDepth( dst->depth(), conversion_flags ); QImage srcconv = src->convertDepth( dst->depth(), conversion_flags );
bitBlt( dst, dx, dy, &srcconv, sx, sy, sw, sh, conversion_flags ); bitBlt( dst, dx, dy, &srcconv, sx, sy, sw, sh, conversion_flags );
} else { } else {

@ -433,7 +433,7 @@ void QGridLayoutData::setSize( int r, int c )
void QGridLayoutData::setNextPosAfter( int row, int col ) void QGridLayoutData::setNextPosAfter( int row, int col )
{ {
if ( addVertical ) { if ( addVertical ) {
if ( col > nextC || col == nextC && row >= nextR ) { if ( (col > nextC) || ((col == nextC) && (row >= nextR)) ) {
nextR = row + 1; nextR = row + 1;
nextC = col; nextC = col;
if ( nextR >= rr ) { if ( nextR >= rr ) {
@ -442,7 +442,7 @@ void QGridLayoutData::setNextPosAfter( int row, int col )
} }
} }
} else { } else {
if ( row > nextR || row == nextR && col >= nextC ) { if ( (row > nextR) || ((row == nextR) && (col >= nextC)) ) {
nextR = row; nextR = row;
nextC = col + 1; nextC = col + 1;
if ( nextC >= cc ) { if ( nextC >= cc ) {

@ -2113,8 +2113,8 @@ bool QObject::disconnectInternal( const QObject *sender, int signal_index,
success = TRUE; success = TRUE;
c = clist->next(); c = clist->next();
} else if ( r == c->object() && } else if ( r == c->object() &&
( member_index == -1 || ( (member_index == -1) ||
member_index == c->member() && c->memberType() == membcode ) ) { ((member_index == c->member()) && (c->memberType() == membcode)) ) ) {
removeObjFromList( c->object()->senderObjects, s, TRUE ); removeObjFromList( c->object()->senderObjects, s, TRUE );
success = TRUE; success = TRUE;
clist->remove(); clist->remove();
@ -2138,8 +2138,8 @@ bool QObject::disconnectInternal( const QObject *sender, int signal_index,
success = TRUE; success = TRUE;
c = clist->next(); c = clist->next();
} else if ( r == c->object() && } else if ( r == c->object() &&
( member_index == -1 || ( (member_index == -1) ||
member_index == c->member() && c->memberType() == membcode ) ) { ((member_index == c->member()) && (c->memberType() == membcode)) ) ) {
removeObjFromList( c->object()->senderObjects, s, TRUE ); removeObjFromList( c->object()->senderObjects, s, TRUE );
success = TRUE; success = TRUE;
clist->remove(); clist->remove();

@ -973,13 +973,16 @@ QPrinter::PaperSource QPrinter::paperSource() const
*/ */
void QPrinter::setPrintRange( PrintRange range ) void QPrinter::setPrintRange( PrintRange range )
{ {
if( range != AllPages ) if( range != AllPages ) {
if( range == Selection if( range == Selection
&& !isOptionEnabled( PrintSelection ) ) && !isOptionEnabled( PrintSelection ) ) {
setOptionEnabled( PrintSelection, TRUE ); setOptionEnabled( PrintSelection, TRUE );
}
else if( range == PageRange else if( range == PageRange
&& !isOptionEnabled( PrintPageRange ) ) && !isOptionEnabled( PrintPageRange ) ) {
setOptionEnabled( PrintPageRange, TRUE ); setOptionEnabled( PrintPageRange, TRUE );
}
}
d->printRange = range; d->printRange = range;
} }

@ -244,8 +244,8 @@ void QSimpleRichText::setWidth( QPainter *p, int w )
if ( w == d->cachedWidth && d->cachedWidthWithPainter ) if ( w == d->cachedWidth && d->cachedWidthWithPainter )
return; return;
d->doc->formatter()->setAllowBreakInWords( d->doc->isPageBreakEnabled() || d->doc->formatter()->setAllowBreakInWords( d->doc->isPageBreakEnabled() ||
p && p->device() && (p && p->device() &&
p->device()->devType() == QInternal::Printer ); (p->device()->devType() == QInternal::Printer)) );
p->save(); p->save();
d->cachedWidth = w; d->cachedWidth = w;
d->cachedWidthWithPainter = TRUE; d->cachedWidthWithPainter = TRUE;

Loading…
Cancel
Save