diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libs/utils/pathchooser.h | 2 | ||||
-rw-r--r-- | src/libs/utils/projectintropage.cpp | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/libs/utils/pathchooser.h b/src/libs/utils/pathchooser.h index ca9655fa25..4fb31599a1 100644 --- a/src/libs/utils/pathchooser.h +++ b/src/libs/utils/pathchooser.h @@ -53,7 +53,7 @@ public: }; Q_ENUM(Kind) - // Default is <Directory> + // Default is <ExistingDirectory> void setExpectedKind(Kind expected); Kind expectedKind() const; diff --git a/src/libs/utils/projectintropage.cpp b/src/libs/utils/projectintropage.cpp index 11ddd00aa1..f49631fc16 100644 --- a/src/libs/utils/projectintropage.cpp +++ b/src/libs/utils/projectintropage.cpp @@ -78,6 +78,7 @@ ProjectIntroPage::ProjectIntroPage(QWidget *parent) : d->m_nameLineEdit = new Utils::FancyLineEdit(frame); d->m_pathChooser = new Utils::PathChooser(frame); + d->m_pathChooser->setExpectedKind(PathChooser::Directory); d->m_pathChooser->setDisabled(d->m_forceSubProject); d->m_projectsDirectoryCheckBox = new QCheckBox(tr("Use as default project location")); @@ -217,7 +218,12 @@ bool ProjectIntroPage::validate() filePath().pathAppended(QDir::fromNativeSeparators(d->m_nameLineEdit->text())); if (!projectDir.exists()) { // All happy - hideStatusLabel(); + if (!d->m_pathChooser->filePath().exists()) { + displayStatusMessage(InfoLabel::Information, tr("Directory \"%1\" will be created.") + .arg(d->m_pathChooser->filePath().toUserOutput())); + } else { + hideStatusLabel(); + } return true; } |