summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDebao Zhang <dbzhang800@gmail.com>2012-02-24 10:51:18 -0800
committerQt by Nokia <qt-info@nokia.com>2012-02-27 20:52:45 +0100
commit63017136a1a6625c3528f9b237468a55b7fab12c (patch)
tree399d8fd90b8f030befcc1f7788852ad24ded73f2 /src/gui
parente76d72aec544878d976423e2136e7787aba980ab (diff)
QClipboard: Fix autotest fails
tst_qclipboard.cpp still has Q_WS_WIN which must be clear away. After clean up, auto test will fail under windows: When setMimeData() is called, dataChanged() signal will be emited twice. The solution for QTBUG-24184 has partially solved the problem, but it still there. Make sure emitChanged() only called by QPlatformClipboard will give our more control for this. Task-number: QTBUG-24484 Change-Id: I23566c6d3b32828b6865234c311af3635fe9e299 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qclipboard_qpa.cpp2
-rw-r--r--src/gui/kernel/qplatformclipboard_qpa.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/kernel/qclipboard_qpa.cpp b/src/gui/kernel/qclipboard_qpa.cpp
index b33ccd42a2..0d97fdd0be 100644
--- a/src/gui/kernel/qclipboard_qpa.cpp
+++ b/src/gui/kernel/qclipboard_qpa.cpp
@@ -76,8 +76,6 @@ void QClipboard::setMimeData(QMimeData* src, Mode mode)
if (!clipboard->supportsMode(mode)) return;
clipboard->setMimeData(src,mode);
-
- emitChanged(mode);
}
bool QClipboard::supportsMode(Mode mode) const
diff --git a/src/gui/kernel/qplatformclipboard_qpa.cpp b/src/gui/kernel/qplatformclipboard_qpa.cpp
index 9e0c60b3f6..bc08a73a7f 100644
--- a/src/gui/kernel/qplatformclipboard_qpa.cpp
+++ b/src/gui/kernel/qplatformclipboard_qpa.cpp
@@ -96,6 +96,8 @@ void QPlatformClipboard::setMimeData(QMimeData *data, QClipboard::Mode mode)
//we know its clipboard
Q_UNUSED(mode);
q_clipboardData()->setSource(data);
+
+ emitChanged(mode);
}
bool QPlatformClipboard::supportsMode(QClipboard::Mode mode) const