From 0b20199a92a2e44040eadd39c6133635079861be Mon Sep 17 00:00:00 2001
From: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Date: Tue, 8 Mar 2011 17:24:19 +0100
Subject: [PATCH] de-arcanize code

no need to make a dummyfied derived class when using another flag is
just fine.
---
 .../customexecutableconfigurationwidget.cpp   | 19 ++-----------------
 1 file changed, 2 insertions(+), 17 deletions(-)

diff --git a/src/plugins/projectexplorer/customexecutableconfigurationwidget.cpp b/src/plugins/projectexplorer/customexecutableconfigurationwidget.cpp
index 09e42679096..ab69b21e35c 100644
--- a/src/plugins/projectexplorer/customexecutableconfigurationwidget.cpp
+++ b/src/plugins/projectexplorer/customexecutableconfigurationwidget.cpp
@@ -54,21 +54,6 @@
 namespace ProjectExplorer {
 namespace Internal {
 
-class CustomDirectoryPathChooser : public Utils::PathChooser
-{
-public:
-    CustomDirectoryPathChooser(QWidget *parent)
-        : Utils::PathChooser(parent)
-    {
-    }
-    virtual bool validatePath(const QString &path, QString *errorMessage = 0)
-    {
-        Q_UNUSED(path)
-        Q_UNUSED(errorMessage)
-        return true;
-    }
-};
-
 CustomExecutableConfigurationWidget::CustomExecutableConfigurationWidget(CustomExecutableRunConfiguration *rc)
     : m_ignoreChange(false), m_runConfiguration(rc)
 {
@@ -85,8 +70,8 @@ CustomExecutableConfigurationWidget::CustomExecutableConfigurationWidget(CustomE
     m_commandLineArgumentsLineEdit->setMinimumWidth(200); // this shouldn't be fixed here...
     layout->addRow(tr("Arguments:"), m_commandLineArgumentsLineEdit);
 
-    m_workingDirectory = new CustomDirectoryPathChooser(this);
-    m_workingDirectory->setExpectedKind(Utils::PathChooser::ExistingDirectory);
+    m_workingDirectory = new Utils::PathChooser(this);
+    m_workingDirectory->setExpectedKind(Utils::PathChooser::Directory);
     m_workingDirectory->setBaseDirectory(rc->target()->project()->projectDirectory());
     m_workingDirectory->setEnvironment(rc->environment());
     layout->addRow(tr("Working directory:"), m_workingDirectory);
-- 
GitLab