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:
Qt Continuous Integration System 2011-05-10 18:17:06 +10:00
commit d0343621a3
6 changed files with 9 additions and 11 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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)

View File

@ -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;

View File

@ -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()) {

View File

@ -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;