Skip to content

Comments

Fix relative Image sources#22

Open
stormc wants to merge 1 commit intoPeterwmoss:masterfrom
stormc:localimgsrc
Open

Fix relative Image sources#22
stormc wants to merge 1 commit intoPeterwmoss:masterfrom
stormc:localimgsrc

Conversation

@stormc
Copy link

@stormc stormc commented Mar 25, 2024

While ./img.src and /img.src are accounted for, ../img.src and img.src are not recognized as
local image sources and hence displayed as broken
image links.

To sidestep this problem, consider any image source not starting with http{,s}:// a local image source.

While `./img.src` and `/img.src` are accounted for,
`../img.src` and `img.src` are not recognized as
local image sources and hence displayed as broken
image links.

To sidestep this problem, consider any image source
not starting with http{,s}:// a local image source.

Signed-off-by: Christian Storm <storm@mailbox.org>
@stormc
Copy link
Author

stormc commented Mar 25, 2024

Note: As tested with qt 6.6.2, QFileInfo's absoluteFilePath() resolves to the fully qualified filename so there's no need to do the path assembly manually. Haven't checked older qt (5.x) versions though...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant