changeset 177:bb89bcd8986b

* Fixes to external program location logic on Win32
author Chris Cannam
date Thu, 16 Dec 2010 20:23:43 +0000
parents a6ec8d0bdd34
children 1a3af8617ea4
files hgrunner.cpp mainwindow.cpp settingsdialog.cpp
diffstat 3 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/hgrunner.cpp	Thu Dec 16 18:00:12 2010 +0000
+++ b/hgrunner.cpp	Thu Dec 16 20:23:43 2010 +0000
@@ -369,11 +369,11 @@
 
     m_proc = new QProcess;
 
-    QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
-
-#ifdef Q_OS_WIN32
-    if (m_myDirPath != "") {
-        env.insert("PATH", m_myDirPath + ";" + env.value("PATH"));
+    QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
+
+#ifdef Q_OS_WIN32
+    if (m_myDirPath != "") {
+        env.insert("PATH", m_myDirPath + ";" + env.value("PATH"));
     }
 #endif
 
--- a/mainwindow.cpp	Thu Dec 16 18:00:12 2010 +0000
+++ b/mainwindow.cpp	Thu Dec 16 20:23:43 2010 +0000
@@ -411,7 +411,7 @@
         bool found = false;
         foreach (QString base, bases) {
             diff = findInPath(base, m_myDirPath, true);
-            if (diff != base) {
+            if (diff != base && diff != base + ".exe") {
                 found = true;
                 break;
             }
--- a/settingsdialog.cpp	Thu Dec 16 18:00:12 2010 +0000
+++ b/settingsdialog.cpp	Thu Dec 16 20:23:43 2010 +0000
@@ -17,6 +17,7 @@
 
 #include "settingsdialog.h"
 #include "common.h"
+#include "debug.h"
 
 #include <QGridLayout>
 #include <QGroupBox>
@@ -207,6 +208,7 @@
 void
 SettingsDialog::accept()
 {
+    DEBUG << "SettingsDialog::accept" << endl;
     QSettings settings;
     settings.beginGroup("User Information");
     settings.setValue("name", m_nameEdit->text());