* parameters);
* - with Qt/Mac or Qt/Win, the dialogs native to the environment are used.
* - with Qt/Win and Qt <= 4.3.0, there was a number of bugs with our own
* parameters);
* - with Qt/Mac or Qt/Win, the dialogs native to the environment are used.
* - with Qt/Win and Qt <= 4.3.0, there was a number of bugs with our own
QFileDialog::getSaveFileName(qApp->focusWidget(),
title_, startsWith, filters.join(";;"),
0, QFileDialog::DontConfirmOverwrite);
QFileDialog::getSaveFileName(qApp->focusWidget(),
title_, startsWith, filters.join(";;"),
0, QFileDialog::DontConfirmOverwrite);
#else
LyXFileDialog dlg(title_, path, filters, private_->b1, private_->b2);
#if QT_VERSION != 0x040203
#else
LyXFileDialog dlg(title_, path, filters, private_->b1, private_->b2);
#if QT_VERSION != 0x040203
LYXERR(Debug::GUI, "result " << res);
if (res == QDialog::Accepted)
result.second = internalPath(dlg.selectedFiles()[0]);
LYXERR(Debug::GUI, "result " << res);
if (res == QDialog::Accepted)
result.second = internalPath(dlg.selectedFiles()[0]);
QString const startsWith = makeAbsPath(suggested, path);
QString const file = QFileDialog::getOpenFileName(qApp->focusWidget(),
title_, startsWith, filters.join(";;"));
QString const startsWith = makeAbsPath(suggested, path);
QString const file = QFileDialog::getOpenFileName(qApp->focusWidget(),
title_, startsWith, filters.join(";;"));
#else
LyXFileDialog dlg(title_, path, filters, private_->b1, private_->b2);
#else
LyXFileDialog dlg(title_, path, filters, private_->b1, private_->b2);
LYXERR(Debug::GUI, "result " << res);
if (res == QDialog::Accepted)
result.second = internalPath(dlg.selectedFiles()[0]);
LYXERR(Debug::GUI, "result " << res);
if (res == QDialog::Accepted)
result.second = internalPath(dlg.selectedFiles()[0]);
#ifdef USE_NATIVE_FILEDIALOG
QString const startsWith = toqstr(makeAbsPath(fromqstr(suggested),
fromqstr(path)).absFilename());
#ifdef USE_NATIVE_FILEDIALOG
QString const startsWith = toqstr(makeAbsPath(fromqstr(suggested),
fromqstr(path)).absFilename());
- result.second = toqstr(os::internal_path(fromqstr(
- QFileDialog::getExistingDirectory(qApp->focusWidget(),
- title_, startsWith))));
+ 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)));
#else
LyXFileDialog dlg(title_, path, QStringList(qt_("Directories")),
private_->b1, private_->b2);
#else
LyXFileDialog dlg(title_, path, QStringList(qt_("Directories")),
private_->b1, private_->b2);
LYXERR(Debug::GUI, "result " << res);
if (res == QDialog::Accepted)
result.second = internalPath(dlg.selectedFiles()[0]);
LYXERR(Debug::GUI, "result " << res);
if (res == QDialog::Accepted)
result.second = internalPath(dlg.selectedFiles()[0]);