| 504 | } |
| 505 | |
| 506 | void ImportProjectDialog::newFolder() { |
| 507 | const QString& path = m_cbFileName->currentText(); |
| 508 | QString name = path.right(path.length() - path.lastIndexOf(QLatin1Char('/')) - 1); |
| 509 | |
| 510 | bool ok; |
| 511 | auto* dlg = new QInputDialog(this); |
| 512 | name = dlg->getText(this, i18n("Add new folder"), i18n("Folder name:"), QLineEdit::Normal, name, &ok); |
| 513 | if (ok) { |
| 514 | auto* folder = new Folder(name); |
| 515 | m_mainWin->addAspectToProject(folder); |
| 516 | m_cbAddTo->setCurrentModelIndex(m_mainWin->model()->modelIndexOfAspect(folder)); |
| 517 | } |
| 518 | |
| 519 | delete dlg; |
| 520 | } |
nothing calls this directly
no test coverage detected