summaryrefslogtreecommitdiffstats
path: root/Source/QtDialog
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2014-03-30 04:39:43 (GMT)
committerClinton Stimpson <clinton@elemtech.com>2014-03-30 04:41:44 (GMT)
commit480be00bfac0af72d373b5ef190ebc770a1bc7c1 (patch)
tree3117726bae3a2a4d5e354a7801f19c72f5e1d19c /Source/QtDialog
parentede0419a376cd3ddc26058f910318c76e0077bb1 (diff)
downloadCMake-480be00bfac0af72d373b5ef190ebc770a1bc7c1.zip
CMake-480be00bfac0af72d373b5ef190ebc770a1bc7c1.tar.gz
CMake-480be00bfac0af72d373b5ef190ebc770a1bc7c1.tar.bz2
cmake-gui: Don't resolve symlinks with using file dialog.
This fixes bug #14274 where a clang++ symlink was resolved to a clang executable.
Diffstat (limited to 'Source/QtDialog')
-rw-r--r--Source/QtDialog/CMakeSetupDialog.cxx6
-rw-r--r--Source/QtDialog/QCMakeWidgets.cxx6
2 files changed, 8 insertions, 4 deletions
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx
index f62afd6..1a98cea 100644
--- a/Source/QtDialog/CMakeSetupDialog.cxx
+++ b/Source/QtDialog/CMakeSetupDialog.cxx
@@ -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);
diff --git a/Source/QtDialog/QCMakeWidgets.cxx b/Source/QtDialog/QCMakeWidgets.cxx
index a0c5e17..41f98b5 100644
--- a/Source/QtDialog/QCMakeWidgets.cxx
+++ b/Source/QtDialog/QCMakeWidgets.cxx
@@ -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())
{