diff options
Diffstat (limited to 'src/dialogs')
-rw-r--r-- | src/dialogs/qdialog.cpp | 6 | ||||
-rw-r--r-- | src/dialogs/qfiledialog.cpp | 16 | ||||
-rw-r--r-- | src/dialogs/qprogressdialog.cpp | 2 |
3 files changed, 13 insertions, 11 deletions
diff --git a/src/dialogs/qdialog.cpp b/src/dialogs/qdialog.cpp index a80f509..04f72a2 100644 --- a/src/dialogs/qdialog.cpp +++ b/src/dialogs/qdialog.cpp @@ -1077,13 +1077,14 @@ void QDialog::showExtension( bool showIt ) /*! \reimp */ QSize QDialog::sizeHint() const { - if ( d->extension ) + if ( d->extension ) { if ( d->orientation == Horizontal ) return QSize( QWidget::sizeHint().width(), QMAX( QWidget::sizeHint().height(),d->extension->sizeHint().height() ) ); else return QSize( QMAX( QWidget::sizeHint().width(), d->extension->sizeHint().width() ), QWidget::sizeHint().height() ); + } return QWidget::sizeHint(); } @@ -1092,13 +1093,14 @@ QSize QDialog::sizeHint() const /*! \reimp */ QSize QDialog::minimumSizeHint() const { - if ( d->extension ) + if ( d->extension ) { if (d->orientation == Horizontal ) return QSize( QWidget::minimumSizeHint().width(), QMAX( QWidget::minimumSizeHint().height(), d->extension->minimumSizeHint().height() ) ); else return QSize( QMAX( QWidget::minimumSizeHint().width(), d->extension->minimumSizeHint().width() ), QWidget::minimumSizeHint().height() ); + } return QWidget::minimumSizeHint(); } diff --git a/src/dialogs/qfiledialog.cpp b/src/dialogs/qfiledialog.cpp index 7d08986..7666770 100644 --- a/src/dialogs/qfiledialog.cpp +++ b/src/dialogs/qfiledialog.cpp @@ -1453,7 +1453,7 @@ void QFileListBox::viewportDropEvent( QDropEvent *e ) bool QFileListBox::acceptDrop( const QPoint &pnt, QWidget *source ) { QListBoxItem *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 QFileDialogQFileListView::viewportDropEvent( QDropEvent *e ) bool QFileDialogQFileListView::acceptDrop( const QPoint &pnt, QWidget *source ) { QListViewItem *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 QFileDialog::okClicked() = (QFileDialogPrivate::File *)files->currentItem(); QFileDialogPrivate::MCItem * m = (QFileDialogPrivate::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 QFileDialog::eventFilter( QObject * o, QEvent * e ) return TRUE; } else if ( ( o == d->moreFiles || o == d->moreFiles->viewport() ) && e->type() == QEvent::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() ) ) ((QWidget*)o)->setFocus(); return FALSE; } @@ -6015,7 +6015,7 @@ void QFileDialog::insertEntry( const QValueList<QUrlInfo> &lst, QNetworkOperatio i = new QFileDialogPrivate::File( d, &inf, files ); i2 = new QFileDialogPrivate::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 QFileDialog::resortDir() item2 = new QFileDialogPrivate::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 bdae310..d90b46e 100644 --- a/src/dialogs/qprogressdialog.cpp +++ b/src/dialogs/qprogressdialog.cpp @@ -573,7 +573,7 @@ int QProgressDialog::progress() const void QProgressDialog::setProgress( int progress ) { if ( progress == bar()->progress() || - bar()->progress() == -1 && progress == bar()->totalSteps() ) + ( bar()->progress() == -1 && progress == bar()->totalSteps() ) ) return; bar()->setProgress(progress); |