summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2011-01-18 06:03:02 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2011-01-18 06:03:02 (GMT)
commitde174875045c60450c8c5bff64fabf449029d86d (patch)
treed85a6546fec67b5ef3cd82c92a6f5e189927b1e7 /src
parentec6a1c33a930e38cb22efd9fa268d80329745062 (diff)
parente46c44f9538dbe5b44ce61d3a42403cfa471ae8b (diff)
downloadQt-de174875045c60450c8c5bff64fabf449029d86d.zip
Qt-de174875045c60450c8c5bff64fabf449029d86d.tar.gz
Qt-de174875045c60450c8c5bff64fabf449029d86d.tar.bz2
Merge branch 'qtquick11' of scm.dev.nokia.troll.no:qt/qt-qml into qtquick11
Diffstat (limited to 'src')
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp8
-rw-r--r--src/declarative/qml/qdeclarativeboundsignal.cpp2
-rw-r--r--src/declarative/qml/qdeclarativeenginedebug.cpp13
-rw-r--r--src/declarative/qml/qdeclarativeglobal_p.h2
-rw-r--r--src/declarative/qml/qdeclarativescriptparser.cpp6
-rw-r--r--src/declarative/util/qdeclarativeutilmodule.cpp2
6 files changed, 9 insertions, 24 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index 6e6e8c1..0bea638 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -2618,12 +2618,8 @@ void QDeclarativeGridView::itemsMoved(int from, int to, int count)
return;
QHash<int,FxGridItem*> moved;
- bool removedBeforeVisible = false;
FxGridItem *firstItem = d->firstVisibleItem();
- if (from < to && from < d->visibleIndex && to > d->visibleIndex)
- removedBeforeVisible = true;
-
QList<FxGridItem*>::Iterator it = d->visibleItems.begin();
while (it != d->visibleItems.end()) {
FxGridItem *item = *it;
@@ -2632,16 +2628,12 @@ void QDeclarativeGridView::itemsMoved(int from, int to, int count)
item->index += (to-from);
moved.insert(item->index, item);
it = d->visibleItems.erase(it);
- if (item->rowPos() < firstItem->rowPos())
- removedBeforeVisible = true;
} else {
if (item->index > from && item->index != -1) {
// move everything after the moved items.
item->index -= count;
if (item->index < d->visibleIndex)
d->visibleIndex = item->index;
- } else if (item->index != -1) {
- removedBeforeVisible = true;
}
++it;
}
diff --git a/src/declarative/qml/qdeclarativeboundsignal.cpp b/src/declarative/qml/qdeclarativeboundsignal.cpp
index 030fb2c..0ac3f64 100644
--- a/src/declarative/qml/qdeclarativeboundsignal.cpp
+++ b/src/declarative/qml/qdeclarativeboundsignal.cpp
@@ -167,7 +167,7 @@ int QDeclarativeBoundSignal::qt_metacall(QMetaObject::Call c, int id, void **a)
{
if (c == QMetaObject::InvokeMetaMethod && id == evaluateIdx) {
QDeclarativeDebugTrace::startRange(QDeclarativeDebugTrace::HandlingSignal);
- QDeclarativeDebugTrace::rangeData(QDeclarativeDebugTrace::HandlingSignal, QLatin1String(m_signal.signature()) + QLatin1String(": ") + (m_expression ? m_expression->expression() : ""));
+ QDeclarativeDebugTrace::rangeData(QDeclarativeDebugTrace::HandlingSignal, QLatin1String(m_signal.signature()) + QLatin1String(": ") + (m_expression ? m_expression->expression() : QLatin1String("")));
m_isEvaluating = true;
if (!m_paramsValid) {
if (!m_signal.parameterTypes().isEmpty())
diff --git a/src/declarative/qml/qdeclarativeenginedebug.cpp b/src/declarative/qml/qdeclarativeenginedebug.cpp
index b6b4b49..0881003 100644
--- a/src/declarative/qml/qdeclarativeenginedebug.cpp
+++ b/src/declarative/qml/qdeclarativeenginedebug.cpp
@@ -539,7 +539,6 @@ void QDeclarativeEngineDebugServer::setBinding(int objectId,
{
QObject *object = objectForId(objectId);
QDeclarativeContext *context = qmlContext(object);
- QByteArray propertyNameArray = propertyName.toUtf8();
if (object && context) {
QDeclarativeProperty property(object, propertyName, context);
@@ -550,7 +549,7 @@ void QDeclarativeEngineDebugServer::setBinding(int objectId,
foreach(QWeakPointer<QDeclarativeState> statePointer, m_allStates) {
if (QDeclarativeState *state = statePointer.data()) {
// here we assume that the revert list on itself defines the base state
- if ( state->isStateActive() && state->containsPropertyInRevertList(object, propertyNameArray) ) {
+ if (state->isStateActive() && state->containsPropertyInRevertList(object, propertyName)) {
inBaseState = false;
QDeclarativeBinding *newBinding = 0;
@@ -560,10 +559,10 @@ void QDeclarativeEngineDebugServer::setBinding(int objectId,
newBinding->setNotifyOnValueChanged(true);
}
- state->changeBindingInRevertList(object,propertyNameArray, newBinding);
+ state->changeBindingInRevertList(object, propertyName, newBinding);
if (isLiteralValue)
- state->changeValueInRevertList(object, propertyNameArray, expression);
+ state->changeValueInRevertList(object, propertyName, expression);
}
}
}
@@ -592,9 +591,9 @@ void QDeclarativeEngineDebugServer::setBinding(int objectId,
// not a valid property
if (QDeclarativePropertyChanges *propertyChanges = dynamic_cast<QDeclarativePropertyChanges *>(object)) {
if (isLiteralValue) {
- propertyChanges->changeValue(propertyName.toUtf8(),expression);
+ propertyChanges->changeValue(propertyName, expression);
} else {
- propertyChanges->changeExpression(propertyName.toUtf8(),expression.toString());
+ propertyChanges->changeExpression(propertyName, expression.toString());
}
} else {
qWarning() << "QDeclarativeEngineDebugServer::setBinding: unable to set property" << propertyName << "on object" << object;
@@ -639,7 +638,7 @@ void QDeclarativeEngineDebugServer::resetBinding(int objectId, const QString &pr
}
} else {
if (QDeclarativePropertyChanges *propertyChanges = dynamic_cast<QDeclarativePropertyChanges *>(object)) {
- propertyChanges->removeProperty(propertyName.toUtf8());
+ propertyChanges->removeProperty(propertyName);
}
}
}
diff --git a/src/declarative/qml/qdeclarativeglobal_p.h b/src/declarative/qml/qdeclarativeglobal_p.h
index 31fbb1e..b8428b8 100644
--- a/src/declarative/qml/qdeclarativeglobal_p.h
+++ b/src/declarative/qml/qdeclarativeglobal_p.h
@@ -65,7 +65,7 @@ QT_MODULE(Declarative)
}
#ifdef Q_OS_SYMBIAN
-#define Q_DECLARATIVE_PRIVATE_EXPORT
+#define Q_DECLARATIVE_PRIVATE_EXPORT Q_AUTOTEST_EXPORT
#else
#define Q_DECLARATIVE_PRIVATE_EXPORT Q_DECLARATIVE_EXPORT
#endif
diff --git a/src/declarative/qml/qdeclarativescriptparser.cpp b/src/declarative/qml/qdeclarativescriptparser.cpp
index e32a3d2..ce6f943 100644
--- a/src/declarative/qml/qdeclarativescriptparser.cpp
+++ b/src/declarative/qml/qdeclarativescriptparser.cpp
@@ -170,12 +170,6 @@ private:
StateStack _stateStack;
QStringList _scope;
QString _contents;
-
- inline bool isSignalProperty(const QByteArray &propertyName) const {
- return (propertyName.length() >= 3 && propertyName.startsWith("on") &&
- ('A' <= propertyName.at(2) && 'Z' >= propertyName.at(2)));
- }
-
};
ProcessAST::ProcessAST(QDeclarativeScriptParser *parser)
diff --git a/src/declarative/util/qdeclarativeutilmodule.cpp b/src/declarative/util/qdeclarativeutilmodule.cpp
index 5abf085..f32f390 100644
--- a/src/declarative/util/qdeclarativeutilmodule.cpp
+++ b/src/declarative/util/qdeclarativeutilmodule.cpp
@@ -76,7 +76,7 @@
void QDeclarativeUtilModule::defineModule()
{
- qmlRegisterUncreatableType<QDeclarativeApplication>("QtQuick",1,1,"Application", "Application is an abstract class");
+ qmlRegisterUncreatableType<QDeclarativeApplication>("QtQuick",1,1,"Application", QDeclarativeApplication::tr("Application is an abstract class"));
qmlRegisterType<QDeclarativeAnchorAnimation>("QtQuick",1,0,"AnchorAnimation");
qmlRegisterType<QDeclarativeAnchorChanges>("QtQuick",1,0,"AnchorChanges");