comparison common.cpp @ 178:1a3af8617ea4

* basic external editor selection (for hgignore)
author Chris Cannam
date Thu, 16 Dec 2010 22:11:38 +0000
parents b6dd1ee0e486
children 90e70a9024f3
comparison
equal deleted inserted replaced
177:bb89bcd8986b 178:1a3af8617ea4
46 { 46 {
47 bool found = false; 47 bool found = false;
48 if (name != "") { 48 if (name != "") {
49 if (name[0] != '/' 49 if (name[0] != '/'
50 #ifdef Q_OS_WIN32 50 #ifdef Q_OS_WIN32
51 && (QRegExp("^[a-zA-Z]:").indexIn(name) != 0) 51 && (QRegExp("^\\w:").indexIn(name) != 0)
52 #endif 52 #endif
53 ) { 53 ) {
54 #ifdef Q_OS_WIN32 54 #ifdef Q_OS_WIN32
55 QChar pathSep = ';'; 55 QChar pathSep = ';';
56 #else 56 #else
57 QChar pathSep = ':'; 57 QChar pathSep = ':';
58 #endif 58 #endif
66 << ", adding to system path" << endl; 66 << ", adding to system path" << endl;
67 //!!! path = path + pathSep + installPath; 67 //!!! path = path + pathSep + installPath;
68 path = installPath + pathSep + path; 68 path = installPath + pathSep + path;
69 } 69 }
70 #ifndef Q_OS_WIN32 70 #ifndef Q_OS_WIN32
71 //!!! 71 //!!!
72 path = path + ":/usr/local/bin"; 72 path = path + ":/usr/local/bin";
73 DEBUG << "... adding /usr/local/bin just in case (fix and add settings dlg please)" 73 DEBUG << "... adding /usr/local/bin just in case (fix and add settings dlg please)"
74 << endl; 74 << endl;
75 #endif 75 #endif
76 QStringList elements = path.split(pathSep, QString::SkipEmptyParts); 76 QStringList elements = path.split(pathSep, QString::SkipEmptyParts);