Code review comment for lp:~dandrader/qtmir/content-hub-clipboard

Revision history for this message
Gerry Boland (gerboland) wrote :

+Clipboard::Clipboard()
+{
+ mMimeData.reset(new QMimeData);
This is nicer:
+Clipboard::Clipboard()
+ : mMimeData(new QMimeData);

+void Clipboard::setMimeData(QMimeData* mimeData, QClipboard::Mode mode)
+ QDBusPendingCall reply = mContentHub->createPaste(*mimeData);
+
+ // Don't care whether it succeeded
+ auto *watcher = new QDBusPendingCallWatcher(reply, this);
+ connect(watcher, &QDBusPendingCallWatcher::finished,
+ watcher, &QObject::deleteLater);
if you don't care, why do you do this at all? I would think just calling createPaste and throwing away the returned QDBusPendingCall is enough.

Rest looks good though

« Back to merge proposal