src/gui/dialogs/qfiledialog.cpp
changeset 30 5dc02b23752f
parent 18 2f34d5167611
equal deleted inserted replaced
29:b72c6db6890b 30:5dc02b23752f
   226     default, the native file dialog is used unless you use a subclass
   226     default, the native file dialog is used unless you use a subclass
   227     of QFileDialog that contains the Q_OBJECT macro.
   227     of QFileDialog that contains the Q_OBJECT macro.
   228 
   228 
   229     \value ReadOnly Indicates that the model is readonly.
   229     \value ReadOnly Indicates that the model is readonly.
   230 
   230 
   231     \value HideNameFilterDetails Indicates if the is hidden or not.
   231     \value HideNameFilterDetails Indicates if the file name filter details are
       
   232     hidden or not.
   232 
   233 
   233     \value DontUseSheet In previous versions of Qt, the static
   234     \value DontUseSheet In previous versions of Qt, the static
   234     functions would create a sheet by default if the static function
   235     functions would create a sheet by default if the static function
   235     was given a parent. This is no longer supported and does nothing in Qt 4.5, The
   236     was given a parent. This is no longer supported and does nothing in Qt 4.5, The
   236     static functions will always be an application modal dialog. If
   237     static functions will always be an application modal dialog. If
   720         if (d->setVisible_sys(visible)){
   721         if (d->setVisible_sys(visible)){
   721             d->nativeDialogInUse = true;
   722             d->nativeDialogInUse = true;
   722             // Set WA_DontShowOnScreen so that QDialog::setVisible(visible) below
   723             // Set WA_DontShowOnScreen so that QDialog::setVisible(visible) below
   723             // updates the state correctly, but skips showing the non-native version:
   724             // updates the state correctly, but skips showing the non-native version:
   724             setAttribute(Qt::WA_DontShowOnScreen);
   725             setAttribute(Qt::WA_DontShowOnScreen);
       
   726 #ifndef QT_NO_FSCOMPLETER
       
   727             //So the completer don't try to complete and therefore to show a popup
       
   728             d->completer->setModel(0);
       
   729 #endif
   725         } else {
   730         } else {
   726             d->nativeDialogInUse = false;
   731             d->nativeDialogInUse = false;
   727             setAttribute(Qt::WA_DontShowOnScreen, false);
   732             setAttribute(Qt::WA_DontShowOnScreen, false);
       
   733 #ifndef QT_NO_FSCOMPLETER
       
   734             if (d->proxyModel != 0)
       
   735                 d->completer->setModel(d->proxyModel);
       
   736             else
       
   737                 d->completer->setModel(d->model);
       
   738 #endif
   728         }
   739         }
   729     }
   740     }
   730 
   741 
   731     if (!d->nativeDialogInUse)
   742     if (!d->nativeDialogInUse)
   732         d->qFileDialogUi->fileNameEdit->setFocus();
   743         d->qFileDialogUi->fileNameEdit->setFocus();