summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--demos/declarative/calculator/Core/calculator.js10
-rw-r--r--demos/declarative/calculator/calculator.qml16
-rw-r--r--demos/declarative/minehunt/MinehuntCore/pics/No-Ones-Laughing-3.jpgbin30730 -> 0 bytes
-rw-r--r--demos/declarative/minehunt/MinehuntCore/pics/background.pngbin0 -> 313930 bytes
-rw-r--r--demos/declarative/minehunt/MinehuntCore/pics/quit.pngbin0 -> 583 bytes
-rw-r--r--demos/declarative/minehunt/main.cpp1
-rw-r--r--demos/declarative/minehunt/minehunt.qml14
-rw-r--r--demos/declarative/photoviewer/photoviewer.qml5
-rw-r--r--demos/declarative/rssnews/rssnews.qml20
-rw-r--r--demos/declarative/snake/snake.qml6
-rw-r--r--demos/declarative/twitter/TwitterCore/TitleBar.qml12
-rw-r--r--demos/declarative/twitter/TwitterCore/images/quit.pngbin0 -> 2369 bytes
-rw-r--r--demos/declarative/webbrowser/content/Header.qml30
-rw-r--r--demos/declarative/webbrowser/content/pics/edit-delete.pngbin1333 -> 831 bytes
-rw-r--r--demos/declarative/webbrowser/content/pics/go-jump-locationbar.pngbin714 -> 408 bytes
-rw-r--r--demos/declarative/webbrowser/content/pics/go-next-view.pngbin1187 -> 1310 bytes
-rw-r--r--demos/declarative/webbrowser/content/pics/go-previous-view.pngbin1226 -> 1080 bytes
-rw-r--r--dist/changes-4.6.48
-rw-r--r--doc/src/getting-started/installation.qdoc10
-rw-r--r--doc/src/images/qml-image-example.pngbin58184 -> 49584 bytes
-rw-r--r--examples/declarative/animation/states/qt-logo.pngbin0 -> 5149 bytes
-rw-r--r--examples/declarative/animation/states/states.qml8
-rw-r--r--examples/declarative/animation/states/transitions.qml8
-rw-r--r--examples/declarative/animation/states/user.pngbin4886 -> 0 bytes
-rw-r--r--examples/declarative/imageelements/image/ImageCell.qml2
-rw-r--r--examples/declarative/imageelements/image/face-smile.pngbin15408 -> 0 bytes
-rw-r--r--examples/declarative/imageelements/image/qt-logo.pngbin0 -> 5149 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/arrow-down.pngbin892 -> 0 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/arrow-up.pngbin929 -> 0 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/list-delete.pngbin1074 -> 0 bytes
-rw-r--r--examples/declarative/positioners/add.pngbin1577 -> 810 bytes
-rw-r--r--examples/declarative/positioners/del.pngbin1661 -> 488 bytes
-rw-r--r--qmake/generators/symbian/symbiancommon.cpp14
-rw-r--r--qmake/generators/win32/winmakefile.cpp9
-rw-r--r--src/corelib/global/qglobal.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativeanchors.cpp9
-rw-r--r--src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp5
-rw-r--r--src/declarative/graphicsitems/qdeclarativeborderimage.cpp6
-rw-r--r--src/declarative/graphicsitems/qdeclarativeevents.cpp5
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable.cpp10
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable_p_p.h1
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflipable.cpp9
-rw-r--r--src/declarative/graphicsitems/qdeclarativefocuspanel.cpp5
-rw-r--r--src/declarative/graphicsitems/qdeclarativefocusscope.cpp5
-rw-r--r--src/declarative/graphicsitems/qdeclarativegraphicswidget.cpp19
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp14
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview_p.h12
-rw-r--r--src/declarative/graphicsitems/qdeclarativeimage.cpp13
-rw-r--r--src/declarative/graphicsitems/qdeclarativeimagebase.cpp7
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.cpp12
-rw-r--r--src/declarative/graphicsitems/qdeclarativelayoutitem.cpp7
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp16
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview_p.h12
-rw-r--r--src/declarative/graphicsitems/qdeclarativeloader.cpp11
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea.cpp11
-rw-r--r--src/declarative/graphicsitems/qdeclarativepath.cpp58
-rw-r--r--src/declarative/graphicsitems/qdeclarativepositioners.cpp18
-rw-r--r--src/declarative/graphicsitems/qdeclarativerectangle.cpp5
-rw-r--r--src/declarative/graphicsitems/qdeclarativerepeater.cpp21
-rw-r--r--src/declarative/graphicsitems/qdeclarativetext.cpp26
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextedit.cpp17
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativetranslate.cpp3
-rw-r--r--src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp8
-rw-r--r--src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h1
-rw-r--r--src/declarative/qml/qdeclarativecompiledbindings.cpp2
-rw-r--r--src/declarative/qml/qdeclarativecompiler.cpp27
-rw-r--r--src/declarative/qml/qdeclarativecompositetypemanager.cpp18
-rw-r--r--src/declarative/qml/qdeclarativecontext.cpp8
-rw-r--r--src/declarative/qml/qdeclarativeimport.cpp157
-rw-r--r--src/declarative/qml/qdeclarativeimport_p.h37
-rw-r--r--src/declarative/qml/qdeclarativeparser_p.h7
-rw-r--r--src/declarative/util/qdeclarativeanimation.cpp54
-rw-r--r--src/declarative/util/qdeclarativebind.cpp15
-rw-r--r--src/declarative/util/qdeclarativeconnections.cpp7
-rw-r--r--src/declarative/util/qdeclarativelistmodel.cpp3
-rw-r--r--src/declarative/util/qdeclarativepropertychanges.cpp6
-rw-r--r--src/declarative/util/qdeclarativestate.cpp17
-rw-r--r--src/declarative/util/qdeclarativetransition.cpp6
-rw-r--r--src/declarative/util/qdeclarativexmllistmodel.cpp7
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp39
-rw-r--r--src/gui/graphicsview/qgraphicstransform.cpp32
-rw-r--r--src/imports/particles/qdeclarativeparticles.cpp33
-rw-r--r--src/opengl/qgl.cpp3
-rw-r--r--src/opengl/qgl_p.h3
-rw-r--r--src/opengl/qgl_win.cpp2
-rw-r--r--src/opengl/qglshaderprogram.cpp10
-rw-r--r--src/sql/drivers/odbc/qsql_odbc.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp4
-rw-r--r--tests/auto/declarative/qdeclarativelistview/data/itemlist.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp5
-rw-r--r--tests/auto/declarative/qdeclarativevisualdatamodel/data/datalist.qml15
-rw-r--r--tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp35
-rw-r--r--tests/auto/qdbusthreading/tst_qdbusthreading.cpp35
-rw-r--r--tests/auto/qnetworkreply/tst_qnetworkreply.cpp26
-rw-r--r--tools/configure/configure.pro2
-rw-r--r--tools/configure/configureapp.cpp16
-rw-r--r--tools/configure/environment.cpp7
-rw-r--r--tools/configure/tools.cpp10
99 files changed, 481 insertions, 698 deletions
diff --git a/demos/declarative/calculator/Core/calculator.js b/demos/declarative/calculator/Core/calculator.js
index 16cc309..7c363c7 100644
--- a/demos/declarative/calculator/Core/calculator.js
+++ b/demos/declarative/calculator/Core/calculator.js
@@ -74,6 +74,11 @@ function doOperation(op) {
memory = display.text.valueOf()
} else if (op == leftArrow) {
display.text = display.text.toString().slice(0, -1)
+ if (display.text.length == 0) {
+ display.text = "0"
+ }
+ } else if (op == "Off") {
+ Qt.quit();
} else if (op == "C") {
display.text = "0"
} else if (op == "AC") {
@@ -82,10 +87,5 @@ function doOperation(op) {
lastOp = ""
display.text ="0"
}
-
- if (op == rotateRight)
- main.state = "orientation " + Orientation.Landscape
- if (op == rotateLeft)
- main.state = ''
}
diff --git a/demos/declarative/calculator/calculator.qml b/demos/declarative/calculator/calculator.qml
index 288455b..68c922b 100644
--- a/demos/declarative/calculator/calculator.qml
+++ b/demos/declarative/calculator/calculator.qml
@@ -58,7 +58,7 @@ Rectangle {
property string plusminus : "\u00b1"
function doOp(operation) { CalcEngine.doOperation(operation) }
-
+
Item {
id: main
state: "orientation " + runtime.orientation
@@ -70,8 +70,10 @@ Rectangle {
anchors { fill: parent; topMargin: 6; bottomMargin: 6; leftMargin: 6; rightMargin: 6 }
- Row {
- Display { id: display; width: box.width; height: 64 }
+ Display {
+ id: display
+ width: box.width-3
+ height: 64
}
Column {
@@ -82,11 +84,7 @@ Rectangle {
Row {
spacing: 6
-
- Button {
- id: rotateButton
- width: column.w; height: column.h; color: 'purple'; operation: rotateRight
- }
+ Button { width: column.w; height: column.h; color: 'purple'; operation: "Off" }
Button { width: column.w; height: column.h; color: 'purple'; operation: leftArrow }
Button { width: column.w; height: column.h; color: 'purple'; operation: "C" }
Button { width: column.w; height: column.h; color: 'purple'; operation: "AC" }
@@ -103,7 +101,7 @@ Rectangle {
}
Grid {
- id: grid; rows: 4; columns: 5; spacing: 6
+ id: grid; rows: 5; columns: 5; spacing: 6
property real w: (box.width / columns) - ((spacing * (columns - 1)) / columns)
diff --git a/demos/declarative/minehunt/MinehuntCore/pics/No-Ones-Laughing-3.jpg b/demos/declarative/minehunt/MinehuntCore/pics/No-Ones-Laughing-3.jpg
deleted file mode 100644
index 445567f..0000000
--- a/demos/declarative/minehunt/MinehuntCore/pics/No-Ones-Laughing-3.jpg
+++ /dev/null
Binary files differ
diff --git a/demos/declarative/minehunt/MinehuntCore/pics/background.png b/demos/declarative/minehunt/MinehuntCore/pics/background.png
new file mode 100644
index 0000000..3734a27
--- /dev/null
+++ b/demos/declarative/minehunt/MinehuntCore/pics/background.png
Binary files differ
diff --git a/demos/declarative/minehunt/MinehuntCore/pics/quit.png b/demos/declarative/minehunt/MinehuntCore/pics/quit.png
new file mode 100644
index 0000000..b822057
--- /dev/null
+++ b/demos/declarative/minehunt/MinehuntCore/pics/quit.png
Binary files differ
diff --git a/demos/declarative/minehunt/main.cpp b/demos/declarative/minehunt/main.cpp
index fc223dd..8bbaee9 100644
--- a/demos/declarative/minehunt/main.cpp
+++ b/demos/declarative/minehunt/main.cpp
@@ -59,6 +59,7 @@ int main(int argc, char *argv[])
#endif
canvas.engine()->rootContext()->setContextObject(game);
canvas.setSource(QString("minehunt.qml"));
+ QObject::connect(canvas.engine(), SIGNAL(quit()), &app, SLOT(quit()));
#ifdef Q_OS_SYMBIAN
canvas.showFullScreen();
diff --git a/demos/declarative/minehunt/minehunt.qml b/demos/declarative/minehunt/minehunt.qml
index 136f56a..4accb52 100644
--- a/demos/declarative/minehunt/minehunt.qml
+++ b/demos/declarative/minehunt/minehunt.qml
@@ -49,7 +49,7 @@ Item {
width: 450; height: 450
- Image { source: "MinehuntCore/pics/No-Ones-Laughing-3.jpg"; anchors.fill: parent; fillMode: Image.Tile }
+ Image { source: "MinehuntCore/pics/background.png"; anchors.fill: parent; fillMode: Image.Tile }
Grid {
anchors.horizontalCenter: parent.horizontalCenter
@@ -67,6 +67,18 @@ Item {
x: 20; spacing: 20
anchors.bottom: field.bottom; anchors.bottomMargin: 15
+ Image {
+ source: "MinehuntCore/pics/quit.png"
+ scale: quitMouse.pressed ? 0.8 : 1.0
+ smooth: quitMouse.pressed
+ y: 10
+ MouseArea {
+ id: quitMouse
+ anchors.fill: parent
+ anchors.margins: -20
+ onClicked: Qt.quit()
+ }
+ }
Column {
spacing: 2
Image { source: "MinehuntCore/pics/bomb-color.png" }
diff --git a/demos/declarative/photoviewer/photoviewer.qml b/demos/declarative/photoviewer/photoviewer.qml
index 4ed3105..3072ea2 100644
--- a/demos/declarative/photoviewer/photoviewer.qml
+++ b/demos/declarative/photoviewer/photoviewer.qml
@@ -81,6 +81,11 @@ Rectangle {
onClicked: mainWindow.editMode = !mainWindow.editMode
anchors.horizontalCenter: parent.horizontalCenter
}
+ Button {
+ id: quitButton; label: qsTr("Quit"); rotation: -2;
+ onClicked: Qt.quit()
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
}
Rectangle {
diff --git a/demos/declarative/rssnews/rssnews.qml b/demos/declarative/rssnews/rssnews.qml
index def3e2c..fb5b5a3 100644
--- a/demos/declarative/rssnews/rssnews.qml
+++ b/demos/declarative/rssnews/rssnews.qml
@@ -71,6 +71,7 @@ Rectangle {
id: categories
anchors.fill: parent
model: rssFeeds
+ footer: quitButtonDelegate
delegate: CategoryDelegate {}
highlight: Rectangle { color: "steelblue" }
highlightMoveSpeed: 9999999
@@ -87,7 +88,24 @@ Rectangle {
delegate: NewsDelegate {}
}
}
-
+ Component {
+ id: quitButtonDelegate
+ Item {
+ width: categories.width; height: 60
+ Text {
+ text: "Quit"
+ font { family: "Helvetica"; pixelSize: 16; bold: true }
+ anchors {
+ left: parent.left; leftMargin: 15
+ verticalCenter: parent.verticalCenter
+ }
+ }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: Qt.quit()
+ }
+ }
+ }
ScrollBar { scrollArea: list; height: list.height; width: 8; anchors.right: window.right }
Rectangle { x: 220; height: window.height; width: 1; color: "#cccccc" }
}
diff --git a/demos/declarative/snake/snake.qml b/demos/declarative/snake/snake.qml
index ed3bac9..12ad71c 100644
--- a/demos/declarative/snake/snake.qml
+++ b/demos/declarative/snake/snake.qml
@@ -194,6 +194,12 @@ Rectangle {
anchors.verticalCenter: parent.verticalCenter
}
+ Content.Button {
+ text: "Quit"
+ anchors { left: btnA.right; leftMargin: 3; verticalCenter: parent.verticalCenter }
+ onClicked: Qt.quit();
+ }
+
Text {
color: activePalette.text
text: "Score: " + score; font.bold: true
diff --git a/demos/declarative/twitter/TwitterCore/TitleBar.qml b/demos/declarative/twitter/TwitterCore/TitleBar.qml
index 558bc18..479aa20 100644
--- a/demos/declarative/twitter/TwitterCore/TitleBar.qml
+++ b/demos/declarative/twitter/TwitterCore/TitleBar.qml
@@ -58,10 +58,20 @@ Item {
rssModel.tags = editor.text
}
+ Image {
+ id: quitButton
+ x: 5
+ anchors.verticalCenter: parent.verticalCenter
+ source: "images/quit.png"
+ MouseArea {
+ anchors.fill: parent
+ onClicked: Qt.quit()
+ }
+ }
Text {
id: categoryText
anchors {
- left: parent.left; right: tagButton.left; leftMargin: 10; rightMargin: 10
+ left: quitButton.right; right: tagButton.left; leftMargin: 5; rightMargin: 10
verticalCenter: parent.verticalCenter
}
elide: Text.ElideLeft
diff --git a/demos/declarative/twitter/TwitterCore/images/quit.png b/demos/declarative/twitter/TwitterCore/images/quit.png
new file mode 100644
index 0000000..5bda1b6
--- /dev/null
+++ b/demos/declarative/twitter/TwitterCore/images/quit.png
Binary files differ
diff --git a/demos/declarative/webbrowser/content/Header.qml b/demos/declarative/webbrowser/content/Header.qml
index 5abf440..d3ccae3 100644
--- a/demos/declarative/webbrowser/content/Header.qml
+++ b/demos/declarative/webbrowser/content/Header.qml
@@ -51,7 +51,6 @@ Image {
x: webView.contentX < 0 ? -webView.contentX : webView.contentX > webView.contentWidth-webView.width
? -webView.contentX+webView.contentWidth-webView.width : 0
-
y: {
if (webView.progress < 1.0)
return 0;
@@ -59,7 +58,6 @@ Image {
webView.contentY < 0 ? -webView.contentY : webView.contentY > height ? -height : -webView.contentY
}
}
-
Column {
width: parent.width
@@ -101,14 +99,38 @@ Image {
Button {
id: reloadButton
- anchors { right: parent.right; rightMargin: 4 }
+ anchors { right: quitButton.left; rightMargin: 10 }
action: webView.reload; image: "pics/view-refresh.png"
visible: webView.progress == 1.0 && !header.urlChanged
}
+ Text {
+ id: quitButton
+ color: "white"
+ style: Text.Sunken
+ anchors.right: parent.right
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+ verticalAlignment: Text.AlignVCenter
+ horizontalAlignment: Text.AlignHCenter
+ font.pixelSize: 18
+ width: 60
+ text: "Quit"
+ MouseArea {
+ anchors.fill: parent
+ onClicked: Qt.quit()
+ }
+ Rectangle {
+ width: 1
+ y: 5
+ height: parent.height-10
+ anchors.right: parent.left
+ color: "darkgray"
+ }
+ }
Button {
id: stopButton
- anchors { right: parent.right; rightMargin: 4 }
+ anchors { right: quitButton.left; rightMargin: 10 }
action: webView.stop; image: "pics/edit-delete.png"
visible: webView.progress < 1.0 && !header.urlChanged
}
diff --git a/demos/declarative/webbrowser/content/pics/edit-delete.png b/demos/declarative/webbrowser/content/pics/edit-delete.png
index 351659b..df2a147 100644
--- a/demos/declarative/webbrowser/content/pics/edit-delete.png
+++ b/demos/declarative/webbrowser/content/pics/edit-delete.png
Binary files differ
diff --git a/demos/declarative/webbrowser/content/pics/go-jump-locationbar.png b/demos/declarative/webbrowser/content/pics/go-jump-locationbar.png
index 636fe38..61f779c 100644
--- a/demos/declarative/webbrowser/content/pics/go-jump-locationbar.png
+++ b/demos/declarative/webbrowser/content/pics/go-jump-locationbar.png
Binary files differ
diff --git a/demos/declarative/webbrowser/content/pics/go-next-view.png b/demos/declarative/webbrowser/content/pics/go-next-view.png
index 3bce02d..a585cab 100644
--- a/demos/declarative/webbrowser/content/pics/go-next-view.png
+++ b/demos/declarative/webbrowser/content/pics/go-next-view.png
Binary files differ
diff --git a/demos/declarative/webbrowser/content/pics/go-previous-view.png b/demos/declarative/webbrowser/content/pics/go-previous-view.png
index 3ec011e..612fb34 100644
--- a/demos/declarative/webbrowser/content/pics/go-previous-view.png
+++ b/demos/declarative/webbrowser/content/pics/go-previous-view.png
Binary files differ
diff --git a/dist/changes-4.6.4 b/dist/changes-4.6.4
index 381023f..389aa3a 100644
--- a/dist/changes-4.6.4
+++ b/dist/changes-4.6.4
@@ -63,8 +63,12 @@ QtNetwork
QtOpenGL
--------
- - foo
- * bar
+ - QGLShaderProgram
+ * [QTBUG-12478] Don't resolve GLSL extensions if no shaders.
+ * [QTBUG-12591] setUniformValue(QSize) was setting (w,w) not (w,h).
+ * [QTBUG-12862] Don't #define highp/mediump/lowp if the desktop OpenGL
+ implementation has the GL_ARB_ES2_compatibility extension.
+ * [QTBUG-12554] Wrong OpenGLVersionFlags on OpenGL 4.0 systems.
QtScript
--------
diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc
index 629d8b7..708f166 100644
--- a/doc/src/getting-started/installation.qdoc
+++ b/doc/src/getting-started/installation.qdoc
@@ -1211,9 +1211,9 @@ applications using Qt for Symbian can start right away.}
Qt for the Symbian platform requires the following software installed on your development PC:
\list
- \o \l{http://www.forum.nokia.com/main/resources/tools_and_sdks/carbide_cpp/}{Carbide.c++ v2.0.0 or higher}
+ \o \l{http://www.forum.nokia.com/Library/Tools_and_downloads/Other/Carbide.c++/}{Carbide.c++ v2.3.0 or higher recommended}.
\list
- \o \bold{Note:} It may be necessary to update the Carbide compiler.
+ \o \bold{Note:} It may be necessary to update the Carbide compiler depending on Carbide version.
See \l{http://pepper.troll.no/s60prereleases/patches/}{here} for instructions how to check your
compiler version and how to patch it, if needed.
\endlist
@@ -1223,18 +1223,18 @@ applications using Qt for Symbian can start right away.}
but that version is no longer available from ActiveState. However, Qt for Symbian has been successfully
compiled using both 5.8.x and 5.10.x versions.
\endlist
- \o \l{http://www.forum.nokia.com/main/resources/tools_and_sdks/S60SDK/}{S60 Platform SDK 3rd Edition FP1 or higher}
+ \o \l{http://www.forum.nokia.com/info/sw.nokia.com/id/ec866fab-4b76-49f6-b5a5-af0631419e9c/S60_All_in_One_SDKs.html}{S60 Platform SDK 3rd Edition FP1 or higher}
\list
\o \bold{Note:} Users of \bold{S60 Platform SDK 3rd Edition FP1} also need special update. The update can be found
\l{http://pepper.troll.no/s60prereleases/patches/}{here}.
\endlist
- \o \l{http://www.forum.nokia.com/main/resources/technologies/openc_cpp/}{Open C/C++ v1.6.0 or higher}.
+ \o \l{http://www.forum.nokia.com/info/sw.nokia.com/id/91d89929-fb8c-4d66-bea0-227e42df9053/Open_C_SDK_Plug-In.html}{Open C/C++ v1.7.5 or higher}.
Install this to all Symbian SDKs you plan to use Qt with.
\o Building Qt tools from scratch requires \l{http://www.mingw.org/}{MinGW 3.4.5 or higher}, or another windows compiler.
\list
\o \bold{Note:} This is not required if you are using pre-built binary package.
\endlist
- \o Building Qt libraries requires \l{http://www.arm.com/products/DevTools/RVCT.html}{RVCT} version 2.2 (build 686 or later),
+ \o Building Qt libraries requires \l{http://www.arm.com/products/tools/software-development-tools.php}{RVCT} version 2.2 (build 686 or later),
which is not available free of charge. Usage of later versions of RVCT, including the 3.x and 4.x series, is not supported
in this release.
\endlist
diff --git a/doc/src/images/qml-image-example.png b/doc/src/images/qml-image-example.png
index c1951c0..8d9846f 100644
--- a/doc/src/images/qml-image-example.png
+++ b/doc/src/images/qml-image-example.png
Binary files differ
diff --git a/examples/declarative/animation/states/qt-logo.png b/examples/declarative/animation/states/qt-logo.png
new file mode 100644
index 0000000..14ddf2a
--- /dev/null
+++ b/examples/declarative/animation/states/qt-logo.png
Binary files differ
diff --git a/examples/declarative/animation/states/states.qml b/examples/declarative/animation/states/states.qml
index 77101d0..34cdae3 100644
--- a/examples/declarative/animation/states/states.qml
+++ b/examples/declarative/animation/states/states.qml
@@ -48,14 +48,14 @@ Rectangle {
Image {
id: userIcon
x: topLeftRect.x; y: topLeftRect.y
- source: "user.png"
+ source: "qt-logo.png"
}
Rectangle {
id: topLeftRect
anchors { left: parent.left; top: parent.top; leftMargin: 10; topMargin: 20 }
- width: 64; height: 64
+ width: 46; height: 54
color: "Transparent"; border.color: "Gray"; radius: 6
// Clicking in here sets the state to the default state, returning the image to
@@ -67,7 +67,7 @@ Rectangle {
id: middleRightRect
anchors { right: parent.right; verticalCenter: parent.verticalCenter; rightMargin: 20 }
- width: 64; height: 64
+ width: 46; height: 54
color: "Transparent"; border.color: "Gray"; radius: 6
// Clicking in here sets the state to 'middleRight'
@@ -78,7 +78,7 @@ Rectangle {
id: bottomLeftRect
anchors { left: parent.left; bottom: parent.bottom; leftMargin: 10; bottomMargin: 20 }
- width: 64; height: 64
+ width: 46; height: 54
color: "Transparent"; border.color: "Gray"; radius: 6
// Clicking in here sets the state to 'bottomLeft'
diff --git a/examples/declarative/animation/states/transitions.qml b/examples/declarative/animation/states/transitions.qml
index 1df60ae..884779c 100644
--- a/examples/declarative/animation/states/transitions.qml
+++ b/examples/declarative/animation/states/transitions.qml
@@ -54,14 +54,14 @@ Rectangle {
Image {
id: userIcon
x: topLeftRect.x; y: topLeftRect.y
- source: "user.png"
+ source: "qt-logo.png"
}
Rectangle {
id: topLeftRect
anchors { left: parent.left; top: parent.top; leftMargin: 10; topMargin: 20 }
- width: 64; height: 64
+ width: 46; height: 54
color: "Transparent"; border.color: "Gray"; radius: 6
// Clicking in here sets the state to the default state, returning the image to
@@ -73,7 +73,7 @@ Rectangle {
id: middleRightRect
anchors { right: parent.right; verticalCenter: parent.verticalCenter; rightMargin: 20 }
- width: 64; height: 64
+ width: 46; height: 54
color: "Transparent"; border.color: "Gray"; radius: 6
// Clicking in here sets the state to 'middleRight'
@@ -84,7 +84,7 @@ Rectangle {
id: bottomLeftRect
anchors { left: parent.left; bottom: parent.bottom; leftMargin: 10; bottomMargin: 20 }
- width: 64; height: 64
+ width: 46; height: 54
color: "Transparent"; border.color: "Gray"; radius: 6
// Clicking in here sets the state to 'bottomLeft'
diff --git a/examples/declarative/animation/states/user.png b/examples/declarative/animation/states/user.png
deleted file mode 100644
index dd7d7a2..0000000
--- a/examples/declarative/animation/states/user.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/imageelements/image/ImageCell.qml b/examples/declarative/imageelements/image/ImageCell.qml
index bd232b9..71a17fe 100644
--- a/examples/declarative/imageelements/image/ImageCell.qml
+++ b/examples/declarative/imageelements/image/ImageCell.qml
@@ -48,7 +48,7 @@ Item {
Image {
id: image
width: parent.width; height: parent.height - captionItem.height
- source: "face-smile.png"
+ source: "qt-logo.png"
clip: true // only makes a difference if mode is PreserveAspectCrop
smooth: true
}
diff --git a/examples/declarative/imageelements/image/face-smile.png b/examples/declarative/imageelements/image/face-smile.png
deleted file mode 100644
index 3d66d72..0000000
--- a/examples/declarative/imageelements/image/face-smile.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/imageelements/image/qt-logo.png b/examples/declarative/imageelements/image/qt-logo.png
new file mode 100644
index 0000000..14ddf2a
--- /dev/null
+++ b/examples/declarative/imageelements/image/qt-logo.png
Binary files differ
diff --git a/examples/declarative/modelviews/listview/content/pics/arrow-down.png b/examples/declarative/modelviews/listview/content/pics/arrow-down.png
deleted file mode 100644
index 63331a5..0000000
--- a/examples/declarative/modelviews/listview/content/pics/arrow-down.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/modelviews/listview/content/pics/arrow-up.png b/examples/declarative/modelviews/listview/content/pics/arrow-up.png
deleted file mode 100644
index 4459024..0000000
--- a/examples/declarative/modelviews/listview/content/pics/arrow-up.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/modelviews/listview/content/pics/list-delete.png b/examples/declarative/modelviews/listview/content/pics/list-delete.png
deleted file mode 100644
index 9640f6b..0000000
--- a/examples/declarative/modelviews/listview/content/pics/list-delete.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/positioners/add.png b/examples/declarative/positioners/add.png
index f29d84b..1ee4542 100644
--- a/examples/declarative/positioners/add.png
+++ b/examples/declarative/positioners/add.png
Binary files differ
diff --git a/examples/declarative/positioners/del.png b/examples/declarative/positioners/del.png
index 1d753a3..8d2eaed 100644
--- a/examples/declarative/positioners/del.png
+++ b/examples/declarative/positioners/del.png
Binary files differ
diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp
index d124b02..155dbc9 100644
--- a/qmake/generators/symbian/symbiancommon.cpp
+++ b/qmake/generators/symbian/symbiancommon.cpp
@@ -275,6 +275,20 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB
if (success)
applicationVersion = QString("%1,%2,%3").arg(major).arg(minor).arg(patch);
+ // Append package build version number if it is set
+ QString pkgBuildVersion = project->first("DEPLOYMENT.pkg_build_version");
+ if (!pkgBuildVersion.isEmpty()) {
+ success = false;
+ uint build = pkgBuildVersion.toUInt(&success);
+ if (success && build < 100) {
+ if (pkgBuildVersion.size() == 1)
+ pkgBuildVersion.prepend(QLatin1Char('0'));
+ applicationVersion.append(pkgBuildVersion);
+ } else {
+ fprintf(stderr, "Warning: Invalid DEPLOYMENT.pkg_build_version (%s), must be a number between 0 - 99\n", qPrintable(pkgBuildVersion));
+ }
+ }
+
// Package header
QString sisHeader = "; SIS header: name, uid, version\n#{\"%1\"},(%2),%3\n\n";
QString visualTarget = generator->escapeFilePath(project->first("TARGET"));
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
index 64aaf34..ecb20c7 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
@@ -472,10 +472,13 @@ void Win32MakefileGenerator::processRcFileVar()
resFile.replace(".rc", Option::res_ext);
project->values("RES_FILE").prepend(fileInfo(resFile).fileName());
if (!project->values("OBJECTS_DIR").isEmpty()) {
- if(project->isActiveConfig("staticlib"))
- project->values("RES_FILE").first().prepend(fileInfo(project->values("DESTDIR").first()).absoluteFilePath() + Option::dir_sep);
+ QString resDestDir;
+ if (project->isActiveConfig("staticlib"))
+ resDestDir = fileInfo(project->first("DESTDIR")).absoluteFilePath();
else
- project->values("RES_FILE").first().prepend(project->values("OBJECTS_DIR").first() + Option::dir_sep);
+ resDestDir = project->first("OBJECTS_DIR");
+ resDestDir.append(Option::dir_sep);
+ project->values("RES_FILE").first().prepend(resDestDir);
}
project->values("RES_FILE").first() = Option::fixPathToTargetOS(project->values("RES_FILE").first(), false, false);
project->values("POST_TARGETDEPS") += project->values("RES_FILE");
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index af35316..401af85 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -1828,6 +1828,7 @@ QSysInfo::S60Version QSysInfo::s60Version()
CDir* contents;
TInt err = fileFinder.FindWildByDir(qt_S60Filter, qt_S60SystemInstallDir, contents);
if (err == KErrNone) {
+ QScopedPointer<CDir> contentsDeleter(contents);
err = contents->Sort(EDescending|ESortByName);
if (err == KErrNone && contents->Count() > 0 && (*contents)[0].iName.Length() >= 12) {
TInt major = (*contents)[0].iName[9] - '0';
@@ -1850,7 +1851,6 @@ QSysInfo::S60Version QSysInfo::s60Version()
}
}
}
- delete contents;
}
# ifdef Q_CC_NOKIAX86
diff --git a/src/declarative/graphicsitems/qdeclarativeanchors.cpp b/src/declarative/graphicsitems/qdeclarativeanchors.cpp
index 7ac2b17..26fb97f 100644
--- a/src/declarative/graphicsitems/qdeclarativeanchors.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeanchors.cpp
@@ -148,15 +148,6 @@ static qreal adjustedPosition(QGraphicsObject *item, QDeclarativeAnchorLine::Anc
return ret;
}
-/*!
- \internal
- \class QDeclarativeAnchors
- \since 4.7
- \brief The QDeclarativeAnchors class provides a way to lay out items relative to other items.
-
- \warning Currently, only anchoring to siblings or parent is supported.
-*/
-
QDeclarativeAnchors::QDeclarativeAnchors(QObject *parent)
: QObject(*new QDeclarativeAnchorsPrivate(0), parent)
{
diff --git a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp
index e0a2149..a95e944 100644
--- a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp
@@ -54,11 +54,6 @@
QT_BEGIN_NAMESPACE
/*!
- \class QDeclarativeAnimatedImage
- \internal
-*/
-
-/*!
\qmlclass AnimatedImage QDeclarativeAnimatedImage
\inherits Image
\since 4.7
diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
index e0c7fc2..f16770b 100644
--- a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
@@ -79,12 +79,6 @@ QT_BEGIN_NAMESPACE
rectangular item.
*/
-/*!
- \class QDeclarativeBorderImage BorderImage
- \internal
- \brief The QDeclarativeBorderImage class provides an image item that you can add to a QDeclarativeView.
-*/
-
QDeclarativeBorderImage::QDeclarativeBorderImage(QDeclarativeItem *parent)
: QDeclarativeImageBase(*(new QDeclarativeBorderImagePrivate), parent)
{
diff --git a/src/declarative/graphicsitems/qdeclarativeevents.cpp b/src/declarative/graphicsitems/qdeclarativeevents.cpp
index 0a35a3f..dbfb3fb 100644
--- a/src/declarative/graphicsitems/qdeclarativeevents.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeevents.cpp
@@ -60,11 +60,6 @@ Item {
*/
/*!
- \internal
- \class QDeclarativeKeyEvent
-*/
-
-/*!
\qmlproperty int KeyEvent::key
This property holds the code of the key that was pressed or released.
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
index a6e8c85..a710190 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
@@ -653,6 +653,8 @@ void QDeclarativeFlickablePrivate::handleMousePressEvent(QGraphicsSceneMouseEven
timeline.clear();
hData.velocity = 0;
vData.velocity = 0;
+ hData.dragStartOffset = 0;
+ vData.dragStartOffset = 0;
lastPos = QPoint();
QDeclarativeItemPrivate::start(lastPosTime);
pressPos = event->pos();
@@ -675,7 +677,9 @@ void QDeclarativeFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent
if (q->yflick()) {
int dy = int(event->pos().y() - pressPos.y());
if (qAbs(dy) > QApplication::startDragDistance() || QDeclarativeItemPrivate::elapsed(pressTime) > 200) {
- qreal newY = dy + vData.pressPos;
+ if (!vMoved)
+ vData.dragStartOffset = dy;
+ qreal newY = dy + vData.pressPos - vData.dragStartOffset;
const qreal minY = q->minYExtent();
const qreal maxY = q->maxYExtent();
if (newY > minY)
@@ -705,7 +709,9 @@ void QDeclarativeFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent
if (q->xflick()) {
int dx = int(event->pos().x() - pressPos.x());
if (qAbs(dx) > QApplication::startDragDistance() || QDeclarativeItemPrivate::elapsed(pressTime) > 200) {
- qreal newX = dx + hData.pressPos;
+ if (!hMoved)
+ hData.dragStartOffset = dx;
+ qreal newX = dx + hData.pressPos - hData.dragStartOffset;
const qreal minX = q->minXExtent();
const qreal maxX = q->maxXExtent();
if (newX > minX)
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h b/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h
index b919e1b..c398faa 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h
@@ -96,6 +96,7 @@ public:
QDeclarativeTimeLineValueProxy<QDeclarativeFlickablePrivate> move;
qreal viewSize;
qreal pressPos;
+ qreal dragStartOffset;
qreal velocity;
qreal flickTarget;
QDeclarativeFlickablePrivate::Velocity smoothVelocity;
diff --git a/src/declarative/graphicsitems/qdeclarativeflipable.cpp b/src/declarative/graphicsitems/qdeclarativeflipable.cpp
index 6ce0fa6..69dd66a 100644
--- a/src/declarative/graphicsitems/qdeclarativeflipable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflipable.cpp
@@ -99,15 +99,6 @@ public:
\sa {declarative/ui-components/flipable}{Flipable example}
*/
-/*!
- \internal
- \class QDeclarativeFlipable
- \brief The Flipable item provides a surface that can be flipped.
-
- Flipable is an item that can be visibly "flipped" between its front and
- back sides.
-*/
-
QDeclarativeFlipable::QDeclarativeFlipable(QDeclarativeItem *parent)
: QDeclarativeItem(*(new QDeclarativeFlipablePrivate), parent)
{
diff --git a/src/declarative/graphicsitems/qdeclarativefocuspanel.cpp b/src/declarative/graphicsitems/qdeclarativefocuspanel.cpp
index 5c7959a..f345a14 100644
--- a/src/declarative/graphicsitems/qdeclarativefocuspanel.cpp
+++ b/src/declarative/graphicsitems/qdeclarativefocuspanel.cpp
@@ -61,11 +61,6 @@ QT_BEGIN_NAMESPACE
\l {qmlfocus}{keyboard focus documentation}.
*/
-/*!
- \internal
- \class QDeclarativeFocusPanel
-*/
-
QDeclarativeFocusPanel::QDeclarativeFocusPanel(QDeclarativeItem *parent) :
QDeclarativeItem(parent)
{
diff --git a/src/declarative/graphicsitems/qdeclarativefocusscope.cpp b/src/declarative/graphicsitems/qdeclarativefocusscope.cpp
index 4498275..da97a46 100644
--- a/src/declarative/graphicsitems/qdeclarativefocusscope.cpp
+++ b/src/declarative/graphicsitems/qdeclarativefocusscope.cpp
@@ -60,11 +60,6 @@ QT_BEGIN_NAMESPACE
\sa {declarative/keyinteraction/focus}{Keyboard focus example}
*/
-/*!
- \internal
- \class QDeclarativeFocusScope
-*/
-
QDeclarativeFocusScope::QDeclarativeFocusScope(QDeclarativeItem *parent) :
QDeclarativeItem(parent)
{
diff --git a/src/declarative/graphicsitems/qdeclarativegraphicswidget.cpp b/src/declarative/graphicsitems/qdeclarativegraphicswidget.cpp
index ee45406..d45fe83 100644
--- a/src/declarative/graphicsitems/qdeclarativegraphicswidget.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegraphicswidget.cpp
@@ -68,7 +68,6 @@ QDeclarativeGraphicsWidget::~QDeclarativeGraphicsWidget()
delete d->_anchors; d->_anchors = 0;
}
-/*! \internal */
QDeclarativeAnchors *QDeclarativeGraphicsWidget::anchors()
{
Q_D(QDeclarativeGraphicsWidget);
@@ -85,54 +84,36 @@ QDeclarativeItemPrivate::AnchorLines *QDeclarativeGraphicsWidgetPrivate::anchorL
return _anchorLines;
}
-/*!
- \internal
-*/
QDeclarativeAnchorLine QDeclarativeGraphicsWidget::left() const
{
Q_D(const QDeclarativeGraphicsWidget);
return d->anchorLines()->left;
}
-/*!
- \internal
-*/
QDeclarativeAnchorLine QDeclarativeGraphicsWidget::right() const
{
Q_D(const QDeclarativeGraphicsWidget);
return d->anchorLines()->right;
}
-/*!
- \internal
-*/
QDeclarativeAnchorLine QDeclarativeGraphicsWidget::horizontalCenter() const
{
Q_D(const QDeclarativeGraphicsWidget);
return d->anchorLines()->hCenter;
}
-/*!
- \internal
-*/
QDeclarativeAnchorLine QDeclarativeGraphicsWidget::top() const
{
Q_D(const QDeclarativeGraphicsWidget);
return d->anchorLines()->top;
}
-/*!
- \internal
-*/
QDeclarativeAnchorLine QDeclarativeGraphicsWidget::bottom() const
{
Q_D(const QDeclarativeGraphicsWidget);
return d->anchorLines()->bottom;
}
-/*!
- \internal
-*/
QDeclarativeAnchorLine QDeclarativeGraphicsWidget::verticalCenter() const
{
Q_D(const QDeclarativeGraphicsWidget);
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index d67e69a..a0faf14 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -64,7 +64,7 @@ public:
FxGridItem(QDeclarativeItem *i, QDeclarativeGridView *v) : item(i), view(v) {
attached = static_cast<QDeclarativeGridViewAttached*>(qmlAttachedPropertiesObject<QDeclarativeGridView>(item));
if (attached)
- attached->m_view = view;
+ attached->setView(view);
}
~FxGridItem() {}
@@ -2212,7 +2212,7 @@ void QDeclarativeGridView::trackedPositionChanged()
if (trackedPos < d->startPosition() + d->highlightRangeStart) {
pos = d->startPosition();
} else if (d->trackedItem->endRowPos() > d->endPosition() - d->size() + d->highlightRangeEnd) {
- pos = d->endPosition() - d->size();
+ pos = d->endPosition() - d->size() + 1;
if (pos < d->startPosition())
pos = d->startPosition();
} else {
@@ -2226,14 +2226,14 @@ void QDeclarativeGridView::trackedPositionChanged()
} else {
if (trackedPos < viewPos && d->currentItem->rowPos() < viewPos) {
pos = d->currentItem->rowPos() < trackedPos ? trackedPos : d->currentItem->rowPos();
- } else if (d->trackedItem->endRowPos() > viewPos + d->size()
- && d->currentItem->endRowPos() > viewPos + d->size()) {
- if (d->trackedItem->endRowPos() < d->currentItem->endRowPos()) {
- pos = d->trackedItem->endRowPos() - d->size();
+ } else if (d->trackedItem->endRowPos() >= viewPos + d->size()
+ && d->currentItem->endRowPos() >= viewPos + d->size()) {
+ if (d->trackedItem->endRowPos() <= d->currentItem->endRowPos()) {
+ pos = d->trackedItem->endRowPos() - d->size() + 1;
if (d->rowSize() > d->size())
pos = trackedPos;
} else {
- pos = d->currentItem->endRowPos() - d->size();
+ pos = d->currentItem->endRowPos() - d->size() + 1;
if (d->rowSize() > d->size())
pos = d->currentItem->rowPos();
}
diff --git a/src/declarative/graphicsitems/qdeclarativegridview_p.h b/src/declarative/graphicsitems/qdeclarativegridview_p.h
index d6bbaf3..ee632b1 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview_p.h
+++ b/src/declarative/graphicsitems/qdeclarativegridview_p.h
@@ -43,6 +43,7 @@
#define QDECLARATIVEGRIDVIEW_H
#include "private/qdeclarativeflickable_p.h"
+#include "private/qdeclarativeguard_p.h"
QT_BEGIN_HEADER
@@ -220,8 +221,14 @@ public:
: QObject(parent), m_view(0), m_isCurrent(false), m_delayRemove(false) {}
~QDeclarativeGridViewAttached() {}
- Q_PROPERTY(QDeclarativeGridView *view READ view CONSTANT)
+ Q_PROPERTY(QDeclarativeGridView *view READ view NOTIFY viewChanged)
QDeclarativeGridView *view() { return m_view; }
+ void setView(QDeclarativeGridView *view) {
+ if (view != m_view) {
+ m_view = view;
+ emit viewChanged();
+ }
+ }
Q_PROPERTY(bool isCurrentItem READ isCurrentItem NOTIFY currentItemChanged)
bool isCurrentItem() const { return m_isCurrent; }
@@ -249,9 +256,10 @@ Q_SIGNALS:
void delayRemoveChanged();
void add();
void remove();
+ void viewChanged();
public:
- QDeclarativeGridView *m_view;
+ QDeclarativeGuard<QDeclarativeGridView> m_view;
bool m_isCurrent : 1;
bool m_delayRemove : 1;
};
diff --git a/src/declarative/graphicsitems/qdeclarativeimage.cpp b/src/declarative/graphicsitems/qdeclarativeimage.cpp
index 1cc5f81..7a88e78 100644
--- a/src/declarative/graphicsitems/qdeclarativeimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeimage.cpp
@@ -91,19 +91,6 @@ QT_BEGIN_NAMESPACE
\sa {declarative/imageelements/image}{Image example}, QDeclarativeImageProvider
*/
-/*!
- \internal
- \class QDeclarativeImage Image
- \brief The QDeclarativeImage class provides an image item that you can add to a QDeclarativeView.
-
- Example:
- \qml
- Image { source: "pics/star.png" }
- \endqml
-
- A QDeclarativeImage object can be instantiated in QML using the tag \l Image.
-*/
-
QDeclarativeImage::QDeclarativeImage(QDeclarativeItem *parent)
: QDeclarativeImageBase(*(new QDeclarativeImagePrivate), parent)
{
diff --git a/src/declarative/graphicsitems/qdeclarativeimagebase.cpp b/src/declarative/graphicsitems/qdeclarativeimagebase.cpp
index d6b935b..416604b 100644
--- a/src/declarative/graphicsitems/qdeclarativeimagebase.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeimagebase.cpp
@@ -50,13 +50,6 @@
QT_BEGIN_NAMESPACE
-
-/*!
- \class QDeclarativeImageBase
- \internal
- \brief The base class for declarative images.
- */
-
QDeclarativeImageBase::QDeclarativeImageBase(QDeclarativeImageBasePrivate &dd, QDeclarativeItem *parent)
: QDeclarativeItem(dd, parent)
{
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
index 0f16a79..1054898 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
@@ -229,12 +229,6 @@ QT_BEGIN_NAMESPACE
The angle to rotate, in degrees clockwise.
*/
-/*!
- \internal
- \class QDeclarativeContents
- \brief The QDeclarativeContents class gives access to the height and width of an item's contents.
-
-*/
QDeclarativeContents::QDeclarativeContents(QDeclarativeItem *item) : m_item(item), m_x(0), m_y(0), m_width(0), m_height(0)
{
//### optimize
@@ -1728,7 +1722,6 @@ void QDeclarativeItemPrivate::parentProperty(QObject *o, void *rv, QDeclarativeN
specify it.
*/
-/*! \internal */
QDeclarativeListProperty<QObject> QDeclarativeItemPrivate::data()
{
return QDeclarativeListProperty<QObject>(q_func(), 0, QDeclarativeItemPrivate::data_append);
@@ -2416,7 +2409,6 @@ void QDeclarativeItemPrivate::focusChanged(bool flag)
emit q->focusChanged(flag);
}
-/*! \internal */
QDeclarativeListProperty<QObject> QDeclarativeItemPrivate::resources()
{
return QDeclarativeListProperty<QObject>(q_func(), 0, QDeclarativeItemPrivate::resources_append,
@@ -2441,7 +2433,6 @@ QDeclarativeListProperty<QObject> QDeclarativeItemPrivate::resources()
\sa {qmlstate}{States}
*/
-/*! \internal */
QDeclarativeListProperty<QDeclarativeState> QDeclarativeItemPrivate::states()
{
return _states()->statesProperty();
@@ -2465,7 +2456,6 @@ QDeclarativeListProperty<QDeclarativeState> QDeclarativeItemPrivate::states()
*/
-/*! \internal */
QDeclarativeListProperty<QDeclarativeTransition> QDeclarativeItemPrivate::transitions()
{
return _states()->transitionsProperty();
@@ -2538,7 +2528,6 @@ QDeclarativeListProperty<QDeclarativeTransition> QDeclarativeItemPrivate::transi
\sa {qmlstates}{States}
*/
-/*! \internal */
QString QDeclarativeItemPrivate::state() const
{
if (!_stateGroup)
@@ -2547,7 +2536,6 @@ QString QDeclarativeItemPrivate::state() const
return _stateGroup->state();
}
-/*! \internal */
void QDeclarativeItemPrivate::setState(const QString &state)
{
_states()->setState(state);
diff --git a/src/declarative/graphicsitems/qdeclarativelayoutitem.cpp b/src/declarative/graphicsitems/qdeclarativelayoutitem.cpp
index 8509473..d71b2c5 100644
--- a/src/declarative/graphicsitems/qdeclarativelayoutitem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelayoutitem.cpp
@@ -66,13 +66,6 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \internal
- \class QDeclarativeLayoutItem
- \brief The QDeclarativeLayoutItem class allows you to place your QML UI elements inside Qt's Graphics View layouts.
-*/
-
-
-/*!
\qmlproperty QSizeF LayoutItem::maximumSize
The maximumSize property can be set to specify the maximum desired size of this LayoutItem
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index 2e2e08c..d3d46f7 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -96,7 +96,7 @@ public:
FxListItem(QDeclarativeItem *i, QDeclarativeListView *v) : item(i), section(0), view(v) {
attached = static_cast<QDeclarativeListViewAttached*>(qmlAttachedPropertiesObject<QDeclarativeListView>(item));
if (attached)
- attached->m_view = view;
+ attached->setView(view);
}
~FxListItem() {}
qreal position() const {
@@ -2652,7 +2652,7 @@ void QDeclarativeListView::trackedPositionChanged()
if (trackedPos < d->startPosition() + d->highlightRangeStart) {
pos = d->startPosition();
} else if (d->trackedItem->endPosition() > d->endPosition() - d->size() + d->highlightRangeEnd) {
- pos = d->endPosition() - d->size();
+ pos = d->endPosition() - d->size() + 1;
if (pos < d->startPosition())
pos = d->startPosition();
} else {
@@ -2666,14 +2666,14 @@ void QDeclarativeListView::trackedPositionChanged()
} else {
if (trackedPos < viewPos && d->currentItem->position() < viewPos) {
pos = d->currentItem->position() < trackedPos ? trackedPos : d->currentItem->position();
- } else if (d->trackedItem->endPosition() > viewPos + d->size()
- && d->currentItem->endPosition() > viewPos + d->size()) {
- if (d->trackedItem->endPosition() < d->currentItem->endPosition()) {
- pos = d->trackedItem->endPosition() - d->size();
- if (d->trackedItem->size() > d->size())
+ } else if (d->trackedItem->endPosition() >= viewPos + d->size()
+ && d->currentItem->endPosition() >= viewPos + d->size()) {
+ if (d->trackedItem->endPosition() <= d->currentItem->endPosition()) {
+ pos = d->trackedItem->endPosition() - d->size() + 1;
+ if (d->trackedItem->size() > d->size())
pos = trackedPos;
} else {
- pos = d->currentItem->endPosition() - d->size();
+ pos = d->currentItem->endPosition() - d->size() + 1;
if (d->currentItem->size() > d->size())
pos = d->currentItem->position();
}
diff --git a/src/declarative/graphicsitems/qdeclarativelistview_p.h b/src/declarative/graphicsitems/qdeclarativelistview_p.h
index b264861..8fbff49 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview_p.h
+++ b/src/declarative/graphicsitems/qdeclarativelistview_p.h
@@ -43,6 +43,7 @@
#define QDECLARATIVELISTVIEW_H
#include "private/qdeclarativeflickable_p.h"
+#include "private/qdeclarativeguard_p.h"
QT_BEGIN_HEADER
@@ -268,8 +269,14 @@ public:
: QObject(parent), m_view(0), m_isCurrent(false), m_delayRemove(false) {}
~QDeclarativeListViewAttached() {}
- Q_PROPERTY(QDeclarativeListView *view READ view CONSTANT)
+ Q_PROPERTY(QDeclarativeListView *view READ view NOTIFY viewChanged)
QDeclarativeListView *view() { return m_view; }
+ void setView(QDeclarativeListView *view) {
+ if (view != m_view) {
+ m_view = view;
+ emit viewChanged();
+ }
+ }
Q_PROPERTY(bool isCurrentItem READ isCurrentItem NOTIFY currentItemChanged)
bool isCurrentItem() const { return m_isCurrent; }
@@ -327,9 +334,10 @@ Q_SIGNALS:
void delayRemoveChanged();
void add();
void remove();
+ void viewChanged();
public:
- QDeclarativeListView *m_view;
+ QDeclarativeGuard<QDeclarativeListView> m_view;
mutable QString m_section;
QString m_prevSection;
QString m_nextSection;
diff --git a/src/declarative/graphicsitems/qdeclarativeloader.cpp b/src/declarative/graphicsitems/qdeclarativeloader.cpp
index 2fde4c8..5d71625 100644
--- a/src/declarative/graphicsitems/qdeclarativeloader.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeloader.cpp
@@ -189,14 +189,6 @@ void QDeclarativeLoaderPrivate::initResize()
\sa {dynamic-object-creation}{Dynamic Object Creation}
*/
-/*!
- \internal
- \class QDeclarativeLoader
- */
-
-/*!
- Create a new QDeclarativeLoader instance.
- */
QDeclarativeLoader::QDeclarativeLoader(QDeclarativeItem *parent)
: QDeclarativeItem(*(new QDeclarativeLoaderPrivate), parent)
{
@@ -204,9 +196,6 @@ QDeclarativeLoader::QDeclarativeLoader(QDeclarativeItem *parent)
d->flags |= QGraphicsItem::ItemIsFocusScope;
}
-/*!
- Destroy the loader instance.
- */
QDeclarativeLoader::~QDeclarativeLoader()
{
Q_D(QDeclarativeLoader);
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
index 2823888..ec01549 100644
--- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp
+++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
@@ -317,16 +317,6 @@ QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate()
\l Flickable, \c onCanceled should be used in addition to onReleased.
*/
-/*!
- \internal
- \class QDeclarativeMouseArea
- \brief The QDeclarativeMouseArea class provides a simple mouse handling abstraction for use within QML.
-
- All QDeclarativeItem derived classes can do mouse handling but the QDeclarativeMouseArea class exposes mouse
- handling data as properties and tracks flicking and dragging of the mouse.
-
- A QDeclarativeMouseArea object can be instantiated in QML using the tag \l MouseArea.
- */
QDeclarativeMouseArea::QDeclarativeMouseArea(QDeclarativeItem *parent)
: QDeclarativeItem(*(new QDeclarativeMouseAreaPrivate), parent)
{
@@ -690,7 +680,6 @@ void QDeclarativeMouseArea::geometryChanged(const QRectF &newGeometry,
d->lastPos = mapFromScene(d->lastScenePos);
}
-/*! \internal */
QVariant QDeclarativeMouseArea::itemChange(GraphicsItemChange change,
const QVariant &value)
{
diff --git a/src/declarative/graphicsitems/qdeclarativepath.cpp b/src/declarative/graphicsitems/qdeclarativepath.cpp
index 0c069ce..f93357d 100644
--- a/src/declarative/graphicsitems/qdeclarativepath.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepath.cpp
@@ -62,11 +62,6 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \internal
- \class QDeclarativePathElement
-*/
-
-/*!
\qmlclass Path QDeclarativePath
\ingroup qml-view-elements
\since 4.7
@@ -83,13 +78,6 @@ QT_BEGIN_NAMESPACE
\sa PathView, PathAttribute, PathPercent, PathLine, PathQuad, PathCubic
*/
-
-/*!
- \internal
- \class QDeclarativePath
- \brief The QDeclarativePath class defines a path.
- \sa QDeclarativePathView
-*/
QDeclarativePath::QDeclarativePath(QObject *parent)
: QObject(*(new QDeclarativePathPrivate), parent)
{
@@ -527,15 +515,6 @@ void QDeclarativeCurve::setY(qreal y)
*/
/*!
- \internal
- \class QDeclarativePathAttribute
- \brief The QDeclarativePathAttribute class allows to set the value of an attribute at a given position in the path.
-
- \sa QDeclarativePath
-*/
-
-
-/*!
\qmlproperty string PathAttribute::name
the name of the attribute to change.
@@ -608,14 +587,6 @@ void QDeclarativePathAttribute::setValue(qreal value)
*/
/*!
- \internal
- \class QDeclarativePathLine
- \brief The QDeclarativePathLine class defines a straight line.
-
- \sa QDeclarativePath
-*/
-
-/*!
\qmlproperty real PathLine::x
\qmlproperty real PathLine::y
@@ -652,15 +623,6 @@ void QDeclarativePathLine::addToPath(QPainterPath &path)
*/
/*!
- \internal
- \class QDeclarativePathQuad
- \brief The QDeclarativePathQuad class defines a quadratic Bezier curve with a control point.
-
- \sa QDeclarativePath
-*/
-
-
-/*!
\qmlproperty real PathQuad::x
\qmlproperty real PathQuad::y
@@ -743,14 +705,6 @@ void QDeclarativePathQuad::addToPath(QPainterPath &path)
*/
/*!
- \internal
- \class QDeclarativePathCubic
- \brief The QDeclarativePathCubic class defines a cubic Bezier curve with two control points.
-
- \sa QDeclarativePath
-*/
-
-/*!
\qmlproperty real PathCubic::x
\qmlproperty real PathCubic::y
@@ -872,18 +826,6 @@ void QDeclarativePathCubic::addToPath(QPainterPath &path)
\sa Path
*/
-/*!
- \internal
- \class QDeclarativePathPercent
- \brief The QDeclarativePathPercent class manipulates the way a path is interpreted.
-
- QDeclarativePathPercent allows you to bunch up items (or spread out items) along various
- segments of a QDeclarativePathView's path.
-
- \sa QDeclarativePath
-
-*/
-
qreal QDeclarativePathPercent::value() const
{
return _value;
diff --git a/src/declarative/graphicsitems/qdeclarativepositioners.cpp b/src/declarative/graphicsitems/qdeclarativepositioners.cpp
index 4ceb5d9..b776b8e 100644
--- a/src/declarative/graphicsitems/qdeclarativepositioners.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepositioners.cpp
@@ -108,8 +108,7 @@ void QDeclarativeBasePositioner::graphicsWidgetGeometryChanged()
You also need to set a PositionerType, to declare whether you are positioning the x, y or both
for the child items. Depending on the chosen type, only x or y changes will be applied.
- Note that the subclass is responsible for adding the
- spacing in between items.
+ Note that the subclass is responsible for adding the spacing in between items.
*/
QDeclarativeBasePositioner::QDeclarativeBasePositioner(PositionerType at, QDeclarativeItem *parent)
: QDeclarativeItem(*(new QDeclarativeBasePositionerPrivate), parent)
@@ -439,11 +438,6 @@ Column {
\image spacing_b.png
*/
-/*!
- \internal
- \class QDeclarativeColumn
- \brief The QDeclarativeColumn class lines up items vertically.
-*/
QDeclarativeColumn::QDeclarativeColumn(QDeclarativeItem *parent)
: QDeclarativeBasePositioner(Vertical, parent)
{
@@ -579,11 +573,6 @@ Row {
\image spacing_b.png
*/
-/*!
- \internal
- \class QDeclarativeRow
- \brief The QDeclarativeRow class lines up items horizontally.
-*/
QDeclarativeRow::QDeclarativeRow(QDeclarativeItem *parent)
: QDeclarativeBasePositioner(Horizontal, parent)
{
@@ -736,11 +725,6 @@ Grid {
\image spacing_b.png
*/
-/*!
- \internal
- \class QDeclarativeGrid
- \brief The QDeclarativeGrid class lays out items in a grid.
-*/
QDeclarativeGrid::QDeclarativeGrid(QDeclarativeItem *parent) :
QDeclarativeBasePositioner(Both, parent), m_rows(-1), m_columns(-1), m_flow(LeftToRight)
{
diff --git a/src/declarative/graphicsitems/qdeclarativerectangle.cpp b/src/declarative/graphicsitems/qdeclarativerectangle.cpp
index 5990c2d..d027924 100644
--- a/src/declarative/graphicsitems/qdeclarativerectangle.cpp
+++ b/src/declarative/graphicsitems/qdeclarativerectangle.cpp
@@ -180,11 +180,6 @@ void QDeclarativeGradient::doUpdate()
int QDeclarativeRectanglePrivate::doUpdateSlotIdx = -1;
-/*!
- \internal
- \class QDeclarativeRectangle
- \brief The QDeclarativeRectangle class provides a rectangle item that you can add to a QDeclarativeView.
-*/
QDeclarativeRectangle::QDeclarativeRectangle(QDeclarativeItem *parent)
: QDeclarativeItem(*(new QDeclarativeRectanglePrivate), parent)
{
diff --git a/src/declarative/graphicsitems/qdeclarativerepeater.cpp b/src/declarative/graphicsitems/qdeclarativerepeater.cpp
index 4a951a2..97cf05c 100644
--- a/src/declarative/graphicsitems/qdeclarativerepeater.cpp
+++ b/src/declarative/graphicsitems/qdeclarativerepeater.cpp
@@ -146,23 +146,11 @@ QDeclarativeRepeaterPrivate::~QDeclarativeRepeaterPrivate()
\endcode
*/
-/*!
- \internal
- \class QDeclarativeRepeater
- */
-
-/*!
- Create a new QDeclarativeRepeater instance.
- */
QDeclarativeRepeater::QDeclarativeRepeater(QDeclarativeItem *parent)
: QDeclarativeItem(*(new QDeclarativeRepeaterPrivate), parent)
{
}
-/*!
- Destroy the repeater instance. All items it instantiated are also
- destroyed.
- */
QDeclarativeRepeater::~QDeclarativeRepeater()
{
}
@@ -301,18 +289,12 @@ int QDeclarativeRepeater::count() const
}
-/*!
- \internal
- */
void QDeclarativeRepeater::componentComplete()
{
QDeclarativeItem::componentComplete();
regenerate();
}
-/*!
- \internal
- */
QVariant QDeclarativeRepeater::itemChange(GraphicsItemChange change,
const QVariant &value)
{
@@ -335,9 +317,6 @@ void QDeclarativeRepeater::clear()
d->deletables.clear();
}
-/*!
- \internal
- */
void QDeclarativeRepeater::regenerate()
{
Q_D(QDeclarativeRepeater);
diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp
index e5ad743..f16af88 100644
--- a/src/declarative/graphicsitems/qdeclarativetext.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetext.cpp
@@ -190,32 +190,6 @@ QSet<QUrl> QTextDocumentWithImageResources::errors;
\sa {declarative/text/fonts}{Fonts example}
*/
-
-/*!
- \internal
- \class QDeclarativeText
- \qmlclass Text
-
- \brief The QDeclarativeText class provides a formatted text item that you can add to a QDeclarativeView.
-
- Text was designed for read-only text; it does not allow for any text editing.
- It can display both plain and rich text. For example:
-
- \qml
- Text { text: "Hello World!"; font.family: "Helvetica"; font.pointSize: 24; color: "red" }
- Text { text: "<b>Hello</b> <i>World!</i>" }
- \endqml
-
- \image text.png
-
- If height and width are not explicitly set, Text will attempt to determine how
- much room is needed and set it accordingly. Unless \c wrapMode is set, it will always
- prefer width to height (all text will be placed on a single line).
-
- The \c elide property can alternatively be used to fit a line of plain text to a set width.
-
- A QDeclarativeText object can be instantiated in QML using the tag \c Text.
-*/
QDeclarativeText::QDeclarativeText(QDeclarativeItem *parent)
: QDeclarativeItem(*(new QDeclarativeTextPrivate), parent)
{
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
index b8e8726..b1c0fcd 100644
--- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
@@ -103,23 +103,6 @@ TextEdit {
\sa Text, TextInput, {declarative/text/textselection}{Text Selection example}
*/
-/*!
- \internal
- \class QDeclarativeTextEdit
- \qmlclass TextEdit
-
- \brief The QDeclarativeTextEdit class provides an editable formatted text item that you can add to a QDeclarativeView.
-
- It can display both plain and rich text.
-
- \image declarative-textedit.png
-
- A QDeclarativeTextEdit object can be instantiated in QML using the tag \c &lt;TextEdit&gt;.
-*/
-
-/*!
- Constructs a new QDeclarativeTextEdit.
-*/
QDeclarativeTextEdit::QDeclarativeTextEdit(QDeclarativeItem *parent)
: QDeclarativePaintedItem(*(new QDeclarativeTextEditPrivate), parent)
{
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
index b4f36f4..5604b82 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
@@ -437,8 +437,6 @@ void QDeclarativeTextInput::setCursorPosition(int cp)
}
/*!
- \internal
-
Returns a Rect which encompasses the cursor, but which may be larger than is
required. Ignores custom cursor delegates.
*/
diff --git a/src/declarative/graphicsitems/qdeclarativetranslate.cpp b/src/declarative/graphicsitems/qdeclarativetranslate.cpp
index 0bae0cd..2e0af2a 100644
--- a/src/declarative/graphicsitems/qdeclarativetranslate.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetranslate.cpp
@@ -116,9 +116,6 @@ void QDeclarativeTranslate::setY(qreal y)
emit yChanged();
}
-/*!
- \internal
-*/
void QDeclarativeTranslate::applyTo(QMatrix4x4 *matrix) const
{
Q_D(const QDeclarativeTranslate);
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
index 65b14cf..b4e8bda 100644
--- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
+++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
@@ -714,6 +714,7 @@ void QDeclarativeVisualDataModel::setModel(const QVariant &model)
QObject::disconnect(d->m_abstractItemModel, SIGNAL(rowsMoved(const QModelIndex&,int,int,const QModelIndex&,int)),
this, SLOT(_q_rowsMoved(const QModelIndex&,int,int,const QModelIndex&,int)));
QObject::disconnect(d->m_abstractItemModel, SIGNAL(modelReset()), this, SLOT(_q_modelReset()));
+ QObject::disconnect(d->m_abstractItemModel, SIGNAL(layoutChanged()), this, SLOT(_q_layoutChanged()));
d->m_abstractItemModel = 0;
} else if (d->m_visualItemModel) {
QObject::disconnect(d->m_visualItemModel, SIGNAL(itemsInserted(int,int)),
@@ -761,6 +762,7 @@ void QDeclarativeVisualDataModel::setModel(const QVariant &model)
QObject::connect(d->m_abstractItemModel, SIGNAL(rowsMoved(const QModelIndex&,int,int,const QModelIndex&,int)),
this, SLOT(_q_rowsMoved(const QModelIndex&,int,int,const QModelIndex&,int)));
QObject::connect(d->m_abstractItemModel, SIGNAL(modelReset()), this, SLOT(_q_modelReset()));
+ QObject::connect(d->m_abstractItemModel, SIGNAL(layoutChanged()), this, SLOT(_q_layoutChanged()));
d->m_metaDataCacheable = true;
return;
}
@@ -1332,6 +1334,12 @@ void QDeclarativeVisualDataModel::_q_dataChanged(const QModelIndex &begin, const
_q_itemsChanged(begin.row(), end.row() - begin.row() + 1, d->m_roles);
}
+void QDeclarativeVisualDataModel::_q_layoutChanged()
+{
+ Q_D(QDeclarativeVisualDataModel);
+ _q_itemsChanged(0, count(), d->m_roles);
+}
+
void QDeclarativeVisualDataModel::_q_modelReset()
{
emit modelReset();
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h b/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h
index 50d2c53..e159786 100644
--- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h
+++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h
@@ -194,6 +194,7 @@ private Q_SLOTS:
void _q_rowsRemoved(const QModelIndex &,int,int);
void _q_rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int);
void _q_dataChanged(const QModelIndex&,const QModelIndex&);
+ void _q_layoutChanged();
void _q_modelReset();
void _q_createdPackage(int index, QDeclarativePackage *package);
void _q_destroyingPackage(QDeclarativePackage *package);
diff --git a/src/declarative/qml/qdeclarativecompiledbindings.cpp b/src/declarative/qml/qdeclarativecompiledbindings.cpp
index 723da94..9402596 100644
--- a/src/declarative/qml/qdeclarativecompiledbindings.cpp
+++ b/src/declarative/qml/qdeclarativecompiledbindings.cpp
@@ -1874,7 +1874,7 @@ bool QDeclarativeBindingCompilerPrivate::parseName(AST::Node *node, Result &type
return false;
QDeclarativeImportedNamespace *ns = 0;
- if (!engine->importDatabase.resolveType(imports, name.toUtf8(), &attachType, 0, 0, 0, &ns))
+ if (!imports.resolveType(name.toUtf8(), &attachType, 0, 0, 0, &ns))
return false;
if (ns || !attachType || !attachType->attachedPropertiesType())
return false;
diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp
index 2b4a4a5..f044e1a 100644
--- a/src/declarative/qml/qdeclarativecompiler.cpp
+++ b/src/declarative/qml/qdeclarativecompiler.cpp
@@ -668,13 +668,14 @@ void QDeclarativeCompiler::compileTree(Object *tree)
QString scriptCode = QString::fromUtf8(unit->scripts.at(ii).resource->data);
Object::ScriptBlock::Pragmas pragmas = QDeclarativeScriptParser::extractPragmas(scriptCode);
+ Q_ASSERT(!importedScripts.contains(unit->scripts.at(ii).qualifier));
+
if (!scriptCode.isEmpty()) {
Object::ScriptBlock &scriptBlock = importedScripts[unit->scripts.at(ii).qualifier];
- scriptBlock.codes.append(scriptCode);
- scriptBlock.lineNumbers.append(1);
- scriptBlock.files.append(unit->scripts.at(ii).resource->url);
- scriptBlock.pragmas.append(pragmas);
+ scriptBlock.code = scriptCode;
+ scriptBlock.file = unit->scripts.at(ii).resource->url;
+ scriptBlock.pragmas = pragmas;
}
}
@@ -703,7 +704,7 @@ void QDeclarativeCompiler::compileTree(Object *tree)
for (int ii = 0; ii < importedScriptIndexes.count(); ++ii)
output->importCache->add(importedScriptIndexes.at(ii), ii);
- unit->imports.cache(output->importCache, engine);
+ unit->imports.populateCache(output->importCache, engine);
Q_ASSERT(tree->metatype);
@@ -1403,8 +1404,7 @@ bool QDeclarativeCompiler::buildProperty(QDeclarativeParser::Property *prop,
QDeclarativeType *type = 0;
QDeclarativeImportedNamespace *typeNamespace = 0;
- enginePrivate->importDatabase.resolveType(unit->imports, prop->name,
- &type, 0, 0, 0, &typeNamespace);
+ unit->imports.resolveType(prop->name, &type, 0, 0, 0, &typeNamespace);
if (typeNamespace) {
// ### We might need to indicate that this property is a namespace
@@ -1512,7 +1512,7 @@ bool QDeclarativeCompiler::buildPropertyInNamespace(QDeclarativeImportedNamespac
// Setup attached property data
QDeclarativeType *type = 0;
- enginePrivate->importDatabase.resolveTypeInNamespace(ns, prop->name, &type, 0, 0, 0);
+ unit->imports.resolveType(ns, prop->name, &type, 0, 0, 0);
if (!type || !type->attachedPropertiesType())
COMPILE_EXCEPTION(prop, tr("Non-existent attached object"));
@@ -2139,8 +2139,7 @@ bool QDeclarativeCompiler::testQualifiedEnumAssignment(const QMetaProperty &prop
QString typeName = parts.at(0);
QDeclarativeType *type = 0;
- enginePrivate->importDatabase.resolveType(unit->imports, typeName.toUtf8(),
- &type, 0, 0, 0, 0);
+ unit->imports.resolveType(typeName.toUtf8(), &type, 0, 0, 0, 0);
if (!type || obj->typeName != type->qmlTypeName())
return true;
@@ -2167,7 +2166,7 @@ int QDeclarativeCompiler::evaluateEnum(const QByteArray& script) const
int dot = script.indexOf('.');
if (dot > 0) {
QDeclarativeType *type = 0;
- enginePrivate->importDatabase.resolveType(unit->imports, script.left(dot), &type, 0, 0, 0, 0);
+ unit->imports.resolveType(script.left(dot), &type, 0, 0, 0, 0);
if (!type)
return -1;
const QMetaObject *mo = type->metaObject();
@@ -2185,8 +2184,7 @@ int QDeclarativeCompiler::evaluateEnum(const QByteArray& script) const
const QMetaObject *QDeclarativeCompiler::resolveType(const QByteArray& name) const
{
QDeclarativeType *qmltype = 0;
- if (!enginePrivate->importDatabase.resolveType(unit->imports, name, &qmltype,
- 0, 0, 0, 0))
+ if (!unit->imports.resolveType(name, &qmltype, 0, 0, 0, 0))
return 0;
if (!qmltype)
return 0;
@@ -2344,8 +2342,7 @@ bool QDeclarativeCompiler::buildDynamicMeta(QDeclarativeParser::Object *obj, Dyn
QByteArray customTypeName;
QDeclarativeType *qmltype = 0;
QUrl url;
- if (!enginePrivate->importDatabase.resolveType(unit->imports, p.customType, &qmltype,
- &url, 0, 0, 0))
+ if (!unit->imports.resolveType(p.customType, &qmltype, &url, 0, 0, 0))
COMPILE_EXCEPTION(&p, tr("Invalid property type"));
if (!qmltype) {
diff --git a/src/declarative/qml/qdeclarativecompositetypemanager.cpp b/src/declarative/qml/qdeclarativecompositetypemanager.cpp
index 2e77534..cc8f887 100644
--- a/src/declarative/qml/qdeclarativecompositetypemanager.cpp
+++ b/src/declarative/qml/qdeclarativecompositetypemanager.cpp
@@ -523,7 +523,7 @@ int QDeclarativeCompositeTypeManager::resolveTypes(QDeclarativeCompositeTypeData
int waiting = 0;
QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine);
- QDeclarativeImportDatabase &importDatabase = ep->importDatabase;
+ QDeclarativeImportDatabase *importDatabase = &ep->importDatabase;
// For local urls, add an implicit import "." as first (most overridden) lookup.
// This will also trigger the loading of the qmldir and the import of any native
@@ -538,9 +538,10 @@ int QDeclarativeCompositeTypeManager::resolveTypes(QDeclarativeCompositeTypeData
qmldircomponentsnetwork = parser.components();
}
- importDatabase.addToImport(&unit->imports, qmldircomponentsnetwork, QLatin1String("."),
- QString(), -1, -1, QDeclarativeScriptParser::Import::File,
- 0); // error ignored (just means no fallback)
+ unit->imports.addImport(importDatabase,
+ QLatin1String("."), QString(), -1, -1, QDeclarativeScriptParser::Import::File,
+ qmldircomponentsnetwork,
+ 0); // error ignored (just means no fallback)
}
@@ -577,8 +578,9 @@ int QDeclarativeCompositeTypeManager::resolveTypes(QDeclarativeCompositeTypeData
}
QString errorString;
- if (!importDatabase.addToImport(&unit->imports, qmldircomponentsnetwork, imp.uri, imp.qualifier,
- vmaj, vmin, imp.type, &errorString)) {
+ if (!unit->imports.addImport(importDatabase,
+ imp.uri, imp.qualifier, vmaj, vmin, imp.type,
+ qmldircomponentsnetwork, &errorString)) {
QDeclarativeError error;
error.setUrl(unit->imports.baseUrl());
error.setDescription(errorString);
@@ -606,8 +608,8 @@ int QDeclarativeCompositeTypeManager::resolveTypes(QDeclarativeCompositeTypeData
int minorVersion;
QDeclarativeImportedNamespace *typeNamespace = 0;
QString errorString;
- if (!importDatabase.resolveType(unit->imports, typeName, &ref.type, &url, &majorVersion, &minorVersion,
- &typeNamespace, &errorString) || typeNamespace) {
+ if (!unit->imports.resolveType(typeName, &ref.type, &url, &majorVersion, &minorVersion,
+ &typeNamespace, &errorString) || typeNamespace) {
// Known to not be a type:
// - known to be a namespace (Namespace {})
// - type with unknown namespace (UnknownNamespace.SomeType {})
diff --git a/src/declarative/qml/qdeclarativecontext.cpp b/src/declarative/qml/qdeclarativecontext.cpp
index a3b16d9..de45a95 100644
--- a/src/declarative/qml/qdeclarativecontext.cpp
+++ b/src/declarative/qml/qdeclarativecontext.cpp
@@ -660,14 +660,12 @@ void QDeclarativeContextData::addImportedScript(const QDeclarativeParser::Object
if (!engine)
return;
- Q_ASSERT(script.codes.count() == 1);
-
QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(engine);
QScriptEngine *scriptEngine = QDeclarativeEnginePrivate::getScriptEngine(engine);
- const QString &code = script.codes.at(0);
- const QString &url = script.files.at(0);
- const QDeclarativeParser::Object::ScriptBlock::Pragmas &pragmas = script.pragmas.at(0);
+ const QString &code = script.code;
+ const QString &url = script.file;
+ const QDeclarativeParser::Object::ScriptBlock::Pragmas &pragmas = script.pragmas;
Q_ASSERT(!url.isEmpty());
diff --git a/src/declarative/qml/qdeclarativeimport.cpp b/src/declarative/qml/qdeclarativeimport.cpp
index 5c21ebc..8f95e26 100644
--- a/src/declarative/qml/qdeclarativeimport.cpp
+++ b/src/declarative/qml/qdeclarativeimport.cpp
@@ -109,6 +109,11 @@ public:
QHash<QString,QDeclarativeImportedNamespace* > set;
};
+/*!
+\class QDeclarativeImports
+\brief The QDeclarativeImports class encapsulates one QML document's import statements.
+\internal
+*/
QDeclarativeImports::QDeclarativeImports(const QDeclarativeImports &copy)
: d(copy.d)
{
@@ -181,7 +186,7 @@ cacheForNamespace(QDeclarativeEngine *engine, const QDeclarativeImportedNamespac
return cache;
}
-void QDeclarativeImports::cache(QDeclarativeTypeNameCache *cache, QDeclarativeEngine *engine) const
+void QDeclarativeImports::populateCache(QDeclarativeTypeNameCache *cache, QDeclarativeEngine *engine) const
{
const QDeclarativeImportedNamespace &set = d->unqualifiedset;
@@ -201,6 +206,67 @@ void QDeclarativeImports::cache(QDeclarativeTypeNameCache *cache, QDeclarativeEn
cacheForNamespace(engine, set, cache);
}
+
+/*!
+ \internal
+
+ The given (namespace qualified) \a type is resolved to either
+ \list
+ \o a QDeclarativeImportedNamespace stored at \a ns_return,
+ \o a QDeclarativeType stored at \a type_return, or
+ \o a component located at \a url_return.
+ \endlist
+
+ If any return pointer is 0, the corresponding search is not done.
+
+ \sa addImport()
+*/
+bool QDeclarativeImports::resolveType(const QByteArray& type,
+ QDeclarativeType** type_return, QUrl* url_return, int *vmaj, int *vmin,
+ QDeclarativeImportedNamespace** ns_return, QString *errorString) const
+{
+ QDeclarativeImportedNamespace* ns = d->findNamespace(QString::fromUtf8(type));
+ if (ns) {
+ if (ns_return)
+ *ns_return = ns;
+ return true;
+ }
+ if (type_return || url_return) {
+ if (d->find(type,vmaj,vmin,type_return,url_return, errorString)) {
+ if (qmlImportTrace()) {
+ if (type_return && *type_return && url_return && !url_return->isEmpty())
+ qDebug().nospace() << "QDeclarativeImports(" << qPrintable(baseUrl().toString()) << ")" << "::resolveType: "
+ << type << " => " << (*type_return)->typeName() << " " << *url_return;
+ if (type_return && *type_return)
+ qDebug().nospace() << "QDeclarativeImports(" << qPrintable(baseUrl().toString()) << ")" << "::resolveType: "
+ << type << " => " << (*type_return)->typeName();
+ if (url_return && !url_return->isEmpty())
+ qDebug().nospace() << "QDeclarativeImports(" << qPrintable(baseUrl().toString()) << ")" << "::resolveType: "
+ << type << " => " << *url_return;
+ }
+ return true;
+ }
+ }
+ return false;
+}
+
+/*!
+ \internal
+
+ Searching \e only in the namespace \a ns (previously returned in a call to
+ resolveType(), \a type is found and returned to either
+ a QDeclarativeType stored at \a type_return, or
+ a component located at \a url_return.
+
+ If either return pointer is 0, the corresponding search is not done.
+*/
+bool QDeclarativeImports::resolveType(QDeclarativeImportedNamespace* ns, const QByteArray& type,
+ QDeclarativeType** type_return, QUrl* url_return,
+ int *vmaj, int *vmin) const
+{
+ return ns->find(type,vmaj,vmin,type_return,url_return);
+}
+
bool QDeclarativeImportedNamespace::find_helper(int i, const QByteArray& type, int *vmajor, int *vminor,
QDeclarativeType** type_return, QUrl* url_return,
QUrl *base, bool *typeRecursionDetected)
@@ -280,15 +346,16 @@ QDeclarativeImportsPrivate::~QDeclarativeImportsPrivate()
}
bool QDeclarativeImportsPrivate::importExtension(const QString &absoluteFilePath, const QString &uri,
- QDeclarativeImportDatabase *database,
- QDeclarativeDirComponents* components, QString *errorString)
+ QDeclarativeImportDatabase *database,
+ QDeclarativeDirComponents* components, QString *errorString)
{
QFile file(absoluteFilePath);
QString filecontent;
if (file.open(QFile::ReadOnly)) {
filecontent = QString::fromUtf8(file.readAll());
if (qmlImportTrace())
- qDebug() << "QDeclarativeImportDatabase::add: loaded" << absoluteFilePath;
+ qDebug().nospace() << "QDeclarativeImports(" << qPrintable(base.toString()) << "::importExtension: "
+ << "loaded " << absoluteFilePath;
} else {
if (errorString)
*errorString = QDeclarativeImportDatabase::tr("module \"%1\" definition \"%2\" not readable").arg(uri).arg(absoluteFilePath);
@@ -576,6 +643,10 @@ bool QDeclarativeImportedNamespace::find(const QByteArray& type, int *vmajor, in
return false;
}
+/*!
+\class QDeclarativeImportDatabase
+\brief The QDeclarativeImportDatabase class manages the QML imports for a QDeclarativeEngine.
+*/
QDeclarativeImportDatabase::QDeclarativeImportDatabase(QDeclarativeEngine *e)
: engine(e)
{
@@ -619,75 +690,19 @@ QDeclarativeImportDatabase::~QDeclarativeImportDatabase()
The base URL must already have been set with Import::setBaseUrl().
*/
-bool QDeclarativeImportDatabase::addToImport(QDeclarativeImports* imports,
- const QDeclarativeDirComponents &qmldircomponentsnetwork,
- const QString& uri, const QString& prefix, int vmaj, int vmin,
- QDeclarativeScriptParser::Import::Type importType,
- QString *errorString)
+bool QDeclarativeImports::addImport(QDeclarativeImportDatabase *importDb,
+ const QString& uri, const QString& prefix, int vmaj, int vmin,
+ QDeclarativeScriptParser::Import::Type importType,
+ const QDeclarativeDirComponents &qmldircomponentsnetwork,
+ QString *errorString)
{
if (qmlImportTrace())
- qDebug().nospace() << "QDeclarativeImportDatabase::addToImport " << imports << " " << uri << " "
- << vmaj << '.' << vmin << " "
+ qDebug().nospace() << "QDeclarativeImports(" << qPrintable(baseUrl().toString()) << ")" << "::addImport: "
+ << uri << " " << vmaj << '.' << vmin << " "
<< (importType==QDeclarativeScriptParser::Import::Library? "Library" : "File")
<< " as " << prefix;
- bool ok = imports->d->add(qmldircomponentsnetwork, uri, prefix, vmaj, vmin, importType, this, errorString);
- return ok;
-}
-
-/*!
- \internal
-
- Using the given \a imports, the given (namespace qualified) \a type is resolved to either
- a QDeclarativeImportedNamespace stored at \a ns_return,
- a QDeclarativeType stored at \a type_return, or
- a component located at \a url_return.
-
- If any return pointer is 0, the corresponding search is not done.
-
- \sa addToImport()
-*/
-bool QDeclarativeImportDatabase::resolveType(const QDeclarativeImports& imports, const QByteArray& type,
- QDeclarativeType** type_return, QUrl* url_return, int *vmaj, int *vmin,
- QDeclarativeImportedNamespace** ns_return, QString *errorString) const
-{
- QDeclarativeImportedNamespace* ns = imports.d->findNamespace(QString::fromUtf8(type));
- if (ns) {
- if (ns_return)
- *ns_return = ns;
- return true;
- }
- if (type_return || url_return) {
- if (imports.d->find(type,vmaj,vmin,type_return,url_return, errorString)) {
- if (qmlImportTrace()) {
- if (type_return && *type_return && url_return && !url_return->isEmpty())
- qDebug() << "QDeclarativeImportDatabase::resolveType" << type << '=' << (*type_return)->typeName() << *url_return;
- if (type_return && *type_return)
- qDebug() << "QDeclarativeImportDatabase::resolveType" << type << '=' << (*type_return)->typeName();
- if (url_return && !url_return->isEmpty())
- qDebug() << "QDeclarativeImportDatabase::resolveType" << type << '=' << *url_return;
- }
- return true;
- }
- }
- return false;
-}
-
-/*!
- \internal
-
- Searching \e only in the namespace \a ns (previously returned in a call to
- resolveType(), \a type is found and returned to either
- a QDeclarativeType stored at \a type_return, or
- a component located at \a url_return.
-
- If either return pointer is 0, the corresponding search is not done.
-*/
-bool QDeclarativeImportDatabase::resolveTypeInNamespace(QDeclarativeImportedNamespace* ns, const QByteArray& type,
- QDeclarativeType** type_return, QUrl* url_return,
- int *vmaj, int *vmin) const
-{
- return ns->find(type,vmaj,vmin,type_return,url_return);
+ return d->add(qmldircomponentsnetwork, uri, prefix, vmaj, vmin, importType, importDb, errorString);
}
/*!
@@ -834,7 +849,7 @@ void QDeclarativeImportDatabase::setPluginPathList(const QStringList &paths)
void QDeclarativeImportDatabase::addPluginPath(const QString& path)
{
if (qmlImportTrace())
- qDebug() << "QDeclarativeImportDatabase::addPluginPath" << path;
+ qDebug().nospace() << "QDeclarativeImportDatabase::addPluginPath: " << path;
QUrl url = QUrl(path);
if (url.isRelative() || url.scheme() == QLatin1String("file")) {
@@ -848,7 +863,7 @@ void QDeclarativeImportDatabase::addPluginPath(const QString& path)
void QDeclarativeImportDatabase::addImportPath(const QString& path)
{
if (qmlImportTrace())
- qDebug() << "QDeclarativeImportDatabase::addImportPath" << path;
+ qDebug().nospace() << "QDeclarativeImportDatabase::addImportPath: " << path;
if (path.isEmpty())
return;
@@ -882,7 +897,7 @@ void QDeclarativeImportDatabase::setImportPathList(const QStringList &paths)
bool QDeclarativeImportDatabase::importPlugin(const QString &filePath, const QString &uri, QString *errorString)
{
if (qmlImportTrace())
- qDebug() << "QDeclarativeImportDatabase::importPlugin" << uri << "from" << filePath;
+ qDebug().nospace() << "QDeclarativeImportDatabase::importPlugin: " << uri << " from " << filePath;
QFileInfo fileInfo(filePath);
const QString absoluteFilePath = fileInfo.absoluteFilePath();
diff --git a/src/declarative/qml/qdeclarativeimport_p.h b/src/declarative/qml/qdeclarativeimport_p.h
index 88246d4..84802de 100644
--- a/src/declarative/qml/qdeclarativeimport_p.h
+++ b/src/declarative/qml/qdeclarativeimport_p.h
@@ -65,9 +65,10 @@ QT_BEGIN_NAMESPACE
class QDeclarativeTypeNameCache;
class QDeclarativeEngine;
class QDir;
-
class QDeclarativeImportedNamespace;
class QDeclarativeImportsPrivate;
+class QDeclarativeImportDatabase;
+
class QDeclarativeImports
{
public:
@@ -79,7 +80,24 @@ public:
void setBaseUrl(const QUrl &url);
QUrl baseUrl() const;
- void cache(QDeclarativeTypeNameCache *cache, QDeclarativeEngine *) const;
+ bool resolveType(const QByteArray& type,
+ QDeclarativeType** type_return, QUrl* url_return,
+ int *version_major, int *version_minor,
+ QDeclarativeImportedNamespace** ns_return,
+ QString *errorString = 0) const;
+ bool resolveType(QDeclarativeImportedNamespace*,
+ const QByteArray& type,
+ QDeclarativeType** type_return, QUrl* url_return,
+ int *version_major, int *version_minor) const;
+
+ bool addImport(QDeclarativeImportDatabase *,
+ const QString& uri, const QString& prefix, int vmaj, int vmin,
+ QDeclarativeScriptParser::Import::Type importType,
+ const QDeclarativeDirComponents &qmldircomponentsnetwork,
+ QString *errorString);
+
+ void populateCache(QDeclarativeTypeNameCache *cache, QDeclarativeEngine *) const;
+
private:
friend class QDeclarativeImportDatabase;
QDeclarativeImportsPrivate *d;
@@ -102,21 +120,6 @@ public:
void setPluginPathList(const QStringList &paths);
void addPluginPath(const QString& path);
-
- bool addToImport(QDeclarativeImports*, const QDeclarativeDirComponents &qmldircomponentsnetwork,
- const QString& uri, const QString& prefix, int vmaj, int vmin,
- QDeclarativeScriptParser::Import::Type importType,
- QString *errorString);
- bool resolveType(const QDeclarativeImports&, const QByteArray& type,
- QDeclarativeType** type_return, QUrl* url_return,
- int *version_major, int *version_minor,
- QDeclarativeImportedNamespace** ns_return,
- QString *errorString = 0) const;
- bool resolveTypeInNamespace(QDeclarativeImportedNamespace*, const QByteArray& type,
- QDeclarativeType** type_return, QUrl* url_return,
- int *version_major, int *version_minor ) const;
-
-
private:
friend class QDeclarativeImportsPrivate;
QString resolvePlugin(const QDir &qmldirPath, const QString &qmldirPluginPath,
diff --git a/src/declarative/qml/qdeclarativeparser_p.h b/src/declarative/qml/qdeclarativeparser_p.h
index d192f3a..c58aebc 100644
--- a/src/declarative/qml/qdeclarativeparser_p.h
+++ b/src/declarative/qml/qdeclarativeparser_p.h
@@ -183,10 +183,9 @@ namespace QDeclarativeParser
};
Q_DECLARE_FLAGS(Pragmas, Pragma)
- QStringList codes;
- QStringList files;
- QList<int> lineNumbers;
- QList<Pragmas> pragmas;
+ QString code;
+ QString file;
+ Pragmas pragmas;
};
// The bytes to cast instances by to get to the QDeclarativeParserStatus
diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp
index 4e9e8d5..267642d 100644
--- a/src/declarative/util/qdeclarativeanimation.cpp
+++ b/src/declarative/util/qdeclarativeanimation.cpp
@@ -84,11 +84,6 @@ QT_BEGIN_NAMESPACE
element directly will result in an error.
*/
-/*!
- \class QDeclarativeAbstractAnimation
- \internal
-*/
-
QDeclarativeAbstractAnimation::QDeclarativeAbstractAnimation(QObject *parent)
: QObject(*(new QDeclarativeAbstractAnimationPrivate), parent)
{
@@ -574,12 +569,6 @@ void QDeclarativeAbstractAnimation::timelineComplete()
\sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
*/
-/*!
- \internal
- \class QDeclarativePauseAnimation
-*/
-
-
QDeclarativePauseAnimation::QDeclarativePauseAnimation(QObject *parent)
: QDeclarativeAbstractAnimation(*(new QDeclarativePauseAnimationPrivate), parent)
{
@@ -659,11 +648,6 @@ QAbstractAnimation *QDeclarativePauseAnimation::qtAnimation()
\sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
*/
-/*!
- \internal
- \class QDeclarativeColorAnimation
-*/
-
QDeclarativeColorAnimation::QDeclarativeColorAnimation(QObject *parent)
: QDeclarativePropertyAnimation(parent)
{
@@ -776,10 +760,6 @@ void QDeclarativeColorAnimation::setTo(const QColor &t)
\sa StateChangeScript
*/
-/*!
- \internal
- \class QDeclarativeScriptAction
-*/
QDeclarativeScriptAction::QDeclarativeScriptAction(QObject *parent)
:QDeclarativeAbstractAnimation(*(new QDeclarativeScriptActionPrivate), parent)
{
@@ -933,10 +913,6 @@ QAbstractAnimation *QDeclarativeScriptAction::qtAnimation()
\sa {QML Animation}, QtDeclarative
*/
-/*!
- \internal
- \class QDeclarativePropertyAction
-*/
QDeclarativePropertyAction::QDeclarativePropertyAction(QObject *parent)
: QDeclarativeAbstractAnimation(*(new QDeclarativePropertyActionPrivate), parent)
{
@@ -1185,12 +1161,6 @@ void QDeclarativePropertyAction::transition(QDeclarativeStateActions &actions,
\sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
*/
-
-/*!
- \internal
- \class QDeclarativeNumberAnimation
-*/
-
QDeclarativeNumberAnimation::QDeclarativeNumberAnimation(QObject *parent)
: QDeclarativePropertyAnimation(parent)
{
@@ -1276,7 +1246,7 @@ void QDeclarativeNumberAnimation::setTo(qreal t)
/*!
\qmlclass Vector3dAnimation QDeclarativeVector3dAnimation
- \ingroup qml-animation-transition
+ \ingroup qml-animation-transition
\since 4.7
\inherits PropertyAnimation
\brief The Vector3dAnimation element animates changes in QVector3d values.
@@ -1291,12 +1261,6 @@ void QDeclarativeNumberAnimation::setTo(qreal t)
\sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
*/
-
-/*!
- \internal
- \class QDeclarativeVector3dAnimation
-*/
-
QDeclarativeVector3dAnimation::QDeclarativeVector3dAnimation(QObject *parent)
: QDeclarativePropertyAnimation(parent)
{
@@ -1396,12 +1360,6 @@ void QDeclarativeVector3dAnimation::setTo(QVector3D t)
\sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
*/
-
-/*!
- \internal
- \class QDeclarativeRotationAnimation
-*/
-
QVariant _q_interpolateShortestRotation(qreal &f, qreal &t, qreal progress)
{
qreal newt = t;
@@ -1702,11 +1660,6 @@ void QDeclarativeSequentialAnimation::transition(QDeclarativeStateActions &actio
\sa SequentialAnimation, {QML Animation}, {declarative/animation/basics}{Animation basics example}
*/
-/*!
- \internal
- \class QDeclarativeParallelAnimation
-*/
-
QDeclarativeParallelAnimation::QDeclarativeParallelAnimation(QObject *parent) :
QDeclarativeAnimationGroup(parent)
{
@@ -2512,11 +2465,6 @@ void QDeclarativePropertyAnimation::transition(QDeclarativeStateActions &actions
\sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
*/
-
-/*!
- \internal
- \class QDeclarativeParentAnimation
-*/
QDeclarativeParentAnimation::QDeclarativeParentAnimation(QObject *parent)
: QDeclarativeAnimationGroup(*(new QDeclarativeParentAnimationPrivate), parent)
{
diff --git a/src/declarative/util/qdeclarativebind.cpp b/src/declarative/util/qdeclarativebind.cpp
index 86d08f5..88b45ae 100644
--- a/src/declarative/util/qdeclarativebind.cpp
+++ b/src/declarative/util/qdeclarativebind.cpp
@@ -72,7 +72,7 @@ public:
/*!
\qmlclass Binding QDeclarativeBind
- \ingroup qml-working-with-data
+ \ingroup qml-working-with-data
\since 4.7
\brief The Binding element allows arbitrary property bindings to be created.
@@ -95,18 +95,7 @@ public:
immediately pushed onto the new target.
\sa QtDeclarative
- */
-/*!
- \internal
- \class QDeclarativeBind
- \brief The QDeclarativeBind class allows arbitrary property bindings to be created.
-
- Simple bindings are usually earier to do in-place rather than creating a
- QDeclarativeBind item. For that reason, QDeclarativeBind is usually used to transfer property information
- from Qml to C++.
-
- \sa cppqml
- */
+*/
QDeclarativeBind::QDeclarativeBind(QObject *parent)
: QObject(*(new QDeclarativeBindPrivate), parent)
{
diff --git a/src/declarative/util/qdeclarativeconnections.cpp b/src/declarative/util/qdeclarativeconnections.cpp
index 293928e..15e5ac5 100644
--- a/src/declarative/util/qdeclarativeconnections.cpp
+++ b/src/declarative/util/qdeclarativeconnections.cpp
@@ -124,13 +124,6 @@ public:
\sa QtDeclarative
*/
-
-/*!
- \internal
- \class QDeclarativeConnections
- \brief The QDeclarativeConnections class describes generalized connections to signals.
-
-*/
QDeclarativeConnections::QDeclarativeConnections(QObject *parent) :
QObject(*(new QDeclarativeConnectionsPrivate), parent)
{
diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp
index 0162beb..7504c23 100644
--- a/src/declarative/util/qdeclarativelistmodel.cpp
+++ b/src/declarative/util/qdeclarativelistmodel.cpp
@@ -58,9 +58,6 @@ Q_DECLARE_METATYPE(QListModelInterface *)
QT_BEGIN_NAMESPACE
-#define DATA_ROLE_ID 1
-#define DATA_ROLE_NAME "data"
-
QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListModelData::instructions() const
{
return (QDeclarativeListModelParser::ListInstruction *)((char *)this + sizeof(ListModelData));
diff --git a/src/declarative/util/qdeclarativepropertychanges.cpp b/src/declarative/util/qdeclarativepropertychanges.cpp
index c28ada3..e897458 100644
--- a/src/declarative/util/qdeclarativepropertychanges.cpp
+++ b/src/declarative/util/qdeclarativepropertychanges.cpp
@@ -127,12 +127,6 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \internal
- \class QDeclarativePropertyChanges
- \brief The QDeclarativePropertyChanges class describes new property values for a state.
-*/
-
-/*!
\qmlproperty Object PropertyChanges::target
This property holds the object which contains the properties to be changed.
*/
diff --git a/src/declarative/util/qdeclarativestate.cpp b/src/declarative/util/qdeclarativestate.cpp
index 6e17cf2..1ed7923 100644
--- a/src/declarative/util/qdeclarativestate.cpp
+++ b/src/declarative/util/qdeclarativestate.cpp
@@ -123,9 +123,6 @@ bool QDeclarativeActionEvent::override(QDeclarativeActionEvent *other)
return false;
}
-/*!
- \internal
-*/
QDeclarativeStateOperation::QDeclarativeStateOperation(QObjectPrivate &dd, QObject *parent)
: QObject(dd, parent)
{
@@ -164,20 +161,6 @@ QDeclarativeStateOperation::QDeclarativeStateOperation(QObjectPrivate &dd, QObje
\sa {declarative/animation/states}{states example}, {qmlstates}{States},
{qdeclarativeanimation.html#transitions}{QML Transitions}, QtDeclarative
*/
-
-/*!
- \internal
- \class QDeclarativeState
- \brief The QDeclarativeState class allows you to define configurations of objects and properties.
-
-
- QDeclarativeState allows you to specify a state as a set of batched changes from the default
- configuration.
-
- \sa {states-transitions}{States and Transitions}
-*/
-
-
QDeclarativeState::QDeclarativeState(QObject *parent)
: QObject(*(new QDeclarativeStatePrivate), parent)
{
diff --git a/src/declarative/util/qdeclarativetransition.cpp b/src/declarative/util/qdeclarativetransition.cpp
index 21d7ded..478c7f4 100644
--- a/src/declarative/util/qdeclarativetransition.cpp
+++ b/src/declarative/util/qdeclarativetransition.cpp
@@ -99,12 +99,6 @@ QT_BEGIN_NAMESPACE
\sa {QML Animation}, {declarative/animation/states}{states example}, {qmlstates}{States}, {QtDeclarative}
*/
-/*!
- \internal
- \class QDeclarativeTransition
- \brief The QDeclarativeTransition class allows you to define animated transitions that occur on state changes.
-*/
-
//ParallelAnimationWrapper allows us to do a "callback" when the animation finishes, rather than connecting
//and disconnecting signals and slots frequently
class ParallelAnimationWrapper : public QParallelAnimationGroup
diff --git a/src/declarative/util/qdeclarativexmllistmodel.cpp b/src/declarative/util/qdeclarativexmllistmodel.cpp
index 7b3d4a8..47b502d 100644
--- a/src/declarative/util/qdeclarativexmllistmodel.cpp
+++ b/src/declarative/util/qdeclarativexmllistmodel.cpp
@@ -466,8 +466,6 @@ public:
QList<QDeclarativeXmlListModelRole *> roleObjects;
static void append_role(QDeclarativeListProperty<QDeclarativeXmlListModelRole> *list, QDeclarativeXmlListModelRole *role);
static void clear_role(QDeclarativeListProperty<QDeclarativeXmlListModelRole> *list);
- static void removeAt_role(QDeclarativeListProperty<QDeclarativeXmlListModelRole> *list, int i);
- static void insert_role(QDeclarativeListProperty<QDeclarativeXmlListModelRole> *list, int i, QDeclarativeXmlListModelRole *role);
QList<QList<QVariant> > data;
int redirectCount;
};
@@ -500,11 +498,6 @@ void QDeclarativeXmlListModelPrivate::clear_role(QDeclarativeListProperty<QDecla
}
/*!
- \class QDeclarativeXmlListModel
- \internal
-*/
-
-/*!
\qmlclass XmlListModel QDeclarativeXmlListModel
\ingroup qml-working-with-data
\since 4.7
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 0b3b164..57d1071 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -7758,19 +7758,22 @@ void QGraphicsItemPrivate::resetHeight()
}
/*!
- \property QGraphicsObject::children
- \internal
-*/
+ \property QGraphicsObject::children
+ \since 4.7
+ \internal
+ */
/*!
- \property QGraphicsObject::width
- \internal
-*/
+ \property QGraphicsObject::width
+ \since 4.7
+ \internal
+ */
/*!
- \property QGraphicsObject::height
- \internal
-*/
+ \property QGraphicsObject::height
+ \since 4.7
+ \internal
+ */
/*!
\property QGraphicsObject::parent
@@ -7985,24 +7988,6 @@ void QGraphicsItemPrivate::resetHeight()
*/
/*!
- \property QGraphicsObject::children
- \since 4.7
- \internal
-*/
-
-/*!
- \property QGraphicsObject::width
- \since 4.7
- \internal
-*/
-
-/*!
- \property QGraphicsObject::height
- \since 4.7
- \internal
-*/
-
-/*!
\class QAbstractGraphicsShapeItem
\brief The QAbstractGraphicsShapeItem class provides a common base for
all path items.
diff --git a/src/gui/graphicsview/qgraphicstransform.cpp b/src/gui/graphicsview/qgraphicstransform.cpp
index bd3f2ef..1f155c6 100644
--- a/src/gui/graphicsview/qgraphicstransform.cpp
+++ b/src/gui/graphicsview/qgraphicstransform.cpp
@@ -346,21 +346,24 @@ void QGraphicsScale::applyTo(QMatrix4x4 *matrix) const
/*!
\fn QGraphicsScale::xScaleChanged()
+ \since 4.7
- QGraphicsScale emits this signal when its xScale changes.
+ This signal is emitted whenever the \l xScale property changes.
*/
/*!
\fn QGraphicsScale::yScaleChanged()
+ \since 4.7
- QGraphicsScale emits this signal when its yScale changes.
+ This signal is emitted whenever the \l yScale property changes.
*/
/*!
\fn QGraphicsScale::zScaleChanged()
+ \since 4.7
- QGraphicsScale emits this signal when its zScale changes.
-*/
+ This signal is emitted whenever the \l zScale property changes.
+*/
/*!
\fn QGraphicsScale::scaleChanged()
@@ -583,27 +586,6 @@ void QGraphicsRotation::applyTo(QMatrix4x4 *matrix) const
\sa QGraphicsRotation::axis
*/
-/*!
- \fn QGraphicsScale::xScaleChanged()
- \since 4.7
-
- This signal is emitted whenever the \l xScale property changes.
-*/
-
-/*!
- \fn QGraphicsScale::yScaleChanged()
- \since 4.7
-
- This signal is emitted whenever the \l yScale property changes.
-*/
-
-/*!
- \fn QGraphicsScale::zScaleChanged()
- \since 4.7
-
- This signal is emitted whenever the \l zScale property changes.
-*/
-
#include "moc_qgraphicstransform.cpp"
QT_END_NAMESPACE
diff --git a/src/imports/particles/qdeclarativeparticles.cpp b/src/imports/particles/qdeclarativeparticles.cpp
index 5cd9c0c..edb69bc 100644
--- a/src/imports/particles/qdeclarativeparticles.cpp
+++ b/src/imports/particles/qdeclarativeparticles.cpp
@@ -165,14 +165,6 @@ void QDeclarativeParticleMotion::destroy(QDeclarativeParticle &particle)
It has no further properties.
*/
-
-/*!
- \internal
- \class QDeclarativeParticleMotionLinear
- \ingroup group_effects
- \brief The QDeclarativeParticleMotionLinear class moves the particles linearly.
-*/
-
void QDeclarativeParticleMotionLinear::advance(QDeclarativeParticle &p, int interval)
{
p.x += interval * p.x_velocity;
@@ -196,14 +188,6 @@ void QDeclarativeParticleMotionLinear::advance(QDeclarativeParticle &p, int inte
*/
/*!
- \internal
- \class QDeclarativeParticleMotionGravity
- \ingroup group_effects
- \brief The QDeclarativeParticleMotionGravity class moves the particles towards a point.
-
-*/
-
-/*!
\qmlproperty real ParticleMotionGravity::xattractor
\qmlproperty real ParticleMotionGravity::yattractor
These properties hold the x and y coordinates of the point attracting the particles.
@@ -311,16 +295,6 @@ Rectangle {
*/
/*!
- \internal
- \class QDeclarativeParticleMotionWander
- \ingroup group_effects
- \brief The QDeclarativeParticleMotionWander class moves particles in a somewhat random fashion.
-
- The particles will continue roughly in the original direction, however will randomly
- drift to each side.
-*/
-
-/*!
\qmlproperty real ParticleMotionWander::xvariance
\qmlproperty real ParticleMotionWander::yvariance
@@ -709,13 +683,6 @@ Rectangle {
\image particles.gif
*/
-/*!
- \internal
- \class QDeclarativeParticles
- \ingroup group_effects
- \brief The QDeclarativeParticles class generates and moves particles.
-*/
-
QDeclarativeParticles::QDeclarativeParticles(QDeclarativeItem *parent)
: QDeclarativeItem(*(new QDeclarativeParticlesPrivate), parent)
{
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 9e69816..943a195 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -5262,6 +5262,8 @@ QGLExtensions::Extensions QGLExtensions::currentContextExtensions()
glExtensions |= FragmentProgram;
if (extensions.match("GL_ARB_fragment_shader"))
glExtensions |= FragmentShader;
+ if (extensions.match("GL_ARB_ES2_compatibility"))
+ glExtensions |= ES2Compatibility;
if (extensions.match("GL_ARB_texture_mirrored_repeat"))
glExtensions |= MirroredRepeat;
if (extensions.match("GL_EXT_framebuffer_object"))
@@ -5282,6 +5284,7 @@ QGLExtensions::Extensions QGLExtensions::currentContextExtensions()
glExtensions |= FramebufferObject;
glExtensions |= GenerateMipmap;
glExtensions |= FragmentShader;
+ glExtensions |= ES2Compatibility;
#endif
#if defined(QT_OPENGL_ES_1)
if (extensions.match("GL_OES_framebuffer_object"))
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index 387c8f7..623eeaf 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -284,7 +284,8 @@ public:
DDSTextureCompression = 0x00008000,
ETC1TextureCompression = 0x00010000,
PVRTCTextureCompression = 0x00020000,
- FragmentShader = 0x00040000
+ FragmentShader = 0x00040000,
+ ES2Compatibility = 0x00080000
};
Q_DECLARE_FLAGS(Extensions, Extension)
diff --git a/src/opengl/qgl_win.cpp b/src/opengl/qgl_win.cpp
index 5ab944a..8eb6177 100644
--- a/src/opengl/qgl_win.cpp
+++ b/src/opengl/qgl_win.cpp
@@ -1042,7 +1042,7 @@ int QGLContext::choosePixelFormat(void* dummyPfd, HDC pdc)
iAttributes[i++] = WGL_DRAW_TO_WINDOW_ARB;
iAttributes[i++] = TRUE;
iAttributes[i++] = WGL_COLOR_BITS_ARB;
- iAttributes[i++] = 32;
+ iAttributes[i++] = 24;
iAttributes[i++] = WGL_DOUBLE_BUFFER_ARB;
iAttributes[i++] = d->glFormat.doubleBuffer();
if (d->glFormat.stereo()) {
diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp
index 74382b0..bc1c009 100644
--- a/src/opengl/qglshaderprogram.cpp
+++ b/src/opengl/qglshaderprogram.cpp
@@ -97,6 +97,10 @@ QT_BEGIN_NAMESPACE
to just features that are present in GLSL/ES, and avoid
standard variable names that only work on the desktop.
+ If the \c{GL_ARB_ES2_compatibility} extension is present,
+ then the above prefix is not added because the desktop OpenGL
+ implementation supports precision qualifiers.
+
\section1 Simple shader example
\snippet doc/src/snippets/code/src_opengl_qglshaderprogram.cpp 1
@@ -394,8 +398,10 @@ bool QGLShader::compileSourceCode(const char *source)
srclen.append(GLint(headerLen));
}
#ifdef QGL_DEFINE_QUALIFIERS
- src.append(qualifierDefines);
- srclen.append(GLint(sizeof(qualifierDefines) - 1));
+ if (!(QGLExtensions::glExtensions() & QGLExtensions::ES2Compatibility)) {
+ src.append(qualifierDefines);
+ srclen.append(GLint(sizeof(qualifierDefines) - 1));
+ }
#endif
#ifdef QGL_REDEFINE_HIGHP
if (d->shaderType == Fragment) {
diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp
index 9a35ac5..66dabfa 100644
--- a/src/sql/drivers/odbc/qsql_odbc.cpp
+++ b/src/sql/drivers/odbc/qsql_odbc.cpp
@@ -2106,7 +2106,7 @@ void QODBCDriverPrivate::checkSqlServer()
serverType = QString::fromUtf8((const char *)serverString.constData(), t);
#endif
isFreeTDSDriver = serverType.contains(QLatin1String("tdsodbc"), Qt::CaseInsensitive);
- unicode = isFreeTDSDriver == false;
+ unicode = unicode && !isFreeTDSDriver;
}
}
diff --git a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
index 1a28b71..896d69e 100644
--- a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
+++ b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
@@ -590,7 +590,7 @@ void tst_QDeclarativeGridView::currentIndex()
QCOMPARE(gridview->currentIndex(), 35);
QCOMPARE(gridview->currentItem(), findItem<QDeclarativeItem>(contentItem, "wrapper", 35));
QCOMPARE(gridview->currentItem()->y(), gridview->highlightItem()->y());
- QCOMPARE(gridview->contentY(), 399.0);
+ QCOMPARE(gridview->contentY(), 400.0);
gridview->moveCurrentIndexRight();
QCOMPARE(gridview->currentIndex(), 36);
@@ -629,7 +629,7 @@ void tst_QDeclarativeGridView::currentIndex()
gridview->moveCurrentIndexLeft();
QCOMPARE(gridview->currentIndex(), model.count()-1);
- QTRY_COMPARE(gridview->contentY(), 879.0);
+ QTRY_COMPARE(gridview->contentY(), 880.0);
gridview->moveCurrentIndexRight();
QCOMPARE(gridview->currentIndex(), 0);
diff --git a/tests/auto/declarative/qdeclarativelistview/data/itemlist.qml b/tests/auto/declarative/qdeclarativelistview/data/itemlist.qml
index 66728d6..9ea5953 100644
--- a/tests/auto/declarative/qdeclarativelistview/data/itemlist.qml
+++ b/tests/auto/declarative/qdeclarativelistview/data/itemlist.qml
@@ -13,17 +13,17 @@ Rectangle {
objectName: "itemModel"
Rectangle {
objectName: "item1"
- height: view.height; width: view.width; color: "#FFFEF0"
+ height: ListView.view.height; width: view.width; color: "#FFFEF0"
Text { objectName: "text1"; text: "index: " + parent.VisualItemModel.index; font.bold: true; anchors.centerIn: parent }
}
Rectangle {
objectName: "item2"
- height: view.height; width: view.width; color: "#F0FFF7"
+ height: ListView.view.height; width: view.width; color: "#F0FFF7"
Text { objectName: "text2"; text: "index: " + parent.VisualItemModel.index; font.bold: true; anchors.centerIn: parent }
}
Rectangle {
objectName: "item3"
- height: view.height; width: view.width; color: "#F4F0FF"
+ height: ListView.view.height; width: view.width; color: "#F4F0FF"
Text { objectName: "text3"; text: "index: " + parent.VisualItemModel.index; font.bold: true; anchors.centerIn: parent }
}
}
diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
index 9c24e03..bf4754d 100644
--- a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
+++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
@@ -979,7 +979,7 @@ void tst_QDeclarativeListView::currentIndex()
// current item should be 20th item at startup
// and current item should be in view
QCOMPARE(listview->currentIndex(), 20);
- QCOMPARE(listview->contentY(), 99.0);
+ QCOMPARE(listview->contentY(), 100.0);
QCOMPARE(listview->currentItem(), findItem<QDeclarativeItem>(contentItem, "wrapper", 20));
QCOMPARE(listview->highlightItem()->y(), listview->currentItem()->y());
@@ -1002,7 +1002,7 @@ void tst_QDeclarativeListView::currentIndex()
listview->decrementCurrentIndex();
QCOMPARE(listview->currentIndex(), model.count()-1);
- QTRY_COMPARE(listview->contentY(), 279.0);
+ QTRY_COMPARE(listview->contentY(), 280.0);
listview->incrementCurrentIndex();
QCOMPARE(listview->currentIndex(), 0);
@@ -1066,6 +1066,7 @@ void tst_QDeclarativeListView::itemList()
QDeclarativeItem *item = findItem<QDeclarativeItem>(contentItem, "item1");
QTRY_VERIFY(item);
QTRY_COMPARE(item->x(), 0.0);
+ QCOMPARE(item->height(), listview->height());
QDeclarativeText *text = findItem<QDeclarativeText>(contentItem, "text1");
QTRY_VERIFY(text);
diff --git a/tests/auto/declarative/qdeclarativevisualdatamodel/data/datalist.qml b/tests/auto/declarative/qdeclarativevisualdatamodel/data/datalist.qml
new file mode 100644
index 0000000..a798f77
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevisualdatamodel/data/datalist.qml
@@ -0,0 +1,15 @@
+import Qt 4.7
+
+ListView {
+ width: 100
+ height: 100
+ anchors.fill: parent
+ model: myModel
+ delegate: Component {
+ Rectangle {
+ height: 25
+ width: 100
+ Text { objectName: "display"; text: display }
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp b/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp
index e0f32ea..3cd786f 100644
--- a/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp
+++ b/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp
@@ -83,6 +83,7 @@ public:
private slots:
void rootIndex();
+ void updateLayout();
void objectListModel();
private:
@@ -155,6 +156,40 @@ void tst_qdeclarativevisualdatamodel::rootIndex()
delete obj;
}
+void tst_qdeclarativevisualdatamodel::updateLayout()
+{
+ QDeclarativeView view;
+
+ QStandardItemModel model;
+ initStandardTreeModel(&model);
+
+ view.rootContext()->setContextProperty("myModel", &model);
+
+ view.setSource(QUrl::fromLocalFile(SRCDIR "/data/datalist.qml"));
+
+ QDeclarativeListView *listview = qobject_cast<QDeclarativeListView*>(view.rootObject());
+ QVERIFY(listview != 0);
+
+ QDeclarativeItem *contentItem = listview->contentItem();
+ QVERIFY(contentItem != 0);
+
+ QDeclarativeText *name = findItem<QDeclarativeText>(contentItem, "display", 0);
+ QCOMPARE(name->text(), QString("Row 1 Item"));
+ name = findItem<QDeclarativeText>(contentItem, "display", 1);
+ QCOMPARE(name->text(), QString("Row 2 Item"));
+ name = findItem<QDeclarativeText>(contentItem, "display", 2);
+ QCOMPARE(name->text(), QString("Row 3 Item"));
+
+ model.invisibleRootItem()->sortChildren(0, Qt::DescendingOrder);
+
+ name = findItem<QDeclarativeText>(contentItem, "display", 0);
+ QCOMPARE(name->text(), QString("Row 3 Item"));
+ name = findItem<QDeclarativeText>(contentItem, "display", 1);
+ QCOMPARE(name->text(), QString("Row 2 Item"));
+ name = findItem<QDeclarativeText>(contentItem, "display", 2);
+ QCOMPARE(name->text(), QString("Row 1 Item"));
+}
+
void tst_qdeclarativevisualdatamodel::objectListModel()
{
QDeclarativeView view;
diff --git a/tests/auto/qdbusthreading/tst_qdbusthreading.cpp b/tests/auto/qdbusthreading/tst_qdbusthreading.cpp
index 94771a8..9d96ad8 100644
--- a/tests/auto/qdbusthreading/tst_qdbusthreading.cpp
+++ b/tests/auto/qdbusthreading/tst_qdbusthreading.cpp
@@ -70,7 +70,12 @@ public:
QSemaphore sem1, sem2;
volatile bool success;
QEventLoop *loop;
- const char *functionSpy;
+ enum FunctionSpy {
+ NoMethod = 0,
+ Adaptor_method,
+ Object_method
+ } functionSpy;
+
QThread *threadSpy;
int signalSpy;
@@ -127,7 +132,7 @@ public:
public Q_SLOTS:
void method()
{
- tst_QDBusThreading::self()->functionSpy = Q_FUNC_INFO;
+ tst_QDBusThreading::self()->functionSpy = tst_QDBusThreading::Adaptor_method;
tst_QDBusThreading::self()->threadSpy = QThread::currentThread();
emit signal();
}
@@ -155,7 +160,7 @@ public:
public Q_SLOTS:
void method()
{
- tst_QDBusThreading::self()->functionSpy = Q_FUNC_INFO;
+ tst_QDBusThreading::self()->functionSpy = tst_QDBusThreading::Object_method;
tst_QDBusThreading::self()->threadSpy = QThread::currentThread();
emit signal();
deleteLater();
@@ -198,7 +203,7 @@ void Thread::run()
static const char myConnectionName[] = "connection";
tst_QDBusThreading::tst_QDBusThreading()
- : loop(0), functionSpy(0), threadSpy(0)
+ : loop(0), functionSpy(NoMethod), threadSpy(0)
{
_self = this;
QCoreApplication::instance()->thread()->setObjectName("Main thread");
@@ -420,22 +425,22 @@ void tst_QDBusThreading::registerObjectInOtherThread()
QTest::qWait(100);
QCOMPARE(signalSpy, 0);
- functionSpy = 0;
+ functionSpy = NoMethod;
threadSpy = 0;
QDBusReply<void> reply = iface.call("method");
QVERIFY(reply.isValid());
- QCOMPARE(functionSpy, "void Object::method()");
+ QCOMPARE(functionSpy, Object_method);
QCOMPARE(threadSpy, th);
QTest::qWait(100);
QCOMPARE(signalSpy, 1);
sem2.acquire(); // the object is gone
- functionSpy = 0;
+ functionSpy = NoMethod;
threadSpy = 0;
reply = iface.call("method");
QVERIFY(!reply.isValid());
- QCOMPARE(functionSpy, (const char*)0);
+ QCOMPARE(functionSpy, NoMethod);
QCOMPARE(threadSpy, (QThread*)0);
}
@@ -468,36 +473,36 @@ void tst_QDBusThreading::registerAdaptorInOtherThread()
connect(&adaptor, SIGNAL(signal()), SLOT(signalSpySlot()));
QCOMPARE(signalSpy, 0);
- functionSpy = 0;
+ functionSpy = NoMethod;
threadSpy = 0;
QDBusReply<void> reply = adaptor.call("method");
QVERIFY(reply.isValid());
- QCOMPARE(functionSpy, "void Adaptor::method()");
+ QCOMPARE(functionSpy, Adaptor_method);
QCOMPARE(threadSpy, th);
QTest::qWait(100);
QCOMPARE(signalSpy, 1);
- functionSpy = 0;
+ functionSpy = NoMethod;
threadSpy = 0;
reply = object.call("method");
QVERIFY(reply.isValid());
- QCOMPARE(functionSpy, "void Object::method()");
+ QCOMPARE(functionSpy, Object_method);
QCOMPARE(threadSpy, th);
QTest::qWait(100);
QCOMPARE(signalSpy, 1);
sem2.acquire(); // the object is gone
- functionSpy = 0;
+ functionSpy = NoMethod;
threadSpy = 0;
reply = adaptor.call("method");
QVERIFY(!reply.isValid());
- QCOMPARE(functionSpy, (const char*)0);
+ QCOMPARE(functionSpy, NoMethod);
QCOMPARE(threadSpy, (QThread*)0);
reply = object.call("method");
QVERIFY(!reply.isValid());
- QCOMPARE(functionSpy, (const char*)0);
+ QCOMPARE(functionSpy, NoMethod);
QCOMPARE(threadSpy, (QThread*)0);
}
diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
index 01d7783..306b5f8 100644
--- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
@@ -289,6 +289,8 @@ private Q_SLOTS:
void symbianOpenCDataUrlCrash();
+ void qtbug12908compressedHttpReply();
+
// NOTE: This test must be last!
void parentingRepliesToTheApp();
};
@@ -4274,6 +4276,30 @@ void tst_QNetworkReply::symbianOpenCDataUrlCrash()
QCOMPARE(reply->header(QNetworkRequest::ContentLengthHeader).toLongLong(), qint64(598));
}
+// TODO:
+// Prepare a gzip that has one chunk that expands to the size mentioned in the bugreport.
+// Then have a custom HTTP server that waits after this chunk so the returning gets
+// triggered.
+void tst_QNetworkReply::qtbug12908compressedHttpReply()
+{
+ QString header("HTTP/1.0 200 OK\r\nContent-Encoding: gzip\r\nContent-Length: 63\r\n\r\n");
+
+ // dd if=/dev/zero of=qtbug-12908 bs=16384 count=1 && gzip qtbug-12908 && base64 -w 0 qtbug-12908.gz
+ QString encodedFile("H4sICDdDaUwAA3F0YnVnLTEyOTA4AO3BMQEAAADCoPVPbQwfoAAAAAAAAAAAAAAAAAAAAIC3AYbSVKsAQAAA");
+ QByteArray decodedFile = QByteArray::fromBase64(encodedFile.toAscii());
+
+ MiniHttpServer server(header.toAscii() + decodedFile);
+ server.doClose = true;
+
+ QNetworkRequest request(QUrl("http://localhost:" + QString::number(server.serverPort())));
+ QNetworkReplyPtr reply = manager.get(request);
+
+ connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
+ QTestEventLoop::instance().enterLoop(10);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+
+ QCOMPARE(reply->error(), QNetworkReply::NoError);
+}
// NOTE: This test must be last testcase in tst_qnetworkreply!
diff --git a/tools/configure/configure.pro b/tools/configure/configure.pro
index 73f3317..a3473af 100644
--- a/tools/configure/configure.pro
+++ b/tools/configure/configure.pro
@@ -28,7 +28,7 @@ INCLUDEPATH += \
$$QT_SOURCE_TREE/src/corelib/global \
$$QT_BUILD_TREE/include \
$$QT_BUILD_TREE/include/QtCore \
- $$QT_BUILD_TREE/tools/shared
+ $$QT_SOURCE_TREE/tools/shared
HEADERS = configureapp.h environment.h tools.h\
$$QT_SOURCE_TREE/src/corelib/tools/qbytearray.h \
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 7049306..e1d7275 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -341,7 +341,7 @@ Configure::Configure(int& argc, char** argv)
dictionary[ "ACCESSIBILITY" ] = "yes";
dictionary[ "OPENGL" ] = "yes";
dictionary[ "OPENVG" ] = "no";
- dictionary[ "IPV6" ] = "yes"; // Always, dynamicly loaded
+ dictionary[ "IPV6" ] = "yes"; // Always, dynamically loaded
dictionary[ "OPENSSL" ] = "auto";
dictionary[ "DBUS" ] = "auto";
dictionary[ "S60" ] = "yes";
@@ -2149,7 +2149,7 @@ bool Configure::checkAvailability(const QString &part)
available = (paths.size() == 0);
if (!available) {
- if (epocRoot.isNull() || epocRoot == "")
+ if (epocRoot.isEmpty())
epocRoot = "<empty string>";
cout << endl
<< "The QtMultimedia audio backend will not be built because required" << endl
@@ -2700,7 +2700,7 @@ void Configure::generateOutputVars()
QString set_config = dictionary["QCONFIG"];
if (possible_configs.contains(set_config)) {
- foreach(QString cfg, possible_configs) {
+ foreach (const QString &cfg, possible_configs) {
qtConfig += (cfg + "-config");
if (cfg == set_config)
break;
@@ -2826,7 +2826,7 @@ void Configure::generateCachefile()
QStringList buildParts;
buildParts << "libs" << "tools" << "examples" << "demos" << "docs" << "translations";
- foreach(QString item, disabledBuildParts) {
+ foreach (const QString &item, disabledBuildParts) {
buildParts.removeAll(item);
}
cacheStream << "QT_BUILD_PARTS = " << buildParts.join(" ") << endl;
@@ -3139,7 +3139,7 @@ void Configure::generateConfigfiles()
QStringList kbdDrivers = dictionary["KBD_DRIVERS"].split(" ");;
QStringList allKbdDrivers;
allKbdDrivers<<"tty"<<"usb"<<"sl5000"<<"yopy"<<"vr41xx"<<"qvfb"<<"um";
- foreach(QString kbd, allKbdDrivers) {
+ foreach (const QString &kbd, allKbdDrivers) {
if (!kbdDrivers.contains(kbd))
tmpStream<<"#define QT_NO_QWS_KBD_"<<kbd.toUpper()<<endl;
}
@@ -3147,7 +3147,7 @@ void Configure::generateConfigfiles()
QStringList mouseDrivers = dictionary["MOUSE_DRIVERS"].split(" ");
QStringList allMouseDrivers;
allMouseDrivers << "pc"<<"bus"<<"linuxtp"<<"yopy"<<"vr41xx"<<"tslib"<<"qvfb";
- foreach(QString mouse, allMouseDrivers) {
+ foreach (const QString &mouse, allMouseDrivers) {
if (!mouseDrivers.contains(mouse))
tmpStream<<"#define QT_NO_QWS_MOUSE_"<<mouse.toUpper()<<endl;
}
@@ -3155,7 +3155,7 @@ void Configure::generateConfigfiles()
QStringList gfxDrivers = dictionary["GFX_DRIVERS"].split(" ");
QStringList allGfxDrivers;
allGfxDrivers<<"linuxfb"<<"transformed"<<"qvfb"<<"vnc"<<"multiscreen"<<"ahi";
- foreach(QString gfx, allGfxDrivers) {
+ foreach (const QString &gfx, allGfxDrivers) {
if (!gfxDrivers.contains(gfx))
tmpStream<<"#define QT_NO_QWS_"<<gfx.toUpper()<<endl;
}
@@ -3163,7 +3163,7 @@ void Configure::generateConfigfiles()
tmpStream<<"#define Q_WS_QWS"<<endl;
QStringList depths = dictionary[ "QT_QWS_DEPTH" ].split(" ");
- foreach(QString depth, depths)
+ foreach (const QString &depth, depths)
tmpStream<<"#define QT_QWS_DEPTH_"+depth<<endl;
}
diff --git a/tools/configure/environment.cpp b/tools/configure/environment.cpp
index 943a8a2..03fd0cc 100644
--- a/tools/configure/environment.cpp
+++ b/tools/configure/environment.cpp
@@ -281,8 +281,7 @@ static QByteArray qt_create_environment(const QStringList &environment)
pos += tmpSize;
}
// add the user environment
- for (QStringList::ConstIterator it = environment.begin(); it != environment.end(); it++ ) {
- QString tmp = *it;
+ foreach (const QString &tmp, environment) {
uint tmpSize = sizeof(wchar_t) * (tmp.length() + 1);
envlist.resize(envlist.size() + tmpSize);
memcpy(envlist.data() + pos, tmp.utf16(), tmpSize);
@@ -386,7 +385,7 @@ int Environment::execute(QStringList arguments, const QStringList &additionalEnv
switch(GetLastError()) {
case E2BIG:
cerr << "execute: Argument list exceeds 1024 bytes" << endl;
- foreach(QString arg, arguments)
+ foreach (const QString &arg, arguments)
cerr << " (" << arg.toLocal8Bit().constData() << ")" << endl;
break;
case ENOENT:
@@ -400,7 +399,7 @@ int Environment::execute(QStringList arguments, const QStringList &additionalEnv
break;
default:
cerr << "execute: Unknown error" << endl;
- foreach(QString arg, arguments)
+ foreach (const QString &arg, arguments)
cerr << " (" << arg.toLocal8Bit().constData() << ")" << endl;
break;
}
diff --git a/tools/configure/tools.cpp b/tools/configure/tools.cpp
index c4625af..c91f048 100644
--- a/tools/configure/tools.cpp
+++ b/tools/configure/tools.cpp
@@ -91,8 +91,8 @@ void Tools::checkLicense(QMap<QString,QString> &dictionary, QMap<QString,QString
QStringList components = buffer.split( '=' );
if ( components.size() >= 2 ) {
QStringList::Iterator it = components.begin();
- QString key = (*it++).trimmed().replace( "\"", QString() ).toUpper();
- QString value = (*it++).trimmed().replace( "\"", QString() );
+ QString key = (*it++).trimmed().remove('"').toUpper();
+ QString value = (*it++).trimmed().remove('"');
licenseInfo[ key ] = value;
}
}
@@ -111,7 +111,7 @@ void Tools::checkLicense(QMap<QString,QString> &dictionary, QMap<QString,QString
// Verify license info...
QString licenseKey = licenseInfo["LICENSEKEYEXT"];
QByteArray clicenseKey = licenseKey.toLatin1();
- //We check the licence
+ //We check the license
static const char * const SEP = "-";
char *licenseParts[NUMBER_OF_PARTS];
int partNumber = 0;
@@ -218,7 +218,7 @@ void Tools::checkLicense(QMap<QString,QString> &dictionary, QMap<QString,QString
if (QFile::exists(dictionary["QT_SOURCE_TREE"] + "/.LICENSE")) {
// Generic, no-suffix license
- dictionary["LICENSE_EXTENSION"] = QString();
+ dictionary["LICENSE_EXTENSION"].clear();
} else if (dictionary["LICENSE_EXTENSION"].isEmpty()) {
cout << "License file does not contain proper license key." << endl;
dictionary["DONE"] = "error";
@@ -239,7 +239,7 @@ void Tools::checkLicense(QMap<QString,QString> &dictionary, QMap<QString,QString
fromLicenseFile += "-US";
if (!CopyFile((wchar_t*)QDir::toNativeSeparators(fromLicenseFile).utf16(),
- (wchar_t*)QDir::toNativeSeparators(toLicenseFile).utf16(), FALSE)) {
+ (wchar_t*)QDir::toNativeSeparators(toLicenseFile).utf16(), false)) {
cout << "Failed to copy license file (" << fromLicenseFile << ")";
dictionary["DONE"] = "error";
return;