Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging: Remove const from QPlatformClipboard::mimeData().
This commit is contained in:
commit
d0343621a3
@ -83,7 +83,7 @@ QPlatformClipboard::~QPlatformClipboard()
|
||||
|
||||
}
|
||||
|
||||
const QMimeData *QPlatformClipboard::mimeData(QClipboard::Mode mode) const
|
||||
QMimeData *QPlatformClipboard::mimeData(QClipboard::Mode mode)
|
||||
{
|
||||
//we know its clipboard
|
||||
Q_UNUSED(mode);
|
||||
|
@ -59,7 +59,7 @@ class Q_GUI_EXPORT QPlatformClipboard
|
||||
public:
|
||||
virtual ~QPlatformClipboard();
|
||||
|
||||
virtual const QMimeData *mimeData(QClipboard::Mode mode = QClipboard::Clipboard ) const;
|
||||
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;
|
||||
void emitChanged(QClipboard::Mode mode);
|
||||
|
@ -217,7 +217,7 @@ QVariant QWaylandClipboard::retrieveData(const QString &mimeType, QVariant::Type
|
||||
return content;
|
||||
}
|
||||
|
||||
const QMimeData *QWaylandClipboard::mimeData(QClipboard::Mode mode) const
|
||||
QMimeData *QWaylandClipboard::mimeData(QClipboard::Mode mode)
|
||||
{
|
||||
Q_ASSERT(mode == QClipboard::Clipboard);
|
||||
if (!mMimeDataIn)
|
||||
|
@ -57,7 +57,7 @@ public:
|
||||
QWaylandClipboard(QWaylandDisplay *display);
|
||||
~QWaylandClipboard();
|
||||
|
||||
const QMimeData *mimeData(QClipboard::Mode mode = QClipboard::Clipboard) const;
|
||||
QMimeData *mimeData(QClipboard::Mode mode = QClipboard::Clipboard);
|
||||
void setMimeData(QMimeData *data, QClipboard::Mode mode = QClipboard::Clipboard);
|
||||
bool supportsMode(QClipboard::Mode mode) const;
|
||||
|
||||
@ -81,7 +81,7 @@ private:
|
||||
|
||||
QWaylandDisplay *mDisplay;
|
||||
QWaylandSelection *mSelection;
|
||||
mutable QWaylandMimeData *mMimeDataIn;
|
||||
QWaylandMimeData *mMimeDataIn;
|
||||
QList<QWaylandSelection *> mSelections;
|
||||
QStringList mOfferedMimeTypes;
|
||||
struct wl_selection_offer *mOffer;
|
||||
|
@ -161,12 +161,11 @@ QXlibClipboard::QXlibClipboard(QXlibScreen *screen)
|
||||
{
|
||||
}
|
||||
|
||||
const QMimeData * QXlibClipboard::mimeData(QClipboard::Mode mode) const
|
||||
QMimeData * QXlibClipboard::mimeData(QClipboard::Mode mode)
|
||||
{
|
||||
if (mode == QClipboard::Clipboard) {
|
||||
if (!m_xClipboard) {
|
||||
QXlibClipboard *that = const_cast<QXlibClipboard *>(this);
|
||||
that->m_xClipboard = new QXlibClipboardMime(mode,that);
|
||||
m_xClipboard = new QXlibClipboardMime(mode, this);
|
||||
}
|
||||
Window clipboardOwner = XGetSelectionOwner(screen()->display()->nativeDisplay(),QXlibStatic::atom(QXlibStatic::CLIPBOARD));
|
||||
if (clipboardOwner == owner()) {
|
||||
@ -176,8 +175,7 @@ const QMimeData * QXlibClipboard::mimeData(QClipboard::Mode mode) const
|
||||
}
|
||||
} else if (mode == QClipboard::Selection) {
|
||||
if (!m_xSelection) {
|
||||
QXlibClipboard *that = const_cast<QXlibClipboard *>(this);
|
||||
that->m_xSelection = new QXlibClipboardMime(mode,that);
|
||||
m_xSelection = new QXlibClipboardMime(mode, this);
|
||||
}
|
||||
Window clipboardOwner = XGetSelectionOwner(screen()->display()->nativeDisplay(),XA_PRIMARY);
|
||||
if (clipboardOwner == owner()) {
|
||||
|
@ -51,7 +51,7 @@ class QXlibClipboard : public QPlatformClipboard
|
||||
public:
|
||||
QXlibClipboard(QXlibScreen *screen);
|
||||
|
||||
const QMimeData *mimeData(QClipboard::Mode mode) const;
|
||||
QMimeData *mimeData(QClipboard::Mode mode);
|
||||
void setMimeData(QMimeData *data, QClipboard::Mode mode);
|
||||
|
||||
bool supportsMode(QClipboard::Mode mode) const;
|
||||
|
Loading…
Reference in New Issue
Block a user