Add a platform API for QClipboard::ownsMode()
Simply forward ownsMode() to the QPlatformClipboard.
This commit is contained in:
parent
672fe5d43c
commit
fc266713cc
@ -87,9 +87,8 @@ bool QClipboard::supportsMode(Mode mode) const
|
|||||||
|
|
||||||
bool QClipboard::ownsMode(Mode mode) const
|
bool QClipboard::ownsMode(Mode mode) const
|
||||||
{
|
{
|
||||||
if (mode == Clipboard)
|
QPlatformClipboard *clipboard = QGuiApplicationPrivate::platformIntegration()->clipboard();
|
||||||
qWarning("QClipboard::ownsClipboard: UNIMPLEMENTED!");
|
return clipboard->ownsMode(mode);
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QClipboard::connectNotify( const char * )
|
void QClipboard::connectNotify( const char * )
|
||||||
|
@ -102,6 +102,11 @@ bool QPlatformClipboard::supportsMode(QClipboard::Mode mode) const
|
|||||||
return mode == QClipboard::Clipboard;
|
return mode == QClipboard::Clipboard;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool QPlatformClipboard::ownsMode(QClipboard::Mode mode) const
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void QPlatformClipboard::emitChanged(QClipboard::Mode mode)
|
void QPlatformClipboard::emitChanged(QClipboard::Mode mode)
|
||||||
{
|
{
|
||||||
QGuiApplication::clipboard()->emitChanged(mode);
|
QGuiApplication::clipboard()->emitChanged(mode);
|
||||||
|
@ -62,6 +62,7 @@ public:
|
|||||||
virtual QMimeData *mimeData(QClipboard::Mode mode = QClipboard::Clipboard);
|
virtual QMimeData *mimeData(QClipboard::Mode mode = QClipboard::Clipboard);
|
||||||
virtual void setMimeData(QMimeData *data, QClipboard::Mode mode = QClipboard::Clipboard);
|
virtual void setMimeData(QMimeData *data, QClipboard::Mode mode = QClipboard::Clipboard);
|
||||||
virtual bool supportsMode(QClipboard::Mode mode) const;
|
virtual bool supportsMode(QClipboard::Mode mode) const;
|
||||||
|
virtual bool ownsMode(QClipboard::Mode mode) const;
|
||||||
void emitChanged(QClipboard::Mode mode);
|
void emitChanged(QClipboard::Mode mode);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user