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

Windows: Suggest to implement fallback for clipboard (text) should OleInitialize fail due to different COM thread apartment mode or similar

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4: Low
    • None
    • 4.7.4, 5.3.1
    • None

    Description

      I have large application which initialized COM with multithreaded appartment model. In this case the clipboard operations (both programmatically and from widgets) doesn't work in qt.
      I have made a simple example to illustrate the problem based on example for QTBUG-7689. It outputs following errors:
      Qt: Could not initialize OLE (error 80010106)
      QClipboard::setMimeData: Failed to set data on clipboard ()

      I understand that Qt cannot initialize OLE properly but I believe that Qt have to use native WinAPI to work with clipboard in such case. I think it may be done for plain text only because it will be enough in the most cases.

      So my request is to add support to insert plain text into Windows Clipboard using WinAPI in the case when Qt fails to initialize OLE.

      Attachments

        1. clipboard.zip
          0.8 kB
        2. clipboard.patch
          2 kB

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              kleint Friedemann Kleint
              nikolaynnov Andrey
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes