1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-06-26 19:19:16 +02:00

Show track/route source file info when multiple files are opened

Closes #559
This commit is contained in:
2024-09-06 00:05:36 +02:00
parent 36f8f94f15
commit 649d972aec
56 changed files with 198 additions and 92 deletions

View File

@ -137,16 +137,14 @@ QString Util::displayName(const QString &path)
QUrl url(path);
// Not an Android URL, return standard filename.
if (url.scheme() != "content") {
QFileInfo fi(path);
return fi.fileName();
if (url.scheme() != "content")
return QFileInfo(path).fileName();
// Directory browsing URLs. Those can not be translated using the Android
// content resolver but we can get the filename from the URL path.
} else if (url.path().startsWith("/tree/")) {
QFileInfo fi(url.fileName());
return fi.fileName();
else if (url.path().startsWith("/tree/"))
return QFileInfo(url.fileName()).fileName();
// Translate all "regular" android URLs using the Android content resolver.
} else
else
return documentName(path);
#else
return path;