| 4463 | } |
| 4464 | |
| 4465 | CString WizDatabase::getLocationName(const CString& strLocation) |
| 4466 | { |
| 4467 | //FIXME:容错处理,如果路径的结尾不是 '/',则增加该结尾符号 |
| 4468 | QString strLoc = strLocation; |
| 4469 | if (strLoc.right(1) != "/") |
| 4470 | strLoc.append('/'); |
| 4471 | |
| 4472 | int index = strLoc.lastIndexOf('/', strLocation.length() - 2); |
| 4473 | if (index == -1) |
| 4474 | return CString(); |
| 4475 | |
| 4476 | CString str = strLoc.right(strLocation.length() - index - 1); |
| 4477 | |
| 4478 | str.trim('/'); |
| 4479 | |
| 4480 | return str; |
| 4481 | } |
| 4482 | |
| 4483 | CString WizDatabase::getLocationDisplayName(const CString& strLocation) |
| 4484 | { |
no test coverage detected