diff options
author | Christian Kandeler <[email protected]> | 2022-11-23 16:52:14 +0100 |
---|---|---|
committer | Christian Kandeler <[email protected]> | 2022-11-24 07:33:19 +0000 |
commit | 706b0ff9eba7d40a3f9c1fac1a5f9784611b9461 (patch) | |
tree | c8e5e3b225807a9a53070bc041d8c3a87241c36f /src/libs/utils/projectintropage.cpp | |
parent | 2e75492257d48d269c5b00856f4591d4ae5b8726 (diff) |
"New Project" wizard: Create project parent directory, if needed
There's no reason to force users to the terminal if they want to create
their project in a new subdirectory.
Fixes: QTCREATORBUG-28346
Change-Id: Id92b2194c018274aac6f7f29c7304efa8c1d2d9e
Reviewed-by: <[email protected]>
Reviewed-by: Eike Ziller <[email protected]>
Diffstat (limited to 'src/libs/utils/projectintropage.cpp')
-rw-r--r-- | src/libs/utils/projectintropage.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libs/utils/projectintropage.cpp b/src/libs/utils/projectintropage.cpp index 11ddd00aa16..f49631fc166 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; } |