Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Further refinement of image tooltips (issue #593) #629

Merged
merged 1 commit into from
Sep 10, 2019

Commits on Sep 9, 2019

  1. Fixed & robustified image tooltips (issue olivierkes#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 olivierkes#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.
    worstje committed Sep 9, 2019
    Configuration menu
    Copy the full SHA
    797d7a5 View commit details
    Browse the repository at this point in the history