summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-10-09 04:53:38 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-10-09 04:53:38 (GMT)
commit48b48fba165683bf8f1a24eb7cf53cb1d6ab0795 (patch)
tree963691788465639e1569c56fdc03e62e664a6b82 /src
parent0dc2fe6685323a8aa6bc0e79f908aa9f2dafe6f2 (diff)
parent9b7d77460c38ec93d98fa4779826b32bea2eaaff (diff)
downloadQt-48b48fba165683bf8f1a24eb7cf53cb1d6ab0795.zip
Qt-48b48fba165683bf8f1a24eb7cf53cb1d6ab0795.tar.gz
Qt-48b48fba165683bf8f1a24eb7cf53cb1d6ab0795.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src')
-rw-r--r--src/declarative/fx/qfxborderimage.cpp4
-rw-r--r--src/declarative/fx/qfxborderimage.h7
-rw-r--r--src/declarative/fx/qfxgridview.cpp4
-rw-r--r--src/declarative/fx/qfxgridview.h7
-rw-r--r--src/declarative/fx/qfxitem.cpp16
-rw-r--r--src/declarative/fx/qfxitem.h2
-rw-r--r--src/declarative/fx/qfxlistview.cpp1
-rw-r--r--src/declarative/fx/qfxlistview.h5
-rw-r--r--src/declarative/fx/qfxpositioners.cpp1
-rw-r--r--src/declarative/fx/qfxpositioners.h3
-rw-r--r--src/declarative/fx/qfxtextedit.cpp2
-rw-r--r--src/declarative/qml/qmlxmlhttprequest.cpp24
12 files changed, 32 insertions, 44 deletions
diff --git a/src/declarative/fx/qfxborderimage.cpp b/src/declarative/fx/qfxborderimage.cpp
index 6616912..8f98a11 100644
--- a/src/declarative/fx/qfxborderimage.cpp
+++ b/src/declarative/fx/qfxborderimage.cpp
@@ -273,7 +273,7 @@ void QFxBorderImage::setHorizontalTileMode(TileMode t)
Q_D(QFxBorderImage);
if (t != d->horizontalTileMode) {
d->horizontalTileMode = t;
- emit tileModeChanged();
+ emit horizontalTileModeChanged();
update();
}
}
@@ -289,7 +289,7 @@ void QFxBorderImage::setVerticalTileMode(TileMode t)
Q_D(QFxBorderImage);
if (t != d->verticalTileMode) {
d->verticalTileMode = t;
- emit tileModeChanged();
+ emit verticalTileModeChanged();
update();
}
}
diff --git a/src/declarative/fx/qfxborderimage.h b/src/declarative/fx/qfxborderimage.h
index eae9bd1..5bc1067 100644
--- a/src/declarative/fx/qfxborderimage.h
+++ b/src/declarative/fx/qfxborderimage.h
@@ -59,8 +59,8 @@ class Q_DECLARATIVE_EXPORT QFxBorderImage : public QFxImageBase
Q_ENUMS(TileMode)
Q_PROPERTY(QFxScaleGrid *border READ border CONSTANT)
- Q_PROPERTY(TileMode horizontalTileMode READ horizontalTileMode WRITE setHorizontalTileMode NOTIFY tileModeChanged)
- Q_PROPERTY(TileMode verticalTileMode READ verticalTileMode WRITE setVerticalTileMode NOTIFY tileModeChanged)
+ Q_PROPERTY(TileMode horizontalTileMode READ horizontalTileMode WRITE setHorizontalTileMode NOTIFY horizontalTileModeChanged)
+ Q_PROPERTY(TileMode verticalTileMode READ verticalTileMode WRITE setVerticalTileMode NOTIFY verticalTileModeChanged)
public:
QFxBorderImage(QFxItem *parent=0);
@@ -80,7 +80,8 @@ public:
void setSource(const QUrl &url);
Q_SIGNALS:
- void tileModeChanged();
+ void horizontalTileModeChanged();
+ void verticalTileModeChanged();
protected:
QFxBorderImage(QFxBorderImagePrivate &dd, QFxItem *parent);
diff --git a/src/declarative/fx/qfxgridview.cpp b/src/declarative/fx/qfxgridview.cpp
index 2d25d56..6abe88e 100644
--- a/src/declarative/fx/qfxgridview.cpp
+++ b/src/declarative/fx/qfxgridview.cpp
@@ -991,7 +991,7 @@ void QFxGridView::setCellWidth(int cellWidth)
if (cellWidth != d->cellWidth && cellWidth > 0) {
d->cellWidth = qMax(1, cellWidth);
d->updateGrid();
- emit cellSizeChanged();
+ emit cellWidthChanged();
d->layout();
}
}
@@ -1008,7 +1008,7 @@ void QFxGridView::setCellHeight(int cellHeight)
if (cellHeight != d->cellHeight && cellHeight > 0) {
d->cellHeight = qMax(1, cellHeight);
d->updateGrid();
- emit cellSizeChanged();
+ emit cellHeightChanged();
d->layout();
}
}
diff --git a/src/declarative/fx/qfxgridview.h b/src/declarative/fx/qfxgridview.h
index 08a7565..7f30f03 100644
--- a/src/declarative/fx/qfxgridview.h
+++ b/src/declarative/fx/qfxgridview.h
@@ -67,8 +67,8 @@ class Q_DECLARATIVE_EXPORT QFxGridView : public QFxFlickable
Q_PROPERTY(Flow flow READ flow WRITE setFlow)
Q_PROPERTY(bool keyNavigationWraps READ isWrapEnabled WRITE setWrapEnabled)
Q_PROPERTY(int cacheBuffer READ cacheBuffer WRITE setCacheBuffer)
- Q_PROPERTY(int cellWidth READ cellWidth WRITE setCellWidth NOTIFY cellSizeChanged)
- Q_PROPERTY(int cellHeight READ cellHeight WRITE setCellHeight NOTIFY cellSizeChanged)
+ Q_PROPERTY(int cellWidth READ cellWidth WRITE setCellWidth NOTIFY cellWidthChanged)
+ Q_PROPERTY(int cellHeight READ cellHeight WRITE setCellHeight NOTIFY cellHeightChanged)
Q_CLASSINFO("DefaultProperty", "data")
public:
@@ -121,7 +121,8 @@ public Q_SLOTS:
Q_SIGNALS:
void countChanged();
void currentIndexChanged();
- void cellSizeChanged();
+ void cellWidthChanged();
+ void cellHeightChanged();
protected:
virtual void viewportMoved();
diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp
index d6534a1..a155d5a 100644
--- a/src/declarative/fx/qfxitem.cpp
+++ b/src/declarative/fx/qfxitem.cpp
@@ -1257,12 +1257,6 @@ QFxKeysAttached *QFxKeysAttached::qmlAttachedProperties(QObject *obj)
*/
/*!
- \fn void QFxItem::activeFocusChanged()
-
- This signal is emitted when this item gains active focus.
-*/
-
-/*!
\fn void QFxItem::baselineOffsetChanged()
This signal is emitted when the baseline offset of the item
@@ -2260,16 +2254,6 @@ void QFxItem::setKeepMouseGrab(bool keep)
}
/*!
- This function emits the \e activeFocusChanged signal.
- \a flag is not used.
- */
-void QFxItem::activeFocusChanged(bool flag)
-{
- Q_UNUSED(flag);
- emit activeFocusChanged();
-}
-
-/*!
This function emits the \e focusChanged signal.
Subclasses overriding this function should call up
diff --git a/src/declarative/fx/qfxitem.h b/src/declarative/fx/qfxitem.h
index bde0c9e..b2aefe2 100644
--- a/src/declarative/fx/qfxitem.h
+++ b/src/declarative/fx/qfxitem.h
@@ -166,7 +166,6 @@ Q_SIGNALS:
void stateChanged(const QString &);
void focusChanged();
void wantsFocusChanged();
- void activeFocusChanged();
void parentChanged();
protected:
@@ -183,7 +182,6 @@ protected:
virtual void classBegin();
virtual void componentComplete();
virtual void focusChanged(bool);
- virtual void activeFocusChanged(bool);
virtual void keyPressEvent(QKeyEvent *event);
virtual void keyReleaseEvent(QKeyEvent *event);
virtual void inputMethodEvent(QInputMethodEvent *);
diff --git a/src/declarative/fx/qfxlistview.cpp b/src/declarative/fx/qfxlistview.cpp
index 5afd881..604d16b 100644
--- a/src/declarative/fx/qfxlistview.cpp
+++ b/src/declarative/fx/qfxlistview.cpp
@@ -1169,6 +1169,7 @@ void QFxListView::setOrientation(Qt::Orientation orientation)
setViewportHeight(-1);
d->clear();
refill();
+ emit orientationChanged();
d->updateCurrent(d->currentIndex);
}
}
diff --git a/src/declarative/fx/qfxlistview.h b/src/declarative/fx/qfxlistview.h
index 3cff422..5a83604 100644
--- a/src/declarative/fx/qfxlistview.h
+++ b/src/declarative/fx/qfxlistview.h
@@ -72,7 +72,7 @@ class Q_DECLARATIVE_EXPORT QFxListView : public QFxFlickable
Q_PROPERTY(bool strictlyEnforceHighlightRange READ strictlyEnforceHighlightRange WRITE setStrictlyEnforceHighlightRange)
Q_PROPERTY(qreal spacing READ spacing WRITE setSpacing NOTIFY spacingChanged)
- Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation)
+ Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged)
Q_PROPERTY(bool keyNavigationWraps READ isWrapEnabled WRITE setWrapEnabled)
Q_PROPERTY(int cacheBuffer READ cacheBuffer WRITE setCacheBuffer)
Q_PROPERTY(QString sectionExpression READ sectionExpression WRITE setSectionExpression NOTIFY sectionExpressionChanged)
@@ -106,7 +106,7 @@ public:
bool strictlyEnforceHighlightRange() const;
void setStrictlyEnforceHighlightRange(bool strict);
-
+
qreal preferredHighlightBegin() const;
void setPreferredHighlightBegin(qreal);
@@ -144,6 +144,7 @@ public Q_SLOTS:
Q_SIGNALS:
void countChanged();
void spacingChanged();
+ void orientationChanged();
void currentIndexChanged();
void currentSectionChanged();
void sectionExpressionChanged();
diff --git a/src/declarative/fx/qfxpositioners.cpp b/src/declarative/fx/qfxpositioners.cpp
index e4500aa..f8e7213 100644
--- a/src/declarative/fx/qfxpositioners.cpp
+++ b/src/declarative/fx/qfxpositioners.cpp
@@ -97,6 +97,7 @@ void QFxBasePositioner::setSpacing(int s)
return;
d->_spacing = s;
prePositioning();
+ emit spacingChanged();
}
QmlTransition *QFxBasePositioner::move() const
diff --git a/src/declarative/fx/qfxpositioners.h b/src/declarative/fx/qfxpositioners.h
index 89a61d7..d62da08 100644
--- a/src/declarative/fx/qfxpositioners.h
+++ b/src/declarative/fx/qfxpositioners.h
@@ -59,7 +59,7 @@ class Q_DECLARATIVE_EXPORT QFxBasePositioner : public QFxItem
{
Q_OBJECT
- Q_PROPERTY(int spacing READ spacing WRITE setSpacing)
+ Q_PROPERTY(int spacing READ spacing WRITE setSpacing NOTIFY spacingChanged)
Q_PROPERTY(QmlTransition *move READ move WRITE setMove)
Q_PROPERTY(QmlTransition *add READ add WRITE setAdd)
Q_PROPERTY(QmlTransition *remove READ remove WRITE setRemove)
@@ -93,6 +93,7 @@ protected:
Q_SIGNALS:
void layoutItemChanged();
+ void spacingChanged();
protected Q_SLOTS:
virtual void doPositioning()=0;
diff --git a/src/declarative/fx/qfxtextedit.cpp b/src/declarative/fx/qfxtextedit.cpp
index 07444bb..ccb8f7e 100644
--- a/src/declarative/fx/qfxtextedit.cpp
+++ b/src/declarative/fx/qfxtextedit.cpp
@@ -822,7 +822,7 @@ void QFxTextEdit::keyReleaseEvent(QKeyEvent *event)
\overload
Handles changing of the focus property. Focus is applied to the control
even if the edit does not have active focus. This is because things
- like KeyProxy can give the behavior of focus even when activeFocus isn't
+ like KeyProxy can give the behavior of focus even when hasFocus() isn't
true.
*/
void QFxTextEdit::focusChanged(bool hasFocus)
diff --git a/src/declarative/qml/qmlxmlhttprequest.cpp b/src/declarative/qml/qmlxmlhttprequest.cpp
index 65c5b16..0bc927c 100644
--- a/src/declarative/qml/qmlxmlhttprequest.cpp
+++ b/src/declarative/qml/qmlxmlhttprequest.cpp
@@ -1190,7 +1190,7 @@ static QScriptValue qmlxmlhttprequest_open(QScriptContext *context, QScriptEngin
if (!request) return context->throwError(QScriptContext::ReferenceError, QLatin1String("Not an XMLHttpRequest object"));
if (context->argumentCount() < 2 || context->argumentCount() > 5)
- return context->throwError(QScriptContext::SyntaxError, "Incorrect argument count");
+ return context->throwError(QScriptContext::SyntaxError, QLatin1String("Incorrect argument count"));
// Argument 0 - Method
QString method = context->argument(0).toString().toUpper();
@@ -1198,7 +1198,7 @@ static QScriptValue qmlxmlhttprequest_open(QScriptContext *context, QScriptEngin
method != QLatin1String("PUT") &&
method != QLatin1String("HEAD") &&
method != QLatin1String("POST"))
- return context->throwError(QScriptContext::SyntaxError, "Unsupported method");
+ return context->throwError(QScriptContext::SyntaxError, QLatin1String("Unsupported method"));
// Argument 1 - URL
@@ -1209,12 +1209,12 @@ static QScriptValue qmlxmlhttprequest_open(QScriptContext *context, QScriptEngin
if (ctxt)
url = ctxt->resolvedUrl(url);
else
- return context->throwError(QScriptContext::SyntaxError, "Relative URLs not supported");
+ return context->throwError(QScriptContext::SyntaxError, QLatin1String("Relative URLs not supported"));
}
// Argument 2 - async (optional)
if (context->argumentCount() > 2 && !context->argument(2).toBoolean())
- return context->throwError(QScriptContext::SyntaxError, "Synchronous call not supported");
+ return context->throwError(QScriptContext::SyntaxError, QLatin1String("Synchronous call not supported"));
// Argument 3/4 - user/pass (optional)
@@ -1242,12 +1242,12 @@ static QScriptValue qmlxmlhttprequest_setRequestHeader(QScriptContext *context,
if (!request) return context->throwError(QScriptContext::ReferenceError, QLatin1String("Not an XMLHttpRequest object"));
if (context->argumentCount() != 2)
- return context->throwError(QScriptContext::SyntaxError, "Incorrect argument count");
+ return context->throwError(QScriptContext::SyntaxError, QLatin1String("Incorrect argument count"));
if (request->readyState() != QmlXMLHttpRequest::Opened ||
request->sendFlag())
- return context->throwError(INVALID_STATE_ERR, "Invalid state");
+ return context->throwError(INVALID_STATE_ERR, QLatin1String("Invalid state"));
QString name = context->argument(0).toString();
@@ -1289,10 +1289,10 @@ static QScriptValue qmlxmlhttprequest_send(QScriptContext *context, QScriptEngin
if (!request) return context->throwError(QScriptContext::ReferenceError, QLatin1String("Not an XMLHttpRequest object"));
if (request->readyState() != QmlXMLHttpRequest::Opened)
- return context->throwError(INVALID_STATE_ERR, "Invalid state");
+ return context->throwError(INVALID_STATE_ERR, QLatin1String("Invalid state"));
if (request->sendFlag())
- return context->throwError(INVALID_STATE_ERR, "Invalid state");
+ return context->throwError(INVALID_STATE_ERR, QLatin1String("Invalid state"));
QByteArray data;
if (context->argumentCount() > 0)
@@ -1324,7 +1324,7 @@ static QScriptValue qmlxmlhttprequest_getResponseHeader(QScriptContext *context,
if (request->readyState() != QmlXMLHttpRequest::Loading &&
request->readyState() != QmlXMLHttpRequest::Done &&
request->readyState() != QmlXMLHttpRequest::HeadersReceived)
- return context->throwError(INVALID_STATE_ERR, "Invalid state");
+ return context->throwError(INVALID_STATE_ERR, QLatin1String("Invalid state"));
QString headerName = context->argument(0).toString();
@@ -1342,7 +1342,7 @@ static QScriptValue qmlxmlhttprequest_getAllResponseHeaders(QScriptContext *cont
if (request->readyState() != QmlXMLHttpRequest::Loading &&
request->readyState() != QmlXMLHttpRequest::Done &&
request->readyState() != QmlXMLHttpRequest::HeadersReceived)
- return context->throwError(INVALID_STATE_ERR, "Invalid state");
+ return context->throwError(INVALID_STATE_ERR, QLatin1String("Invalid state"));
return QScriptValue(request->headers());
}
@@ -1363,7 +1363,7 @@ static QScriptValue qmlxmlhttprequest_status(QScriptContext *context, QScriptEng
if (request->readyState() == QmlXMLHttpRequest::Unsent ||
request->readyState() == QmlXMLHttpRequest::Opened)
- return context->throwError(INVALID_STATE_ERR, "Invalid state");
+ return context->throwError(INVALID_STATE_ERR, QLatin1String("Invalid state"));
if (request->errorFlag())
return QScriptValue(0);
@@ -1378,7 +1378,7 @@ static QScriptValue qmlxmlhttprequest_statusText(QScriptContext *context, QScrip
if (request->readyState() == QmlXMLHttpRequest::Unsent ||
request->readyState() == QmlXMLHttpRequest::Opened)
- return context->throwError(INVALID_STATE_ERR, "Invalid state");
+ return context->throwError(INVALID_STATE_ERR, QLatin1String("Invalid state"));
if (request->errorFlag())
return QScriptValue(0);