- QString const startsWith = makeAbsPath(suggested, path);
- result.second = toqstr(internal_path(fromqstr(
- QFileDialog::getExistingDirectory(qApp->focusWidget(),
- title_, startsWith))));
+ QString const startsWith = toqstr(makeAbsPath(fromqstr(suggested),
+ fromqstr(path)).absFilename());
+ QString const dir = QFileDialog::getExistingDirectory(qApp->focusWidget(),
+ title_, startsWith);
+ if (dir.isNull())
+ result.first = FileDialog::Later;
+ else
+ result.second = toqstr(os::internal_path(fromqstr(dir)));