Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.8.0
-
None
Description
A call of functionQClipboard::text as immediate response to a signal QClipboard::changed causes frequently the warning 'Retrying to obtain clipboard'. I found the following code in qwindowsclipboard.cpp:
IDataObject *QWindowsClipboardRetrievalMimeData::retrieveDataObject() const { enum : int { attempts = 3 }; IDataObject * pDataObj = nullptr; // QTBUG-53979, retry in case the other application has clipboard locked for (int i = 1; i <= attempts; ++i) { if (SUCCEEDED(OleGetClipboard(&pDataObj))) { if (QWindowsContext::verbose > 1) qCDebug(lcQpaMime) << __FUNCTION__ << pDataObj; return pDataObj; } qCWarning(lcQpaMime, i == attempts ? "Unable to obtain clipboard." : "Retrying to obtain clipboard."); QThread::msleep(50); } return nullptr; }
Possible fix: Issue only the warning 'Unable to obtain clipboard'.
The bug is obviously related to QTBUG-53979 and possibly to QTBUG-27097.