Commit bd676c15a0d862ddf6d35636b5d673f13329b972
1 parent
9f3a5152
Added some explation for the use of QUrl::fromUserInput
Showing
1 changed file
with
3 additions
and
0 deletions
openbr/plugins/gallery/binary.cpp
| ... | ... | @@ -286,6 +286,9 @@ class utGallery : public BinaryGallery |
| 286 | 286 | qFatal("Expected 16-byte ImageID, got: %d bytes.", imageID.size()); |
| 287 | 287 | |
| 288 | 288 | const int32_t algorithmID = (t.isEmpty() || t.file.fte) ? 0 : t.file.get<int32_t>("AlgorithmID"); |
| 289 | + | |
| 290 | + // QUrl::fromUserInput provides some nice functionality in terms of completing URLs | |
| 291 | + // e.g. C:/test.jpg -> file://C:/test.jpg and google.com/image.jpg -> http://google.com/image.jpg | |
| 289 | 292 | const QByteArray url = QUrl::fromUserInput(t.file.get<QString>("URL", t.file.name)).toEncoded(); |
| 290 | 293 | |
| 291 | 294 | int32_t x = 0, y = 0; | ... | ... |