Utils: Introduce FilePath::displayName()

To produce "<filepath> on <devicename>" which is nicer to read than
"<scheme>://<deviceid>/<filepath>" in some places.

Change-Id: Ife47bbf49382cf73dd4709d826bdeaa8730f88be
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
hjk
2022-06-02 17:05:46 +02:00
parent 51aae3bb1f
commit 31f0ba4ef9
7 changed files with 39 additions and 2 deletions

View File

@@ -86,6 +86,7 @@ public:
std::function<Environment(const FilePath &)> environment;
std::function<qint64(const FilePath &)> fileSize;
std::function<qint64(const FilePath &)> bytesAvailable;
std::function<QString(const FilePath &)> deviceDisplayName;
template <class ...Args> using Continuation = std::function<void(Args...)>;
std::function<void(const Continuation<bool> &, const FilePath &, const FilePath &)> asyncCopyFile;