changeset 217:18bac9a34d58

Merge
author Chris Cannam
date Wed, 05 Jan 2011 16:09:23 +0000
parents 27bfdc28541e (current diff) 90e70a9024f3 (diff)
children 12b2bd530bd6
files
diffstat 3 files changed, 9 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/common.cpp	Wed Jan 05 15:58:58 2011 +0000
+++ b/common.cpp	Wed Jan 05 16:09:23 2011 +0000
@@ -97,7 +97,11 @@
         }
     }
 #endif
-    return name;
+    if (found) {
+        return name;
+    } else {
+        return "";
+    }
 }
 
 #ifdef Q_OS_WIN32
--- a/hgrunner.cpp	Wed Jan 05 15:58:58 2011 +0000
+++ b/hgrunner.cpp	Wed Jan 05 16:09:23 2011 +0000
@@ -83,9 +83,6 @@
     extpath = unbundled;
     if (extpath == "") {
         extpath = findInPath("easyhg.py", m_myDirPath, false);
-        if (extpath == "easyhg.py") {
-            extpath = "";
-        }
     }
 
     settings.setValue("extensionpath", extpath);
@@ -186,7 +183,7 @@
     if (hg == "") {
         hg = findInPath("hg", m_myDirPath, true);
     }
-    if (hg != "hg") {
+    if (hg != "") {
         settings.setValue("hgbinary", hg);
     }
     return hg;
--- a/mainwindow.cpp	Wed Jan 05 15:58:58 2011 +0000
+++ b/mainwindow.cpp	Wed Jan 05 16:09:23 2011 +0000
@@ -512,7 +512,7 @@
         bool found = false;
         foreach (QString base, bases) {
             diff = findInPath(base, m_myDirPath, true);
-            if (diff != base && diff != base + ".exe") {
+            if (diff != "") {
                 found = true;
                 break;
             }
@@ -543,7 +543,7 @@
     bool found = false;
     foreach (QString base, bases) {
         merge = findInPath(base, m_myDirPath, true);
-        if (merge != base && merge != base + ".exe") {
+        if (merge != "") {
             found = true;
             break;
         }
@@ -577,7 +577,7 @@
         bool found = false;
         foreach (QString base, bases) {
             editor = findInPath(base, m_myDirPath, true);
-            if (editor != base && editor != base + ".exe") {
+            if (editor != "") {
                 found = true;
                 break;
             }