OSDN Git Service

Use absolute path for xterm on Mac and remove unused file.
authorEike Ziller <eike.ziller@nokia.com>
Tue, 27 Sep 2011 14:18:29 +0000 (16:18 +0200)
committerEike Ziller <eike.ziller@nokia.com>
Tue, 27 Sep 2011 15:42:00 +0000 (17:42 +0200)
xterm is (no longer?) in the PATH on Mac, so we need to point to it
directly.

Task-number: QTCREATORBUG-6150
Change-Id: I84202d0ebac1b8875c890116cce960898f65e5f9
Reviewed-on: http://codereview.qt-project.org/5303
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
share/qtcreator/runInTerminal.command [deleted file]
src/libs/utils/consoleprocess_unix.cpp

diff --git a/share/qtcreator/runInTerminal.command b/share/qtcreator/runInTerminal.command
deleted file mode 100755 (executable)
index 3cc5baa..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#! /bin/bash
-
-### FIXME:
-# - currentTab and geometry stuff does not work with macX 10.4 (tiger)
-# - -async is always in effect, i.e., synchronous execution is not implemented
-
-geom=
-async=
-while test -n "$1"; do
-    case $1 in
-    -async)
-        async=1
-        shift;;
-    -geom)
-        shift
-        w=${1%%x*}
-        y=${1#*x}
-        h=${y%%+*}
-        y=${y#*+}
-        x=${y%%+*}
-        y=${y#*+}
-        geom="\
-        set number of columns of currentTab to $w
-        set number of rows of currentTab to $h
-        set position of windows whose tabs contains currentTab to {$x, $y}"
-        shift;;
-    -e)
-        shift
-        break;;
-    *)
-        echo "Invalid call" >&2
-        exit 1;;
-    esac
-done
-args=
-for i in "$@"; do
-    i=${i//\\/\\\\\\\\}
-    i=${i//\"/\\\\\\\"}
-    i=${i//\$/\\\\\\\$}
-    i=${i//\`/\\\\\\\`}
-    args="$args \\\"$i\\\""
-done
-osascript <<EOF
-    tell application "Terminal"
-        do script "$args; exit"
-        set currentTab to the result
-$geom
-        activate
-    end tell
-EOF
index b5e896b..6ae0d62 100644 (file)
@@ -281,10 +281,8 @@ void ConsoleProcess::stubExited()
 
 QString ConsoleProcess::defaultTerminalEmulator()
 {
-// FIXME: enable this once runInTerminal works nicely
-#if 0 //def Q_OS_MAC
-    return QDir::cleanPath(QCoreApplication::applicationDirPath()
-                           + QLatin1String("/../Resources/runInTerminal.command"));
+#ifdef Q_OS_MAC
+    return QLatin1String("/usr/X11/bin/xterm");
 #else
     return QLatin1String("xterm");
 #endif