diff --git a/doc/qt.index b/doc/qt.index index 822a064dd4f6a4ffae545f069443f0ff38559dde..372ab49c575fd5d7ba9ce61b95bea43b88497e58 100644 --- a/doc/qt.index +++ b/doc/qt.index @@ -76150,14 +76150,14 @@ <contents name="qt-for-embedded-linux" title="Qt for Embedded Linux" level="1"/> </page> <function access="public" threadsafety="unspecified" status="commendable" name="QWIDGETSIZE_MAX" href="qwidget.html#QWIDGETSIZE_MAX" location="qwidget.cpp" virtual="non" meta="macrowithoutparams" const="false" static="false" overload="false" relates="QWidget" type="" signature="QWIDGETSIZE_MAX()"/> - <page access="public" status="commendable" name="MouseRegion" href="qml-mouseregion.html" title="QML MouseRegion Element Reference" fulltitle="QML MouseRegion Element Reference" subtitle="" location="qfxmouseregion.cpp"> - <page access="public" status="commendable" name="mouseX" href="mousex.html" title="" fulltitle="" subtitle="" location="qfxmouseregion.cpp"/> - <page access="public" status="commendable" name="enabled" href="enabled.html" title="" fulltitle="" subtitle="" location="qfxmouseregion.cpp"/> - <page access="public" status="commendable" name="hoverEnabled" href="hoverenabled.html" title="" fulltitle="" subtitle="" location="qfxmouseregion.cpp"/> - <page access="public" status="commendable" name="containsMouse" href="containsmouse.html" title="" fulltitle="" subtitle="" location="qfxmouseregion.cpp"/> - <page access="public" status="commendable" name="pressed" href="pressed.html" title="" fulltitle="" subtitle="" location="qfxmouseregion.cpp"/> - <page access="public" status="commendable" name="acceptedButtons" href="acceptedbuttons.html" title="" fulltitle="" subtitle="" location="qfxmouseregion.cpp"/> - <page access="public" status="commendable" name="drag.target" href="drag-target.html" title="" fulltitle="" subtitle="" location="qfxmouseregion.cpp"/> + <page access="public" status="commendable" name="MouseArea" href="qml-mousearea.html" title="QML MouseArea Element Reference" fulltitle="QML MouseArea Element Reference" subtitle="" location="qfxmousearea.cpp"> + <page access="public" status="commendable" name="mouseX" href="mousex.html" title="" fulltitle="" subtitle="" location="qfxmousearea.cpp"/> + <page access="public" status="commendable" name="enabled" href="enabled.html" title="" fulltitle="" subtitle="" location="qfxmousearea.cpp"/> + <page access="public" status="commendable" name="hoverEnabled" href="hoverenabled.html" title="" fulltitle="" subtitle="" location="qfxmousearea.cpp"/> + <page access="public" status="commendable" name="containsMouse" href="containsmouse.html" title="" fulltitle="" subtitle="" location="qfxmousearea.cpp"/> + <page access="public" status="commendable" name="pressed" href="pressed.html" title="" fulltitle="" subtitle="" location="qfxmousearea.cpp"/> + <page access="public" status="commendable" name="acceptedButtons" href="acceptedbuttons.html" title="" fulltitle="" subtitle="" location="qfxmousearea.cpp"/> + <page access="public" status="commendable" name="drag.target" href="drag-target.html" title="" fulltitle="" subtitle="" location="qfxmousearea.cpp"/> </page> <page access="public" status="commendable" name="http://www.freedesktop.org/" href="http-www-freedesktop-org.html" subtype="externalpage" title="freedesktop.org" fulltitle="freedesktop.org" subtitle="" location="external-resources.qdoc"/> <page access="public" status="commendable" name="http://www.freedesktop.org/Standards/xembed-spec" href="http-www-freedesktop-org-standards-xembed-spec.html" subtype="externalpage" title="XEmbed Specification" fulltitle="XEmbed Specification" subtitle="" location="external-resources.qdoc"/> diff --git a/share/qtcreator/qmldesigner/Button.qml b/share/qtcreator/qmldesigner/Button.qml index 22b2a9c0634cd6de0657acacb85d998af44ffdb2..c7f7b72cbc21b77ceffa36bb3007b3a0f9cc3b0d 100644 --- a/share/qtcreator/qmldesigner/Button.qml +++ b/share/qtcreator/qmldesigner/Button.qml @@ -57,8 +57,8 @@ Rectangle { verticalAlignment: "AlignVCenter"; } - MouseRegion { - id: mouseRegion + MouseArea { + id: mouseArea anchors.fill: parent onReleased: { parent.clicked.emit(); } } @@ -66,7 +66,7 @@ Rectangle { states: [ State { name: "released" - when: !mouseRegion.pressed + when: !mouseArea.pressed PropertyChanges { target: buttonGradientRectangle @@ -75,7 +75,7 @@ Rectangle { }, State { name: "pressed" - when: mouseRegion.pressed + when: mouseArea.pressed PropertyChanges { target: buttonGradientRectangle diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/images/mouse-region-icon.png b/share/qtcreator/qmldesigner/propertyeditor/Qt/images/mouse-area-icon.png similarity index 100% rename from share/qtcreator/qmldesigner/propertyeditor/Qt/images/mouse-region-icon.png rename to share/qtcreator/qmldesigner/propertyeditor/Qt/images/mouse-area-icon.png diff --git a/share/qtcreator/qmldesigner/welcomescreen.qml b/share/qtcreator/qmldesigner/welcomescreen.qml index 81a4cc435641bb50f97a3fa3285f344eb5cd2d3a..95d449a9cfe0915d0e3cd6e299d94d3ad8863e00 100644 --- a/share/qtcreator/qmldesigner/welcomescreen.qml +++ b/share/qtcreator/qmldesigner/welcomescreen.qml @@ -110,7 +110,7 @@ Image { text: name } - MouseRegion { + MouseArea { anchors.top: fileDelegateText.top anchors.left: fileDelegateText.left anchors.right: fileDelegateText.right diff --git a/src/plugins/qmldesigner/components/itemlibrary/qml/ItemView.qml b/src/plugins/qmldesigner/components/itemlibrary/qml/ItemView.qml index bbec3c44bc72ec2be579f8a607baea3a3e01f6bf..4feebedbee9d2efb76d81da802627a1697eafe4d 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/qml/ItemView.qml +++ b/src/plugins/qmldesigner/components/itemlibrary/qml/ItemView.qml @@ -111,8 +111,8 @@ Item { color: style.itemNameTextColor } - MouseRegion { - id: mouseRegion + MouseArea { + id: mouseArea anchors.fill: parent property bool reallyPressed: false diff --git a/src/plugins/qmldesigner/components/itemlibrary/qml/ItemsView.qml b/src/plugins/qmldesigner/components/itemlibrary/qml/ItemsView.qml index 62f0fc04137d840266a8a7b733e18898f48b2b52..a00005388b3ba9e8fd76200affb1a89b6206a564 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/qml/ItemsView.qml +++ b/src/plugins/qmldesigner/components/itemlibrary/qml/ItemsView.qml @@ -59,7 +59,7 @@ Rectangle { /* workaround: without this, a completed drag and drop operation would result in the drag being continued when QmlView re-gains focus */ - MouseRegion { + MouseArea { anchors.fill: parent hoverEnabled: true onEntered: if (!pressed) itemsView.stopDragAndDrop diff --git a/src/plugins/qmldesigner/components/itemlibrary/qml/Scrollbar.qml b/src/plugins/qmldesigner/components/itemlibrary/qml/Scrollbar.qml index c729530a0b62c60e851c4894205a7b437c410311..e4c049f83873f385c1015d59480400e43cdac45c 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/qml/Scrollbar.qml +++ b/src/plugins/qmldesigner/components/itemlibrary/qml/Scrollbar.qml @@ -87,7 +87,7 @@ Item { onHeightChanged: updateHandle() - MouseRegion { + MouseArea { anchors.left: parent.left anchors.right: parent.right anchors.top: parent.top @@ -125,7 +125,7 @@ Item { } } - MouseRegion { + MouseArea { anchors.fill: parent drag.target: parent drag.axis: "YAxis" @@ -134,7 +134,7 @@ Item { } } - MouseRegion { + MouseArea { anchors.left: parent.left anchors.right: parent.right anchors.top: handle.bottom diff --git a/src/plugins/qmldesigner/components/itemlibrary/qml/SectionView.qml b/src/plugins/qmldesigner/components/itemlibrary/qml/SectionView.qml index 555cb8b9ab9b71c9f571d59e488d61cb5ada177b..cff06fde81320ee60ddb9a764d8ace8661ef1eb1 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/qml/SectionView.qml +++ b/src/plugins/qmldesigner/components/itemlibrary/qml/SectionView.qml @@ -107,7 +107,7 @@ Column { text: sectionName color: style.sectionTitleTextColor } - MouseRegion { + MouseArea { anchors.fill: parent onClicked: { if (itemHighlight.visible && diff --git a/src/plugins/qmldesigner/components/stateseditor/stateslist.qml b/src/plugins/qmldesigner/components/stateseditor/stateslist.qml index b97bb85522b398e2999658bdbfdd7cf330e2b7de..ca6585b2aac6720219a6031c278ae1ad094a08b3 100644 --- a/src/plugins/qmldesigner/components/stateseditor/stateslist.qml +++ b/src/plugins/qmldesigner/components/stateseditor/stateslist.qml @@ -28,7 +28,7 @@ Rectangle { // TextInputs don't loose focus automatically when user clicks away, have to be done explicitly signal unFocus - MouseRegion { + MouseArea { anchors.fill:parent hoverEnabled:true onExited: root.unFocus(); @@ -201,7 +201,7 @@ Rectangle { } } - MouseRegion { + MouseArea { id: itemRegion anchors.fill: container onClicked: { @@ -286,7 +286,7 @@ Rectangle { } } - MouseRegion { + MouseArea { anchors.fill:parent onClicked: { root.unFocus(); @@ -325,7 +325,7 @@ Rectangle { elide:Qt.ElideMiddle horizontalAlignment:Qt.AlignHCenter } - MouseRegion { + MouseArea { id: txtRegion anchors.fill:parent onClicked: { @@ -489,7 +489,7 @@ Rectangle { anchors.centerIn:parent } } - MouseRegion { + MouseArea { anchors.fill:parent onClicked: { // force close textinput @@ -557,7 +557,7 @@ Rectangle { } } - MouseRegion { + MouseArea { anchors.fill:parent property int dragging:0; property int originalX:0; diff --git a/src/plugins/qmldesigner/fxplugin/fx.metainfo b/src/plugins/qmldesigner/fxplugin/fx.metainfo index e1be3be308089677acb1b76a3bf40cb0a1cf77fd..21d3bb2a7822f4b356cfe426262cc7e3e25c2ae9 100644 --- a/src/plugins/qmldesigner/fxplugin/fx.metainfo +++ b/src/plugins/qmldesigner/fxplugin/fx.metainfo @@ -41,9 +41,9 @@ <property name="text" type="QString" value="textInput"/> </itemlibraryrepresentation> </node> - <node name="Qt/MouseRegion" showInItemLibrary="true" category="Qt - Interaction" icon=":/fxplugin/images/mouse-region-icon.png"> + <node name="Qt/MouseArea" showInItemLibrary="true" category="Qt - Interaction" icon=":/fxplugin/images/mouse-area-icon.png"> <inherits name="Item" /> - <itemlibraryrepresentation name="Mouse Region" icon=":/fxplugin/images/mouse-region-icon.png"> + <itemlibraryrepresentation name="Mouse Area" icon=":/fxplugin/images/mouse-area-icon.png"> <property name="width" type="int" value="100"/> <property name="height" type="int" value="100"/> </itemlibraryrepresentation> diff --git a/src/plugins/qmldesigner/fxplugin/fxplugin.qrc b/src/plugins/qmldesigner/fxplugin/fxplugin.qrc index d973a4452e99984ec64a750ea8e127aec7d281fb..5c2087f57b15cdccdcbe513744d56612a800766b 100644 --- a/src/plugins/qmldesigner/fxplugin/fxplugin.qrc +++ b/src/plugins/qmldesigner/fxplugin/fxplugin.qrc @@ -3,7 +3,7 @@ <file>images/blended-image-icon.png</file> <file>images/image-icon.png</file> <file>images/item-icon.png</file> - <file>images/mouse-region-icon.png</file> + <file>images/mouse-area-icon.png</file> <file>images/rect-icon.png</file> <file>images/text-edit-icon.png</file> <file>images/text-icon.png</file> diff --git a/src/plugins/qmldesigner/fxplugin/images/mouse-region-icon.png b/src/plugins/qmldesigner/fxplugin/images/mouse-area-icon.png similarity index 100% rename from src/plugins/qmldesigner/fxplugin/images/mouse-region-icon.png rename to src/plugins/qmldesigner/fxplugin/images/mouse-area-icon.png diff --git a/src/plugins/qmlinspector/components/engines.qml b/src/plugins/qmlinspector/components/engines.qml index d5c8f76fdcbfa1ea8ad35b8a3ac80205601bd159..2339cba7e1c56ee99090a36b1a7581c3a4790bd0 100644 --- a/src/plugins/qmlinspector/components/engines.qml +++ b/src/plugins/qmlinspector/components/engines.qml @@ -22,7 +22,7 @@ Item { text: modelData.name + "(" + modelData.engineId + ")" anchors.horizontalCenter: parent.horizontalCenter } - MouseRegion { + MouseArea { anchors.fill: parent onClicked: root.engineClicked(modelData.engineId); } @@ -38,7 +38,7 @@ Item { height: 63; smooth: true anchors.right: parent.right - MouseRegion { + MouseArea { anchors.fill: parent onClicked: Root.refreshEngines() } diff --git a/src/plugins/snippets/QMLSNIPPETS.TXT b/src/plugins/snippets/QMLSNIPPETS.TXT index b4e33ab4c26218696f2603564444ee1922d8a58a..cd50273ed4949ac874878ec81499f4fc7fe18f59 100644 --- a/src/plugins/snippets/QMLSNIPPETS.TXT +++ b/src/plugins/snippets/QMLSNIPPETS.TXT @@ -8,7 +8,7 @@ Item { } If you delete the name maybe the 'id:' should be deleted as well. -This is fine for most other QML elements such as Rectangle and MouseRegion +This is fine for most other QML elements such as Rectangle and MouseArea ---------------- diff --git a/tests/auto/qml/qmldesigner/coretests/testcore.cpp b/tests/auto/qml/qmldesigner/coretests/testcore.cpp index db25534d39e25574b5e33b362dd995f8155f5bba..1fa685b484e207dde02a892519265fc8f5105d9b 100644 --- a/tests/auto/qml/qmldesigner/coretests/testcore.cpp +++ b/tests/auto/qml/qmldesigner/coretests/testcore.cpp @@ -823,12 +823,12 @@ void TestCore::testModelNodeListProperty() QVERIFY(rootChildren.isNodeListProperty()); QVERIFY(!rootChildren.isEmpty()); - ModelNode mouseRegionNode = view->createModelNode("Qt/Item", 4, 6); + ModelNode mouseAreaNode = view->createModelNode("Qt/Item", 4, 6); NodeListProperty rectChildren = rectNode.nodeListProperty("children"); - rectChildren.reparentHere(mouseRegionNode); + rectChildren.reparentHere(mouseAreaNode); // - // Item { children: [ Rectangle { children : [ MouseRegion {} ] } ] } + // Item { children: [ Rectangle { children : [ MouseArea {} ] } ] } // QVERIFY(rectNode.hasProperty("children")); QVERIFY(rectChildren.isValid()); @@ -841,7 +841,7 @@ void TestCore::testModelNodeListProperty() // Item { } // QVERIFY(!rectNode.isValid()); - QVERIFY(!mouseRegionNode.isValid()); + QVERIFY(!mouseAreaNode.isValid()); QVERIFY(!rootNode.hasProperty("children")); QVERIFY(rootChildren.isValid()); QVERIFY(!rootChildren.isNodeListProperty()); @@ -5286,12 +5286,12 @@ void TestCore::testRewriterAddObjectDefinition() QVERIFY(rootNode.isValid()); QCOMPARE(rootNode.type(), QString("Qt/Rectangle")); - ModelNode childNode = view->createModelNode("Qt/MouseRegion", 4, 6); + ModelNode childNode = view->createModelNode("Qt/MouseArea", 4, 6); rootNode.nodeAbstractProperty(QLatin1String("data")).reparentHere(childNode); QCOMPARE(rootNode.nodeProperty(QLatin1String("data")).toNodeListProperty().toModelNodeList().size(), 1); childNode = rootNode.nodeProperty(QLatin1String("data")).toNodeListProperty().toModelNodeList().at(0); - QCOMPARE(childNode.type(), QString(QLatin1String("Qt/MouseRegion"))); + QCOMPARE(childNode.type(), QString(QLatin1String("Qt/MouseArea"))); } void TestCore::testRewriterAddStatesArray() @@ -5416,9 +5416,9 @@ void TestCore::testRewriterRemoveObjectDefinition() "import Qt 4.6\n" "\n" "Rectangle {\n" - " MouseRegion {\n" + " MouseArea {\n" " }\n" - " MouseRegion {\n" + " MouseArea {\n" " } // some comment here\n" "}"); QPlainTextEdit textEdit; @@ -5442,13 +5442,13 @@ void TestCore::testRewriterRemoveObjectDefinition() QCOMPARE(rootNode.nodeProperty(QLatin1String("data")).toNodeListProperty().toModelNodeList().size(), 2); ModelNode childNode = rootNode.nodeProperty(QLatin1String("data")).toNodeListProperty().toModelNodeList().at(1); - QCOMPARE(childNode.type(), QString(QLatin1String("Qt/MouseRegion"))); + QCOMPARE(childNode.type(), QString(QLatin1String("Qt/MouseArea"))); childNode.destroy(); QCOMPARE(rootNode.nodeProperty(QLatin1String("data")).toNodeListProperty().toModelNodeList().size(), 1); childNode = rootNode.nodeProperty(QLatin1String("data")).toNodeListProperty().toModelNodeList().at(0); - QCOMPARE(childNode.type(), QString(QLatin1String("Qt/MouseRegion"))); + QCOMPARE(childNode.type(), QString(QLatin1String("Qt/MouseArea"))); childNode.destroy(); @@ -5529,7 +5529,7 @@ void TestCore::testRewriterNodeReparenting() "\n" "Rectangle {\n" " Item {\n" - " MouseRegion {\n" + " MouseArea {\n" " }\n" " }\n" "}"); @@ -5556,13 +5556,13 @@ void TestCore::testRewriterNodeReparenting() QVERIFY(itemNode.isValid()); QCOMPARE(itemNode.type(), QLatin1String("Qt/Item")); - ModelNode mouseRegion = itemNode.nodeListProperty("data").toModelNodeList().at(0); - QVERIFY(mouseRegion.isValid()); - QCOMPARE(mouseRegion.type(), QLatin1String("Qt/MouseRegion")); + ModelNode mouseArea = itemNode.nodeListProperty("data").toModelNodeList().at(0); + QVERIFY(mouseArea.isValid()); + QCOMPARE(mouseArea.type(), QLatin1String("Qt/MouseArea")); - rootNode.nodeListProperty("data").reparentHere(mouseRegion); + rootNode.nodeListProperty("data").reparentHere(mouseArea); - QVERIFY(mouseRegion.isValid()); + QVERIFY(mouseArea.isValid()); QCOMPARE(rootNode.nodeListProperty("data").toModelNodeList().size(), 2); QString expected = "\n" @@ -5572,7 +5572,7 @@ void TestCore::testRewriterNodeReparenting() " Item {\n" " }\n" "\n" - "MouseRegion {\n" + "MouseArea {\n" " }\n" "}"; QCOMPARE(textEdit.toPlainText(), expected); @@ -5594,7 +5594,7 @@ void TestCore::testRewriterNodeReparenting() " Item {\n" " }\n" "\n" - "MouseRegion {\n" + "MouseArea {\n" " }\n" "\n" " Rectangle {\n" @@ -5618,7 +5618,7 @@ void TestCore::testRewriterNodeReparenting() " Item {\n" " }\n" "\n" - "MouseRegion {\n" + "MouseArea {\n" " }\n" "}"; @@ -5721,14 +5721,14 @@ void TestCore::testRewriterMovingInOut() QVERIFY(rootNode.isValid()); QCOMPARE(rootNode.type(), QString("Qt/Rectangle")); - ModelNode newNode = view->createModelNode("Qt/MouseRegion", 4, 6); + ModelNode newNode = view->createModelNode("Qt/MouseArea", 4, 6); rootNode.nodeListProperty(QLatin1String("data")).reparentHere(newNode); const QLatin1String expected1("\n" "import Qt 4.6\n" "\n" "Rectangle {\n" - "MouseRegion {\n" + "MouseArea {\n" "}\n" "}"); QCOMPARE(textEdit.toPlainText(), expected1); @@ -5779,7 +5779,7 @@ void TestCore::testRewriterMovingInOutWithTransaction() RewriterTransaction transaction = view->beginRewriterTransaction(); - ModelNode newNode = view->createModelNode("Qt/MouseRegion", 4, 6); + ModelNode newNode = view->createModelNode("Qt/MouseArea", 4, 6); rootNode.nodeListProperty(QLatin1String("data")).reparentHere(newNode); #define move(node, x, y) {\ @@ -5831,7 +5831,7 @@ void TestCore::testRewriterComplexMovingInOut() QCOMPARE(rootNode.type(), QString("Qt/Rectangle")); ModelNode itemNode = rootNode.nodeListProperty(QLatin1String("data")).toModelNodeList().at(0); - ModelNode newNode = view->createModelNode("Qt/MouseRegion", 4, 6); + ModelNode newNode = view->createModelNode("Qt/MouseArea", 4, 6); rootNode.nodeListProperty(QLatin1String("data")).reparentHere(newNode); const QLatin1String expected1("\n" @@ -5841,7 +5841,7 @@ void TestCore::testRewriterComplexMovingInOut() " Item {\n" " }\n" "\n" - " MouseRegion {\n" + " MouseArea {\n" " }\n" "}"); QCOMPARE(textEdit.toPlainText(), expected1); @@ -5861,7 +5861,7 @@ void TestCore::testRewriterComplexMovingInOut() " Item {\n" " }\n" "\n" - " MouseRegion {\n" + " MouseArea {\n" " x: 3\n" " y: 3\n" " }\n" @@ -5875,7 +5875,7 @@ void TestCore::testRewriterComplexMovingInOut() "\n" "Rectangle {\n" " Item {\n" - "MouseRegion {\n" + "MouseArea {\n" " x: 3\n" " y: 3\n" " }\n"