| 56 | } |
| 57 | |
| 58 | void PathLineEdit::setPath(const QString& path) |
| 59 | { |
| 60 | QString finalPath(path); |
| 61 | if (!path.isEmpty() && m_defaultDir.exists()) |
| 62 | { |
| 63 | QString tmp = m_defaultDir.relativeFilePath(path); |
| 64 | if (!tmp.startsWith("..")) |
| 65 | finalPath = tmp; |
| 66 | } |
| 67 | |
| 68 | if (!finalPath.isEmpty()) |
| 69 | setText(finalPath); |
| 70 | } |
| 71 | |
| 72 | void PathLineEdit::browse() |
| 73 | { |
no test coverage detected