Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-55442

Very slow to access QClipboard MIME data

    XMLWordPrintable

Details

    • 730cbad8824bcfcb7ab60371a6563cfb6dd5658d (qt/qtbase/5.12)

    Description

      There must be a bug either in QClipboard or QMimeData, as the following line

      QApplication::clipboard()->mimeData()->data("text/plain");

      takes ridiculously a lot of time (>100ms when just a single text line, roughly 20 characters, is in the clipboard).

      I've uploaded an example project (just 3 files: main.cpp, QClipboardListener.h and QClipboardTest.pro). After building, run the application in a terminal, copy something into the clipboard and check the application output in the terminal, where it prints the time elapsed.

      This very same bug is present in software that uses Qt 5 such as Telegram Desktop, where you can experience how the entire UI stalls when you paste an image with Ctrl+V. I've seen the UI blocked for longer than 10 seconds when the image size is 1920x1080.

      Related to: https://bugreports.qt.io/browse/QTBUG-43497

      Attachments

        For Gerrit Dashboard: QTBUG-55442
        # Subject Branch Project Status CR V

        Activity

          People

            avolkov Alexander Volkov
            cristian64 Christian Aguilera
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes