mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-20 12:53:55 +08:00
cmake-gui: Fix regression that prints an incidental error on fresh build trees
Since commit a872844908
(cmake-gui: Handle relative paths in the build
directory text input, 2024-04-24, v3.30.0-rc1~5^2), `cmake-gui` gave an
incidental error message even when a valid build directory was being
passed. Fix this by checking for a non-empty path before using it.
Fixes: #26744
This commit is contained in:
@@ -94,7 +94,8 @@ void QCMake::setSourceDirectory(const QString& _dir)
|
|||||||
emit this->sourceDirChanged(this->SourceDirectory);
|
emit this->sourceDirChanged(this->SourceDirectory);
|
||||||
this->loadPresets();
|
this->loadPresets();
|
||||||
this->setPreset(QString{});
|
this->setPreset(QString{});
|
||||||
if (!cmSystemTools::FileIsFullPath(
|
if (!this->MaybeRelativeBinaryDirectory.isEmpty() &&
|
||||||
|
!cmSystemTools::FileIsFullPath(
|
||||||
this->MaybeRelativeBinaryDirectory.toStdString())) {
|
this->MaybeRelativeBinaryDirectory.toStdString())) {
|
||||||
this->setBinaryDirectory(this->MaybeRelativeBinaryDirectory);
|
this->setBinaryDirectory(this->MaybeRelativeBinaryDirectory);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user