summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-04-13 17:26:07 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-04-13 17:26:07 (GMT)
commit9bf12a037f96d85cef049305660a1ebd382c9c1e (patch)
tree65439d78cdcb968c919ca8dd78d02af7c1ed87d6
parentba3dd5c9c0aed851e4f1ee829c827f8d3bfbd5b3 (diff)
parentcc526edbff1cc413532f7ab1b6c088adae76744d (diff)
downloadQt-9bf12a037f96d85cef049305660a1ebd382c9c1e.zip
Qt-9bf12a037f96d85cef049305660a1ebd382c9c1e.tar.gz
Qt-9bf12a037f96d85cef049305660a1ebd382c9c1e.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: Fix to 'QImage convertToFormat doesn't work correctly' Predictive Text causing app to crash after repeated edit attempts
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_s60.cpp2
-rw-r--r--src/openvg/qpaintengine_vg.cpp15
2 files changed, 16 insertions, 1 deletions
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
index 868565d..8574f2c 100644
--- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
+++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
@@ -231,7 +231,7 @@ bool QCoeFepInputContext::filterEvent(const QEvent *event)
// It ignores the mouse event, so we need to commit and send a selection event (which will get triggered
// after the commit)
if (!m_preeditString.isEmpty()) {
- commitCurrentString(false);
+ commitCurrentString(true);
int pos = focusWidget()->inputMethodQuery(Qt::ImCursorPosition).toInt();
diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp
index 570adfd..ebdfa5f 100644
--- a/src/openvg/qpaintengine_vg.cpp
+++ b/src/openvg/qpaintengine_vg.cpp
@@ -1024,9 +1024,11 @@ static VGImage toVGImage
switch (img.format()) {
case QImage::Format_Mono:
img = image.convertToFormat(QImage::Format_MonoLSB, flags);
+ img.invertPixels();
format = VG_BW_1;
break;
case QImage::Format_MonoLSB:
+ img.invertPixels();
format = VG_BW_1;
break;
case QImage::Format_RGB32:
@@ -3189,6 +3191,19 @@ void qt_vg_drawVGImageStencil
bool QVGPaintEngine::canVgWritePixels(const QImage &image) const
{
Q_D(const QVGPaintEngine);
+
+ // qt_vg_image_to_vg_format returns VG_sARGB_8888 as
+ // fallback case if no matching VG format is found.
+ // If given image format is not Format_ARGB32 and returned
+ // format is VG_sARGB_8888, it means that no match was
+ // found. In that case vgWritePixels cannot be used.
+ // Also 1-bit formats cannot be used directly either.
+ if ((image.format() != QImage::Format_ARGB32
+ && qt_vg_image_to_vg_format(image.format()) == VG_sARGB_8888)
+ || image.depth() == 1) {
+ return false;
+ }
+
// vgWritePixels ignores masking, blending and xforms so we can only use it if
// ALL of the following conditions are true:
// - It is a simple translate, or a scale of -1 on the y-axis (inverted)