forked from qt-creator/qt-creator
CMake: Apply build directory change on editingFinished
Otherwise every time a character is typed, a dialog pops up, and that dialog is closed without triggering a cmake run, the value is reset. Add that behavior optionally to StringAspect. Change-Id: I6831d1622f08acae6df43d4ceb2bf7367c96a747 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -182,6 +182,7 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildConfiguration *bc)
|
||||
container->setWidget(details);
|
||||
|
||||
auto buildDirAspect = bc->buildDirectoryAspect();
|
||||
buildDirAspect->setAutoApplyOnEditingFinished(true);
|
||||
connect(buildDirAspect, &BaseAspect::changed, this, [this]() {
|
||||
m_configModel->flush(); // clear out config cache...;
|
||||
});
|
||||
@@ -851,7 +852,7 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(Target *target, Id id)
|
||||
return newDir;
|
||||
|
||||
if (QDir(oldDir).exists("CMakeCache.txt") && !QDir(newDir).exists("CMakeCache.txt")) {
|
||||
if (QMessageBox::information(nullptr,
|
||||
if (QMessageBox::information(Core::ICore::dialogParent(),
|
||||
tr("Changing Build Directory"),
|
||||
tr("Change the build directory and start with a "
|
||||
"basic CMake configuration?"),
|
||||
|
||||
Reference in New Issue
Block a user