summaryrefslogtreecommitdiffstats
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
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
-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
-rw-r--r--tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp12
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp3
-rw-r--r--tests/auto/declarative/qmlvisual/qmlvisual.pro2
-rw-r--r--tools/qml/loggerwidget.cpp5
-rw-r--r--tools/qml/qml.pri17
-rw-r--r--tools/qml/qml.pro6
-rw-r--r--tools/qml/qmlruntime.cpp4
13 files changed, 46 insertions, 36 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");
diff --git a/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp b/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp
index 50d0731..df7c694 100644
--- a/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp
+++ b/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp
@@ -47,6 +47,11 @@
#include "testhttpserver.h"
#include "../../../shared/util.h"
+#ifndef QT_NO_CONCURRENT
+#include <qtconcurrentrun.h>
+#include <qfuture.h>
+#endif
+
// These don't let normal people run tests!
//#include "../network-settings.h"
@@ -74,7 +79,10 @@ private slots:
void massive();
void cancelcrash();
void shrinkcache();
+#ifndef QT_NO_CONCURRENT
void networkCrash();
+#endif
+
private:
QDeclarativeEngine engine;
QUrl thisfile;
@@ -354,6 +362,8 @@ void tst_qdeclarativepixmapcache::shrinkcache()
}
}
+#ifndef QT_NO_CONCURRENT
+
void createNetworkServer()
{
QEventLoop eventLoop;
@@ -378,6 +388,8 @@ void tst_qdeclarativepixmapcache::networkCrash()
future.cancel();
}
+#endif
+
QTEST_MAIN(tst_qdeclarativepixmapcache)
#include "tst_qdeclarativepixmapcache.moc"
diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
index d7e6a60..88bff8a 100644
--- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
+++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
@@ -619,6 +619,7 @@ void tst_qdeclarativetextinput::dragMouseSelection()
QVERIFY(str2.length() > 3);
QVERIFY(str1 != str2); // Verify the second press and drag is a new selection and doesn't not the first moved.
+ delete canvas;
}
void tst_qdeclarativetextinput::horizontalAlignment_data()
@@ -1129,6 +1130,8 @@ void tst_qdeclarativetextinput::echoMode()
input->setFocus(false);
QVERIFY(input->hasActiveFocus() == false);
QCOMPARE(input->displayText(), QLatin1String("Q"));
+
+ delete canvas;
}
void tst_qdeclarativetextinput::simulateKey(QDeclarativeView *view, int key)
diff --git a/tests/auto/declarative/qmlvisual/qmlvisual.pro b/tests/auto/declarative/qmlvisual/qmlvisual.pro
index cb7e5d7..b2c5b4f 100644
--- a/tests/auto/declarative/qmlvisual/qmlvisual.pro
+++ b/tests/auto/declarative/qmlvisual/qmlvisual.pro
@@ -19,7 +19,7 @@ symbian: {
qdeclarativepathview \
qdeclarativepositioners \
qdeclarativesmoothedanimation \
- qdeclarativespringfollow \
+ qdeclarativespringanimation \
qdeclarativetext \
qdeclarativetextedit \
qdeclarativetextinput \
diff --git a/tools/qml/loggerwidget.cpp b/tools/qml/loggerwidget.cpp
index fb4fedc..e167c94 100644
--- a/tools/qml/loggerwidget.cpp
+++ b/tools/qml/loggerwidget.cpp
@@ -67,6 +67,11 @@ LoggerWidget::LoggerWidget(QWidget *parent) :
m_plainTextEdit = new QPlainTextEdit();
#if defined(Q_OS_SYMBIAN)
+ QAction* clearAction = new QAction(tr("Clear"), this);
+ clearAction->setSoftKeyRole(QAction::PositiveSoftKey);
+ connect(clearAction, SIGNAL(triggered()), m_plainTextEdit, SLOT(clear()));
+ addAction(clearAction);
+
m_plainTextEdit->setReadOnly(true);
QAction* backAction = new QAction( tr("Back"), this );
backAction->setSoftKeyRole( QAction::NegativeSoftKey );
diff --git a/tools/qml/qml.pri b/tools/qml/qml.pri
index 5db7678..08cd506 100644
--- a/tools/qml/qml.pri
+++ b/tools/qml/qml.pri
@@ -19,10 +19,18 @@ SOURCES += $$PWD/qmlruntime.cpp \
RESOURCES = $$PWD/browser/browser.qrc \
$$PWD/startup/startup.qrc
-symbian:!contains(S60_VERSION, 3.1):!contains(S60_VERSION, 3.2) {
- SOURCES += $$PWD/deviceorientation_symbian.cpp
- FORMS = $$PWD/recopts.ui \
- $$PWD/proxysettings.ui
+symbian: {
+ contains(QT_CONFIG, s60): {
+ LIBS += -lavkon -lcone
+ }
+ !contains(S60_VERSION, 3.1):!contains(S60_VERSION, 3.2) {
+ LIBS += -lsensrvclient -lsensrvutil
+ }
+ !contains(S60_VERSION, 3.1):!contains(S60_VERSION, 3.2): {
+ SOURCES += $$PWD/deviceorientation_symbian.cpp
+ FORMS = $$PWD/recopts.ui \
+ $$PWD/proxysettings.ui
+ }
} else:maemo5 {
QT += dbus
HEADERS += $$PWD/texteditautoresizer_maemo5.h
@@ -39,3 +47,4 @@ symbian:!contains(S60_VERSION, 3.1):!contains(S60_VERSION, 3.2) {
FORMS = $$PWD/recopts.ui \
$$PWD/proxysettings.ui
}
+
diff --git a/tools/qml/qml.pro b/tools/qml/qml.pro
index 9b07ebe..5d6192d 100644
--- a/tools/qml/qml.pro
+++ b/tools/qml/qml.pro
@@ -37,12 +37,6 @@ symbian {
include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
TARGET.EPOCHEAPSIZE = 0x20000 0x4000000
TARGET.CAPABILITY = NetworkServices ReadUserData
- !contains(S60_VERSION, 3.1):!contains(S60_VERSION, 3.2) {
- LIBS += -lsensrvclient -lsensrvutil
- }
- contains(QT_CONFIG, s60): {
- LIBS += -lavkon -lcone
- }
# Deploy plugin for remote debugging
qmldebuggingplugin.sources = $$QT_BUILD_TREE/plugins/qmldebugging/tcpserver$${QT_LIBINFIX}.dll
diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp
index 31bb73b..586eaa5 100644
--- a/tools/qml/qmlruntime.cpp
+++ b/tools/qml/qmlruntime.cpp
@@ -781,9 +781,11 @@ void QDeclarativeViewer::createMenu()
aboutAction->setMenuRole(QAction::AboutQtRole);
connect(aboutAction, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+#if !defined(Q_OS_SYMBIAN)
QAction *closeAction = new QAction(tr("&Close"), this);
closeAction->setShortcuts(QKeySequence::Close);
connect(closeAction, SIGNAL(triggered()), this, SLOT(close()));
+#endif
QAction *quitAction = new QAction(tr("&Quit"), this);
quitAction->setMenuRole(QAction::QuitRole);
@@ -819,9 +821,9 @@ void QDeclarativeViewer::createMenu()
fileMenu->addAction(openAction);
fileMenu->addAction(openUrlAction);
fileMenu->addAction(reloadAction);
+#if !defined(Q_OS_SYMBIAN)
fileMenu->addSeparator();
fileMenu->addAction(closeAction);
-#if !defined(Q_OS_SYMBIAN)
fileMenu->addAction(quitAction);
QMenu *recordMenu = menu->addMenu(tr("&Recording"));