diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-03 21:55:22 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-03 21:55:22 (GMT) |
commit | a3e6d144cdf03e67b6533c34b450f950a8427372 (patch) | |
tree | fb25ac3369eb25daa6978fbbb57fc396930702e3 /src | |
parent | 9b3c0bfb17600afff73294f4e549e0629709cfe0 (diff) | |
parent | a4d7572059b5b56d49d7e0c3f3466686e1dc6e16 (diff) | |
download | Qt-a3e6d144cdf03e67b6533c34b450f950a8427372.zip Qt-a3e6d144cdf03e67b6533c34b450f950a8427372.tar.gz Qt-a3e6d144cdf03e67b6533c34b450f950a8427372.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
QVariant: Fix crash when comparing two variant with the same undefined type.
Fix compositing when QWS background is completely transparent.
Fixes wrong composition mode for cached backgrounds in Graphics View.
Support keypad input with vnc driver
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/kernel/qvariant.cpp | 3 | ||||
-rw-r--r-- | src/gui/embedded/qscreen_qws.cpp | 2 | ||||
-rw-r--r-- | src/gui/graphicsview/qgraphicsview.cpp | 6 | ||||
-rw-r--r-- | src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp | 34 |
4 files changed, 37 insertions, 8 deletions
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index e1b5825..95b2352 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -466,7 +466,8 @@ static bool compare(const QVariant::Private *a, const QVariant::Private *b) * QMetaType::VoidStar, QMetaType::QObjectStar and so forth, is that it wouldn't include * user defined pointer types. */ const char *const typeName = QMetaType::typeName(a->type); - if (typeName[qstrlen(typeName) - 1] == '*') + uint typeNameLen = qstrlen(typeName); + if (typeNameLen > 0 && typeName[typeNameLen - 1] == '*') return *static_cast<void *const *>(a_ptr) == *static_cast<void *const *>(b_ptr); return a_ptr == b_ptr; diff --git a/src/gui/embedded/qscreen_qws.cpp b/src/gui/embedded/qscreen_qws.cpp index 8eb8123..9bd73a4 100644 --- a/src/gui/embedded/qscreen_qws.cpp +++ b/src/gui/embedded/qscreen_qws.cpp @@ -2739,7 +2739,7 @@ void QScreen::compose(int level, const QRegion &exposed, QRegion &blend, default: break; } - spanData.setup(qwsServer->backgroundBrush(), 256, QPainter::CompositionMode_SourceOver); + spanData.setup(qwsServer->backgroundBrush(), 256, QPainter::CompositionMode_Source); spanData.dx = off.x(); spanData.dy = off.y(); } else if (!surface->isBuffered()) { diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp index 1ced3d7..a767987 100644 --- a/src/gui/graphicsview/qgraphicsview.cpp +++ b/src/gui/graphicsview/qgraphicsview.cpp @@ -3360,12 +3360,6 @@ void QGraphicsView::paintEvent(QPaintEvent *event) backgroundPainter.setClipRegion(d->backgroundPixmapExposed, Qt::ReplaceClip); if (viewTransformed) backgroundPainter.setTransform(viewTransform); -#ifdef Q_WS_X11 -#undef X11 - if (backgroundPainter.paintEngine()->type() != QPaintEngine::X11) -#define X11 qt_x11Data -#endif - backgroundPainter.setCompositionMode(QPainter::CompositionMode_Source); QRectF backgroundExposedSceneRect = mapToScene(d->backgroundPixmapExposed.boundingRect()).boundingRect(); drawBackground(&backgroundPainter, backgroundExposedSceneRect); d->backgroundPixmapExposed = QRegion(); diff --git a/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp b/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp index 7bcb74d..e78fec1 100644 --- a/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp +++ b/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp @@ -325,6 +325,36 @@ static const struct { { 0xffe8, Qt::Key_Meta }, { 0xffe9, Qt::Key_Alt }, { 0xffea, Qt::Key_Alt }, + + { 0xffb0, Qt::Key_0 }, + { 0xffb1, Qt::Key_1 }, + { 0xffb2, Qt::Key_2 }, + { 0xffb3, Qt::Key_3 }, + { 0xffb4, Qt::Key_4 }, + { 0xffb5, Qt::Key_5 }, + { 0xffb6, Qt::Key_6 }, + { 0xffb7, Qt::Key_7 }, + { 0xffb8, Qt::Key_8 }, + { 0xffb9, Qt::Key_9 }, + + { 0xff8d, Qt::Key_Return }, + { 0xffaa, Qt::Key_Asterisk }, + { 0xffab, Qt::Key_Plus }, + { 0xffad, Qt::Key_Minus }, + { 0xffae, Qt::Key_Period }, + { 0xffaf, Qt::Key_Slash }, + + { 0xff95, Qt::Key_Home }, + { 0xff96, Qt::Key_Left }, + { 0xff97, Qt::Key_Up }, + { 0xff98, Qt::Key_Right }, + { 0xff99, Qt::Key_Down }, + { 0xff9a, Qt::Key_PageUp }, + { 0xff9b, Qt::Key_PageDown }, + { 0xff9c, Qt::Key_End }, + { 0xff9e, Qt::Key_Insert }, + { 0xff9f, Qt::Key_Delete }, + { 0, 0 } }; @@ -483,6 +513,10 @@ bool QRfbKeyEvent::read(QTcpSocket *s) keycode = keyMap[i].keycode; i++; } + + if (keycode >= ' ' && keycode <= '~') + unicode = keycode; + if (!keycode) { if (key <= 0xff) { unicode = key; |