From bd676c15a0d862ddf6d35636b5d673f13329b972 Mon Sep 17 00:00:00 2001 From: Scott Klum Date: Mon, 9 Mar 2015 13:56:27 -0400 Subject: [PATCH] Added some explation for the use of QUrl::fromUserInput --- openbr/plugins/gallery/binary.cpp | 3 +++ 1 file changed, 3 insertions(+), 0 deletions(-) diff --git a/openbr/plugins/gallery/binary.cpp b/openbr/plugins/gallery/binary.cpp index e66bea8..b92c4d0 100644 --- a/openbr/plugins/gallery/binary.cpp +++ b/openbr/plugins/gallery/binary.cpp @@ -286,6 +286,9 @@ class utGallery : public BinaryGallery qFatal("Expected 16-byte ImageID, got: %d bytes.", imageID.size()); const int32_t algorithmID = (t.isEmpty() || t.file.fte) ? 0 : t.file.get("AlgorithmID"); + + // QUrl::fromUserInput provides some nice functionality in terms of completing URLs + // e.g. C:/test.jpg -> file://C:/test.jpg and google.com/image.jpg -> http://google.com/image.jpg const QByteArray url = QUrl::fromUserInput(t.file.get("URL", t.file.name)).toEncoded(); int32_t x = 0, y = 0; -- libgit2 0.21.4