| 180 | OpenProjectDialog::~OpenProjectDialog() = default; |
| 181 | |
| 182 | bool OpenProjectDialog::execNativeDialog() |
| 183 | { |
| 184 | while (true) |
| 185 | { |
| 186 | if (nativeDialog->exec()) { |
| 187 | QUrl selectedUrl = nativeDialog->selectedUrls().at(0); |
| 188 | if (urlInfo(selectedUrl).isValid) { |
| 189 | // validate directory first to populate m_projectName and m_projectManager |
| 190 | validateOpenUrl(selectedUrl.adjusted(QUrl::RemoveFilename)); |
| 191 | validateOpenUrl(selectedUrl); |
| 192 | return true; |
| 193 | } |
| 194 | } |
| 195 | else { |
| 196 | return false; |
| 197 | } |
| 198 | } |
| 199 | } |
| 200 | |
| 201 | int OpenProjectDialog::exec() |
| 202 | { |