<table><tr><td style="">davidedmundson added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D12373">View Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>Storing such a 'text/confidential' string in the clipboard with mode 'QClipboard::Clipboard' works, and Klipper could handle it by not storing it in its history. But unfortunately the clipboard contents are of no use to any application. They check the clipboard with QMimeData::hasText(), which only returns true if there is data with a 'text/plain' mime type and retrieve data from clipboard by calling QClipboard::text(), which only returns 'text/plain' typed data.</p></blockquote>

<p>I didn't explain well.</p>

<p>mimeData is key value pairs, you can have many pieces of mimeData.</p>

<p>So we have text/plain     with the password as before<br />
and x-kde-passwordManagerHint   data   "secret"</p>

<p>We still use the text/plain mimeData for context, but klipper ignores entries where that other mimeData is present.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R120 Plasma Workspace</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D12373">https://phabricator.kde.org/D12373</a></div></div><br /><div><strong>To: </strong>hoffmannrobert<br /><strong>Cc: </strong>graesslin, broulik, davidedmundson, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>