summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-03-26 04:37:28 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-03-26 04:37:28 (GMT)
commitca90afcf32d9ba083b34f5cef3c7bde6300844f4 (patch)
treee4833fd2340009f15ba1bb1ed5bd09421e5ea067 /src
parent09a40e13174b9f34007ce9fbd98e06b4e48c1954 (diff)
parent33f7ae1c2edf7c414a5f8b3af79c9529718c29b1 (diff)
downloadQt-ca90afcf32d9ba083b34f5cef3c7bde6300844f4.zip
Qt-ca90afcf32d9ba083b34f5cef3c7bde6300844f4.tar.gz
Qt-ca90afcf32d9ba083b34f5cef3c7bde6300844f4.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'src')
-rw-r--r--src/declarative/QmlChanges.txt1
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp6
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp6
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp6
-rw-r--r--src/declarative/graphicsitems/qdeclarativepathview.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput.cpp17
-rw-r--r--src/imports/multimedia/multimedia.pro11
-rw-r--r--src/imports/particles/particles.pro11
-rw-r--r--src/imports/webkit/webkit.pro11
-rw-r--r--src/imports/widgets/widgets.pro11
10 files changed, 64 insertions, 18 deletions
diff --git a/src/declarative/QmlChanges.txt b/src/declarative/QmlChanges.txt
index 9a55bde..d35a4c2 100644
--- a/src/declarative/QmlChanges.txt
+++ b/src/declarative/QmlChanges.txt
@@ -1,6 +1,7 @@
=============================================================================
The changes below are pre Qt 4.7.0 beta
+Removed Q-prefix from validators (IntValidator, DoubleValidator, and RegExpValidator)
PathView: offset property now uses range 0-1.0 rather than 0-100
ListView, GridView::positionViewAtIndex() gained a 'mode' parameter
Removed Qt.playSound (replaced by SoundEffect element)
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index de0cb04..17f74db 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -1552,9 +1552,6 @@ qreal QDeclarativeGridView::maxXExtent() const
void QDeclarativeGridView::keyPressEvent(QKeyEvent *event)
{
Q_D(QDeclarativeGridView);
- QDeclarativeFlickable::keyPressEvent(event);
- if (event->isAccepted())
- return;
if (d->model && d->model->count() && d->interactive) {
d->moveReason = QDeclarativeGridViewPrivate::SetIndex;
int oldCurrent = currentIndex();
@@ -1580,6 +1577,9 @@ void QDeclarativeGridView::keyPressEvent(QKeyEvent *event)
}
}
d->moveReason = QDeclarativeGridViewPrivate::Other;
+ QDeclarativeFlickable::keyPressEvent(event);
+ if (event->isAccepted())
+ return;
event->ignore();
}
diff --git a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
index 1c458b1d4..7bc74ce 100644
--- a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
@@ -115,10 +115,10 @@ void QDeclarativeItemModule::defineModule()
qmlRegisterType<QDeclarativePathPercent>("Qt",4,6,"PathPercent");
qmlRegisterType<QDeclarativePathQuad>("Qt",4,6,"PathQuad");
qmlRegisterType<QDeclarativePathView>("Qt",4,6,"PathView");
- qmlRegisterType<QIntValidator>("Qt",4,6,"QIntValidator");
+ qmlRegisterType<QIntValidator>("Qt",4,6,"IntValidator");
#if (QT_VERSION >= QT_VERSION_CHECK(4,7,0))
- qmlRegisterType<QDoubleValidator>("Qt",4,7,"QDoubleValidator");
- qmlRegisterType<QRegExpValidator>("Qt",4,7,"QRegExpValidator");
+ qmlRegisterType<QDoubleValidator>("Qt",4,7,"DoubleValidator");
+ qmlRegisterType<QRegExpValidator>("Qt",4,7,"RegExpValidator");
#endif
qmlRegisterType<QDeclarativeRectangle>("Qt",4,6,"Rectangle");
qmlRegisterType<QDeclarativeRepeater>("Qt",4,6,"Repeater");
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index 8a70c07..85fcc27 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -2124,9 +2124,6 @@ qreal QDeclarativeListView::maxXExtent() const
void QDeclarativeListView::keyPressEvent(QKeyEvent *event)
{
Q_D(QDeclarativeListView);
- QDeclarativeFlickable::keyPressEvent(event);
- if (event->isAccepted())
- return;
if (d->model && d->model->count() && d->interactive) {
if ((d->orient == QDeclarativeListView::Horizontal && event->key() == Qt::Key_Left)
@@ -2151,6 +2148,9 @@ void QDeclarativeListView::keyPressEvent(QKeyEvent *event)
}
}
}
+ QDeclarativeFlickable::keyPressEvent(event);
+ if (event->isAccepted())
+ return;
event->ignore();
}
diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp
index c98b006..783387c 100644
--- a/src/declarative/graphicsitems/qdeclarativepathview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp
@@ -772,7 +772,7 @@ void QDeclarativePathView::mouseReleaseEvent(QGraphicsSceneMouseEvent *)
qreal v2 = velocity*velocity;
qreal accel = d->deceleration;
// + 0.25 to encourage moving at least one item in the flick direction
- qreal dist = qMin(qreal(d->model->count()-1), qreal(d->model->count()) * v2 / (accel * 2.0) + 0.25);
+ qreal dist = qMin(qreal(d->model->count()-1), qreal(qreal(d->model->count()) * v2 / (accel * 2.0) + 0.25));
// round to nearest item.
if (velocity > 0.)
dist = qRound(dist + d->offset) - d->offset;
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
index b049728..f57ffc1 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
@@ -428,20 +428,21 @@ void QDeclarativeTextInput::setFocusOnPress(bool b)
}
/*!
- \qmlproperty QValidator* TextInput::validator
+ \qmlproperty Validator TextInput::validator
- Allows you to set a QValidator on the TextInput. When a validator is set
+ Allows you to set a validator on the TextInput. When a validator is set
the TextInput will only accept input which leaves the text property in
an acceptable or intermediate state. The accepted signal will only be sent
if the text is in an acceptable state when enter is pressed.
- Currently supported validators are QIntValidator, QDoubleValidator and
- QRegExpValidator. For details, refer to their C++ documentation and remember
+ Currently supported validators are IntValidator, DoubleValidator and
+ RegExpValidator. For details, refer to their C++ documentation (QIntValidator,
+ QDoubleValidator, and QRegExpValidator) and remember
that all Q_PROPERTIES are accessible from Qml. A brief usage guide follows:
- QIntValidator and QDoubleValidator both are controllable through two properties,
- top and bottom. The difference is that for QIntValidator the top and bottom properties
- should be integers, and for QDoubleValidator they should be doubles. QRegExpValidator
+ IntValidator and DoubleValidator both are controllable through two properties,
+ top and bottom. The difference is that for IntValidator the top and bottom properties
+ should be integers, and for DoubleValidator they should be doubles. RegExpValidator
has a single string property, regExp, which should be set to the regular expression to
be used for validation. An example of using validators is shown below, which allows
input of integers between 11 and 31 into the text input:
@@ -449,7 +450,7 @@ void QDeclarativeTextInput::setFocusOnPress(bool b)
\code
import Qt 4.6
TextInput{
- validator: QIntValidator{bottom: 11; top: 31;}
+ validator: IntValidator{bottom: 11; top: 31;}
focus: true
}
\endcode
diff --git a/src/imports/multimedia/multimedia.pro b/src/imports/multimedia/multimedia.pro
index 16b3ace..8792e2b 100644
--- a/src/imports/multimedia/multimedia.pro
+++ b/src/imports/multimedia/multimedia.pro
@@ -23,4 +23,15 @@ target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
qmldir.files += $$QT_BUILD_TREE/imports/$$TARGETPATH/qmldir
qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
+symbian:{
+ load(data_caging_paths)
+ include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
+
+ importFiles.sources = multimedia.dll \
+ qmldir
+ importFiles.path = $$QT_IMPORTS_BASE_DIR/$$TARGETPATH
+
+ DEPLOYMENT = importFiles
+}
+
INSTALLS += target qmldir
diff --git a/src/imports/particles/particles.pro b/src/imports/particles/particles.pro
index 02d9ea6..53d9c24 100644
--- a/src/imports/particles/particles.pro
+++ b/src/imports/particles/particles.pro
@@ -17,4 +17,15 @@ target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
qmldir.files += $$QT_BUILD_TREE/imports/$$TARGETPATH/qmldir
qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
+symbian:{
+ load(data_caging_paths)
+ include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
+
+ importFiles.sources = particles.dll \
+ qmldir
+ importFiles.path = $$QT_IMPORTS_BASE_DIR/$$TARGETPATH
+
+ DEPLOYMENT = importFiles
+}
+
INSTALLS += target qmldir
diff --git a/src/imports/webkit/webkit.pro b/src/imports/webkit/webkit.pro
index ef08efe..a11f87f 100644
--- a/src/imports/webkit/webkit.pro
+++ b/src/imports/webkit/webkit.pro
@@ -14,4 +14,15 @@ target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
qmldir.files += $$QT_BUILD_TREE/imports/$$TARGETPATH/qmldir
qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
+symbian:{
+ load(data_caging_paths)
+ include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
+
+ importFiles.sources = webkitqmlplugin.dll \
+ qmldir
+ importFiles.path = $$QT_IMPORTS_BASE_DIR/$$TARGETPATH
+
+ DEPLOYMENT = importFiles
+}
+
INSTALLS += target qmldir
diff --git a/src/imports/widgets/widgets.pro b/src/imports/widgets/widgets.pro
index aa09b3c..bf2576d 100644
--- a/src/imports/widgets/widgets.pro
+++ b/src/imports/widgets/widgets.pro
@@ -18,4 +18,15 @@ target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
qmldir.files += $$QT_BUILD_TREE/imports/$$TARGETPATH/qmldir
qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
+symbian:{
+ load(data_caging_paths)
+ include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
+
+ importFiles.sources = widgets.dll \
+ qmldir
+ importFiles.path = $$QT_IMPORTS_BASE_DIR/$$TARGETPATH
+
+ DEPLOYMENT = importFiles
+}
+
INSTALLS += target qmldir