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

fix: extend/fix DND and clipboard image operations #10975

Merged
merged 6 commits into from
Jun 8, 2023

Commits on Jun 8, 2023

  1. fix(QClipboardProxy): use more reliable clipboard/DND checks

    - getFileSize: NIM version would crash on non-existing or remote files
    - isValidImageUrl: properly detect file extensions when the URL contains
    a query (eg "file.jpeg?width=1000&height=600")
    caybro committed Jun 8, 2023
    Configuration menu
    Copy the full SHA
    00e94d7 View commit details
    Browse the repository at this point in the history
  2. fix(Utils): use the more robust QClipboardProxy checks

    - when verifying whether an image has a suitable size or extension
    caybro committed Jun 8, 2023
    Configuration menu
    Copy the full SHA
    1778734 View commit details
    Browse the repository at this point in the history
  3. fix(DOS): fix the "image_resizer" to accept both paths and blobs

    - accept both the blob (`data:image/jpeg;base64` payload) or a path/URL
    to a local file
    - remove the usage of QPixmap, QImage is enough and more suitable for
    save/load and resizing as well
    - remove usage of an extra file when saving
    caybro committed Jun 8, 2023
    Configuration menu
    Copy the full SHA
    e29a6e9 View commit details
    Browse the repository at this point in the history
  4. fix(sendImages): also work for remote URLs

    - when the user drops a remote URL (e.g. from a webbrowser), detect it
    and download it before passing onto the "image_resizer"
    - since the "dos_image_resizer" now handles both data and URLs, we can
    simply forward the `imageUrl` to it
    - detect an invalid (empty) result from "dos_image_resizer" and don't
    try to send such an image
    caybro committed Jun 8, 2023
    Configuration menu
    Copy the full SHA
    16535ef View commit details
    Browse the repository at this point in the history
  5. fix(StatusChatInput): handle non standard DND MIME types

    - most browsers will pass a standard `text/uri-list` MIME type, however
    Chrome uses `text/x-moz-url` so we handle that separately
    (`drop.hasUrls` is `false` in this case)
    caybro committed Jun 8, 2023
    Configuration menu
    Copy the full SHA
    ca26330 View commit details
    Browse the repository at this point in the history
  6. fix(e2e): resolve dynlib OpenSSL issues

    by explicitely specifying `-d:useOpenssl3`
    
    cf #9428 (comment)
    caybro committed Jun 8, 2023
    Configuration menu
    Copy the full SHA
    c5d5d1e View commit details
    Browse the repository at this point in the history