From 345f06a6fc17531c9e10661b4534a435014473d8 Mon Sep 17 00:00:00 2001
From: Tobias Hunger <tobias.hunger@nokia.com>
Date: Thu, 11 Feb 2010 14:50:43 +0100
Subject: [PATCH] Fix customexecutable RC

 * CustomExecutableRunConfiguration is supposed to ask the user
   for input if asked to run when unconfigured. It did no longer do that.

 * This was discovered and fixed by dt.
---
 .../projectexplorer/customexecutablerunconfiguration.cpp      | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp b/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
index 47ee00bb1b5..416fabc39c9 100644
--- a/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
+++ b/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
@@ -328,7 +328,7 @@ QString CustomExecutableRunConfiguration::userName() const
 QString CustomExecutableRunConfiguration::executable() const
 {
     QString exec;
-    if (QDir::isRelativePath(m_executable)) {
+    if (!m_executable.isEmpty() && QDir::isRelativePath(m_executable)) {
         Environment env = activeBuildConfiguration()->environment();
         exec = env.searchInPath(m_executable);
         if (exec.isEmpty())
@@ -337,7 +337,7 @@ QString CustomExecutableRunConfiguration::executable() const
         exec = m_executable;
     }
 
-    if (!QFileInfo(exec).exists()) {
+    if (m_executable.isEmpty() || !QFileInfo(exec).exists()) {
         // Oh the executable doesn't exists, ask the user.
         QWidget *confWidget = const_cast<CustomExecutableRunConfiguration *>(this)->configurationWidget();
         QDialog dialog(Core::ICore::instance()->mainWindow());
-- 
GitLab