QtPass 2.0.0
Developer documentation
Loading...
Searching...
No Matches
clipboardmanager.h File Reference

ClipboardManager, which puts secrets on the clipboard and removes them again, and the MIME data that marks them as secrets. More...

#include <QMimeData>
#include <QObject>
#include <QString>
#include <QStringList>
#include <QTimer>
#include <optional>
Include dependency graph for clipboardmanager.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ClipboardManager
 Puts secrets on the system clipboard and takes them off again. More...

Functions

auto buildClipboardMimeData (const QString &text) -> QMimeData *
 Build clipboard MIME data with platform-specific security hints.
static auto dwordBytes (quint32 value) -> QByteArray
 Convert quint32 to byte array for Windows clipboard formats.

Detailed Description

ClipboardManager, which puts secrets on the clipboard and removes them again, and the MIME data that marks them as secrets.

Definition in file clipboardmanager.h.

Function Documentation

◆ buildClipboardMimeData()

auto buildClipboardMimeData ( const QString & text) -> QMimeData *

Build clipboard MIME data with platform-specific security hints.

Parameters
text- Plain text to copy
Returns
QMimeData* - Ownership transferred to caller. Caller must delete or transfer to QClipboard::setMimeData which takes ownership.

Definition at line 190 of file clipboardmanager.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dwordBytes()

auto dwordBytes ( quint32 value) -> QByteArray
inlinestatic

Convert quint32 to byte array for Windows clipboard formats.

Parameters
value- DWORD value
Returns
QByteArray with raw bytes

Definition at line 31 of file clipboardmanager.h.