Changeset 997
- Timestamp:
- Aug 17, 2011, 4:45:20 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/qmake/generators/os2/gnumake.cpp
r996 r997 73 73 QString ret = path; 74 74 // we assume that make variables contain paths already properly escaped 75 if (!path.contains(QRegExp("\\$\\(([^$)]+)\\)"))) { 75 if (!ret.isEmpty() && !ret.contains(QRegExp("\\$\\(([^$)]+)\\)"))) { 76 ret = unescapeFilePath(ret); 76 77 if (!isDosLikeShell()) { 77 ret.remove('\"');78 78 ret.replace('\\', '/'); 79 79 ret.replace(' ', "\\ "); 80 80 } else { 81 ret.replace(QRegExp("\""), "");82 81 ret.replace('/', '\\'); 83 if (ret.contains(QRegExp("[ +&;%]"))) 82 // Note: also quote paths ending with the backslash to avoid 83 // interpreting it as a linebreak 84 if (ret.contains(QRegExp("[ +&;%]")) || ret.endsWith('\\')) 84 85 ret = quote + ret + quote; 85 86 } … … 96 97 // it at runtime. 97 98 QString ret = path; 98 bool matched = false; 99 if (path.contains("$(")) 100 ret = escapeFileVars(path, &matched); 101 if (!matched) { 102 // didn't find variable references, do plain escaping 103 ret.remove('\"'); 104 ret.replace(' ', "\\ "); 105 // and we still want to normalize slashes as this is what we do in 106 // other places (e.g. .cpp targets); this function will do it for 107 // QMAKE_EXTRA_TARGETS as well 108 if (!isDosLikeShell()) 109 ret.replace('\\', '/'); 110 else 111 ret.replace('/', '\\'); 99 if (!ret.isEmpty()) { 100 bool matched = false; 101 if (path.contains("$(")) 102 ret = escapeFileVars(path, &matched); 103 if (!matched) { 104 // didn't find variable references, do plain escaping 105 ret = unescapeFilePath(ret); 106 ret.replace(' ', "\\ "); 107 // and we still want to normalize slashes as this is what we do in 108 // other places (e.g. .cpp targets); this function will do it for 109 // QMAKE_EXTRA_TARGETS as well 110 if (!isDosLikeShell()) 111 ret.replace('\\', '/'); 112 else 113 ret.replace('/', '\\'); 114 } 112 115 } 113 116 return ret;
Note:
See TracChangeset
for help on using the changeset viewer.