manuskript/manuskript
Jan Wester d626d3ba75 Fixed & robustified image tooltips (issue #593)
Last time I touched this code, I went in looking for a specific problem,
and came out with a fix specific to that issue. That fix was not wrong,
yet it hardly covered all the problems present in the code once one took
into account issues like:

- local vs remote resources,
- relative vs absolute paths,
- different operating systems behaving differently, and
- Qt being uniquely buggy on different platforms.

The major part of it was fixed by using QUrl.fromUserInput(), which does
the exact kind of auto-detection for the nature of the resource that we
were in need of.

The rest of the issues were fixed by creating a number of test cases and
fixing problems as they popped up. Testing was done in Windows & Ubunty
against the above-mentioned test cases, which can be found in PR #629.

Regarding ImageTooltip.supportedSchemes

When QUrl.fromUserInput() misidentifies the scheme on Linux, it causes
all resemblance between the original request and the reply.request() in
the finished() signal to be lost, which results in this item getting
stuck in the ImageTooltip processing pipeline.

Limiting the supported schemes to the ones most commonly encountered
('file', 'http', 'https' and the schema-less local paths) is the only
reliable method I have found to work around this particular bug in Qt.
2019-09-10 11:30:35 -06:00
..
converters Fix typos in code comments, invisible to end-users. 2018-01-29 10:30:41 -07:00
exporter Do not try to export after dismissing the dialog 2019-09-07 15:59:45 -06:00
functions Fixed crash for pre-Qt5.6 2019-09-07 15:59:45 -06:00
importer Fix crash if using a custom pandoc installation 2019-05-20 09:39:45 -06:00
load_save Fixed race when closing an auto-saving project. 2019-08-12 10:35:07 -06:00
models Fix crash if invalid character is inserted into the text. 2019-05-21 09:52:18 -06:00
tests Fix pytest warning about duplicate name when running tests 2018-11-16 12:52:09 -07:00
ui Fixed & robustified image tooltips (issue #593) 2019-09-10 11:30:35 -06:00
__init__.py Renaming source folder 2016-02-06 08:38:33 +01:00
enums.py Checkpoint in refactoring outlineItem 2017-11-17 12:16:39 +01:00
loadSave.py Ensure text file open methods use utf-8 encoding 2019-02-27 09:30:16 -07:00
main.py Basic dark theme support (Windows 10) 2019-09-10 10:15:54 -06:00
mainWindow.py Do not prompt "Save project?" when _Save on quit_ setting enabled 2019-08-22 15:18:18 -06:00
settings.py Rename setting "Save on quit" to "Save on project close" 2019-08-22 15:18:18 -06:00
settingsWindow.py Add new language translations to the Settings window 2019-07-14 10:11:52 -06:00
version.py ========== manuskript-0.9.0 ========== 2019-04-04 10:34:25 -06:00