Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.6.2
-
None
Description
Problem
There are two ways to copy a URL in iOS. Either you mark the URL in the browser and select copy in the context menu or you directly press long on the URL.
The second way with long press, the clipboard is empty.
QClipboard *clipboard = QGuiApplication::clipboard(); QString originalText = clipboard->text(); auto mimeData = clipboard->mimeData(); qDebug() << "clipboard" << originalText; qDebug() << "clipboard.mimeData" << mimeData; qDebug() << "clipboard.mimeData.hasText" << mimeData->hasText(); qDebug() << "clipboard.mimeData.text" << mimeData->text(); qDebug() << "clipboard.mimeData.hasHtml" << mimeData->hasHtml(); qDebug() << "clipboard.mimeData.html" << mimeData->html(); qDebug() << "clipboard.mimeData.hasUrls" << mimeData->hasUrls(); qDebug() << "clipboard.mimeData.urls" << mimeData->urls(); qDebug() << "clipboard.mimeData.format" << mimeData->formats(); qDebug() << "clipboard.mimeData.hasImage" << mimeData->hasImage(); qDebug() << "clipboard.mimeData.image" << mimeData->imageData();
// Copied when text is marked [2024-06-05 09:24:04.643] [P1475] [T972670] [debug] [default] clipboard "https://www.wikipedia.org" [2024-06-05 09:24:04.643] [P1475] [T972670] [debug] [default] clipboard.mimeData QMimeData(0x302a6e120) [2024-06-05 09:24:04.646] [P1475] [T972670] [debug] [default] clipboard.mimeData.hasText true [2024-06-05 09:24:04.659] [P1475] [T972670] [debug] [default] clipboard.mimeData.text "https://www.wikipedia.org" [2024-06-05 09:24:04.662] [P1475] [T972670] [debug] [default] clipboard.mimeData.hasHtml false [2024-06-05 09:24:04.663] [P1475] [T972670] [debug] [default] clipboard.mimeData.html "" [2024-06-05 09:24:04.664] [P1475] [T972670] [debug] [default] clipboard.mimeData.hasUrls true [2024-06-05 09:24:04.674] [P1475] [T972670] [debug] [default] clipboard.mimeData.urls QList(QUrl("")) [2024-06-05 09:24:04.676] [P1475] [T972670] [debug] [default] clipboard.mimeData.format QList("text/plain", "text/uri-list") [2024-06-05 09:24:04.677] [P1475] [T972670] [debug] [default] clipboard.mimeData.hasImage false [2024-06-05 09:24:04.679] [P1475] [T972670] [debug] [default] clipboard.mimeData.image QVariant(Invalid) [2024-06-05 09:24:04.679] [P1475] [T972670] [debug] [default] clipboard.toUtf8 "https://www.wikipedia.org" // Copied when Url is long pressed (in browser, in my case safari) [2024-06-05 09:24:57.098] [P1477] [T973831] [debug] [default] clipboard "" [2024-06-05 09:24:57.099] [P1477] [T973831] [debug] [default] clipboard.mimeData QMimeData(0x3019e5f20) [2024-06-05 09:24:57.103] [P1477] [T973831] [debug] [default] clipboard.mimeData.hasText true [2024-06-05 09:24:57.118] [P1477] [T973831] [debug] [default] clipboard.mimeData.text "" [2024-06-05 09:24:57.119] [P1477] [T973831] [debug] [default] clipboard.mimeData.hasHtml false [2024-06-05 09:24:57.121] [P1477] [T973831] [debug] [default] clipboard.mimeData.html "" [2024-06-05 09:24:57.122] [P1477] [T973831] [debug] [default] clipboard.mimeData.hasUrls true [2024-06-05 09:24:57.131] [P1477] [T973831] [debug] [default] clipboard.mimeData.urls QList(QUrl("")) [2024-06-05 09:24:57.133] [P1477] [T973831] [debug] [default] clipboard.mimeData.format QList("text/uri-list") [2024-06-05 09:24:57.134] [P1477] [T973831] [debug] [default] clipboard.mimeData.hasImage false [2024-06-05 09:24:57.135] [P1477] [T973831] [debug] [default] clipboard.mimeData.image QVariant(Invalid) [2024-06-05 09:24:57.136] [P1477] [T973831] [debug] [default] clipboard.toUtf8 ""