The fix: QAD_FileDlg redefines dirPath() function. The implementation returns dirPath of the selected file if it exists.
return dirname;
}
+/*!
+ QFileDialog::dirPath() has a bug on Linux Debian (1 level up from correct
+ directory is returned). This function fixes the bug.
+*/
+QString QAD_FileDlg::dirPath() const
+{
+ if ( !mySelectedFile.isNull() )
+ return QFileInfo( mySelectedFile ).dirPath();
+
+ return QFileDialog::dirPath();
+}
void setValidator( QAD_FileValidator* );
+ QString dirPath() const; // QFileDialog::dirPath() has a bug on Linux Debian (1 level up from correct
+ // directory is returned). This redefinition fixes the bug.
+
static QString getFileName( QWidget* parent,
const QString& initial,
const QStringList& filters,