| 81 | //Workaround for QUrl::toDisplayString/QUrl::toString behavior that does not fit KDiff3's expectations |
| 82 | [[nodiscard]] QString absoluteFilePath() const; |
| 83 | [[nodiscard]] static QString prettyAbsPath(const QUrl& url) |
| 84 | { |
| 85 | if(!isLocal(url)) return url.toDisplayString(); |
| 86 | |
| 87 | //work around for bad path in windows drop event urls. (Qt 5.15.2 affected) |
| 88 | const QString path = url.toLocalFile(); |
| 89 | if(!path.isEmpty() && !path.startsWith('/')) |
| 90 | return path; |
| 91 | |
| 92 | return QFileInfo(url.path()).absoluteFilePath(); |
| 93 | } |
| 94 | |
| 95 | //Workaround for QUrl::isLocalFile behavior that does not fit KDiff3's expectations. |
| 96 | [[nodiscard]] bool isLocal() const; |
nothing calls this directly
no test coverage detected