From d5e89ceab38f7046f8d2d1c4bcc1a80cc324b0a8 Mon Sep 17 00:00:00 2001 From: dt Date: Mon, 21 Feb 2011 21:08:22 +0100 Subject: [PATCH] Qt4TargetSetupPage: On adding a import dir, disable default builds The user probably wants to have just his builds. --- src/plugins/qt4projectmanager/qt4target.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/plugins/qt4projectmanager/qt4target.cpp b/src/plugins/qt4projectmanager/qt4target.cpp index e220109fef8..54efa612c43 100644 --- a/src/plugins/qt4projectmanager/qt4target.cpp +++ b/src/plugins/qt4projectmanager/qt4target.cpp @@ -472,6 +472,18 @@ void Qt4DefaultTargetSetupWidget::addImportClicked() tr("The Build found in %1 is incompatible with this target").arg(m_importLinePath->path())); return; } + if (m_selected == m_enabled.size() && m_importInfos.isEmpty()) { + // All regular builds are enabled and we didn't have a import before + // That means we are still in the default setup, in that case + // we disable all the builds + m_selected = 0; + for (int i=0; isetChecked(false); + } + } + + ++m_selected; m_importEnabled << true;