forked from qt-creator/qt-creator
Wizards: Let "new file" wizard create subdirectories
Change-Id: I1267025ab3db3803e10c6a5ebf78bb945fe19c71 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -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:"));
|
||||
|
@@ -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());
|
||||
|
Reference in New Issue
Block a user