|
|
@ -111,8 +111,12 @@ FileSystemPathEdit::FileSystemPathEditPrivate::FileSystemPathEditPrivate( |
|
|
|
void FileSystemPathEdit::FileSystemPathEditPrivate::browseActionTriggered() |
|
|
|
void FileSystemPathEdit::FileSystemPathEditPrivate::browseActionTriggered() |
|
|
|
{ |
|
|
|
{ |
|
|
|
Q_Q(FileSystemPathEdit); |
|
|
|
Q_Q(FileSystemPathEdit); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const QFileInfo fileInfo {q->selectedPath()}; |
|
|
|
|
|
|
|
const QString directory = (m_mode == FileSystemPathEdit::Mode::DirectoryOpen) || (m_mode == FileSystemPathEdit::Mode::DirectorySave) |
|
|
|
|
|
|
|
? fileInfo.absoluteFilePath() |
|
|
|
|
|
|
|
: fileInfo.absolutePath(); |
|
|
|
QString filter = q->fileNameFilter(); |
|
|
|
QString filter = q->fileNameFilter(); |
|
|
|
QString directory = q->currentDirectory().isEmpty() ? QDir::homePath() : q->currentDirectory(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString selectedPath; |
|
|
|
QString selectedPath; |
|
|
|
switch (m_mode) |
|
|
|
switch (m_mode) |
|
|
@ -308,11 +312,6 @@ void FileSystemPathEdit::setDialogCaption(const QString &caption) |
|
|
|
d->m_dialogCaption = caption; |
|
|
|
d->m_dialogCaption = caption; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
QString FileSystemPathEdit::currentDirectory() const |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return QFileInfo(selectedPath()).absoluteDir().absolutePath(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QWidget *FileSystemPathEdit::editWidgetImpl() const |
|
|
|
QWidget *FileSystemPathEdit::editWidgetImpl() const |
|
|
|
{ |
|
|
|
{ |
|
|
|
Q_D(const FileSystemPathEdit); |
|
|
|
Q_D(const FileSystemPathEdit); |
|
|
|