Merge topic 'cmake-gui-symlinks'

480be00b cmake-gui: Don't resolve symlinks with using file dialog.
This commit is contained in:
Brad King 2014-04-01 11:06:14 -04:00 committed by CMake Topic Stage
commit a5a6d53782
2 changed files with 8 additions and 4 deletions

View File

@ -578,7 +578,8 @@ void CMakeSetupDialog::doInterrupt()
void CMakeSetupDialog::doSourceBrowse()
{
QString dir = QFileDialog::getExistingDirectory(this,
tr("Enter Path to Source"), this->SourceDirectory->text());
tr("Enter Path to Source"), this->SourceDirectory->text(),
QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
if(!dir.isEmpty())
{
this->setSourceDirectory(dir);
@ -608,7 +609,8 @@ void CMakeSetupDialog::updateBinaryDirectory(const QString& dir)
void CMakeSetupDialog::doBinaryBrowse()
{
QString dir = QFileDialog::getExistingDirectory(this,
tr("Enter Path to Build"), this->BinaryDirectory->currentText());
tr("Enter Path to Build"), this->BinaryDirectory->currentText(),
QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
if(!dir.isEmpty() && dir != this->BinaryDirectory->currentText())
{
this->setBinaryDirectory(dir);

View File

@ -67,7 +67,8 @@ void QCMakeFilePathEditor::chooseFile()
title = title.arg(this->Variable);
}
this->fileDialogExists(true);
path = QFileDialog::getOpenFileName(this, title, info.absolutePath());
path = QFileDialog::getOpenFileName(this, title, info.absolutePath(),
QString(), NULL, QFileDialog::DontResolveSymlinks);
this->fileDialogExists(false);
if(!path.isEmpty())
@ -91,7 +92,8 @@ void QCMakePathEditor::chooseFile()
title = title.arg(this->Variable);
}
this->fileDialogExists(true);
path = QFileDialog::getExistingDirectory(this, title, this->text());
path = QFileDialog::getExistingDirectory(this, title, this->text(),
QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
this->fileDialogExists(false);
if(!path.isEmpty())
{