From 63017136a1a6625c3528f9b237468a55b7fab12c Mon Sep 17 00:00:00 2001 From: Debao Zhang Date: Fri, 24 Feb 2012 10:51:18 -0800 Subject: QClipboard: Fix autotest fails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Samuel Rødal --- src/plugins/platforms/windows/qwindowsclipboard.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/plugins/platforms/windows/qwindowsclipboard.cpp') diff --git a/src/plugins/platforms/windows/qwindowsclipboard.cpp b/src/plugins/platforms/windows/qwindowsclipboard.cpp index 4f083e93d2..cd555d71a1 100644 --- a/src/plugins/platforms/windows/qwindowsclipboard.cpp +++ b/src/plugins/platforms/windows/qwindowsclipboard.cpp @@ -287,8 +287,7 @@ bool QWindowsClipboard::clipboardViewerWndProc(HWND hwnd, UINT message, WPARAM w const bool owned = ownsClipboard(); if (QWindowsContext::verboseOLE) qDebug("Clipboard changed owned %d", owned); - if (!owned) // changed is emitted by QClipboard in that case. - emitChanged(QClipboard::Clipboard); + emitChanged(QClipboard::Clipboard); // clean up the clipboard object if we no longer own the clipboard if (!owned && m_data) releaseIData(); -- cgit v1.2.3