forked from qt-creator/qt-creator
CMake: Show build directory when asking if it should be used
When changing the build directory to a new or empty directory, we ask if the build directory should be changed and the project be configured there. Mention the new directory in the dialog. Change-Id: Ie4d7e9b132e6e90004e4d498b2182562375e7441 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -852,12 +852,14 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(Target *target, Id id)
|
||||
return newDir;
|
||||
|
||||
if (QDir(oldDir).exists("CMakeCache.txt") && !QDir(newDir).exists("CMakeCache.txt")) {
|
||||
if (QMessageBox::information(Core::ICore::dialogParent(),
|
||||
tr("Changing Build Directory"),
|
||||
tr("Change the build directory and start with a "
|
||||
"basic CMake configuration?"),
|
||||
QMessageBox::Ok,
|
||||
QMessageBox::Cancel)
|
||||
if (QMessageBox::information(
|
||||
Core::ICore::dialogParent(),
|
||||
tr("Changing Build Directory"),
|
||||
tr("Change the build directory to \"%1\" and start with a "
|
||||
"basic CMake configuration?")
|
||||
.arg(newDir),
|
||||
QMessageBox::Ok,
|
||||
QMessageBox::Cancel)
|
||||
== QMessageBox::Ok) {
|
||||
return newDir;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user