From f06512d5f7fce45619d3d457765ae290b918296f Mon Sep 17 00:00:00 2001
From: Tobias Hunger <tobias.hunger@nokia.com>
Date: Thu, 23 Sep 2010 17:28:18 +0200
Subject: [PATCH] Use ExistingCommand in PathChooser where it makes sense

---
 src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp   | 2 +-
 src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp      | 2 +-
 src/plugins/cvs/settingspage.cpp                             | 2 +-
 src/plugins/debugger/gdb/gdbchooserwidget.cpp                | 2 +-
 src/plugins/mercurial/optionspage.cpp                        | 2 +-
 src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp | 2 +-
 src/plugins/subversion/settingspage.cpp                      | 2 +-
 src/plugins/vcsbase/commonsettingspage.cpp                   | 4 ++--
 8 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp b/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp
index 63b31434f21..c79b73c5bf6 100644
--- a/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp
@@ -300,7 +300,7 @@ void CMakeRunPage::initWidgets()
         fl->addRow(new QLabel(text, this));
         // Show a field for the user to enter
         m_cmakeExecutable = new Utils::PathChooser(this);
-        m_cmakeExecutable->setExpectedKind(Utils::PathChooser::Command);
+        m_cmakeExecutable->setExpectedKind(Utils::PathChooser::ExistingCommand);
         fl->addRow("CMake Executable", m_cmakeExecutable);
     }
 
diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp
index aaffb08bd48..bb84b5242d8 100644
--- a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp
@@ -280,7 +280,7 @@ QWidget *CMakeSettingsPage::createPage(QWidget *parent)
     QWidget *outerWidget = new QWidget(parent);
     QFormLayout *formLayout = new QFormLayout(outerWidget);
     m_pathchooser = new Utils::PathChooser;
-    m_pathchooser->setExpectedKind(Utils::PathChooser::Command);
+    m_pathchooser->setExpectedKind(Utils::PathChooser::ExistingCommand);
     formLayout->addRow(tr("Executable:"), m_pathchooser);
     formLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Ignored, QSizePolicy::MinimumExpanding));
     m_pathchooser->setPath(cmakeExecutable());
diff --git a/src/plugins/cvs/settingspage.cpp b/src/plugins/cvs/settingspage.cpp
index d4106f7f6dd..79ff660e50d 100644
--- a/src/plugins/cvs/settingspage.cpp
+++ b/src/plugins/cvs/settingspage.cpp
@@ -47,7 +47,7 @@ SettingsPageWidget::SettingsPageWidget(QWidget *parent) :
     QWidget(parent)
 {
     m_ui.setupUi(this);
-    m_ui.commandPathChooser->setExpectedKind(PathChooser::Command);
+    m_ui.commandPathChooser->setExpectedKind(PathChooser::ExistingCommand);
     m_ui.commandPathChooser->setPromptDialogTitle(tr("CVS Command"));
 }
 
diff --git a/src/plugins/debugger/gdb/gdbchooserwidget.cpp b/src/plugins/debugger/gdb/gdbchooserwidget.cpp
index c45f6f23e69..accaf8aee87 100644
--- a/src/plugins/debugger/gdb/gdbchooserwidget.cpp
+++ b/src/plugins/debugger/gdb/gdbchooserwidget.cpp
@@ -521,7 +521,7 @@ BinaryToolChainDialog::BinaryToolChainDialog(QWidget *parent) :
     setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
     setWindowTitle(tr("Select binary and toolchains"));
 
-    m_pathChooser->setExpectedKind(Utils::PathChooser::Command);
+    m_pathChooser->setExpectedKind(Utils::PathChooser::ExistingCommand);
     m_pathChooser->setPromptDialogTitle(tr("Gdb binary"));
     connect(m_pathChooser, SIGNAL(validChanged()), this, SLOT(slotValidChanged()));
     m_mainLayout->addRow(tr("Path:"), m_pathChooser);
diff --git a/src/plugins/mercurial/optionspage.cpp b/src/plugins/mercurial/optionspage.cpp
index 757ebb78442..38ce87c1e96 100644
--- a/src/plugins/mercurial/optionspage.cpp
+++ b/src/plugins/mercurial/optionspage.cpp
@@ -44,7 +44,7 @@ OptionsPageWidget::OptionsPageWidget(QWidget *parent) :
         QWidget(parent)
 {
     m_ui.setupUi(this);
-    m_ui.commandChooser->setExpectedKind(Utils::PathChooser::Command);
+    m_ui.commandChooser->setExpectedKind(Utils::PathChooser::ExistingCommand);
     m_ui.commandChooser->setPromptDialogTitle(tr("Mercurial Command"));
 }
 
diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
index 64cf746b672..5b63607acdb 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
+++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
@@ -161,7 +161,7 @@ QWidget *QmlProjectRunConfiguration::createConfigurationWidget()
     connect(ProjectExplorer::ProjectExplorerPlugin::instance(), SIGNAL(fileListChanged()), SLOT(updateFileComboBox()));
 
     Utils::PathChooser *qmlViewer = new Utils::PathChooser;
-    qmlViewer->setExpectedKind(Utils::PathChooser::Command);
+    qmlViewer->setExpectedKind(Utils::PathChooser::ExistingCommand);
     qmlViewer->setPath(m_qmlViewerCustomPath);
 
     connect(qmlViewer, SIGNAL(changed(QString)), this, SLOT(onViewerChanged()));
diff --git a/src/plugins/subversion/settingspage.cpp b/src/plugins/subversion/settingspage.cpp
index 0583fe3c472..4ddedd4436b 100644
--- a/src/plugins/subversion/settingspage.cpp
+++ b/src/plugins/subversion/settingspage.cpp
@@ -47,7 +47,7 @@ SettingsPageWidget::SettingsPageWidget(QWidget *parent) :
     QWidget(parent)
 {
     m_ui.setupUi(this);
-    m_ui.pathChooser->setExpectedKind(PathChooser::Command);
+    m_ui.pathChooser->setExpectedKind(PathChooser::ExistingCommand);
     m_ui.pathChooser->setPromptDialogTitle(tr("Subversion Command"));
 }
 
diff --git a/src/plugins/vcsbase/commonsettingspage.cpp b/src/plugins/vcsbase/commonsettingspage.cpp
index c382170b314..b842f96c90a 100644
--- a/src/plugins/vcsbase/commonsettingspage.cpp
+++ b/src/plugins/vcsbase/commonsettingspage.cpp
@@ -50,10 +50,10 @@ CommonSettingsWidget::CommonSettingsWidget(QWidget *parent) :
     m_ui(new Ui::CommonSettingsPage)
 {
     m_ui->setupUi(this);
-    m_ui->submitMessageCheckScriptChooser->setExpectedKind(Utils::PathChooser::Command);
+    m_ui->submitMessageCheckScriptChooser->setExpectedKind(Utils::PathChooser::ExistingCommand);
     m_ui->nickNameFieldsFileChooser->setExpectedKind(Utils::PathChooser::File);
     m_ui->nickNameMailMapChooser->setExpectedKind(Utils::PathChooser::File);
-    m_ui->sshPromptChooser->setExpectedKind(Utils::PathChooser::Command);
+    m_ui->sshPromptChooser->setExpectedKind(Utils::PathChooser::ExistingCommand);
 }
 
 CommonSettingsWidget::~CommonSettingsWidget()
-- 
GitLab