diff options
author | Rafael Roquetto <rafael.roquetto.qnx@kdab.com> | 2013-01-07 19:15:14 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-11 20:58:27 (GMT) |
commit | 5c49c33ab088a926577d3798ef90baac86e5794a (patch) | |
tree | 3595ae8e45d8b9d2d243f79269a54c9b5f1cf6a9 /src/plugins/platforms/blackberry | |
parent | e11bb8e02fa1f2f933784b9d6d6483c5547e5522 (diff) | |
download | Qt-5c49c33ab088a926577d3798ef90baac86e5794a.zip Qt-5c49c33ab088a926577d3798ef90baac86e5794a.tar.gz Qt-5c49c33ab088a926577d3798ef90baac86e5794a.tar.bz2 |
Fix Blackberry QPA plugin clipboard impl
QBBCliboard::setMimeData was not cleaning the system clipboard aproppriately
when m_mimeData != 0 but m_mimeData->userMimeData == 0, as it would return
early before the empty_clipboard() statement.
Also, we must not dataChanged() signal after the clipboard has been changed,
because this is done by the parent class.
cherry-picked from qt5/qtbase 0a977e36e06a69583d8e4edc27ca3df634c53404
Change-Id: I694490e26035d75c3c54e76c538982037c3ef799
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/plugins/platforms/blackberry')
-rw-r--r-- | src/plugins/platforms/blackberry/qbbclipboard.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/platforms/blackberry/qbbclipboard.cpp b/src/plugins/platforms/blackberry/qbbclipboard.cpp index e26b299..dbcee5a 100644 --- a/src/plugins/platforms/blackberry/qbbclipboard.cpp +++ b/src/plugins/platforms/blackberry/qbbclipboard.cpp @@ -190,7 +190,10 @@ void QBBClipboard::setMimeData(QMimeData *data, QClipboard::Mode mode) if (mode != QClipboard::Clipboard) return; - if (data == m_mimeData || data == m_mimeData->userMimeData()) + if (m_mimeData == data) + return; + + if (m_mimeData->userMimeData() && m_mimeData->userMimeData() == data) return; empty_clipboard(); @@ -220,7 +223,6 @@ void QBBClipboard::setMimeData(QMimeData *data, QClipboard::Mode mode) m_mimeData->addFormatToCheck(format); } - emitChanged(QClipboard::Clipboard); } QMimeData* QBBClipboard::mimeData(QClipboard::Mode mode) |