From afa9da2a61b6f2710dcc408c20d430c1eb1fe292 Mon Sep 17 00:00:00 2001
From: dt <qtc-committer@nokia.com>
Date: Tue, 3 Nov 2009 14:12:15 +0100
Subject: [PATCH] Also save before running if Project::hasNoBuildSettings

Fixes a QML bug
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
---
 src/plugins/projectexplorer/projectexplorer.cpp | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp
index d04e1338801..acc2280d8dc 100644
--- a/src/plugins/projectexplorer/projectexplorer.cpp
+++ b/src/plugins/projectexplorer/projectexplorer.cpp
@@ -1554,7 +1554,9 @@ void ProjectExplorerPlugin::runProjectImpl(Project *pro)
             d->m_buildManager->buildProjects(projects, configurations(projects));
         }
     } else {
-        executeRunConfiguration(pro->activeRunConfiguration(), ProjectExplorer::Constants::RUNMODE);
+        // TODO this ignores RunConfiguration::isEnabled()
+        if (saveModifiedFiles())
+            executeRunConfiguration(pro->activeRunConfiguration(), ProjectExplorer::Constants::RUNMODE);
     }
 }
 
@@ -1579,7 +1581,9 @@ void ProjectExplorerPlugin::debugProject()
             updateRunAction();
         }
     } else {
-        executeRunConfiguration(pro->activeRunConfiguration(), ProjectExplorer::Constants::DEBUGMODE);
+        // TODO this ignores RunConfiguration::isEnabled()
+        if (saveModifiedFiles())
+            executeRunConfiguration(pro->activeRunConfiguration(), ProjectExplorer::Constants::DEBUGMODE);
     }
 }
 
-- 
GitLab