Darrell Anderson 12 years ago
commit 7d22e97622

12
configure vendored

@ -111,11 +111,11 @@ CFG_XINERAMA=auto
CFG_BIG_CODECS=yes
CFG_ZLIB=yes
CFG_PNG=yes
CFG_LIBPNG=qt
CFG_LIBPNG=system
CFG_JPEG=auto
CFG_LIBJPEG=system
CFG_MNG=auto
CFG_LIBMNG=qt
CFG_LIBMNG=system
CFG_XCURSOR=auto
CFG_XRANDR=auto
CFG_XRENDER=auto
@ -1999,12 +1999,12 @@ Image Formats:
Third Party Image Loading Libraries:
* -qt-libpng ......... Use the libpng bundled with Qt.
-system-libpng ..... Use libpng from the operating system.
-qt-libpng ......... Use the libpng bundled with Qt.
* -system-libpng ..... Use libpng from the operating system.
See http://www.libpng.org/pub/png
* -qt-libmng ......... Use the libmng bundled with Qt.
-system-libmng ..... Use libmng from the operating system.
-qt-libmng ......... Use the libmng bundled with Qt.
* -system-libmng ..... Use libmng from the operating system.
See http://www.libmng.com
EOF

@ -10555,7 +10555,7 @@ uint TQJpUnicodeConv::unicodeToSjisibmvdc(uint h, uint l) const
if (!sjis208ibmvdc_unicode[i])
return 0;
if (u==sjis208ibmvdc_unicode[i]){
return ((0x00fa +(i/189))<<8 | 0x0040+(i%189));
return ((0x00fa +(i/189))<<8 | (0x0040+(i%189)));
}
}
}
@ -10660,7 +10660,7 @@ uint TQJpUnicodeConv::unicodeToCp932(uint h, uint l) const
if (!cp932_ed_ee_unicode[j])
return 0;
if (u==cp932_ed_ee_unicode[j]){
return ((0x00ed +(j/189))<<8 | 0x0040+(j%189));
return ((0x00ed +(j/189))<<8 | (0x0040+(j%189)));
}
}
}

@ -2844,7 +2844,7 @@ static void setupLocaleMapper()
localeMapper = checkForCodec( lang );
// 5. "@euro"
if ( !localeMapper && ctype && strstr( ctype, "@euro" ) || lang && strstr( lang, "@euro" ) )
if ( ( !localeMapper && ctype && strstr( ctype, "@euro" ) ) || (lang && strstr( lang, "@euro" ) ) )
localeMapper = TQTextCodec::codecForName( "ISO 8859-15" );
// 6. guess locale from ctype unless ctype is "C"

@ -254,8 +254,8 @@ const char* TQUtf16Codec::name() const
int TQUtf16Codec::heuristicContentMatch(const char* chars, int len) const
{
uchar* uchars = (uchar*)chars;
if ( len >= 2 && (uchars[0] == 0xff && uchars[1] == 0xfe ||
uchars[1] == 0xff && uchars[0] == 0xfe) )
if ( len >= 2 && ((uchars[0] == 0xff && uchars[1] == 0xfe) ||
(uchars[1] == 0xff && uchars[0] == 0xfe)) )
return len;
else
return 0;

@ -1077,13 +1077,14 @@ void TQDialog::showExtension( bool showIt )
/*! \reimp */
TQSize TQDialog::sizeHint() const
{
if ( d->extension )
if ( d->extension ) {
if ( d->orientation == Horizontal )
return TQSize( TQWidget::sizeHint().width(),
TQMAX( TQWidget::sizeHint().height(),d->extension->sizeHint().height() ) );
else
return TQSize( TQMAX( TQWidget::sizeHint().width(), d->extension->sizeHint().width() ),
TQWidget::sizeHint().height() );
}
return TQWidget::sizeHint();
}
@ -1092,13 +1093,14 @@ TQSize TQDialog::sizeHint() const
/*! \reimp */
TQSize TQDialog::minimumSizeHint() const
{
if ( d->extension )
if ( d->extension ) {
if (d->orientation == Horizontal )
return TQSize( TQWidget::minimumSizeHint().width(),
TQMAX( TQWidget::minimumSizeHint().height(), d->extension->minimumSizeHint().height() ) );
else
return TQSize( TQMAX( TQWidget::minimumSizeHint().width(), d->extension->minimumSizeHint().width() ),
TQWidget::minimumSizeHint().height() );
}
return TQWidget::minimumSizeHint();
}

@ -1453,7 +1453,7 @@ void TQFileListBox::viewportDropEvent( TQDropEvent *e )
bool TQFileListBox::acceptDrop( const TQPoint &pnt, TQWidget *source )
{
TQListBoxItem *item = itemAt( pnt );
if ( !item || item && !itemRect( item ).contains( pnt ) ) {
if ( !item || ( item && !itemRect( item ).contains( pnt ) ) ) {
if ( source == viewport() && startDragDir == filedialog->dirPath() )
return FALSE;
return TRUE;
@ -1872,7 +1872,7 @@ void TQFileDialogTQFileListView::viewportDropEvent( TQDropEvent *e )
bool TQFileDialogTQFileListView::acceptDrop( const TQPoint &pnt, TQWidget *source )
{
TQListViewItem *item = itemAt( pnt );
if ( !item || item && !itemRect( item ).contains( pnt ) ) {
if ( !item || ( item && !itemRect( item ).contains( pnt ) ) ) {
if ( source == viewport() && startDragDir == filedialog->dirPath() )
return FALSE;
return TRUE;
@ -3753,8 +3753,8 @@ void TQFileDialog::okClicked()
= (TQFileDialogPrivate::File *)files->currentItem();
TQFileDialogPrivate::MCItem * m
= (TQFileDialogPrivate::MCItem *)d->moreFiles->item( d->moreFiles->currentItem() );
if ( c && files->isVisible() && files->hasFocus() ||
m && d->moreFiles->isVisible() && d->moreFiles->hasFocus() ) {
if ( ( c && files->isVisible() && files->hasFocus() ) ||
( m && d->moreFiles->isVisible() && d->moreFiles->hasFocus() ) ) {
if ( c && files->isVisible() )
f = c->info;
else
@ -5480,8 +5480,8 @@ bool TQFileDialog::eventFilter( TQObject * o, TQEvent * e )
return TRUE;
} else if ( ( o == d->moreFiles || o == d->moreFiles->viewport() ) &&
e->type() == TQEvent::FocusIn ) {
if ( o == d->moreFiles->viewport() && !d->moreFiles->viewport()->hasFocus() ||
o == d->moreFiles && !d->moreFiles->hasFocus() )
if ( ( o == d->moreFiles->viewport() && !d->moreFiles->viewport()->hasFocus() ) ||
( o == d->moreFiles && !d->moreFiles->hasFocus() ) )
((TQWidget*)o)->setFocus();
return FALSE;
}
@ -6015,7 +6015,7 @@ void TQFileDialog::insertEntry( const TQValueList<TQUrlInfo> &lst, TQNetworkOper
i = new TQFileDialogPrivate::File( d, &inf, files );
i2 = new TQFileDialogPrivate::MCItem( d->moreFiles, i );
if ( d->mode == ExistingFiles && inf.isDir() ||
if ( ( d->mode == ExistingFiles && inf.isDir() ) ||
( isDirectoryMode( d->mode ) && inf.isFile() ) ) {
i->setSelectable( FALSE );
i2->setSelectable( FALSE );
@ -6297,7 +6297,7 @@ void TQFileDialog::resortDir()
item2 = new TQFileDialogPrivate::MCItem( d->moreFiles, item, item2 );
item->i = item2;
d->pendingItems.append( item );
if ( d->mode == ExistingFiles && item->info.isDir() ||
if ( ( d->mode == ExistingFiles && item->info.isDir() ) ||
( isDirectoryMode( d->mode ) && item->info.isFile() ) ) {
item->setSelectable( FALSE );
item2->setSelectable( FALSE );

@ -573,7 +573,7 @@ int TQProgressDialog::progress() const
void TQProgressDialog::setProgress( int progress )
{
if ( progress == bar()->progress() ||
bar()->progress() == -1 && progress == bar()->totalSteps() )
( bar()->progress() == -1 && progress == bar()->totalSteps() ) )
return;
bar()->setProgress(progress);

@ -3772,7 +3772,7 @@ int TQApplication::x11ProcessEvent( XEvent* event )
case SelectionClear: {
XSelectionClearEvent *req = &event->xselectionclear;
// don't deliver dnd events to the clipboard, it gets confused
if (! req || qt_xdnd_selection && req->selection == qt_xdnd_selection)
if (! req || ( qt_xdnd_selection && req->selection ) == qt_xdnd_selection)
break;
if (tqt_clipboard) {
@ -3785,7 +3785,7 @@ int TQApplication::x11ProcessEvent( XEvent* event )
case SelectionNotify: {
XSelectionEvent *req = &event->xselection;
// don't deliver dnd events to the clipboard, it gets confused
if (! req || qt_xdnd_selection && req->selection == qt_xdnd_selection)
if (! req || ( qt_xdnd_selection && req->selection ) == qt_xdnd_selection)
break;
if (tqt_clipboard) {
@ -4200,7 +4200,7 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
// backward rotation respectively.
int btn = event->xbutton.button;
delta *= 120 * ( (btn == Button4 || btn == 6) ? 1 : -1 );
bool hor = ( (btn == Button4 || btn == Button5) && (state&AltButton) ||
bool hor = ( ( (btn == Button4 || btn == Button5) && (state&AltButton) ) ||
(btn == 6 || btn == 7) );
translateWheelEvent( globalPos.x(), globalPos.y(), delta, state, (hor)?Horizontal:Vertical );
}
@ -5336,7 +5336,7 @@ bool TQETWidget::translateKeyEventInternal( const XEvent *event, int& count,
// (to figure out whether the Ctrl modifier is held while Shift is pressed,
// or Shift is held while Ctrl is pressed) since the 'state' doesn't tell
// us whether the modifier held is Left or Right.
if ( qt_use_rtl_extensions && type == TQEvent::KeyPress && statefulTranslation )
if ( qt_use_rtl_extensions && type == TQEvent::KeyPress && statefulTranslation ) {
if (key == XK_Control_L || key == XK_Control_R || key == XK_Shift_L || key == XK_Shift_R) {
if (!directionKeyEvent) {
directionKeyEvent = key;
@ -5349,6 +5349,7 @@ bool TQETWidget::translateKeyEventInternal( const XEvent *event, int& count,
// if any other key was pressed.
directionKeyEvent = Key_Space;
}
}
// Commentary in X11/keysymdef says that X codes match ASCII, so it
// is safe to use the locale functions to process X codes in ISO8859-1.
@ -5410,11 +5411,11 @@ bool TQETWidget::translateKeyEventInternal( const XEvent *event, int& count,
if ( qt_use_rtl_extensions && type == TQEvent::KeyPress && statefulTranslation ) {
if ( directionKeyEvent && lastWinId == winId() ) {
if ( key == XK_Shift_L && directionKeyEvent == XK_Control_L ||
key == XK_Control_L && directionKeyEvent == XK_Shift_L ) {
if ( ( key == XK_Shift_L && directionKeyEvent == XK_Control_L ) ||
( key == XK_Control_L && directionKeyEvent == XK_Shift_L ) ) {
directionKeyEvent = Key_Direction_L;
} else if ( key == XK_Shift_R && directionKeyEvent == XK_Control_R ||
key == XK_Control_R && directionKeyEvent == XK_Shift_R ) {
} else if ( ( key == XK_Shift_R && directionKeyEvent == XK_Control_R ) ||
( key == XK_Control_R && directionKeyEvent == XK_Shift_R ) ) {
directionKeyEvent = Key_Direction_R;
}
}
@ -5735,8 +5736,8 @@ static Bool isPaintOrScrollDoneEvent( Display *, XEvent *ev, XPointer a )
{
PaintEventInfo *info = (PaintEventInfo *)a;
if ( ev->type == Expose || ev->type == GraphicsExpose
|| ev->type == ClientMessage
&& ev->xclient.message_type == qt_qt_scrolldone )
|| ( ev->type == ClientMessage
&& ev->xclient.message_type == qt_qt_scrolldone ) )
{
if ( ev->xexpose.window == info->window )
return True;

@ -704,7 +704,7 @@ void TQCursor::update() const
forbidden_bits, forbiddenm_bits
};
if ( d->cshape >= SizeVerCursor && d->cshape < SizeAllCursor ||
if ( ( d->cshape >= SizeVerCursor && d->cshape < SizeAllCursor ) ||
d->cshape == BlankCursor ) {
XColor bg, fg;
bg.red = 255 << 8;

@ -611,7 +611,7 @@ void qt_handle_xdnd_position( TQWidget *w, const XEvent * xe, bool passive )
if (!passive && checkEmbedded(c, xe))
return;
if ( !c || !c->acceptDrops() && c->isDesktop() ) {
if ( !c || ( !c->acceptDrops() && c->isDesktop() ) ) {
return;
}

@ -1464,10 +1464,10 @@ TQCString TQUriDrag::unicodeUriToUri(const TQString& uuri)
int n = utf8.length();
bool isFile = uuri.startsWith("file://");
for (int i=0; i<n; i++) {
if ( utf8[i] >= 'a' && utf8[i] <= 'z'
if ( (utf8[i] >= 'a' && utf8[i] <= 'z')
|| utf8[i] == '/'
|| utf8[i] >= '0' && utf8[i] <= '9'
|| utf8[i] >= 'A' && utf8[i] <= 'Z'
|| (utf8[i] >= '0' && utf8[i] <= '9')
|| (utf8[i] >= 'A' && utf8[i] <= 'Z')
|| utf8[i] == '-' || utf8[i] == '_'
|| utf8[i] == '.' || utf8[i] == '!'

@ -258,31 +258,31 @@ TQImageFormat* TQMNGFormatType::decoderFor( const uchar* buffer, int length )
{
if (length < 8) return 0;
if (buffer[0]==138 // MNG signature
if ((buffer[0]==138 // MNG signature
&& buffer[1]=='M'
&& buffer[2]=='N'
&& buffer[3]=='G'
&& buffer[4]==13
&& buffer[5]==10
&& buffer[6]==26
&& buffer[7]==10
|| buffer[0]==139 // JNG signature
&& buffer[7]==10)
|| (buffer[0]==139 // JNG signature
&& buffer[1]=='J'
&& buffer[2]=='N'
&& buffer[3]=='G'
&& buffer[4]==13
&& buffer[5]==10
&& buffer[6]==26
&& buffer[7]==10
&& buffer[7]==10)
#ifdef QT_NO_IMAGEIO_PNG // if we don't have native PNG support use libmng
|| buffer[0]==137 // PNG signature
|| (buffer[0]==137 // PNG signature
&& buffer[1]=='P'
&& buffer[2]=='N'
&& buffer[3]=='G'
&& buffer[4]==13
&& buffer[5]==10
&& buffer[6]==26
&& buffer[7]==10
&& buffer[7]==10)
#endif
)
return new TQMNGFormat;

@ -412,15 +412,15 @@ bool TQPrinter::cmd( int c, TQPainter *paint, TQPDevCmdParam *p )
lphack.append(pr);
}
char ** lpargs = new char *[lphack.size()+6];
lpargs[0] = "lp";
lpargs[0] = (char *)"lp";
uint i;
for (i = 0; i < lphack.size(); ++i)
lpargs[i+1] = (char *)lphack[i].ascii();
#ifndef Q_OS_OSF
if (psToStr[page_size]) {
lpargs[++i] = "-o";
lpargs[++i] = (char *)"-o";
lpargs[++i] = (char *)psToStr[page_size];
lpargs[++i] = "-o";
lpargs[++i] = (char *)"-o";
media = "media=";
media += psToStr[page_size];
lpargs[++i] = (char *)media.ascii();
@ -428,7 +428,7 @@ bool TQPrinter::cmd( int c, TQPainter *paint, TQPDevCmdParam *p )
#endif
lpargs[++i] = 0;
char **lprargs = new char *[lprhack.size()+1];
lprargs[0] = "lpr";
lprargs[0] = (char *)"lpr";
for (uint x = 0; x < lprhack.size(); ++x)
lprargs[x+1] = (char *)lprhack[x].ascii();
lprargs[lprhack.size() + 1] = 0;

@ -177,7 +177,7 @@ bool TQTextCommandHistory::isUndoAvailable()
bool TQTextCommandHistory::isRedoAvailable()
{
return current > -1 && current < (int)history.count() - 1 || current == -1 && history.count() > 0;
return ( current > -1 && current < (int)history.count() - 1 ) || ( current == -1 && history.count() > 0 );
}
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@ -2127,11 +2127,12 @@ void TQTextDocument::setRichTextMarginsInternal( TQPtrList< TQPtrVector<TQStyleS
stylesPar->utm = 0;
} else {
m = TQMAX(0, item->margin( TQStyleSheetItem::MarginTop ) );
if ( stylesPar->ldepth )
if ( stylesPar->ldepth ) {
if ( item->displayMode() == TQStyleSheetItem::DisplayListItem )
m /= stylesPar->ldepth * stylesPar->ldepth;
else
m = 0;
}
}
for ( i = (int)curStyle->size() - 2 ; i >= 0; --i ) {
item = (*curStyle)[ i ];
@ -2155,11 +2156,12 @@ void TQTextDocument::setRichTextMarginsInternal( TQPtrList< TQPtrVector<TQStyleS
stylesPar->ubm = 0;
} else {
m = TQMAX(0, item->margin( TQStyleSheetItem::MarginBottom ) );
if ( stylesPar->ldepth )
if ( stylesPar->ldepth ) {
if ( item->displayMode() == TQStyleSheetItem::DisplayListItem )
m /= stylesPar->ldepth * stylesPar->ldepth;
else
m = 0;
}
}
for ( i = (int)curStyle->size() - 2 ; i >= 0; --i ) {
item = (*curStyle)[ i ];
@ -2243,7 +2245,7 @@ void TQTextDocument::setText( const TQString &text, const TQString &context )
{
focusIndicator.parag = 0;
selections.clear();
if ( txtFormat == TQt::AutoText && TQStyleSheet::mightBeRichText( text ) ||
if ( ( txtFormat == TQt::AutoText && TQStyleSheet::mightBeRichText( text ) ) ||
txtFormat == TQt::RichText )
setRichText( text, context );
else
@ -2459,7 +2461,7 @@ TQString TQTextDocument::richText() const
TQString TQTextDocument::text() const
{
if ( txtFormat == TQt::AutoText && preferRichText || txtFormat == TQt::RichText )
if ( ( txtFormat == TQt::AutoText && preferRichText ) || txtFormat == TQt::RichText )
return richText();
return plainText();
}
@ -2470,7 +2472,7 @@ TQString TQTextDocument::text( int parag ) const
if ( !p )
return TQString::null;
if ( txtFormat == TQt::AutoText && preferRichText || txtFormat == TQt::RichText )
if ( ( txtFormat == TQt::AutoText && preferRichText ) || txtFormat == TQt::RichText )
return p->richText();
else
return p->string()->toString();
@ -2609,12 +2611,12 @@ bool TQTextDocument::setSelectionEnd( int id, const TQTextCursor &cursor )
hadOldEnd = TRUE;
if ( !sel.swapped &&
( hadEnd && !hadStart ||
hadEnd && hadStart && start.paragraph() == end.paragraph() && start.index() > end.index() ) )
( ( hadEnd && !hadStart ) ||
( hadEnd && hadStart && start.paragraph() == end.paragraph() && start.index() > end.index() ) ) )
sel.swapped = TRUE;
if ( c == end && hadStartParag ||
c == start && hadEndParag ) {
if ( ( c == end && hadStartParag ) ||
( c == start && hadEndParag ) ) {
TQTextCursor tmp = c;
tmp.restoreState();
if ( tmp.paragraph() != c.paragraph() ) {
@ -2625,7 +2627,7 @@ bool TQTextDocument::setSelectionEnd( int id, const TQTextCursor &cursor )
}
if ( inSelection &&
( c == end && hadStart || c == start && hadEnd ) )
( ( c == end && hadStart ) || ( c == start && hadEnd ) ) )
leftSelection = TRUE;
else if ( !leftSelection && !inSelection && ( hadStart || hadEnd ) )
inSelection = TRUE;
@ -3253,7 +3255,7 @@ void TQTextDocument::drawParagraph( TQPainter *p, TQTextParagraph *parag, int cx
TQTextParagraph *TQTextDocument::draw( TQPainter *p, int cx, int cy, int cw, int ch, const TQColorGroup &cg,
bool onlyChanged, bool drawCursor, TQTextCursor *cursor, bool resetChanged )
{
if ( withoutDoubleBuffer || par && par->withoutDoubleBuffer ) {
if ( withoutDoubleBuffer || ( par && par->withoutDoubleBuffer ) ) {
withoutDoubleBuffer = TRUE;
TQRect r;
draw( p, r, cg );
@ -4754,7 +4756,7 @@ void TQTextParagraph::drawString( TQPainter &painter, const TQString &str, int s
bool plainText = hasdoc ? document()->textFormat() == TQt::PlainText : FALSE;
TQTextFormat* format = formatChar->format();
if ( !plainText || hasdoc && format->color() != document()->formatCollection()->defaultFormat()->color() )
if ( !plainText || ( hasdoc && format->color() != document()->formatCollection()->defaultFormat()->color() ) )
painter.setPen( TQPen( format->color() ) );
else
painter.setPen( cg.text() );
@ -4848,9 +4850,9 @@ void TQTextParagraph::drawString( TQPainter &painter, const TQString &str, int s
}
if (selStart < real_selEnd ||
selWrap && fullSelectionWidth && extendRight &&
(selWrap && fullSelectionWidth && extendRight &&
// don't draw the standard selection on a printer=
(it.key() != TQTextDocument::Standard || !is_printer( &painter))) {
(it.key() != TQTextDocument::Standard || !is_printer( &painter)))) {
int selection = it.key();
TQColor color;
setColorForSelection( color, painter, cg, selection );
@ -4904,10 +4906,10 @@ void TQTextParagraph::drawString( TQPainter &painter, const TQString &str, int s
if ( hasdoc && formatChar->isAnchor() && !formatChar->anchorHref().isEmpty() &&
document()->focusIndicator.parag == this &&
( document()->focusIndicator.start >= start &&
document()->focusIndicator.start + document()->focusIndicator.len <= start + len ||
document()->focusIndicator.start <= start &&
document()->focusIndicator.start + document()->focusIndicator.len >= start + len ) )
( ( document()->focusIndicator.start >= start &&
document()->focusIndicator.start + document()->focusIndicator.len <= start + len ) ||
( document()->focusIndicator.start <= start &&
document()->focusIndicator.start + document()->focusIndicator.len >= start + len ) ) )
painter.drawWinFocusRect( TQRect( xstart, y, w, h ) );
}
@ -5652,8 +5654,8 @@ int TQTextFormatterBreakInWords::format( TQTextDocument *doc,TQTextParagraph *pa
#endif
if ( wrapEnabled &&
( wrapAtColumn() == -1 && x + ww > w ||
wrapAtColumn() != -1 && col >= wrapAtColumn() ) ) {
( ( wrapAtColumn() == -1 && x + ww > w ) ||
( wrapAtColumn() != -1 && col >= wrapAtColumn() ) ) ) {
x = doc ? parag->document()->flow()->adjustLMargin( y + parag->rect().y(), parag->rect().height(), left, 4 ) : left;
w = dw;
y += h;
@ -5798,7 +5800,7 @@ int TQTextFormatterBreakWords::format( TQTextDocument *doc, TQTextParagraph *par
x -= rb;
}
if ( i > 0 && (x > curLeft || ww == 0) || lastWasNonInlineCustom ) {
if ( ( i > 0 && (x > curLeft || ww == 0) ) || lastWasNonInlineCustom ) {
c->lineStart = 0;
} else {
c->lineStart = 1;
@ -7733,7 +7735,7 @@ void TQTextTable::draw(TQPainter* p, int x, int y, int cx, int cy, int cw, int c
}
for (TQTextTableCell* cell = cells.first(); cell; cell = cells.next() ) {
if ( cx < 0 && cy < 0 ||
if ( ( cx < 0 && cy < 0 ) ||
TQRect( cx, cy, cw, ch ).intersects( TQRect( x + outerborder + cell->geometry().x(),
y + outerborder + cell->geometry().y(),
cell->geometry().width(), cell->geometry().height() ) ) ) {

@ -1167,7 +1167,7 @@ void TQDnsManager::transmitQuery( int i )
return;
}
if ( q && !q->dns || q->dns->isEmpty() )
if ( ( q && !q->dns ) || q->dns->isEmpty() )
// noone currently wants the answer, so there's no point in
// retransmitting the query. we keep it, though. an answer may
// arrive for an earlier query transmission, and if it does we

@ -1019,7 +1019,7 @@ void TQCommonStyle::drawControl( ControlElement element,
if (! toolbutton->isEnabled())
mode = TQIconSet::Disabled;
else if (flags & (Style_Down | Style_On) ||
(flags & Style_Raised) && (flags & Style_AutoRaise))
((flags & Style_Raised) && (flags & Style_AutoRaise)))
mode = TQIconSet::Active;
else
mode = TQIconSet::Normal;

@ -2824,9 +2824,9 @@ void TQTable::drawContents( TQPainter *p, int cx, int cy, int cw, int ch )
TQTableItem *itm = item( r, c );
if ( itm &&
( itm->colSpan() > 1 || itm->rowSpan() > 1 ) ) {
bool goon = r == itm->row() && c == itm->col() ||
r == rowfirst && c == itm->col() ||
r == itm->row() && c == colfirst;
bool goon = (r == itm->row() && c == itm->col()) ||
(r == rowfirst && c == itm->col()) ||
(r == itm->row() && c == colfirst);
if ( !goon )
continue;
rowp = rowPos( itm->row() );
@ -3680,7 +3680,7 @@ void TQTable::contentsMousePressEventEx( TQMouseEvent* e )
} else if ( ( e->state() & ControlButton ) == ControlButton ) {
setCurrentCell( tmpRow, tmpCol, FALSE, TRUE );
if ( selMode != NoSelection ) {
if ( selMode == Single || selMode == SingleRow && !isSelected( tmpRow, tmpCol, FALSE ) )
if ( selMode == Single || ( selMode == SingleRow && !isSelected( tmpRow, tmpCol, FALSE ) ) )
clearSelection();
if ( !(selMode == SingleRow && isSelected( tmpRow, tmpCol, FALSE )) ) {
currentSel = new TQTableSelection();
@ -4033,7 +4033,7 @@ bool TQTable::eventFilter( TQObject *o, TQEvent *e )
}
if ( ( edMode == Replacing ||
itm && itm->editType() == TQTableItem::WhenCurrent ) &&
( itm && itm->editType() == TQTableItem::WhenCurrent ) ) &&
( ke->key() == Key_Up || ke->key() == Key_Prior ||
ke->key() == Key_Home || ke->key() == Key_Down ||
ke->key() == Key_Next || ke->key() == Key_End ||
@ -4218,7 +4218,7 @@ void TQTable::keyPressEvent( TQKeyEvent* e )
TQWidget *w = beginEdit( tmpRow, tmpCol,
itm ? itm->isReplaceable() : TRUE );
if ( w ) {
setEditMode( ( !itm || itm && itm->isReplaceable()
setEditMode( ( !itm || ( itm && itm->isReplaceable() )
? Replacing : Editing ), tmpRow, tmpCol );
TQApplication::sendEvent( w, e );
return;
@ -4725,7 +4725,7 @@ TQRect TQTable::cellGeometry( int row, int col ) const
{
TQTableItem *itm = item( row, col );
if ( !itm || itm->rowSpan() == 1 && itm->colSpan() == 1 )
if ( !itm || ( itm->rowSpan() == 1 && itm->colSpan() == 1 ) )
return TQRect( columnPos( col ), rowPos( row ),
columnWidth( col ), rowHeight( row ) );
@ -6706,8 +6706,8 @@ void TQTableHeader::paintEvent( TQPaintEvent *e )
}
paintSection( &p, i, r );
p.restore();
if ( orientation() == Horizontal && r. right() >= e->rect().right() ||
orientation() == Vertical && r. bottom() >= e->rect().bottom() )
if ( ( orientation() == Horizontal && r. right() >= e->rect().right() ) ||
( orientation() == Vertical && r. bottom() >= e->rect().bottom() ) )
return;
}
if ( !reg.isEmpty() )
@ -6728,7 +6728,7 @@ void TQTableHeader::paintSection( TQPainter *p, int index, const TQRect& fr )
return;
if ( sectionState( index ) != Selected ||
orientation() == Horizontal && isRowSelection( table->selectionMode() ) ) {
( orientation() == Horizontal && isRowSelection( table->selectionMode() ) ) ) {
TQHeader::paintSection( p, index, fr );
} else {
TQStyle::SFlags flags = TQStyle::Style_Off | ( orient == Horizontal ? TQStyle::Style_Horizontal : 0 );
@ -6817,8 +6817,8 @@ bool TQTableHeader::doSelection( TQMouseEvent *e )
if ( startPos == -1 ) {
int secAt = sectionAt( p );
if ( ( e->state() & ControlButton ) != ControlButton &&
( e->state() & ShiftButton ) != ShiftButton ||
if ( ( ( e->state() & ControlButton ) != ControlButton &&
( e->state() & ShiftButton ) != ShiftButton ) ||
table->selectionMode() == TQTable::Single ||
table->selectionMode() == TQTable::SingleRow ) {
startPos = p;
@ -6853,8 +6853,8 @@ bool TQTableHeader::doSelection( TQMouseEvent *e )
table->setCurrentCell( 0, secAt );
}
if ( orientation() == Horizontal && table->isColumnSelected(secAt) ||
orientation() == Vertical && table->isRowSelected(secAt)) {
if ( ( orientation() == Horizontal && table->isColumnSelected(secAt) ) ||
( orientation() == Vertical && table->isRowSelected(secAt) ) ) {
setSectionState( secAt, Selected );
}

@ -1178,7 +1178,7 @@ bool TQDate::isValid( int y, int m, int d )
bool TQDate::leapYear( int y )
{
return y % 4 == 0 && y % 100 != 0 || y % 400 == 0;
return (y % 4 == 0 && y % 100 != 0) || y % 400 == 0;
}
/*!

@ -1051,7 +1051,7 @@ bool TQSettings::sync()
if ( success ) {
TQDir dir( TQFileInfo( file ).dir( TRUE ) );
if ( dir.exists( filename ) && !dir.remove( filename ) ||
if ( ( dir.exists( filename ) && !dir.remove( filename ) ) ||
!dir.rename( file.name(), filename, TRUE ) ) {
#ifdef QT_CHECK_STATE

@ -287,11 +287,12 @@ void TQActionPrivate::update( uint upd )
if ( upd & Visibility )
mi->popup->setItemVisible( mi->id, visible );
if ( upd & Icons )
if ( upd & Icons ) {
if ( iconset )
mi->popup->changeItem( mi->id, *iconset, t );
else
mi->popup->changeItem( mi->id, TQIconSet(), t );
}
if ( upd & EverythingElse ) {
mi->popup->changeItem( mi->id, t );
if ( !whatsthis.isEmpty() )

@ -998,8 +998,8 @@ bool TQButton::isExclusiveToggle() const
{
#ifndef QT_NO_BUTTONGROUP
return group() && ( group()->isExclusive() ||
group()->isRadioButtonExclusive() &&
::tqt_cast<TQRadioButton*>(this) );
( group()->isRadioButtonExclusive() &&
::tqt_cast<TQRadioButton*>(this) ) );
#else
return FALSE;
#endif

@ -434,7 +434,7 @@ void TQButtonGroup::buttonClicked()
void TQButtonGroup::buttonToggled( bool on )
{
// introduce a TQButtonListIt if calling anything
if ( !on || !excl_grp && !radio_excl )
if ( !on || ( !excl_grp && !radio_excl ) )
return;
TQButton *bt = ::tqt_cast<TQButton*>(sender()); // object that sent the signal
#if defined(QT_CHECK_NULL)

@ -624,7 +624,7 @@ bool TQDateTimeEditor::eventFilter( TQObject *o, TQEvent *e )
TQWidget *w = this;
bool hadDateEdit = FALSE;
while ( w ) {
if ( ::tqt_cast<TQDateTimeSpinWidget*>(w) && qstrcmp( w->name(), "qt_spin_widget" ) != 0 ||
if ( ( ::tqt_cast<TQDateTimeSpinWidget*>(w) && qstrcmp( w->name(), "qt_spin_widget" ) != 0 ) ||
::tqt_cast<TQDateTimeEdit*>(w) )
break;
hadDateEdit = hadDateEdit || ::tqt_cast<TQDateEdit*>(w);

@ -691,7 +691,7 @@ void TQDockArea::moveDockWindow( TQDockWindow *w, const TQPoint &p, const TQRect
TQRect lr = *lines.at( lineOf( dockWindowIndex ) );
if ( dockWindowIndex != -1 ) {
if ( lineStarts.find( w ) != -1 &&
( dockWindowIndex < (int)dockWindows->count() - 1 && lineStarts.find( dockWindows->at( dockWindowIndex + 1 ) ) != -1 ||
( ( dockWindowIndex < (int)dockWindows->count() - 1 && lineStarts.find( dockWindows->at( dockWindowIndex + 1 ) ) != -1 ) ||
dockWindowIndex == (int)dockWindows->count() - 1 ) )
wasAloneInLine = TRUE;
dockWindow = dockWindows->take( dockWindowIndex );

@ -1620,8 +1620,8 @@ void TQDockWindow::setCloseMode( int m )
bool TQDockWindow::isCloseEnabled() const
{
return ( ( cMode & Docked ) == Docked && place() == InDock ||
( cMode & Undocked ) == Undocked && place() == OutsideDock );
return ( ( ( cMode & Docked ) == Docked && place() == InDock ) ||
( ( cMode & Undocked ) == Undocked && place() == OutsideDock ) );
}
int TQDockWindow::closeMode() const

@ -602,10 +602,10 @@ void TQHeader::keyPressEvent( TQKeyEvent *e )
repaint( sRect( handleIdx ) );
emit pressed( d->i2s[i] );
}
} else if ( orientation() == Horizontal &&
(e->key() == Key_Right || e->key() == Key_Left)
|| orientation() == Vertical &&
(e->key() == Key_Up || e->key() == Key_Down) ) {
} else if ( ( orientation() == Horizontal &&
(e->key() == Key_Right || e->key() == Key_Left) )
|| ( orientation() == Vertical &&
(e->key() == Key_Up || e->key() == Key_Down) ) ) {
int dir = e->key() == Key_Right || e->key() == Key_Down ? 1 : -1;
int s = d->i2s[i];
if ( e->state() & ControlButton && d->resize[s] ) {
@ -1638,8 +1638,8 @@ void TQHeader::paintEvent( TQPaintEvent *e )
style().drawPrimitive( TQStyle::PE_FocusRect, &p, fr,
colorGroup() );
}
if ( orient == Horizontal && r. right() >= e->rect().right() ||
orient == Vertical && r. bottom() >= e->rect().bottom() )
if ( ( orient == Horizontal && r. right() >= e->rect().right() ) ||
( orient == Vertical && r. bottom() >= e->rect().bottom() ) )
return;
}
}

@ -2191,7 +2191,7 @@ void TQListBox::mouseReleaseEvent( TQMouseEvent *e )
}
TQListBoxItem * i = itemAt( e->pos() );
bool emitClicked = d->mousePressColumn != -1 && d->mousePressRow != -1 || !d->pressedItem;
bool emitClicked = ( d->mousePressColumn != -1 && d->mousePressRow != -1 ) || !d->pressedItem;
emitClicked = emitClicked && d->pressedItem == i;
d->pressedItem = 0;
d->mousePressRow = -1;
@ -2261,7 +2261,7 @@ void TQListBox::mouseMoveEvent( TQMouseEvent *e )
// move outside the listbox without having seen a press, discard
// it.
if ( !TQRect( 0, 0, visibleWidth(), visibleHeight() ).contains( e->pos() ) &&
( d->mousePressColumn < 0 && d->mousePressRow < 0 ||
( (d->mousePressColumn < 0 && d->mousePressRow < 0) ||
(e->state() == NoButton && !d->pressedItem) ) )
return;
@ -4647,7 +4647,7 @@ void TQListBox::selectRange( TQListBoxItem *from, TQListBoxItem *to, bool invert
}
} else {
bool sel = !i->s;
if ( (bool)i->s != sel && sel && i->isSelectable() || !sel ) {
if ( ( (bool)i->s != sel && sel && i->isSelectable() ) || !sel ) {
i->s = sel;
changed = TRUE;
updateItem( i );

@ -1739,7 +1739,7 @@ void TQListViewItem::setExpandable( bool enable )
void TQListViewItem::enforceSortOrder() const
{
TQListView *lv = listView();
if ( !lv || lv && (lv->d->clearing || lv->d->sortcolumn == Unsorted) )
if ( !lv || (lv && (lv->d->clearing || lv->d->sortcolumn == Unsorted)) )
return;
if ( parentItem &&
(parentItem->lsc != lsc || parentItem->lso != lso) )
@ -5178,7 +5178,7 @@ TQListViewItem * TQListView::itemAt( const TQPoint & viewPos ) const
while( c && c->i && ( c->y + c->i->height() <= g ||
!c->i->isVisible() ||
c->i->parent() && !c->i->parent()->isVisible() ) )
( c->i->parent() && !c->i->parent()->isVisible() ) ) )
c = d->drawables->next();
TQListViewItem *i = (c && c->y <= g) ? c->i : 0;
@ -6449,7 +6449,7 @@ void TQCheckListItem::activate()
{
TQListView * lv = listView();
if ( lv && !lv->isEnabled() || !isEnabled() )
if ( ( lv && !lv->isEnabled() ) || !isEnabled() )
return;
TQPoint pos;
@ -7200,7 +7200,7 @@ void TQListView::contentsDragEnterEvent( TQDragEnterEvent *e )
d->focusItem->dragEntered();
d->focusItem->repaint();
}
if ( i && i->dropEnabled() && i->acceptDrop( e ) || acceptDrops() )
if ( ( i && i->dropEnabled() && i->acceptDrop( e ) ) || acceptDrops() )
e->accept();
else
e->ignore();
@ -7227,7 +7227,7 @@ void TQListView::contentsDragMoveEvent( TQDragMoveEvent *e )
} else {
d->autoopenTimer->stop();
}
if ( i && i->dropEnabled() && i->acceptDrop( e ) || acceptDrops() )
if ( ( i && i->dropEnabled() && i->acceptDrop( e ) ) || acceptDrops() )
e->accept();
else
e->ignore();
@ -7988,7 +7988,7 @@ void TQListView::selectRange( TQListViewItem *from, TQListViewItem *to, bool inv
}
} else {
bool sel = !i->selected;
if ( (bool)i->selected != sel && sel && i->isSelectable() || !sel ) {
if ( ( (bool)i->selected != sel && sel && i->isSelectable() ) || !sel ) {
i->setSelected( sel );
changed = TRUE;
}

@ -1626,7 +1626,7 @@ bool TQMainWindow::eventFilter( TQObject* o, TQEvent *e )
setUpLayout();
d->tll->activate();
} else if ( e->type() == TQEvent::ContextMenu && d->dockMenu &&
( ::tqt_cast<TQDockArea*>(o) && dockMainWindow( o ) || o == d->hideDock || o == d->mb ) ) {
( ( ::tqt_cast<TQDockArea*>(o) && dockMainWindow( o ) ) || o == d->hideDock || o == d->mb ) ) {
if ( showDockMenu( ( (TQMouseEvent*)e )->globalPos() ) ) {
( (TQContextMenuEvent*)e )->accept();
return TRUE;

@ -1240,8 +1240,8 @@ void TQMenuBar::mouseReleaseEvent( TQMouseEvent *e )
return;
mouseBtDn = FALSE; // mouse button up
int item = itemAtPos( e->pos() );
if ( item >= 0 && !mitems->at(item)->isEnabledAndVisible() ||
actItem >= 0 && !mitems->at(actItem)->isEnabledAndVisible() ) {
if ( ( item >= 0 && !mitems->at(item)->isEnabledAndVisible() ) ||
( actItem >= 0 && !mitems->at(actItem)->isEnabledAndVisible() ) ) {
hidePopups();
setActiveItem( -1 );
return;

@ -652,19 +652,19 @@ void TQPopupMenu::popup( const TQPoint &pos, int indexAtPoint )
int hGuess = tqApp->reverseLayout() ? TQEffects::LeftScroll : TQEffects::RightScroll;
int vGuess = TQEffects::DownScroll;
if ( tqApp->reverseLayout() ) {
if ( snapToMouse && ( x + w/2 > mouse.x() ) ||
if ( ( snapToMouse && ( x + w/2 > mouse.x() ) ) ||
( parentMenu && parentMenu->isPopupMenu &&
( x + w/2 > ((TQPopupMenu*)parentMenu)->x() ) ) )
hGuess = TQEffects::RightScroll;
} else {
if ( snapToMouse && ( x + w/2 < mouse.x() ) ||
if ( ( snapToMouse && ( x + w/2 < mouse.x() ) ) ||
( parentMenu && parentMenu->isPopupMenu &&
( x + w/2 < ((TQPopupMenu*)parentMenu)->x() ) ) )
hGuess = TQEffects::LeftScroll;
}
#ifndef QT_NO_MENUBAR
if ( snapToMouse && ( y + h/2 < mouse.y() ) ||
if ( ( snapToMouse && ( y + h/2 < mouse.y() ) ) ||
( parentMenu && parentMenu->isMenuBar &&
( y + h/2 < ((TQMenuBar*)parentMenu)->mapToGlobal( ((TQMenuBar*)parentMenu)->pos() ).y() ) ) )
vGuess = TQEffects::UpScroll;

@ -643,7 +643,7 @@ void TQScrollBar::mousePressEvent( TQMouseEvent *e )
pressedControl == TQStyle::SC_ScrollBarSubPage ||
pressedControl == TQStyle::SC_ScrollBarSlider ) &&
((midButtonAbsPos && e->button() == MidButton) ||
style().styleHint(TQStyle::SH_ScrollBar_LeftClickAbsolutePosition) && e->button() == LeftButton)) {
(style().styleHint(TQStyle::SH_ScrollBar_LeftClickAbsolutePosition) && e->button() == LeftButton)) ) {
TQRect sr = style().querySubControlMetrics(TQStyle::CC_ScrollBar, this,
TQStyle::SC_ScrollBarSlider ),

@ -447,8 +447,8 @@ void TQSlider::mousePressEvent( TQMouseEvent *e )
moveSlider( pos - slideLength / 2 );
state = Dragging;
clickOffset = slideLength / 2;
} else if ( orient == Horizontal && e->pos().x() < r.left() //### goodPart
|| orient == Vertical && e->pos().y() < r.top() ) {
} else if ( ( orient == Horizontal && e->pos().x() < r.left() ) //### goodPart
|| ( orient == Vertical && e->pos().y() < r.top() ) ) {
if ( orient == Horizontal && TQApplication::reverseLayout() ) {
state = TimingUp;
addPage();
@ -460,8 +460,8 @@ void TQSlider::mousePressEvent( TQMouseEvent *e )
timer = new TQTimer( this );
connect( timer, SIGNAL(timeout()), SLOT(repeatTimeout()) );
timer->start( thresholdTime, TRUE );
} else if ( orient == Horizontal && e->pos().x() > r.right() //### goodPart
|| orient == Vertical && e->pos().y() > r.bottom() ) {
} else if ( ( orient == Horizontal && e->pos().x() > r.right() ) //### goodPart
|| ( orient == Vertical && e->pos().y() > r.bottom() ) ) {
if ( orient == Horizontal && TQApplication::reverseLayout() ) {
state = TimingDown;
subtractPage();

@ -323,7 +323,7 @@ void TQSpinWidget::paintEvent( TQPaintEvent * )
TQStyle::SFlags flags = TQStyle::Style_Default;
if (isEnabled())
flags |= TQStyle::Style_Enabled;
if (hasFocus() || focusProxy() && focusProxy()->hasFocus())
if (hasFocus() || (focusProxy() && focusProxy()->hasFocus()))
flags |= TQStyle::Style_HasFocus;
TQStyle::SCFlags active;

@ -1395,11 +1395,11 @@ void TQTextEdit::keyPressEvent( TQKeyEvent *e )
break;
default: {
if ( e->text().length() &&
( !( e->state() & ControlButton ) &&
( ( !( e->state() & ControlButton ) &&
#ifndef Q_OS_MACX
!( e->state() & AltButton ) &&
#endif
!( e->state() & MetaButton ) ||
!( e->state() & MetaButton ) ) ||
( ( (e->state()&ControlButton) | AltButton ) == (ControlButton|AltButton) ) ) &&
( !e->ascii() || e->ascii() >= 32 || e->text() == "\t" ) ) {
clearUndoRedoInfo = FALSE;
@ -2812,7 +2812,7 @@ void TQTextEdit::handleMouseMove( const TQPoint& pos )
if ( !mousePressed )
return;
if ( !scrollTimer->isActive() && pos.y() < contentsY() || pos.y() > contentsY() + visibleHeight() )
if ( (!scrollTimer->isActive() && pos.y() < contentsY()) || pos.y() > contentsY() + visibleHeight() )
scrollTimer->start( 100, FALSE );
else if ( scrollTimer->isActive() && pos.y() >= contentsY() && pos.y() <= contentsY() + visibleHeight() )
scrollTimer->stop();
@ -7181,7 +7181,7 @@ void TQTextEdit::optimDoAutoScroll()
repaintContents( contentsX(), y, width(), h, FALSE );
}
if ( !scrollTimer->isActive() && pos.y() < 0 || pos.y() > height() )
if ( (!scrollTimer->isActive() && pos.y() < 0) || pos.y() > height() )
scrollTimer->start( 100, FALSE );
else if ( scrollTimer->isActive() && pos.y() >= 0 && pos.y() <= height() )
scrollTimer->stop();

@ -262,11 +262,12 @@ void TQTipManager::remove( TQWidget *w, const TQRect & r, bool delayhide )
if ( t == 0 )
return;
if ( t == currentTip )
if ( t == currentTip ) {
if (!delayhide)
hideTip();
else
currentTip->autoDelete = TRUE;
}
if ( t == previousTip )
previousTip = 0;

@ -1087,7 +1087,7 @@ void TQWorkspace::minimizeWindow( TQWidget* w)
{
TQWorkspaceChild* c = findChild( w );
if ( !w || w && (!w->testWFlags( WStyle_Minimize ) || w->testWFlags( WStyle_Tool) ) )
if ( !w || ( ( w && (!w->testWFlags( WStyle_Minimize ) ) ) || w->testWFlags( WStyle_Tool) ) )
return;
if ( c ) {
@ -1184,7 +1184,7 @@ void TQWorkspace::maximizeWindow( TQWidget* w)
{
TQWorkspaceChild* c = findChild( w );
if ( !w || w && (!w->testWFlags( WStyle_Maximize ) || w->testWFlags( WStyle_Tool) ) )
if ( !w || ( ( w && (!w->testWFlags( WStyle_Maximize ) ) ) || w->testWFlags( WStyle_Tool) ) )
return;
if ( c ) {

@ -3655,8 +3655,8 @@ static bool isXmlChar(const TQChar &c)
return uc == 0x9
|| uc == 0xA
|| uc == 0xD
|| 0x20 <= uc && uc <= 0xD7FF
|| 0xE000 <= uc && uc <= 0xFFFD;
|| ( 0x20 <= uc && uc <= 0xD7FF )
|| ( 0xE000 <= uc && uc <= 0xFFFD );
}
/*

@ -1433,8 +1433,8 @@ void TQSvgDevice::drawPath( const TQString &data )
// if possible, reflect last control point if smooth shorthand
if ( mode == 6 || mode == 8 ) { // smooth 'S' and 'T'
bool cont = mode == lastMode ||
mode == 6 && lastMode == 5 || // 'S' and 'C'
mode == 8 && lastMode == 7; // 'T' and 'Q'
( mode == 6 && lastMode == 5 ) || // 'S' and 'C'
( mode == 8 && lastMode == 7 ); // 'T' and 'Q'
x = cont ? 2*x-controlX : x;
y = cont ? 2*y-controlY : y;
quad.setPoint( 1, int(x), int(y) );

@ -511,8 +511,8 @@ bool SetPropertyCommand::canMerge( Command *c )
return FALSE;
}
TQVariant::Type t = TQVariant::nameToType( p->type() );
return ( cmd->propName == propName &&
t == TQVariant::String || t == TQVariant::CString || t == TQVariant::Int || t == TQVariant::UInt );
return ( ( cmd->propName == propName &&
t == TQVariant::String ) || t == TQVariant::CString || t == TQVariant::Int || t == TQVariant::UInt );
}
void SetPropertyCommand::merge( Command *c )

@ -1632,7 +1632,7 @@ TQWidget *FormWindow::designerWidget( TQObject *o ) const
if ( !o || !o->isWidgetType() )
return 0;
TQWidget *w = (TQWidget*)o;
while ( w && !isMainContainer( w ) && !insertedWidgets[ (void*)w ] || isCentralWidget( w ) )
while ( ( w && !isMainContainer( w ) && !insertedWidgets[ (void*)w ] ) || isCentralWidget( w ) )
w = (TQWidget*)w->parent();
return w;
}

@ -964,11 +964,12 @@ int Spacer::alignment() const
TQSize Spacer::minimumSize() const
{
TQSize s = TQSize( 20,20 );
if ( sizeType() == Expanding )
if ( sizeType() == Expanding ) {
if ( orient == Vertical )
s.rheight() = 0;
else
s.rwidth() = 0;
}
return s;
}

@ -989,12 +989,12 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
( ::tqt_cast<MenuBarEditor*>(o) ||
::tqt_cast<PopupMenuEditor*>(o) ||
::tqt_cast<TQDesignerToolBar*>(o) ||
( ::tqt_cast<TQComboBox*>(o) ||
( ( ::tqt_cast<TQComboBox*>(o) ||
::tqt_cast<TQToolButton*>(o) ||
::tqt_cast<TQDesignerToolBarSeparator*>(o) ) &&
o->parent()
&& ( ::tqt_cast<TQDesignerToolBar*>(o->parent())
|| ::tqt_cast<TQDesignerWidgetStack*>(o->parent())) ) ) {
|| ::tqt_cast<TQDesignerWidgetStack*>(o->parent())) ) ) ) {
TQWidget *w = (TQWidget*)o;
if ( ::tqt_cast<TQToolButton*>(w) ||
::tqt_cast<TQComboBox*>(w) ||
@ -1570,10 +1570,10 @@ void MainWindow::setupRMBProperties( TQValueList<uint> &ids, TQMap<TQString, int
if ( pixmap && qstrcmp( pixmap->type(), "TQPixmap") != 0 )
pixmap = 0;
if ( text && text->designable(w) ||
title && title->designable(w) ||
pagetitle && pagetitle->designable(w) ||
pixmap && pixmap->designable(w) ) {
if ( ( text && text->designable(w) ) ||
( title && title->designable(w) ) ||
( pagetitle && pagetitle->designable(w) ) ||
( pixmap && pixmap->designable(w) ) ) {
int id = 0;
if ( ids.isEmpty() )
ids << rmbWidgets->insertSeparator(0);
@ -3337,7 +3337,7 @@ void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm )
if ( fw->project() != currentProject )
continue;
if ( qstrcmp( fw->name(), o->name() ) == 0 ||
fw->isFake() && currentProject->objectForFakeForm( fw ) == o ) {
( fw->isFake() && currentProject->objectForFakeForm( fw ) == o ) ) {
if ( se ) {
switch ( lm ) {
case Error:

@ -1248,7 +1248,7 @@ void MainWindow::fileOpen( const TQString &filter, const TQString &extension, co
setCurrentProject( eProject );
openFormWindow( filename );
addRecentlyOpened( filename, recentlyFiles );
} else if ( !extension.isEmpty() && extension.find( ";" + fi.extension( FALSE ) ) != -1 ||
} else if ( ( !extension.isEmpty() && extension.find( ";" + fi.extension( FALSE ) ) != -1 ) ||
additionalSources.find( fi.extension( FALSE ) ) != additionalSources.end() ) {
SourceFile *sf = project->findSourceFile( project->makeRelative( filename ) );
if ( !sf )
@ -1687,14 +1687,14 @@ void MainWindow::editBreakLayout()
if ( formWindow()->currentWidget() )
w = formWindow()->currentWidget();
if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout ||
w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) {
( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) ) {
formWindow()->breakLayout( w );
return;
} else {
TQWidgetList widgets = formWindow()->selectedWidgets();
for ( w = widgets.first(); w; w = widgets.next() ) {
if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout ||
w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout )
( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) )
break;
}
if ( w ) {
@ -1705,7 +1705,7 @@ void MainWindow::editBreakLayout()
w = formWindow()->mainContainer();
if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout ||
w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout )
( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) )
formWindow()->breakLayout( w );
}

@ -355,7 +355,7 @@ void MetaDataBase::setMargin( TQObject *o, int margin )
TQWidget *widget = (TQWidget*)o;
if ( widget && !::tqt_cast<TQLayoutWidget*>(widget) &&
( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ) ) ||
widget && widget->parentWidget() && ::tqt_cast<FormWindow*>(widget->parentWidget()) ) )
( widget && widget->parentWidget() && ::tqt_cast<FormWindow*>(widget->parentWidget()) ) ) )
isInnerLayout = FALSE;

@ -628,7 +628,7 @@ static void remove_multiline_contents( TQString &contents, const TQString &s, in
if ( contents[ i ] == '\n' && !lastWasBackspash )
break;
lastWasBackspash = ( contents[ i ] == '\\' ||
lastWasBackspash && ( contents[ i ] == ' ' || contents[ i ] == '\t' ) );
( lastWasBackspash && ( contents[ i ] == ' ' || contents[ i ] == '\t' ) ) );
}
contents.remove( start, i - start + 1 );
}

@ -553,9 +553,9 @@ TQString PropertyItem::currentItemFromObject() const
void PropertyItem::setFocus( TQWidget *w )
{
if ( !tqApp->focusWidget() ||
listview->propertyEditor()->formWindow() &&
( listview->propertyEditor()->formWindow() &&
( !MainWindow::self->isAFormWindowChild( tqApp->focusWidget() ) &&
!tqApp->focusWidget()->inherits( "Editor" ) ) )
!tqApp->focusWidget()->inherits( "Editor" ) ) ) )
w->setFocus();
}
@ -3151,7 +3151,7 @@ void PropertyList::setupProperties()
bool isPropertyObject = w->isA( "PropertyObject" );
if ( ( p->designable(w) ||
isPropertyObject && p->designable( ( (PropertyObject*)w )->widgetList().first() ) ) &&
( isPropertyObject && p->designable( ( (PropertyObject*)w )->widgetList().first() ) ) ) &&
( !isPropertyObject || qstrcmp( p->name(), "name" ) != 0 ) ) {
if ( p->isSetType() ) {
if ( TQString( p->name() ) == "alignment" ) {
@ -3733,9 +3733,9 @@ void PropertyList::setPropertyValue( PropertyItem *i )
void PropertyList::setCurrentProperty( const TQString &n )
{
if ( currentItem() && currentItem()->text( 0 ) == n ||
currentItem() && ( (PropertyItem*)currentItem() )->propertyParent() &&
( (PropertyItem*)currentItem() )->propertyParent()->text( 0 ) == n )
if ( ( currentItem() && currentItem()->text( 0 ) == n ) ||
( currentItem() && ( (PropertyItem*)currentItem() )->propertyParent() &&
( (PropertyItem*)currentItem() )->propertyParent()->text( 0 ) == n ) )
return;
TQListViewItemIterator it( this );

@ -115,8 +115,8 @@ void TQCompletionEdit::updateListBox()
if ( compList.isEmpty() )
return;
for ( TQStringList::Iterator it = compList.begin(); it != compList.end(); ++it ) {
if ( caseSensitive && (*it).left( text().length() ) == text() ||
!caseSensitive && (*it).left( text().length() ).lower() == text().lower() )
if ( ( caseSensitive && (*it).left( text().length() ) == text() ) ||
( !caseSensitive && (*it).left( text().length() ).lower() == text().lower() ) )
listbox->insertItem( *it );
}
}

@ -1220,8 +1220,8 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
bool isDataTable = false;
# endif
for ( i = 0; i < table->horizontalHeader()->count(); ++i ) {
if ( !table->horizontalHeader()->label( i ).isNull() &&
table->horizontalHeader()->label( i ).toInt() != i + 1 ||
if ( ( !table->horizontalHeader()->label( i ).isNull() &&
table->horizontalHeader()->label( i ).toInt() != i + 1 ) ||
table->horizontalHeader()->iconSet( i ) ||
isDataTable ) {
ts << makeIndent( indent ) << "<column>" << endl;
@ -1245,8 +1245,8 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
}
}
for ( i = 0; i < table->verticalHeader()->count(); ++i ) {
if ( !table->verticalHeader()->label( i ).isNull() &&
table->verticalHeader()->label( i ).toInt() != i + 1 ||
if ( ( !table->verticalHeader()->label( i ).isNull() &&
table->verticalHeader()->label( i ).toInt() != i + 1 ) ||
table->verticalHeader()->iconSet( i ) ) {
ts << makeIndent( indent ) << "<row>" << endl;
indent++;
@ -1547,7 +1547,7 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant
uint unum;
double dob;
TQString comment;
if ( w && formwindow->widgets()->find( (TQWidget*)w ) || formwindow->actionList().find( (TQAction*)w ) )
if ( ( w && formwindow->widgets()->find( (TQWidget*)w ) ) || formwindow->actionList().find( (TQAction*)w ) )
comment = MetaDataBase::propertyComment( w, name );
switch ( t ) {
case TQVariant::String:

@ -568,7 +568,7 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou
if ( ::tqt_cast<TQLayoutWidget*>(widget) &&
( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ) ) ||
widget && ::tqt_cast<FormWindow*>(widget->parentWidget()) ) )
( widget && ::tqt_cast<FormWindow*>(widget->parentWidget()) ) ) )
margin = MainWindow::self->currentLayoutDefaultMargin();
if ( !layout && ::tqt_cast<TQTabWidget*>(widget) )
@ -883,7 +883,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
MetaDataBase::setPropertyChanged( s, "sizeType", TRUE );
if ( !r )
return s;
if ( !r->isValid() || r->width() < 2 && r->height() < 2 )
if ( !r->isValid() || ( r->width() < 2 && r->height() < 2 ) )
s->setOrientation( orient );
else if ( r->width() < r->height() )
s->setOrientation( TQt::Vertical );
@ -904,7 +904,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
TQSlider *s = new TQSlider( parent, name );
if ( !r )
return s;
if ( !r->isValid() || r->width() < 2 && r->height() < 2 )
if ( !r->isValid() || ( r->width() < 2 && r->height() < 2 ) )
s->setOrientation( orient );
else if ( r->width() > r->height() )
s->setOrientation( TQt::Horizontal );
@ -915,7 +915,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
TQScrollBar *s = new TQScrollBar( parent, name );
if ( !r )
return s;
if ( !r->isValid() || r->width() < 2 && r->height() < 2 )
if ( !r->isValid() || ( r->width() < 2 && r->height() < 2 ) )
s->setOrientation( orient );
else if ( r->width() > r->height() )
s->setOrientation( TQt::Horizontal );
@ -936,7 +936,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
MetaDataBase::setPropertyChanged( l, "frameShape", TRUE );
if ( !r )
return l;
if ( !r->isValid() || r->width() < 2 && r->height() < 2 )
if ( !r->isValid() || ( r->width() < 2 && r->height() < 2 ) )
l->setOrientation( orient );
else if ( r->width() < r->height() )
l->setOrientation( TQt::Vertical );
@ -1143,7 +1143,7 @@ TQWidget* WidgetFactory::widgetOfContainer( TQWidget *w )
while ( w ) {
int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) );
if ( WidgetDatabase::isContainer( id ) ||
w && ::tqt_cast<FormWindow*>(w->parentWidget()) )
( w && ::tqt_cast<FormWindow*>(w->parentWidget()) ) )
return w;
w = w->parentWidget();
}

@ -363,8 +363,8 @@ bool EditorCompletion::eventFilter( TQObject *o, TQEvent *e )
}
}
if ( ke->text().length() && !( ke->state() & AltButton ) &&
( !ke->ascii() || ke->ascii() >= 32 ) ||
if ( ( ke->text().length() && !( ke->state() & AltButton ) &&
( !ke->ascii() || ke->ascii() >= 32 ) ) ||
( ke->text() == "\t" && !( ke->state() & ControlButton ) ) ) {
if ( ke->key() == Key_Tab ) {
if ( curEditor->textCursor()->index() == 0 &&
@ -372,13 +372,13 @@ bool EditorCompletion::eventFilter( TQObject *o, TQEvent *e )
return FALSE;
if ( doCompletion() )
return TRUE;
} else if ( ke->key() == Key_Period &&
} else if ( ( ke->key() == Key_Period &&
( curEditor->textCursor()->index() == 0 ||
curEditor->textCursor()->paragraph()->at( curEditor->textCursor()->index() - 1 )->c != '.' )
curEditor->textCursor()->paragraph()->at( curEditor->textCursor()->index() - 1 )->c != '.' ) )
||
ke->key() == Key_Greater &&
( ke->key() == Key_Greater &&
curEditor->textCursor()->index() > 0 &&
curEditor->textCursor()->paragraph()->at( curEditor->textCursor()->index() - 1 )->c == '-' ) {
curEditor->textCursor()->paragraph()->at( curEditor->textCursor()->index() - 1 )->c == '-' ) ) {
doObjectCompletion();
} else {
if ( !doArgumentHint( ke->text() == "(" ) )
@ -423,7 +423,7 @@ bool EditorCompletion::eventFilter( TQObject *o, TQEvent *e )
return TRUE;
}
}
if ( o == functionLabel || ::tqt_cast<Editor*>(o) && functionLabel->isVisible() ) {
if ( o == functionLabel || ( ::tqt_cast<Editor*>(o) && functionLabel->isVisible() ) ) {
if ( e->type() == TQEvent::KeyPress ) {
TQKeyEvent *ke = (TQKeyEvent*)e;
if ( ke->key() == Key_Escape ) {

@ -120,9 +120,9 @@ bool ParenMatcher::checkOpenParen( TQTextCursor *cursor )
}
int id = Match;
if ( c == '{' && closedParen.chr != '}' ||
c == '(' && closedParen.chr != ')' ||
c == '[' && closedParen.chr != ']' )
if ( ( c == '{' && closedParen.chr != '}' ) ||
( c == '(' && closedParen.chr != ')' ) ||
( c == '[' && closedParen.chr != ']' ) )
id = Mismatch;
cursor->document()->setSelectionStart( id, *cursor );
int tidx = cursor->index();
@ -194,9 +194,9 @@ bool ParenMatcher::checkClosedParen( TQTextCursor *cursor )
}
int id = Match;
if ( c == '}' && openParen.chr != '{' ||
c == ')' && openParen.chr != '(' ||
c == ']' && openParen.chr != '[' )
if ( ( c == '}' && openParen.chr != '{' ) ||
( c == ')' && openParen.chr != '(' ) ||
( c == ']' && openParen.chr != '[' ) )
id = Mismatch;
cursor->document()->setSelectionStart( id, *cursor );
int tidx = cursor->index();

@ -246,9 +246,9 @@ void MainWindowWizardBase::accept()
}
}
for ( TQAction *ac = usedActions.first(); ac; ac = usedActions.next() ) {
if ( TQString( ac->name() ).find( "file" ) != -1 && checkCreateConnectionsFile->isChecked() ||
TQString( ac->name() ).find( "edit" ) != -1 && checkCreateConnectionsEdit->isChecked() ||
TQString( ac->name() ).find( "help" ) != -1 && checkCreateConnectionsHelp->isChecked() ) {
if ( ( TQString( ac->name() ).find( "file" ) != -1 && checkCreateConnectionsFile->isChecked() ) ||
( TQString( ac->name() ).find( "edit" ) != -1 && checkCreateConnectionsEdit->isChecked() ) ||
( TQString( ac->name() ).find( "help" ) != -1 && checkCreateConnectionsHelp->isChecked() ) ) {
TQString slot = ac->name();
slot.remove( slot.length() - 6, 6 );
slot += "()";

@ -120,7 +120,7 @@ void SqlFormWizard::connectionSelected( const TQString &c )
listBoxTable->clear();
TQPtrList<DesignerDatabase> databases = proIface->databaseConnections();
for ( DesignerDatabase *d = databases.first(); d; d = databases.next() ) {
if ( d->name() == c || ( d->name() == "(default)" || d->name().isEmpty() ) && c == "(default)")
if ( d->name() == c || ( ( d->name() == "(default)" || d->name().isEmpty() ) && c == "(default)") )
listBoxTable->insertStringList( d->tables() );
}
setNextEnabled( databasePage, ( listBoxTable->currentItem() >= 0 ) );
@ -356,7 +356,7 @@ void SqlFormWizard::accept()
TQPtrList<DesignerDatabase> databases = proIface->databaseConnections();
DesignerDatabase *database = 0;
for ( DesignerDatabase *d = databases.first(); d; d = databases.next() ) {
if ( d->name() == listBoxConnection->currentText() || ( d->name() == "(default)" || d->name().isEmpty() ) && listBoxConnection->currentText() == "(default)" ) {
if ( d->name() == listBoxConnection->currentText() || ( ( d->name() == "(default)" || d->name().isEmpty() ) && listBoxConnection->currentText() == "(default)" ) ) {
database = d;
d->open( FALSE );
break;

@ -113,7 +113,7 @@ TQString richText( const TQString& text )
} else if ( ch == '&' ) {
rich += TQString( "&amp;" );
} else if ( ch == ' ' ) {
if ( i == 0 || i == (text.length()-1) || text[i - 1] == ' ' || text[i + 1] == ' ' ) {
if ( i == 0 || i == ((int) text.length()-1) || text[i - 1] == ' ' || text[i + 1] == ' ' ) {
rich += richMeta( MessageEditor::tr("sp") );
} else {
rich += ' ';

@ -573,9 +573,9 @@ static void parse( MetaTranslator *tor, const char *initialContext,
(match(Tok_Comma) &&
matchString(&com) &&
(match(Tok_RightParen) ||
match(Tok_Comma) &&
matchEncoding(&utf8) &&
match(Tok_RightParen))) )
(match(Tok_Comma) &&
matchEncoding(&utf8) &&
match(Tok_RightParen)))) )
tor->insert( MetaTranslatorMessage(context, text, com,
TQString::null, utf8) );
}

@ -331,7 +331,7 @@ int main( int argc, char* argv[] )
int orgfile = 1;
int newfile = 2;
if ( argc <= newfile || argc > 1 && argv[1][0] == '-') {
if ( argc <= newfile || ( argc > 1 && argv[1][0] == '-' ) ) {
printf("usage: %s orgfile newfile [outfile]\n", argv[0]);
exit(1);
}

@ -392,7 +392,7 @@ void TQAnimationWriter::appendFrame(const TQImage& frm, const TQPoint& offset)
tqDebug("%d,%d %d,%d",minx,miny,offset.x(),offset.y());
d->composeImage(diff,TQPoint(minx,miny)+offset);
}
if ( prev.isNull() || prev.size() == frame.size() && offset == TQPoint(0,0) ) {
if ( prev.isNull() || ( prev.size() == frame.size() && offset == TQPoint(0,0) ) ) {
prev = frame;
} else {
bitBlt(&prev,offset.x(),offset.y(),&frame,0,0,frame.width(),frame.height());

Loading…
Cancel
Save