Wizards: Let "new file" wizard create subdirectories

Change-Id: I1267025ab3db3803e10c6a5ebf78bb945fe19c71
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Christian Kandeler
2022-11-24 09:08:41 +01:00
parent 953051b8bb
commit b841d68a95
2 changed files with 2 additions and 1 deletions

View File

@@ -52,6 +52,7 @@ FileWizardPage::FileWizardPage(QWidget *parent) :
d->m_nameLineEdit->setObjectName("nameLineEdit");
d->m_pathLabel = new QLabel;
d->m_pathChooser = new PathChooser;
d->m_pathChooser->setExpectedKind(PathChooser::Directory);
d->m_nameLabel->setText(tr("File name:"));
d->m_pathLabel->setText(tr("Path:"));

View File

@@ -36,7 +36,7 @@ bool JsonFilePage::validatePage()
return false;
const FilePath dir = filePath();
if (!dir.isDir())
if (dir.exists() && !dir.isDir())
return false;
const FilePath target = dir.resolvePath(fileName());