Open new project after creating it
This commit is contained in:
parent
fc71e02fa4
commit
754607fa2d
@ -286,13 +286,14 @@ void MainWindow::showNewWizard() {
|
|||||||
return pgs;
|
return pgs;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
wizard.setAccept([&wizard, ws, PROJECT_NAME, PROJECT_PATH]() -> int {
|
wizard.setAccept([this, &wizard, ws, PROJECT_NAME, PROJECT_PATH]() -> int {
|
||||||
auto projectName = wizard.field(PROJECT_NAME).toString();
|
auto projectName = wizard.field(PROJECT_NAME).toString();
|
||||||
auto projectPath = wizard.field(PROJECT_PATH).toString();
|
auto projectPath = wizard.field(PROJECT_PATH).toString();
|
||||||
if (QDir(projectPath).exists()) {
|
if (QDir(projectPath).exists()) {
|
||||||
auto path = projectPath + "/" + projectName;
|
auto path = projectPath + "/" + projectName;
|
||||||
if (!QDir(path).exists()) {
|
if (!QDir(path).exists()) {
|
||||||
Project(path).create();
|
Project(path).create();
|
||||||
|
openProject(path);
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user