diff options
author | Darrell Anderson <humanreadable@yahoo.com> | 2012-08-03 08:49:38 -0500 |
---|---|---|
committer | Darrell Anderson <humanreadable@yahoo.com> | 2012-08-03 08:49:38 -0500 |
commit | 7d22e97622a6b963382b88aac6dfde06a2cd8f03 (patch) | |
tree | 231f5c31f279d3e798702fe61e9b6bcef52b089b /src/widgets | |
parent | 6d0157ea558089bb957f35263424a405e42a6931 (diff) | |
parent | fe7969ef886d7287fa959929ddd33fbad8407884 (diff) | |
download | tqt3-7d22e97622a6b963382b88aac6dfde06a2cd8f03.tar.gz tqt3-7d22e97622a6b963382b88aac6dfde06a2cd8f03.zip |
Merge branch 'master' of http://scm.trinitydesktop.org/scm/git/tqt3
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/qaction.cpp | 3 | ||||
-rw-r--r-- | src/widgets/qbutton.cpp | 4 | ||||
-rw-r--r-- | src/widgets/qbuttongroup.cpp | 2 | ||||
-rw-r--r-- | src/widgets/qdatetimeedit.cpp | 2 | ||||
-rw-r--r-- | src/widgets/qdockarea.cpp | 2 | ||||
-rw-r--r-- | src/widgets/qdockwindow.cpp | 4 | ||||
-rw-r--r-- | src/widgets/qheader.cpp | 12 | ||||
-rw-r--r-- | src/widgets/qlistbox.cpp | 6 | ||||
-rw-r--r-- | src/widgets/qlistview.cpp | 12 | ||||
-rw-r--r-- | src/widgets/qmainwindow.cpp | 2 | ||||
-rw-r--r-- | src/widgets/qmenubar.cpp | 4 | ||||
-rw-r--r-- | src/widgets/qpopupmenu.cpp | 6 | ||||
-rw-r--r-- | src/widgets/qscrollbar.cpp | 2 | ||||
-rw-r--r-- | src/widgets/qslider.cpp | 8 | ||||
-rw-r--r-- | src/widgets/qspinwidget.cpp | 2 | ||||
-rw-r--r-- | src/widgets/qtextedit.cpp | 8 | ||||
-rw-r--r-- | src/widgets/qtooltip.cpp | 3 |
17 files changed, 42 insertions, 40 deletions
diff --git a/src/widgets/qaction.cpp b/src/widgets/qaction.cpp index 391b47eef..242de2dd8 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 05539be93..71a2763cb 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 5745cd3ff..595bd883b 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 892c1e618..ccee2adcf 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 760db5382..14c63885f 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 8e6996338..0f4a28e31 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 b2c0e0e40..29c0306bb 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 4e26f005b..71f29fc78 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 faffe09b9..9946319a7 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 830e3f0dc..f2069485d 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 02ee71b24..8ee3cad20 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 76605be88..c52878679 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 cd5b73f29..18d62acd0 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 bf5b74881..fd9dd15b5 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 f0b6b7809..af2e19888 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 37b071c7b..c8e2c9bff 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 fc33aef55..924d563d7 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; |