diff --git a/src/gui/kernel/qclipboard_qpa.cpp b/src/gui/kernel/qclipboard_qpa.cpp index cbff593d7c..737b2131c0 100644 --- a/src/gui/kernel/qclipboard_qpa.cpp +++ b/src/gui/kernel/qclipboard_qpa.cpp @@ -53,7 +53,7 @@ QT_USE_NAMESPACE void QClipboard::clear(Mode mode) { - setMimeData(0,mode); + setMimeData(0, mode); } @@ -87,9 +87,8 @@ bool QClipboard::supportsMode(Mode mode) const bool QClipboard::ownsMode(Mode mode) const { - if (mode == Clipboard) - qWarning("QClipboard::ownsClipboard: UNIMPLEMENTED!"); - return false; + QPlatformClipboard *clipboard = QGuiApplicationPrivate::platformIntegration()->clipboard(); + return clipboard->ownsMode(mode); } void QClipboard::connectNotify( const char * ) diff --git a/src/gui/kernel/qplatformclipboard_qpa.cpp b/src/gui/kernel/qplatformclipboard_qpa.cpp index c38b62e913..454ee56bfa 100644 --- a/src/gui/kernel/qplatformclipboard_qpa.cpp +++ b/src/gui/kernel/qplatformclipboard_qpa.cpp @@ -102,6 +102,11 @@ bool QPlatformClipboard::supportsMode(QClipboard::Mode mode) const return mode == QClipboard::Clipboard; } +bool QPlatformClipboard::ownsMode(QClipboard::Mode mode) const +{ + return false; +} + void QPlatformClipboard::emitChanged(QClipboard::Mode mode) { QGuiApplication::clipboard()->emitChanged(mode); diff --git a/src/gui/kernel/qplatformclipboard_qpa.h b/src/gui/kernel/qplatformclipboard_qpa.h index 6a40fbc86c..fc0505b87e 100644 --- a/src/gui/kernel/qplatformclipboard_qpa.h +++ b/src/gui/kernel/qplatformclipboard_qpa.h @@ -62,6 +62,7 @@ public: virtual QMimeData *mimeData(QClipboard::Mode mode = QClipboard::Clipboard); virtual void setMimeData(QMimeData *data, QClipboard::Mode mode = QClipboard::Clipboard); virtual bool supportsMode(QClipboard::Mode mode) const; + virtual bool ownsMode(QClipboard::Mode mode) const; void emitChanged(QClipboard::Mode mode); };