QFileDialog( parent, 0, modal ),
myValidator( 0 ),
myQuickCombo( 0 ), myQuickButton( 0 ), myQuickLab( 0 ),
-myOpen( open ),
-myAccepted( false )
+myOpen( open )//,
+//myAccepted( false )
{
+ const QObjectList* child = children();
+ QObjectList::const_iterator anIt = child->begin(), aLast = child->end();
+ for( ; anIt!=aLast; anIt++ )
+ if( (*anIt)->inherits( "QPushButton" ) )
+ {
+ QPushButton* bt = ( QPushButton* )( *anIt );
+ bt->setDefault( false );
+ bt->setAutoDefault( false );
+ }
+
if ( parent->icon() )
setIcon( *parent->icon() );
setSizeGripEnabled( true );
* in file name editor while file name is not acceptable by acceptData()
* (e.g. permission denied)
*/
- if ( !myAccepted ) {
+// if ( !myAccepted ) {
if ( mode() != ExistingFiles ) {
mySelectedFile = QFileDialog::selectedFile();
addExtension();
if ( acceptData() ) {
myLastVisitedPath = dirPath();
QFileDialog::accept();
- myAccepted = true;
+// myAccepted = true;
}
- }
- myAccepted = !myAccepted;
+// }
+// myAccepted = !myAccepted;
}
/*! Closes this dialog and sets the return code to 'Rejected' */
* in file name editor while file name is not acceptable by acceptData()
* (e.g. permission denied)
*/
- bool myAccepted;
+// bool myAccepted;
+ /*! ASL: this bug can be fixed with help of call setDefault( false )
+ * and setAutoDefault( false ) methods for all QPushButtons of this dialog
+ */
static QString myLastVisitedPath; //!< last visited path
};