diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-07-28 15:51:58 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-07-28 15:51:58 -0500 |
commit | fe7969ef886d7287fa959929ddd33fbad8407884 (patch) | |
tree | 589aacc109d27561a5188bb46bce27c78bad8f5b /src | |
parent | dba8a853b65e5707e48450e5085e0ff0513b4203 (diff) | |
download | tqt3-fe7969ef886d7287fa959929ddd33fbad8407884.tar.gz tqt3-fe7969ef886d7287fa959929ddd33fbad8407884.zip |
Automated update from Qt3
Diffstat (limited to 'src')
38 files changed, 135 insertions, 128 deletions
diff --git a/src/codecs/qjpunicode.cpp b/src/codecs/qjpunicode.cpp index e3b08f8f..500dab38 100644 --- a/src/codecs/qjpunicode.cpp +++ b/src/codecs/qjpunicode.cpp @@ -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))); } } } diff --git a/src/codecs/qtextcodec.cpp b/src/codecs/qtextcodec.cpp index 331688da..6de93356 100644 --- a/src/codecs/qtextcodec.cpp +++ b/src/codecs/qtextcodec.cpp @@ -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" diff --git a/src/codecs/qutfcodec.cpp b/src/codecs/qutfcodec.cpp index 4943ac8c..9c9f4283 100644 --- a/src/codecs/qutfcodec.cpp +++ b/src/codecs/qutfcodec.cpp @@ -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; diff --git a/src/dialogs/qdialog.cpp b/src/dialogs/qdialog.cpp index 4f40ded2..095cbf2e 100644 --- a/src/dialogs/qdialog.cpp +++ b/src/dialogs/qdialog.cpp @@ -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(); } diff --git a/src/dialogs/qfiledialog.cpp b/src/dialogs/qfiledialog.cpp index e624545f..e268ba1b 100644 --- a/src/dialogs/qfiledialog.cpp +++ b/src/dialogs/qfiledialog.cpp @@ -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 ); diff --git a/src/dialogs/qprogressdialog.cpp b/src/dialogs/qprogressdialog.cpp index 87560add..eeaf54dc 100644 --- a/src/dialogs/qprogressdialog.cpp +++ b/src/dialogs/qprogressdialog.cpp @@ -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); diff --git a/src/kernel/qapplication_x11.cpp b/src/kernel/qapplication_x11.cpp index 7816325c..abf1e953 100644 --- a/src/kernel/qapplication_x11.cpp +++ b/src/kernel/qapplication_x11.cpp @@ -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; diff --git a/src/kernel/qcursor_x11.cpp b/src/kernel/qcursor_x11.cpp index 39b60333..8f5114f9 100644 --- a/src/kernel/qcursor_x11.cpp +++ b/src/kernel/qcursor_x11.cpp @@ -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; diff --git a/src/kernel/qdnd_x11.cpp b/src/kernel/qdnd_x11.cpp index e45341aa..ac8deedd 100644 --- a/src/kernel/qdnd_x11.cpp +++ b/src/kernel/qdnd_x11.cpp @@ -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; } diff --git a/src/kernel/qdragobject.cpp b/src/kernel/qdragobject.cpp index 47f298b7..191b1c09 100644 --- a/src/kernel/qdragobject.cpp +++ b/src/kernel/qdragobject.cpp @@ -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] == '!' diff --git a/src/kernel/qmngio.cpp b/src/kernel/qmngio.cpp index bf4504c3..a7ab00e0 100644 --- a/src/kernel/qmngio.cpp +++ b/src/kernel/qmngio.cpp @@ -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; diff --git a/src/kernel/qprinter_unix.cpp b/src/kernel/qprinter_unix.cpp index f2bb8820..80b91d8c 100644 --- a/src/kernel/qprinter_unix.cpp +++ b/src/kernel/qprinter_unix.cpp @@ -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; diff --git a/src/kernel/qrichtext.cpp b/src/kernel/qrichtext.cpp index 1b7d5375..bc776681 100644 --- a/src/kernel/qrichtext.cpp +++ b/src/kernel/qrichtext.cpp @@ -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() ) ) ) { diff --git a/src/network/qdns.cpp b/src/network/qdns.cpp index 7a4c534f..7a693e18 100644 --- a/src/network/qdns.cpp +++ b/src/network/qdns.cpp @@ -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 diff --git a/src/styles/qcommonstyle.cpp b/src/styles/qcommonstyle.cpp index 0a30f27e..4b51be9f 100644 --- a/src/styles/qcommonstyle.cpp +++ b/src/styles/qcommonstyle.cpp @@ -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; diff --git a/src/table/qtable.cpp b/src/table/qtable.cpp index 40f407bf..555b3e03 100644 --- a/src/table/qtable.cpp +++ b/src/table/qtable.cpp @@ -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 ); } diff --git a/src/tools/qdatetime.cpp b/src/tools/qdatetime.cpp index 6a8d45e2..3fb1e29c 100644 --- a/src/tools/qdatetime.cpp +++ b/src/tools/qdatetime.cpp @@ -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; } /*! diff --git a/src/tools/qsettings.cpp b/src/tools/qsettings.cpp index d5e9f81c..4dd056d0 100644 --- a/src/tools/qsettings.cpp +++ b/src/tools/qsettings.cpp @@ -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 diff --git a/src/widgets/qaction.cpp b/src/widgets/qaction.cpp index 391b47ee..242de2dd 100644 --- a/src/widgets/qaction.cpp +++ b/src/widgets/qaction.cpp @@ -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() ) diff --git a/src/widgets/qbutton.cpp b/src/widgets/qbutton.cpp index 05539be9..71a2763c 100644 --- a/src/widgets/qbutton.cpp +++ b/src/widgets/qbutton.cpp @@ -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 diff --git a/src/widgets/qbuttongroup.cpp b/src/widgets/qbuttongroup.cpp index 5745cd3f..595bd883 100644 --- a/src/widgets/qbuttongroup.cpp +++ b/src/widgets/qbuttongroup.cpp @@ -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) diff --git a/src/widgets/qdatetimeedit.cpp b/src/widgets/qdatetimeedit.cpp index 892c1e61..ccee2adc 100644 --- a/src/widgets/qdatetimeedit.cpp +++ b/src/widgets/qdatetimeedit.cpp @@ -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); diff --git a/src/widgets/qdockarea.cpp b/src/widgets/qdockarea.cpp index 760db538..14c63885 100644 --- a/src/widgets/qdockarea.cpp +++ b/src/widgets/qdockarea.cpp @@ -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 ); diff --git a/src/widgets/qdockwindow.cpp b/src/widgets/qdockwindow.cpp index 8e699633..0f4a28e3 100644 --- a/src/widgets/qdockwindow.cpp +++ b/src/widgets/qdockwindow.cpp @@ -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 diff --git a/src/widgets/qheader.cpp b/src/widgets/qheader.cpp index b2c0e0e4..29c0306b 100644 --- a/src/widgets/qheader.cpp +++ b/src/widgets/qheader.cpp @@ -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; } } diff --git a/src/widgets/qlistbox.cpp b/src/widgets/qlistbox.cpp index 4e26f005..71f29fc7 100644 --- a/src/widgets/qlistbox.cpp +++ b/src/widgets/qlistbox.cpp @@ -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 ); diff --git a/src/widgets/qlistview.cpp b/src/widgets/qlistview.cpp index faffe09b..9946319a 100644 --- a/src/widgets/qlistview.cpp +++ b/src/widgets/qlistview.cpp @@ -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; } diff --git a/src/widgets/qmainwindow.cpp b/src/widgets/qmainwindow.cpp index 830e3f0d..f2069485 100644 --- a/src/widgets/qmainwindow.cpp +++ b/src/widgets/qmainwindow.cpp @@ -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; diff --git a/src/widgets/qmenubar.cpp b/src/widgets/qmenubar.cpp index 02ee71b2..8ee3cad2 100644 --- a/src/widgets/qmenubar.cpp +++ b/src/widgets/qmenubar.cpp @@ -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; diff --git a/src/widgets/qpopupmenu.cpp b/src/widgets/qpopupmenu.cpp index 76605be8..c5287867 100644 --- a/src/widgets/qpopupmenu.cpp +++ b/src/widgets/qpopupmenu.cpp @@ -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; diff --git a/src/widgets/qscrollbar.cpp b/src/widgets/qscrollbar.cpp index cd5b73f2..18d62acd 100644 --- a/src/widgets/qscrollbar.cpp +++ b/src/widgets/qscrollbar.cpp @@ -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 ), diff --git a/src/widgets/qslider.cpp b/src/widgets/qslider.cpp index bf5b7488..fd9dd15b 100644 --- a/src/widgets/qslider.cpp +++ b/src/widgets/qslider.cpp @@ -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(); diff --git a/src/widgets/qspinwidget.cpp b/src/widgets/qspinwidget.cpp index f0b6b780..af2e1988 100644 --- a/src/widgets/qspinwidget.cpp +++ b/src/widgets/qspinwidget.cpp @@ -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; diff --git a/src/widgets/qtextedit.cpp b/src/widgets/qtextedit.cpp index df41d2d0..3475b2bf 100644 --- a/src/widgets/qtextedit.cpp +++ b/src/widgets/qtextedit.cpp @@ -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(); diff --git a/src/widgets/qtooltip.cpp b/src/widgets/qtooltip.cpp index fc33aef5..924d563d 100644 --- a/src/widgets/qtooltip.cpp +++ b/src/widgets/qtooltip.cpp @@ -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; diff --git a/src/workspace/qworkspace.cpp b/src/workspace/qworkspace.cpp index acf1fcb8..08d356d1 100644 --- a/src/workspace/qworkspace.cpp +++ b/src/workspace/qworkspace.cpp @@ -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 ) { diff --git a/src/xml/qdom.cpp b/src/xml/qdom.cpp index 44f07346..64658c1c 100644 --- a/src/xml/qdom.cpp +++ b/src/xml/qdom.cpp @@ -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 ); } /* diff --git a/src/xml/qsvgdevice.cpp b/src/xml/qsvgdevice.cpp index 10690559..9acaf4f9 100644 --- a/src/xml/qsvgdevice.cpp +++ b/src/xml/qsvgdevice.cpp @@ -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) ); |