summaryrefslogtreecommitdiffstats
path: root/src/declarative/fx
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/fx')
-rw-r--r--src/declarative/fx/qfxgridview.cpp3
-rw-r--r--src/declarative/fx/qfxlistview.cpp3
-rw-r--r--src/declarative/fx/qfxreflectionfilter.cpp4
-rw-r--r--src/declarative/fx/qfxtextedit.cpp16
-rw-r--r--src/declarative/fx/qfxtextedit.h1
5 files changed, 21 insertions, 6 deletions
diff --git a/src/declarative/fx/qfxgridview.cpp b/src/declarative/fx/qfxgridview.cpp
index dde8fcf..0ca9393 100644
--- a/src/declarative/fx/qfxgridview.cpp
+++ b/src/declarative/fx/qfxgridview.cpp
@@ -280,10 +280,9 @@ public:
if (listItem->index == -1) {
++skip;
} else if (listItem->index != visibleIndex + i - skip) {
- qDebug() << "index" << visibleIndex << i << listItem->index;
for (int j = 0; j < visibleItems.count(); j++)
qDebug() << " index" << j << "item index" << visibleItems.at(j)->index;
- abort();
+ qFatal("index %d %d %d", visibleIndex, i, listItem->index);
}
}
}
diff --git a/src/declarative/fx/qfxlistview.cpp b/src/declarative/fx/qfxlistview.cpp
index 432c6ac..a8c0747 100644
--- a/src/declarative/fx/qfxlistview.cpp
+++ b/src/declarative/fx/qfxlistview.cpp
@@ -324,8 +324,7 @@ public:
if (listItem->index == -1) {
++skip;
} else if (listItem->index != visibleIndex + i - skip) {
- qDebug() << "index" << visibleIndex << i << listItem->index;
- abort();
+ qFatal("index %d %d %d", visibleIndex, i, listItem->index);
}
}
}
diff --git a/src/declarative/fx/qfxreflectionfilter.cpp b/src/declarative/fx/qfxreflectionfilter.cpp
index 2e57aa7..c66deb7 100644
--- a/src/declarative/fx/qfxreflectionfilter.cpp
+++ b/src/declarative/fx/qfxreflectionfilter.cpp
@@ -239,7 +239,7 @@ void QFxReflectionFilter::setScale(qreal s)
update();
}
-static inline float min(float a, float b)
+static inline float floatmin(float a, float b)
{
return (a < b)?a:b;
}
@@ -257,7 +257,7 @@ void QFxReflectionFilter::filterGL(QSimpleCanvasItem::GLPainter &p)
float refHeight = height;
if (d->height > 0)
- refHeight = min(height, d->height);
+ refHeight = floatmin(height, d->height);
QSimpleCanvas::Matrix simpMat;
QSimpleCanvasItem *simpItem = 0;
diff --git a/src/declarative/fx/qfxtextedit.cpp b/src/declarative/fx/qfxtextedit.cpp
index c7a7700..5492aaa 100644
--- a/src/declarative/fx/qfxtextedit.cpp
+++ b/src/declarative/fx/qfxtextedit.cpp
@@ -772,6 +772,18 @@ void QFxTextEdit::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
\overload
Handles the given mouse \a event.
*/
+void QFxTextEdit::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
+{
+ Q_D(QFxTextEdit);
+ d->control->processEvent(event, QPointF(0, 0));
+ if (!event->isAccepted())
+ QFxPaintedItem::mouseDoubleClickEvent(event);
+}
+
+/*!
+\overload
+Handles the given mouse \a event.
+*/
void QFxTextEdit::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
{
Q_D(QFxTextEdit);
@@ -859,9 +871,13 @@ void QFxTextEditPrivate::init()
void QFxTextEdit::q_textChanged()
{
+ if (!widthValid())
+ updateSize(); //### optimize: we get 3 calls to updateSize every time a letter is typed
emit textChanged(text());
}
+//### we should perhaps be a bit smarter here -- depending on what has changed, we shouldn't
+// need to do all the calculations each time
void QFxTextEdit::updateSize()
{
Q_D(QFxTextEdit);
diff --git a/src/declarative/fx/qfxtextedit.h b/src/declarative/fx/qfxtextedit.h
index e30b9ed..b761a1b 100644
--- a/src/declarative/fx/qfxtextedit.h
+++ b/src/declarative/fx/qfxtextedit.h
@@ -190,6 +190,7 @@ protected:
// mouse filter?
void mousePressEvent(QGraphicsSceneMouseEvent *event);
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
+ void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
void inputMethodEvent(QInputMethodEvent *e);