From 7ed3e0085331e911b231d26c58a4e09e0e7aeffb Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 21 Jun 2010 11:09:29 +0200 Subject: fix issue wrt posted events on Windows CE GetQueueStatus(QS_TIMER) is unreliable if the application has a menu on Windows CE. This patch uses PeekMessage(WM_TIMER) instead. Task-number: QTBUG-10714 Reviewed-by: bhughes --- src/corelib/kernel/qeventdispatcher_win.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp index cede810..e3f537f 100644 --- a/src/corelib/kernel/qeventdispatcher_win.cpp +++ b/src/corelib/kernel/qeventdispatcher_win.cpp @@ -516,8 +516,12 @@ LRESULT QT_WIN_CALLBACK qt_GetMessageHook(int code, WPARAM wp, LPARAM lp) if (q) { QEventDispatcherWin32Private *d = q->d_func(); int localSerialNumber = d->serialNumber; +#ifdef Q_OS_WINCE + MSG dummyMsg; + if (HIWORD(GetQueueStatus(QS_INPUT)) == 0 + && PeekMessage(&dummyMsg, 0, WM_TIMER, WM_TIMER, PM_NOREMOVE) == 0 +#else if (HIWORD(GetQueueStatus(QS_INPUT | QS_RAWINPUT | QS_TIMER)) == 0 -#ifndef Q_OS_WINCE || GetMessageTime() - d->lastMessageTime >= 10 #endif ) { -- cgit v0.12 From 57fcc060fdce0874309ec94bb7ab77b44554e91b Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Mon, 21 Jun 2010 11:59:41 +0200 Subject: Fix crash at exit and out of bounds write MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-11542, QTBUG-11196 Reviewed-by: Jørgen --- src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp b/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp index f5ad70c..e0a365b 100644 --- a/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp +++ b/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp @@ -1481,7 +1481,7 @@ void QVNCServer::convertPixels(char *dst, const char *src, int count) const } if (count & 0x1) { const quint16 *src16 = reinterpret_cast(src); - dst32[count - 1] = qt_conv16ToRgb(src16[count - 1]); + *dst32 = qt_conv16ToRgb(src16[count - 1]); } return; #endif @@ -2038,7 +2038,7 @@ void QVNCServer::discardClient() delete qvnc_cursor; qvnc_cursor = 0; #endif - if (!qvnc_screen->screen() && !qvnc_screen->d_ptr->noDisablePainting) + if (!qvnc_screen->screen() && !qvnc_screen->d_ptr->noDisablePainting && QWSServer::instance()) QWSServer::instance()->enablePainting(false); } -- cgit v0.12 From 71b840ef81a91605beecbb3cccfa0f85c3289e19 Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Mon, 21 Jun 2010 13:56:58 +0200 Subject: Fix crash with large ClientCutMessage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Don't try to read the text length more than once. Task-number: QTBUG-9977 Reviewed-by: Jørgen --- src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp b/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp index e0a365b..3bafd97 100644 --- a/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp +++ b/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp @@ -1053,7 +1053,7 @@ void QVNCServer::clientCutText() { QRfbClientCutText ev; - if (ev.read(client)) { + if (cutTextPending == 0 && ev.read(client)) { cutTextPending = ev.length; if (!cutTextPending) handleMsg = false; -- cgit v0.12 From 6189929e49a36b447fd3fe8372a10eaf6023272d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Mon, 21 Jun 2010 14:55:17 +0200 Subject: Compiler warnings. Reviewed-by: jbarron --- src/gui/painting/qgraphicssystem_runtime_p.h | 2 +- src/gui/painting/qoutlinemapper_p.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/painting/qgraphicssystem_runtime_p.h b/src/gui/painting/qgraphicssystem_runtime_p.h index 445f83d..101a8e7 100644 --- a/src/gui/painting/qgraphicssystem_runtime_p.h +++ b/src/gui/painting/qgraphicssystem_runtime_p.h @@ -170,7 +170,7 @@ public: int windowSurfaceDestroyPolicy() const { return m_windowSurfaceDestroyPolicy; } - int memoryUsage() const { return m_memoryUsage; } + uint memoryUsage() const { return m_memoryUsage; } private: diff --git a/src/gui/painting/qoutlinemapper_p.h b/src/gui/painting/qoutlinemapper_p.h index f64d03b..d534f76 100644 --- a/src/gui/painting/qoutlinemapper_p.h +++ b/src/gui/painting/qoutlinemapper_p.h @@ -95,8 +95,8 @@ public: m_tags(0), m_contours(0), m_polygon_dev(0), - m_round_coords(false), - m_in_clip_elements(false) + m_in_clip_elements(false), + m_round_coords(false) { } -- cgit v0.12 From 32e532743dc6243612ade017e8c326ca0e7e0dec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Mon, 21 Jun 2010 15:01:47 +0200 Subject: Compiler warnings (unused variables). --- src/declarative/graphicsitems/qdeclarativeanchors.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeanchors.cpp b/src/declarative/graphicsitems/qdeclarativeanchors.cpp index 6796977..7ac2b17 100644 --- a/src/declarative/graphicsitems/qdeclarativeanchors.cpp +++ b/src/declarative/graphicsitems/qdeclarativeanchors.cpp @@ -213,15 +213,12 @@ void QDeclarativeAnchorsPrivate::centerInChanged() if (updatingCenterIn < 2) { ++updatingCenterIn; - QGraphicsItemPrivate *itemPrivate = QGraphicsItemPrivate::get(item); if (centerIn == item->parentItem()) { - QGraphicsItemPrivate *parentPrivate = QGraphicsItemPrivate::get(item->parentItem()); QPointF p(hcenter(item->parentItem()) - hcenter(item) + hCenterOffset, vcenter(item->parentItem()) - vcenter(item) + vCenterOffset); setItemPos(p); } else if (centerIn->parentItem() == item->parentItem()) { - QGraphicsItemPrivate *centerPrivate = QGraphicsItemPrivate::get(centerIn); QPointF p(centerIn->x() + hcenter(centerIn) - hcenter(item) + hCenterOffset, centerIn->y() + vcenter(centerIn) - vcenter(item) + vCenterOffset); setItemPos(p); -- cgit v0.12