summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-07-17 23:46:45 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-07-17 23:46:45 (GMT)
commit53d3083eecf88a20bc36ada43942c7a18677af62 (patch)
tree19116918f6aa138197831c2cb86e1adcce120dea /src/gui
parentd61c74faef2ed787aacc53c03b8361fa57bccc8e (diff)
parent15efa03d234aa51b0c24c68c18a98dce0d66bdff (diff)
downloadQt-53d3083eecf88a20bc36ada43942c7a18677af62.zip
Qt-53d3083eecf88a20bc36ada43942c7a18677af62.tar.gz
Qt-53d3083eecf88a20bc36ada43942c7a18677af62.tar.bz2
Merge branch 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration into 4.7-integration
* 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration: (50 commits) Fix compilation after merge Fixed some network tests never being run. Remove test cases which cause stack overflow Avoid a crash in the OpenVG paint engine when clipping to an empty path Fix last character being overwritten in password field Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( 038b62085831eef4dee423361c65ecd55b7b9b1d ) QSslSocket: Improve error handling Compile when bootstrapping qmake Fix regression in tst_qrand::testqrand() syncqt: don't try to split %module's values syncqt: fix wrong paths in include/ActiveQt/headers.pri Fix a crash when recursing into QSharedPointer from QSharedPointer::clear() Fix a couple of memory leaks due to not releasing CFTypes on Mac Initalize the nativeDialogInUse variable The Q_WGL define was removed years ago. Compile QUUid::createUuid() should not generate identical sequences on UNIX typos fixed Use lower case for including system header files Added trace statements to Phonon MMF backend ...
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp27
-rw-r--r--src/gui/graphicsview/qgraphicsitem_p.h14
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_s60.cpp4
-rw-r--r--src/gui/text/qtexttable.cpp7
-rw-r--r--src/gui/widgets/qlineedit.cpp5
5 files changed, 46 insertions, 11 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index bf36d9b..6249822 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -1270,8 +1270,14 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent, const Q
Returns the bounding rect of this item's children (excluding itself).
*/
-void QGraphicsItemPrivate::childrenBoundingRectHelper(QTransform *x, QRectF *rect)
+void QGraphicsItemPrivate::childrenBoundingRectHelper(QTransform *x, QRectF *rect, bool doClip)
{
+ Q_Q(QGraphicsItem);
+
+ QRectF childrenRect;
+ QRectF *result = rect;
+ rect = &childrenRect;
+
for (int i = 0; i < children.size(); ++i) {
QGraphicsItem *child = children.at(i);
QGraphicsItemPrivate *childd = child->d_ptr.data();
@@ -1293,6 +1299,15 @@ void QGraphicsItemPrivate::childrenBoundingRectHelper(QTransform *x, QRectF *rec
childd->childrenBoundingRectHelper(x, rect);
}
}
+
+ if (doClip && (flags & QGraphicsItem::ItemClipsChildrenToShape)){
+ if (x)
+ *rect &= x->mapRect(q->boundingRect());
+ else
+ *rect &= q->boundingRect();
+ }
+
+ *result |= *rect;
}
void QGraphicsItemPrivate::initStyleOption(QStyleOptionGraphicsItem *option, const QTransform &worldTransform,
@@ -11111,8 +11126,14 @@ QRectF QGraphicsItemEffectSourcePrivate::boundingRect(Qt::CoordinateSystem syste
}
QRectF rect = item->boundingRect();
- if (!item->d_ptr->children.isEmpty())
- rect |= item->childrenBoundingRect();
+ if (!item->d_ptr->children.isEmpty()) {
+ if (dirtyChildrenBoundingRect) {
+ childrenBoundingRect = QRectF();
+ item->d_ptr->childrenBoundingRectHelper(0, &childrenBoundingRect, true);
+ dirtyChildrenBoundingRect = false;
+ }
+ rect |= childrenBoundingRect;
+ }
if (deviceCoordinates) {
Q_ASSERT(info->painter);
diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h
index f9f5d3d..5b9a710 100644
--- a/src/gui/graphicsview/qgraphicsitem_p.h
+++ b/src/gui/graphicsview/qgraphicsitem_p.h
@@ -300,7 +300,7 @@ public:
QDeclarativeListProperty<QGraphicsObject> childrenList();
void setParentItemHelper(QGraphicsItem *parent, const QVariant *newParentVariant,
const QVariant *thisPointerVariant);
- void childrenBoundingRectHelper(QTransform *x, QRectF *rect);
+ void childrenBoundingRectHelper(QTransform *x, QRectF *rect, bool doClip = true);
void initStyleOption(QStyleOptionGraphicsItem *option, const QTransform &worldTransform,
const QRegion &exposedRegion, bool allItems = false) const;
QRectF effectiveBoundingRect() const;
@@ -659,7 +659,7 @@ class QGraphicsItemEffectSourcePrivate : public QGraphicsEffectSourcePrivate
{
public:
QGraphicsItemEffectSourcePrivate(QGraphicsItem *i)
- : QGraphicsEffectSourcePrivate(), item(i), info(0)
+ : QGraphicsEffectSourcePrivate(), dirtyChildrenBoundingRect(true), item(i), info(0)
{}
inline void detach()
@@ -710,6 +710,9 @@ public:
QGraphicsEffect::PixmapPadMode mode) const;
QRect paddedEffectRect(Qt::CoordinateSystem system, QGraphicsEffect::PixmapPadMode mode, const QRectF &sourceRect, bool *unpadded = 0) const;
+ mutable bool dirtyChildrenBoundingRect;
+ mutable QRectF childrenBoundingRect;
+
QGraphicsItem *item;
QGraphicsItemPaintInfo *info;
QTransform lastEffectTransform;
@@ -867,9 +870,12 @@ inline void QGraphicsItemPrivate::markParentDirty(bool updateBoundingRect)
#ifndef QT_NO_GRAPHICSEFFECT
if (parentp->graphicsEffect) {
if (updateBoundingRect) {
+ QGraphicsItemEffectSourcePrivate *sourcep =
+ static_cast<QGraphicsItemEffectSourcePrivate *>(parentp->graphicsEffect->d_func()
+ ->source->d_func());
+ parentp->dirtyChildrenBoundingRect = 1;
parentp->notifyInvalidated = 1;
- static_cast<QGraphicsItemEffectSourcePrivate *>(parentp->graphicsEffect->d_func()
- ->source->d_func())->invalidateCache();
+ sourcep->invalidateCache();
}
if (parentp->scene && parentp->graphicsEffect->isEnabled()) {
parentp->dirty = 1;
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
index 4cdc4ad..394d374 100644
--- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
+++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
@@ -297,6 +297,10 @@ void QCoeFepInputContext::commitTemporaryPreeditString()
return;
commitCurrentString(false);
+
+ //update cursor position, now this pre-edit text has been committed.
+ //this prevents next keypress overwriting it (QTBUG-11673)
+ m_cursorPos = focusWidget()->inputMethodQuery(Qt::ImCursorPosition).toInt();
}
void QCoeFepInputContext::mouseHandler( int x, QMouseEvent *event)
diff --git a/src/gui/text/qtexttable.cpp b/src/gui/text/qtexttable.cpp
index e3985ce..c291f25 100644
--- a/src/gui/text/qtexttable.cpp
+++ b/src/gui/text/qtexttable.cpp
@@ -935,12 +935,13 @@ void QTextTable::removeColumns(int pos, int num)
for (int r = 0; r < d->nRows; ++r) {
for (int c = pos; c < pos + num; ++c) {
int cell = d->grid[r*d->nCols + c];
- if (touchedCells.contains(cell))
- continue;
- touchedCells << cell;
QTextDocumentPrivate::FragmentIterator it(&p->fragmentMap(), cell);
QTextCharFormat fmt = collection->charFormat(it->format);
int span = fmt.tableCellColumnSpan();
+ if (touchedCells.contains(cell) && span <= 1)
+ continue;
+ touchedCells << cell;
+
if (span > 1) {
fmt.setTableCellColumnSpan(span - 1);
p->setCharFormat(it.position(), 1, fmt);
diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp
index 1bffde1..d7311ef 100644
--- a/src/gui/widgets/qlineedit.cpp
+++ b/src/gui/widgets/qlineedit.cpp
@@ -1663,8 +1663,11 @@ void QLineEdit::keyPressEvent(QKeyEvent *event)
}
#endif
d->control->processKeyEvent(event);
- if (event->isAccepted())
+ if (event->isAccepted()) {
+ if (layoutDirection() != d->control->layoutDirection())
+ setLayoutDirection(d->control->layoutDirection());
d->control->setCursorBlinkPeriod(0);
+ }
}
/*!