diff options
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem.cpp | 9 | ||||
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem.h | 1 | ||||
-rw-r--r-- | src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 4 | ||||
-rw-r--r-- | src/gui/kernel/qsoftkeymanager.cpp | 6 | ||||
-rw-r--r-- | src/gui/kernel/qwidget.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/qdialogbuttonbox.cpp | 1 | ||||
-rw-r--r-- | src/opengl/qgl.cpp | 8 | ||||
-rw-r--r-- | tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp | 12 |
8 files changed, 28 insertions, 15 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 9e8d587..90cc132 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -2554,6 +2554,8 @@ QGraphicsEffect *QGraphicsItem::graphicsEffect() const If \a effect is the installed on a different item, setGraphicsEffect() will remove the effect from the item and install it on this item. + QGraphicsItem takes ownership of \a effect. + \note This function will apply the effect on itself and all its children. \since 4.6 @@ -7292,13 +7294,6 @@ void QGraphicsObject::ungrabGesture(Qt::GestureType gesture) */ /*! - \property QGraphicsObject::id - \brief the id of of the item - - \sa QObject::objectName(), QObject::setObjectName() -*/ - -/*! \property QGraphicsObject::opacity \brief the opacity of the item diff --git a/src/gui/graphicsview/qgraphicsitem.h b/src/gui/graphicsview/qgraphicsitem.h index 8bbe9f1..8818a0b 100644 --- a/src/gui/graphicsview/qgraphicsitem.h +++ b/src/gui/graphicsview/qgraphicsitem.h @@ -537,7 +537,6 @@ class Q_GUI_EXPORT QGraphicsObject : public QObject, public QGraphicsItem { Q_OBJECT Q_PROPERTY(QGraphicsObject * parent READ parentObject WRITE setParentItem NOTIFY parentChanged DESIGNABLE false) - Q_PROPERTY(QString id READ objectName WRITE setObjectName) Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity NOTIFY opacityChanged FINAL) Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged) Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged FINAL) diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index bdff5e7..a295d66 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -437,6 +437,10 @@ void QCoeFepInputContext::applyHints(Qt::InputMethodHints hints) void QCoeFepInputContext::applyFormat(QList<QInputMethodEvent::Attribute> *attributes) { TCharFormat cFormat; + QColor styleTextColor = QApplication::palette("QLineEdit").text().color(); + TLogicalRgb tontColor(TRgb(styleTextColor.red(), styleTextColor.green(), styleTextColor.blue(), styleTextColor.alpha())); + cFormat.iFontPresentation.iTextColor = tontColor; + TInt numChars = 0; TInt charPos = 0; int oldSize = attributes->size(); diff --git a/src/gui/kernel/qsoftkeymanager.cpp b/src/gui/kernel/qsoftkeymanager.cpp index 464a250..0e98f39 100644 --- a/src/gui/kernel/qsoftkeymanager.cpp +++ b/src/gui/kernel/qsoftkeymanager.cpp @@ -250,13 +250,17 @@ void QSoftKeyManagerPrivate::updateSoftKeys_sys(const QList<QAction*> &softkeys) ? EAknSoftkeyOptions : s60CommandStart + index; + // _q_menuSoftKeyAction action is set to "invisible" and all invisible actions are by default + // disabled. However we never want to dim options softkey, even it is set to "invisible" + bool dimmed = (command == EAknSoftkeyOptions) ? false : !softKeyAction->isEnabled(); + if (position != -1) { const int underlineShortCut = QApplication::style()->styleHint(QStyle::SH_UnderlineShortcut); QString iconText = softKeyAction->iconText(); TPtrC text = qt_QString2TPtrC( underlineShortCut ? softKeyAction->text() : iconText); QT_TRAP_THROWING( nativeContainer->SetCommandL(position, command, text); - nativeContainer->DimCommand(command, !softKeyAction->isEnabled()); + nativeContainer->DimCommand(command, dimmed); ); } } diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 00c7dc0..21aae3e 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -5046,6 +5046,8 @@ QGraphicsEffect *QWidget::graphicsEffect() const If \a effect is the installed on a different widget, setGraphicsEffect() will remove the effect from the widget and install it on this widget. + QWidget takes ownership of \a effect. + \note This function will apply the effect on itself and all its children. \since 4.6 diff --git a/src/gui/widgets/qdialogbuttonbox.cpp b/src/gui/widgets/qdialogbuttonbox.cpp index 47ddc52..f2ef941 100644 --- a/src/gui/widgets/qdialogbuttonbox.cpp +++ b/src/gui/widgets/qdialogbuttonbox.cpp @@ -266,6 +266,7 @@ public: QDialogButtonEnabledProxy(QObject *parent, QWidget *src, QAction *trg) : QObject(parent), source(src), target(trg) { source->installEventFilter(this); + target->setEnabled(source->isEnabled()); } ~QDialogButtonEnabledProxy() { diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 1ff102f..967ba48 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -2234,6 +2234,14 @@ QGLTexture* QGLContextPrivate::bindTexture(const QImage &image, GLenum target, G } } } +#ifdef QT_OPENGL_ES + // OpenGL/ES requires that the internal and external formats be identical. + // This is typically used to convert GL_RGBA into GL_BGRA. + // Also, we need to use GL_UNSIGNED_BYTE when the format is GL_BGRA. + internalFormat = externalFormat; + if (pixel_type == GL_UNSIGNED_INT_8_8_8_8_REV) + pixel_type = GL_UNSIGNED_BYTE; +#endif #ifdef QGL_BIND_TEXTURE_DEBUG printf(" - uploading, image.format=%d, externalFormat=0x%x, internalFormat=0x%x, pixel_type=0x%x\n", img.format(), externalFormat, internalFormat, pixel_type); diff --git a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp index d216924..259df4d 100644 --- a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp +++ b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp @@ -196,8 +196,8 @@ void tst_QGraphicsEffect::source() // Uninstall effect on QGraphicsItem. effect->reset(); item->setGraphicsEffect(0); - QVERIFY(!effect->source()); - QVERIFY(effect->m_sourceChangedFlags & QGraphicsEffect::SourceDetached); + QVERIFY(!effect); + effect = new CustomEffect; // The item takes ownership and should delete the effect when destroyed. item->setGraphicsEffect(effect); @@ -249,10 +249,10 @@ void tst_QGraphicsEffect::boundingRect() QCOMPARE(effect->boundingRect(), effect->boundingRectFor(itemRect)); // Uninstall effect on QGraphicsItem. + QPointer<CustomEffect> ptr = effect; item->setGraphicsEffect(0); - QCOMPARE(effect->boundingRect(), QRectF()); + QVERIFY(!ptr); - delete effect; delete item; } @@ -343,11 +343,11 @@ void tst_QGraphicsEffect::draw() QCOMPARE(item->numRepaints, 0); // Make sure uninstalling an effect triggers a repaint. + QPointer<CustomEffect> ptr = effect; item->setGraphicsEffect(0); + QVERIFY(!ptr); QTest::qWait(50); - QCOMPARE(effect->numRepaints, 0); QCOMPARE(item->numRepaints, 1); - delete effect; } void tst_QGraphicsEffect::opacity() |