From 255609d787082369dfb7c4f873a0b0cfb387b710 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Fri, 10 Jul 2020 09:01:52 +0200 Subject: [PATCH 001/108] Update 4.13 change log Change-Id: I2d87a104bc0a4a90a8da644686545bc093689e0d Reviewed-by: Eike Ziller --- dist/changes-4.13.0.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dist/changes-4.13.0.md b/dist/changes-4.13.0.md index b526ee54a38..33b8a00b53a 100644 --- a/dist/changes-4.13.0.md +++ b/dist/changes-4.13.0.md @@ -37,6 +37,7 @@ Editing * Added editor tool button for `Analyze File` (QTCREATORBUG-23348) * Added `Add forward declaration` refactoring action (QTCREATORBUG-23444) * Extended `Add Include` refactoring action to non-Qt classes (QTCREATORBUG-21) +* Fixed MSVC detection with some locale settings (QTCREATORBUG-24311) * Fixed indentation with C++11 list initialization (QTCREATORBUG-16977, QTCREATORBUG-24035) * Fixed indentation with trailing return types (QTCREATORBUG-23502) * Fixed issue with `std::chrono::time_point` (QTCREATORBUG-24067) @@ -69,6 +70,7 @@ Editing ### Python * Added tool button for opening interactive Python, optionally importing current file +* Fixed highlighting of parentheses ### Diff Viewer @@ -121,6 +123,7 @@ Debugging --------- * Added option to reset all formats for watches to default +* Added option to override sysroot setting when starting or attaching to external application Analyzer -------- @@ -130,6 +133,7 @@ Analyzer * Re-added editor text marks for diagnostics (QTCREATORBUG-23349) * Changed to use separate `clazy-standalone` executable * Fixed issue with `clang-tidy` and `WarningsAsErrors` (QTCREATORBUG-23423) +* Fixed output parsing of `clazy` Version Control Systems ----------------------- @@ -163,6 +167,7 @@ Platforms * Removed Ministro deployment option (QTCREATORBUG-23761) * Added service editor to manifest editor (QTCREATORBUG-23937) * Added splash screen editor to manifest editor (QTCREATORBUG-24011, QTCREATORBUG-24013) +* Fixed QML debugging and profiling (QTCREATORBUG-24155) * Fixed debugging on x86 and armv7 architectures (QTCREATORBUG-24191) * Fixed issue with long kit names (QTBUG-83875) From 245c9c760f04925a063f97c63cc466cf84ca85fd Mon Sep 17 00:00:00 2001 From: Richard Weickelt Date: Thu, 9 Jul 2020 23:52:20 +0200 Subject: [PATCH 002/108] Update qbs submodule To HEAD of 1.17 branch. Change-Id: I9cb01480d72d3d6132c80449ac2da5e18dc6c7f4 Reviewed-by: Christian Kandeler --- src/shared/qbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/qbs b/src/shared/qbs index 53c8000f034..09401f5eab3 160000 --- a/src/shared/qbs +++ b/src/shared/qbs @@ -1 +1 @@ -Subproject commit 53c8000f034b68fae41d3f071be9ab5fe875827b +Subproject commit 09401f5eab3f5c8955e85baf3c98f79fbc03d8b1 From 58ea14aea7c676633ffe83afe69d62b3f802e9a0 Mon Sep 17 00:00:00 2001 From: Henning Gruendl Date: Fri, 3 Jul 2020 16:17:54 +0200 Subject: [PATCH 003/108] QmlDesigner: Controls 1 cleanup * Replace ScrollView Controls 1 with ScrollView Controls 2 * Replace TabView with TabBar and StackLayout * Remove unused styles * Replace Controls 1 imports * Remove print statement in FontSection * Fix layout width by correcting CheckBox width * Remove TabView from QtObjectPane Task-number: QDS-2454 Task-number: QDS-2455 Task-number: QDS-2456 Change-Id: I913d326afb012375dd5b804171cb8cd67681514c Reviewed-by: Thomas Hartmann --- .../itemLibraryQmlSources/ItemDelegate.qml | 7 +- .../itemLibraryQmlSources/ItemsView.qml | 76 ++- .../QtQuick/AdvancedSection.qml | 4 +- .../QtQuick/AlignDistributeSection.qml | 46 +- .../QtQuick/AnchorRow.qml | 12 +- .../QtQuick/ItemPane.qml | 136 ++--- .../QtQuick/LayoutSection.qml | 24 +- .../QtQuick/QtObjectPane.qml | 81 +-- .../imports/HelperWidgets/AnchorButtons.qml | 4 +- .../imports/HelperWidgets/Button.qml | 117 +++-- .../imports/HelperWidgets/ButtonRowButton.qml | 6 +- .../imports/HelperWidgets/ColorEditor.qml | 3 +- .../imports/HelperWidgets/FontSection.qml | 1 - .../HelperWidgets/GradientPresetList.qml | 82 +-- .../GradientPresetTabContent.qml | 487 +++++++++--------- .../HelperWidgets/HorizontalScrollBar.qml} | 38 +- .../imports/HelperWidgets/IconLabel.qml | 33 +- .../imports/HelperWidgets/ScrollView.qml | 36 +- .../{Tab.qml => VerticalScrollBar.qml} | 28 +- .../imports/HelperWidgets/qmldir | 4 +- .../StudioControls/ActionIndicator.qml | 1 - .../imports/StudioControls/CheckBox.qml | 3 +- .../imports/StudioControls/TabBar.qml} | 53 +- .../TabButton.qml} | 62 ++- .../imports/StudioControls/qmldir | 2 + .../imports/StudioTheme/Values.qml | 5 + .../statesEditorQmlSources/StatesDelegate.qml | 164 +++--- .../statesEditorQmlSources/StatesList.qml | 132 +++-- .../itemlibrary/itemlibrarywidget.cpp | 1 + 29 files changed, 839 insertions(+), 809 deletions(-) rename share/qtcreator/qmldesigner/{statesEditorQmlSources/DesignerTextFieldStyle.qml => propertyEditorQmlSources/imports/HelperWidgets/HorizontalScrollBar.qml} (62%) rename share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/{Tab.qml => VerticalScrollBar.qml} (60%) rename share/qtcreator/qmldesigner/{common/DesignerScrollViewStyle.qml => propertyEditorQmlSources/imports/StudioControls/TabBar.qml} (54%) rename share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/{HelperWidgets/TabView.qml => StudioControls/TabButton.qml} (50%) diff --git a/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemDelegate.qml b/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemDelegate.qml index cd3ddef34db..1cbec5d802b 100644 --- a/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemDelegate.qml +++ b/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemDelegate.qml @@ -23,9 +23,8 @@ ** ****************************************************************************/ -import QtQuick 2.1 -import QtQuick.Controls 1.1 -import QtQuick.Controls.Styles 1.0 +import QtQuick 2.15 +import QtQuick.Controls 2.15 import QtQuickDesignerTheme 1.0 import HelperWidgets 2.0 @@ -76,8 +75,6 @@ Item { id: mouseRegion anchors.fill: parent tooltip: itemName - - onPressed: { rootView.startDragAndDrop(mouseRegion, itemLibraryEntry) } diff --git a/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemsView.qml b/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemsView.qml index 30b741f99da..c7619526934 100644 --- a/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemsView.qml +++ b/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemsView.qml @@ -23,15 +23,11 @@ ** ****************************************************************************/ -import QtQuick 2.1 -import QtQuick.Controls 1.1 -import QtQuick.Controls.Styles 1.0 -import "../common" - -import QtQuick.Layouts 1.0 -import HelperWidgets 2.0 - +import QtQuick 2.15 +import QtQuick.Layouts 1.15 import QtQuickDesignerTheme 1.0 +import HelperWidgets 2.0 +import StudioTheme 1.0 as StudioTheme /* The view displaying the item grid. @@ -65,9 +61,6 @@ ScrollView { Item { id: styleConstants - readonly property color backgroundColor: Theme.qmlDesignerBackgroundColorDarkAlternate() - readonly property color lighterBackgroundColor: Theme.color(Theme.FancyToolBarSeparatorColor) - property int textWidth: 58 property int textHeight: Theme.smallFontPixelSize() * 2 @@ -81,48 +74,37 @@ ScrollView { 2 * cellVerticalMargin + cellVerticalSpacing } - Rectangle { - id: background - anchors.fill: parent - color: styleConstants.backgroundColor - } + Column { + id: column + Repeater { + model: itemLibraryModel // to be set in Qml context + delegate: Section { + width: itemsView.width - + (itemsView.verticalScrollBarVisible ? StudioTheme.Values.scrollBarThickness : 0) + caption: sectionName // to be set by model + visible: sectionVisible + topPadding: 2 + leftPadding: 2 + rightPadding: 1 + expanded: sectionExpanded + onExpandedChanged: itemLibraryModel.setExpanded(expanded, sectionName); + Grid { + id: itemGrid - style: DesignerScrollViewStyle { + columns: parent.width / styleConstants.cellWidth + property int flexibleWidth: (parent.width - styleConstants.cellWidth * columns) / columns - } - - Flickable { - contentHeight: column.height - Column { - id: column - Repeater { - model: itemLibraryModel // to be set in Qml context - delegate: Section { - width: itemsView.viewport.width - caption: sectionName // to be set by model - visible: sectionVisible - topPadding: 2 - leftPadding: 2 - rightPadding: 1 - expanded: sectionExpanded - onExpandedChanged: itemLibraryModel.setExpanded(expanded, sectionName); - Grid { - id: itemGrid - - columns: parent.width / styleConstants.cellWidth - property int flexibleWidth: (parent.width - styleConstants.cellWidth * columns) / columns - - Repeater { - model: sectionEntries - delegate: ItemDelegate { - visible: itemVisible - width: styleConstants.cellWidth + itemGrid.flexibleWidth - height: styleConstants.cellHeight - } + Repeater { + model: sectionEntries + delegate: ItemDelegate { + visible: itemVisible + width: styleConstants.cellWidth + itemGrid.flexibleWidth + height: styleConstants.cellHeight } } } } } } + } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AdvancedSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AdvancedSection.qml index 5434e4705bf..22a14efa537 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AdvancedSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AdvancedSection.qml @@ -33,7 +33,7 @@ Section { caption: qsTr("Advanced") SectionLayout { - rows: 4 + columns: 2 Label { text: qsTr("Origin") @@ -171,7 +171,6 @@ Section { backendValue: backendValues.focus text: backendValues.focus.valueToString enabled: backendValues.focus.isAvailable - implicitWidth: 180 } ExpandingSpacer { } @@ -187,7 +186,6 @@ Section { backendValue: backendValues.activeFocusOnTab text: backendValues.activeFocusOnTab.valueToString enabled: backendValues.activeFocusOnTab.isAvailable - implicitWidth: 180 } ExpandingSpacer { } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AlignDistributeSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AlignDistributeSection.qml index 36f4c026429..e21879057bf 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AlignDistributeSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AlignDistributeSection.qml @@ -32,10 +32,10 @@ import StudioTheme 1.0 as StudioTheme Section { anchors.left: parent.left anchors.right: parent.right + caption: qsTr("Align") - ColumnLayout { - width: parent.width + SectionLayout { enabled: alignDistribute.multiSelection && !alignDistribute.selectionHasAnchors && alignDistribute.selectionExclusivlyItems && @@ -49,8 +49,11 @@ Section { Label { text: qsTr("Align objects") width: 120 + Layout.columnSpan: 2 } + RowLayout { + Layout.columnSpan: 2 Row { spacing: -StudioTheme.Values.border AbstractButton { @@ -105,8 +108,11 @@ Section { Label { text: qsTr("Distribute objects") width: 120 + Layout.columnSpan: 2 } + RowLayout { + Layout.columnSpan: 2 Row { spacing: -StudioTheme.Values.border AbstractButton { @@ -161,8 +167,11 @@ Section { Label { text: qsTr("Distribute spacing") width: 120 + Layout.columnSpan: 2 } + RowLayout { + Layout.columnSpan: 2 Row { spacing: -StudioTheme.Values.border AbstractButton { @@ -242,18 +251,16 @@ Section { } } - SectionLayout { - columns: 2 + ItemFilterModel { + id: itemFilterModel + modelNodeBackendProperty: modelNodeBackend + selectionOnly: true + } - ItemFilterModel { - id: itemFilterModel - modelNodeBackendProperty: modelNodeBackend - selectionOnly: true - } - - Label { - text: qsTr("Align to") - } + Label { + text: qsTr("Align to") + } + SecondColumnLayout { ComboBox { id: alignToComboBox Layout.fillWidth: true @@ -267,9 +274,14 @@ Section { } } - Label { - text: qsTr("Key object") + ExpandingSpacer { } + } + + Label { + text: qsTr("Key object") + } + SecondColumnLayout { ComboBox { id: keyObjectComboBox enabled: alignToComboBox.currentIndex === 2 @@ -285,11 +297,15 @@ Section { lastSelectedItem = "" // TODO } } + + ExpandingSpacer { + } } SectionLayout { columns: 1 Layout.topMargin: 30 + Layout.columnSpan: 2 visible: alignDistribute.multiSelection && (alignDistribute.selectionHasAnchors || !alignDistribute.selectionExclusivlyItems || diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AnchorRow.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AnchorRow.qml index 7d18d6a1f98..406e5af011c 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AnchorRow.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AnchorRow.qml @@ -23,9 +23,9 @@ ** ****************************************************************************/ -import QtQuick 2.0 +import QtQuick 2.15 import HelperWidgets 2.0 -import QtQuick.Layouts 1.0 +import QtQuick.Layouts 1.15 import QtQuickDesignerTheme 1.0 import StudioControls 1.0 as StudioControls @@ -34,11 +34,9 @@ import StudioTheme 1.0 as StudioTheme RowLayout { id: anchorRow - anchors.left: parent.left - anchors.right: parent.right opacity: enabled ? 1 : 0.5 - property alias iconSource: icon.source + property alias iconSource: iconLabel.icon property variant anchorMargin @@ -64,8 +62,10 @@ RowLayout { readonly property color __defaultTextColor: StudioTheme.Values.themeTextColor IconLabel { - id: icon + id: iconLabel Layout.alignment: Qt.AlignTop + Layout.topMargin: 4 + Layout.leftMargin: 4 } GridLayout { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml index d66b50da0b6..77af9247cf5 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml @@ -23,10 +23,11 @@ ** ****************************************************************************/ -import QtQuick 2.0 -import HelperWidgets 2.0 -import QtQuick.Layouts 1.0 +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.15 import QtQuickDesignerTheme 1.0 +import HelperWidgets 2.0 import StudioControls 1.0 as StudioControls import StudioTheme 1.0 as StudioTheme @@ -35,14 +36,15 @@ Rectangle { width: 320 height: 400 color: Theme.qmlDesignerBackgroundColorDarkAlternate() + MouseArea { anchors.fill: parent onClicked: forceActiveFocus() } ScrollView { + clip: true anchors.fill: parent - horizontalScrollBarPolicy: Qt.ScrollBarAlwaysOff Column { y: -1 @@ -57,7 +59,6 @@ Rectangle { SectionLayout { Label { text: qsTr("Type") - } SecondColumnLayout { @@ -280,7 +281,6 @@ Rectangle { Item { width: 10 height: 10 - } CheckBox { @@ -319,88 +319,92 @@ Rectangle { width: 4 } - TabView { + StudioControls.TabBar { + id: tabBar + anchors.left: parent.left anchors.right: parent.right - frameVisible: false - id: tabView + StudioControls.TabButton { + text: backendValues.className.value + } + StudioControls.TabButton { + text: qsTr("Layout") + } + StudioControls.TabButton { + text: qsTr("Advanced") + } + } + + StackLayout { + anchors.left: parent.left + anchors.right: parent.right + currentIndex: tabBar.currentIndex + + property int currentHeight: children[currentIndex].implicitHeight + property int extraHeight: 40 height: currentHeight + extraHeight - property int currentHeight: getTab(currentIndex).item.implicitHeight - property int extraHeight: 40 + Column { + anchors.left: parent.left + anchors.right: parent.right - Tab { - title: backendValues.className.value + Loader { + anchors.left: parent.left + anchors.right: parent.right + visible: theSource !== "" - component: Column { + id: specificsTwo; + sourceComponent: specificQmlComponent + + property string theSource: specificQmlData + + onTheSourceChanged: { + active = false + active = true + } + } + + Loader { anchors.left: parent.left anchors.right: parent.right - Loader { - anchors.left: parent.left - anchors.right: parent.right - visible: theSource !== "" + id: specificsOne; + source: specificsUrl; - id: specificsTwo; - sourceComponent: specificQmlComponent - - property string theSource: specificQmlData - - onTheSourceChanged: { - active = false - active = true - } - } - - Loader { - anchors.left: parent.left - anchors.right: parent.right - - id: specificsOne; - source: specificsUrl; - - property int loaderHeight: specificsOne.item.height + tabView.extraHeight - } + property int loaderHeight: specificsOne.item.height + tabView.extraHeight } } - Tab { - title: qsTr("Layout") - component: Column { - anchors.left: parent.left - anchors.right: parent.right + Column { + anchors.left: parent.left + anchors.right: parent.right - LayoutSection { - } + LayoutSection { + } - MarginSection { - visible: anchorBackend.isInLayout - backendValueTopMargin: backendValues.Layout_topMargin - backendValueBottomMargin: backendValues.Layout_bottomMargin - backendValueLeftMargin: backendValues.Layout_leftMargin - backendValueRightMargin: backendValues.Layout_rightMargin - backendValueMargins: backendValues.Layout_margins - } + MarginSection { + visible: anchorBackend.isInLayout + backendValueTopMargin: backendValues.Layout_topMargin + backendValueBottomMargin: backendValues.Layout_bottomMargin + backendValueLeftMargin: backendValues.Layout_leftMargin + backendValueRightMargin: backendValues.Layout_rightMargin + backendValueMargins: backendValues.Layout_margins + } - AlignDistributeSection { - visible: !anchorBackend.isInLayout - } + AlignDistributeSection { + visible: !anchorBackend.isInLayout } } - Tab { - anchors.fill: parent - title: qsTr("Advanced") - component: Column { - anchors.left: parent.left - anchors.right: parent.right + Column { + anchors.left: parent.left + anchors.right: parent.right - AdvancedSection { - } - LayerSection { - } + AdvancedSection { + } + LayerSection { } } } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/LayoutSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/LayoutSection.qml index 7eeb8d22856..458e394fbf4 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/LayoutSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/LayoutSection.qml @@ -50,8 +50,8 @@ Section { } AnchorRow { - visible: anchorBackend.topAnchored; - iconSource: "image://icons/anchor-top" + visible: anchorBackend.topAnchored + iconSource: StudioTheme.Constants.anchorTop anchorMargin: backendValues.anchors_topMargin targetName: anchorBackend.topTarget onTargetChanged: { @@ -73,8 +73,8 @@ Section { } AnchorRow { - visible: anchorBackend.bottomAnchored; - iconSource: "image://icons/anchor-bottom" + visible: anchorBackend.bottomAnchored + iconSource: StudioTheme.Constants.anchorBottom anchorMargin: backendValues.anchors_bottomMargin targetName: anchorBackend.bottomTarget onTargetChanged: { @@ -97,8 +97,8 @@ Section { } AnchorRow { - visible: anchorBackend.leftAnchored; - iconSource: "image://icons/anchor-left" + visible: anchorBackend.leftAnchored + iconSource: StudioTheme.Constants.anchorLeft anchorMargin: backendValues.anchors_leftMargin targetName: anchorBackend.leftTarget onTargetChanged: { @@ -120,8 +120,8 @@ Section { } AnchorRow { - visible: anchorBackend.rightAnchored; - iconSource: "image://icons/anchor-right" + visible: anchorBackend.rightAnchored + iconSource: StudioTheme.Constants.anchorRight anchorMargin: backendValues.anchors_rightMargin targetName: anchorBackend.rightTarget onTargetChanged: { @@ -145,8 +145,8 @@ Section { AnchorRow { showAlternativeTargets: false - visible: anchorBackend.horizontalCentered; - iconSource: "image://icons/anchor-horizontal" + visible: anchorBackend.horizontalCentered + iconSource: StudioTheme.Constants.centerHorizontal anchorMargin: backendValues.anchors_horizontalCenterOffset targetName: anchorBackend.horizontalTarget onTargetChanged: { @@ -158,8 +158,8 @@ Section { AnchorRow { showAlternativeTargets: false - visible: anchorBackend.verticalCentered; - iconSource: "image://icons/anchor-vertical" + visible: anchorBackend.verticalCentered + iconSource: StudioTheme.Constants.centerVertical anchorMargin: backendValues.anchors_verticalCenterOffset targetName: anchorBackend.verticalTarget onTargetChanged: { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/QtObjectPane.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/QtObjectPane.qml index 99efa75c1ed..5b3a641f4c0 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/QtObjectPane.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/QtObjectPane.qml @@ -23,10 +23,10 @@ ** ****************************************************************************/ -import QtQuick 2.0 -import HelperWidgets 2.0 +import QtQuick 2.15 import QtQuick.Layouts 1.0 import QtQuickDesignerTheme 1.0 +import HelperWidgets 2.0 Rectangle { id: itemPane @@ -43,6 +43,7 @@ Rectangle { anchors.fill: parent Column { + id: rootColumn y: -1 width: itemPane.width Section { @@ -54,7 +55,6 @@ Rectangle { SectionLayout { Label { text: qsTr("Type") - } SecondColumnLayout { @@ -148,69 +148,30 @@ Rectangle { width: 4 } - TabView { + Column { anchors.left: parent.left anchors.right: parent.right - frameVisible: false + Loader { + id: specificsTwo + anchors.left: parent.left + anchors.right: parent.right + visible: theSource !== "" + sourceComponent: specificQmlComponent - id: tabView - height: Math.max(layoutSectionHeight, specficsHeight) + property string theSource: specificQmlData - property int layoutSectionHeight: 400 - property int specficsOneHeight: 0 - property int specficsTwoHeight: 0 - - property int specficsHeight: Math.max(specficsOneHeight, specficsTwoHeight) - - property int extraHeight: 40 - - Tab { - id: tab - title: backendValues.className.value - - component: Column { - anchors.left: parent.left - anchors.right: parent.right - Loader { - anchors.left: parent.left - anchors.right: parent.right - - visible: theSource !== "" - - id: specificsTwo; - sourceComponent: specificQmlComponent - - property string theSource: specificQmlData - - onTheSourceChanged: { - active = false - active = true - } - - property int loaderHeight: specificsTwo.item.height + tabView.extraHeight - onLoaderHeightChanged: tabView.specficsTwoHeight = loaderHeight - - onLoaded: { - tabView.specficsTwoHeight = loaderHeight - } - } - - Loader { - anchors.left: parent.left - anchors.right: parent.right - - id: specificsOne; - source: specificsUrl; - - property int loaderHeight: specificsOne.item.height + tabView.extraHeight - onLoaderHeightChanged: tabView.specficsHeight = loaderHeight - - onLoaded: { - tabView.specficsOneHeight = loaderHeight - } - } + onTheSourceChanged: { + active = false + active = true } } + + Loader { + id: specificsOne + anchors.left: parent.left + anchors.right: parent.right + source: specificsUrl + } } } } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/AnchorButtons.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/AnchorButtons.qml index 84d5090125f..483c4947f0c 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/AnchorButtons.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/AnchorButtons.qml @@ -156,7 +156,7 @@ StudioControls.ButtonRow { buttonIcon: StudioTheme.Constants.centerVertical tooltip: qsTr("Anchor item vertically.") - property bool verticalCentered: anchorBackend.verticalCentered; + property bool verticalCentered: anchorBackend.verticalCentered onVerticalCenteredChanged: { checked = verticalCentered } @@ -179,7 +179,7 @@ StudioControls.ButtonRow { buttonIcon: StudioTheme.Constants.centerHorizontal tooltip: qsTr("Anchor item horizontally.") - property bool horizontalCentered: anchorBackend.horizontalCentered; + property bool horizontalCentered: anchorBackend.horizontalCentered onHorizontalCenteredChanged: { checked = horizontalCentered } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/Button.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/Button.qml index 5f989d7e5fd..a20469966af 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/Button.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/Button.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of Qt Creator. @@ -23,48 +23,79 @@ ** ****************************************************************************/ -import QtQuick 2.1 -import QtQuick.Controls 1.1 as Controls -import QtQuick.Controls.Styles 1.1 -import "Constants.js" as Constants +import QtQuick 2.15 +import QtQuick.Templates 2.15 as T +import StudioTheme 1.0 as StudioTheme -Controls.Button { - property color borderColor: "#222" - property color highlightColor: "orange" - property color textColor: "#eee" - style: ButtonStyle { - label: Text { - color: Constants.colorsDefaultText - anchors.fill: parent - renderType: Text.NativeRendering - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignHCenter - text: control.text - opacity: enabled ? 1 : 0.7 - } - background: Rectangle { - implicitWidth: 100 - implicitHeight: 23 - radius: 3 - gradient: control.pressed ? pressedGradient : gradient - Gradient{ - id: pressedGradient - GradientStop{color: "#333" ; position: 0} - } - Gradient { - id: gradient - GradientStop {color: "#606060" ; position: 0} - GradientStop {color: "#404040" ; position: 0.07} - GradientStop {color: "#303030" ; position: 1} - } - Rectangle { - anchors.fill: parent - anchors.margins: -1 - color: "transparent" - radius: 4 - opacity: 0.3 - visible: control.activeFocus - } - } +T.AbstractButton { + id: myButton + + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, + implicitContentWidth + leftPadding + rightPadding) + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, + implicitContentHeight + topPadding + bottomPadding) + + background: Rectangle { + id: buttonBackground + implicitWidth: 100 + implicitHeight: 23 + radius: 3 + color: StudioTheme.Values.themeControlBackground + border.color: StudioTheme.Values.themeControlOutline + border.width: StudioTheme.Values.border } + + contentItem: Text { + id: buttonText + color: StudioTheme.Values.themeTextColor + font.family: StudioTheme.Constants.font.family + font.pixelSize: StudioTheme.Values.myFontSize + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + anchors.fill: parent + renderType: Text.QtRendering + text: myButton.text + } + + states: [ + State { + name: "default" + when: myButton.enabled && !myButton.hovered && !myButton.pressed + && !myButton.checked + PropertyChanges { + target: buttonBackground + color: StudioTheme.Values.themeControlBackground + } + }, + State { + name: "hovered" + when: myButton.hovered && !myButton.pressed + PropertyChanges { + target: buttonBackground + color: StudioTheme.Values.themeHoverHighlight + } + }, + State { + name: "pressed" + when: myButton.hovered && myButton.pressed + PropertyChanges { + target: buttonBackground + color: StudioTheme.Values.themeControlBackgroundPressed + border.color: StudioTheme.Values.themeInteraction + } + }, + State { + name: "disabled" + when: !myButton.enabled + PropertyChanges { + target: buttonBackground + color: StudioTheme.Values.themeControlBackgroundDisabled + border.color: StudioTheme.Values.themeControlOutlineDisabled + } + PropertyChanges { + target: buttonText + color: StudioTheme.Values.themeTextColorDisabled + } + } + ] } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ButtonRowButton.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ButtonRowButton.qml index 6ba9957cd57..a893a12529a 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ButtonRowButton.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ButtonRowButton.qml @@ -23,10 +23,8 @@ ** ****************************************************************************/ -import QtQuick 2.1 -import QtQuick.Controls 1.0 as Controls -import QtQuick.Layouts 1.0 -import QtQuick.Controls.Private 1.0 +import QtQuick 2.15 +import QtQuick.Layouts 1.15 import QtQuickDesignerTheme 1.0 Item { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditor.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditor.qml index 8c12d37bb57..3d8291e7e70 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditor.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditor.qml @@ -38,7 +38,7 @@ Column { property bool supportGradient: false - property string caption: "Color" + property string caption: qsTr("Color") property variant backendValue @@ -47,7 +47,6 @@ Column { return Qt.rgba(backendValue.value.x, backendValue.value.y, backendValue.value.z, 1); else return backendValue.value; - } property alias gradientPropertyName: gradientLine.gradientPropertyName diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontSection.qml index 8f1c130089f..1261f2ee5ed 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontSection.qml @@ -73,7 +73,6 @@ Section { Layout.fillWidth: true width: 160 property string familyName: backendValue.value - onFamilyNameChanged: print(styleNamesForFamily(familyName)) } Label { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/GradientPresetList.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/GradientPresetList.qml index d756b53fe65..4a0665076a6 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/GradientPresetList.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/GradientPresetList.qml @@ -23,12 +23,11 @@ ** ****************************************************************************/ -import QtQuick 2.11 -import QtQuick.Layouts 1.12 +import QtQuick 2.15 +import QtQuick.Layouts 1.15 import QtQuick.Dialogs 1.3 - -import HelperWidgets 2.0 import QtQuickDesignerTheme 1.0 +import HelperWidgets 2.0 import StudioControls 1.0 as StudioControls import StudioTheme 1.0 as StudioTheme @@ -76,49 +75,52 @@ Dialog { anchors.margins: 13 anchors.bottomMargin: 71 - TabView { - id: presetTabView - Layout.alignment: Qt.AlignTop | Qt.AlignHCenter - Layout.fillHeight: true - Layout.fillWidth: true + StudioControls.TabBar { + id: presetTabBar - Tab { - title: qsTr("System Presets") - anchors.fill: parent + anchors.left: parent.left + anchors.right: parent.right - GradientPresetTabContent { - id: defaultTabContent - viewModel: defaultPresetListModel - editableName: false - } + StudioControls.TabButton { + text: qsTr("System Presets") + } + StudioControls.TabButton { + text: qsTr("User Presets") + } + } + + StackLayout { + anchors.left: parent.left + anchors.right: parent.right + currentIndex: presetTabBar.currentIndex + + GradientPresetTabContent { + id: defaultTabContent + viewModel: defaultPresetListModel + editableName: false } - Tab { - title: qsTr("User Presets") - anchors.fill: parent + GradientPresetTabContent { + id: customTabContent + viewModel: customPresetListModel + editableName: true + onPresetNameChanged: customPresetListModel.changePresetName(id, name) - GradientPresetTabContent { - id: customTabContent - viewModel: customPresetListModel - editableName: true - onPresetNameChanged: customPresetListModel.changePresetName(id, name) + property int deleteId - property int deleteId + onDeleteButtonClicked: { + deleteId = id + deleteDialog.open() + } - onDeleteButtonClicked: { - deleteId = id - deleteDialog.open() - } - - MessageDialog { - id: deleteDialog - visible: false - modality: Qt.WindowModal - standardButtons: Dialog.No | Dialog.Yes - title: qsTr("Delete preset?") - text: qsTr("Are you sure you want to delete this preset?") - onAccepted: customPresetListModel.deletePreset(customTabContent.deleteId) - } + MessageDialog { + id: deleteDialog + visible: false + modality: Qt.WindowModal + standardButtons: Dialog.No | Dialog.Yes + title: qsTr("Delete preset?") + text: qsTr("Are you sure you want to delete this preset?") + onAccepted: customPresetListModel.deletePreset(customTabContent.deleteId) } } } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/GradientPresetTabContent.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/GradientPresetTabContent.qml index f26064dd213..fd0fee4cf77 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/GradientPresetTabContent.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/GradientPresetTabContent.qml @@ -23,12 +23,11 @@ ** ****************************************************************************/ -import QtQuick 2.11 -import QtQuick.Layouts 1.12 -import QtQuick.Dialogs 1.3 - -import HelperWidgets 2.0 +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.15 import QtQuickDesignerTheme 1.0 +import HelperWidgets 2.0 import StudioControls 1.0 as StudioControls import StudioTheme 1.0 as StudioTheme @@ -48,271 +47,277 @@ Rectangle { property real delegateHeight: 178 property real gridCellWidth: 160 - ScrollView { + GridView { + id: gradientTable Layout.fillWidth: true Layout.fillHeight: true anchors.fill: parent + anchors.leftMargin: 10 + clip: true + delegate: gradientDelegate - GridView { - id: gradientTable - Layout.fillWidth: true - Layout.fillHeight: true - anchors.fill: parent - anchors.leftMargin: 10 - clip: true - delegate: gradientDelegate + property int gridColumns: width / tabBackground.gridCellWidth; + cellWidth: width / gridColumns + cellHeight: 185 - property int gridColumns: width / tabBackground.gridCellWidth; - cellWidth: width / gridColumns - cellHeight: 185 + property bool bothVisible: horizontal.scrollBarVisible && vertical.scrollBarVisible - Component { - id: gradientDelegate + ScrollBar.horizontal: HorizontalScrollBar { + id: horizontal + parent: gradientTable + } - Rectangle { - id: backgroundCard - color: StudioTheme.Values.themeControlOutline - clip: true + ScrollBar.vertical: VerticalScrollBar { + id: vertical + parent: gradientTable + } - property real flexibleWidth: (gradientTable.width - gradientTable.cellWidth * gradientTable.gridColumns) / gradientTable.gridColumns - property bool isSelected: false + Component { + id: gradientDelegate - width: gradientTable.cellWidth + flexibleWidth - 8 - height: tabBackground.delegateHeight - radius: 16 + Rectangle { + id: backgroundCard + color: StudioTheme.Values.themeControlOutline + clip: true - function selectPreset(index) { - gradientTable.currentIndex = index - gradientData.stops = stopsPosList - gradientData.colors = stopsColorList - gradientData.stopsCount = stopListSize - gradientData.presetID = presetID - gradientData.presetType = presetTabView.currentIndex + property real flexibleWidth: (gradientTable.width - gradientTable.cellWidth * gradientTable.gridColumns) / gradientTable.gridColumns + property bool isSelected: false - if (gradientData.selectedItem != null) - gradientData.selectedItem.isSelected = false + width: gradientTable.cellWidth + flexibleWidth - 8 + height: tabBackground.delegateHeight + radius: 16 - backgroundCard.isSelected = true - gradientData.selectedItem = backgroundCard + function selectPreset(index) { + gradientTable.currentIndex = index + gradientData.stops = stopsPosList + gradientData.colors = stopsColorList + gradientData.stopsCount = stopListSize + gradientData.presetID = presetID + gradientData.presetType = presetTabBar.currentIndex + + if (gradientData.selectedItem != null) + gradientData.selectedItem.isSelected = false + + backgroundCard.isSelected = true + gradientData.selectedItem = backgroundCard + } + + MouseArea { + id: rectMouseArea + anchors.fill: parent + hoverEnabled: true + onClicked: { + presetNameBox.edit = false + nameInput.focus = false + backgroundCard.selectPreset(index) } + } - MouseArea { - id: rectMouseArea - anchors.fill: parent - hoverEnabled: true - onClicked: { - presetNameBox.edit = false - nameInput.focus = false - backgroundCard.selectPreset(index) + states: [ + State { + name: "default" + when: !(rectMouseArea.containsMouse || removeButton.hovered || + (nameMouseArea.containsMouse && !tabBackground.editableName)) && + !backgroundCard.isSelected + PropertyChanges { + target: backgroundCard + color: StudioTheme.Values.themeControlOutline + border.width: 0 + } + }, + State { + name: "hovered" + when: (rectMouseArea.containsMouse || removeButton.hovered || + (nameMouseArea.containsMouse && !tabBackground.editableName)) && + !backgroundCard.isSelected + PropertyChanges { + target: backgroundCard + color: StudioTheme.Values.themeControlBackgroundPressed + border.width: 1 + border.color: StudioTheme.Values.themeInteraction + } + }, + State { + name: "selected" + when: backgroundCard.isSelected + PropertyChanges { + target: backgroundCard + color:StudioTheme.Values.themeInteraction + border.width: 1 + border.color: StudioTheme.Values.themeControlBackgroundPressed + } + } + ] + + ColumnLayout { + spacing: 2 + anchors.fill: parent + + Rectangle { + id: gradientRect + width: 150 + height: 150 + radius: 16 + Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter + Layout.topMargin: 2 + + gradient: Gradient { + id: showGr + } + + Component { + id: stopComponent + GradientStop {} + } + + Component.onCompleted: { + var stopsAmount = stopListSize; + var newStops = []; + for (var i = 0; i < stopsAmount; i++) { + newStops.push( stopComponent.createObject(showGr, { "position": stopsPosList[i], "color": stopsColorList[i] }) ); + } + showGr.stops = newStops; + } + + AbstractButton { + id: removeButton + visible: editableName && (rectMouseArea.containsMouse || removeButton.hovered) + backgroundRadius: StudioTheme.Values.smallRectWidth + anchors.right: parent.right + anchors.rightMargin: 5 + anchors.top: parent.top + anchors.topMargin: 5 + width: Math.round(StudioTheme.Values.smallRectWidth) + height: Math.round(StudioTheme.Values.smallRectWidth) + buttonIcon: StudioTheme.Constants.closeCross + onClicked: tabBackground.deleteButtonClicked(index) } } - states: [ - State { - name: "default" - when: !(rectMouseArea.containsMouse || removeButton.hovered || - (nameMouseArea.containsMouse && !tabBackground.editableName)) && - !backgroundCard.isSelected - PropertyChanges { - target: backgroundCard - color: StudioTheme.Values.themeControlOutline - border.width: 0 - } - }, - State { - name: "hovered" - when: (rectMouseArea.containsMouse || removeButton.hovered || - (nameMouseArea.containsMouse && !tabBackground.editableName)) && - !backgroundCard.isSelected - PropertyChanges { - target: backgroundCard - color: StudioTheme.Values.themeControlBackgroundPressed - border.width: 1 - border.color: StudioTheme.Values.themeInteraction - } - }, - State { - name: "selected" - when: backgroundCard.isSelected - PropertyChanges { - target: backgroundCard - color:StudioTheme.Values.themeInteraction - border.width: 1 - border.color: StudioTheme.Values.themeControlBackgroundPressed - } - } - ] + Item { + id: presetNameBox + Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter + Layout.preferredWidth: backgroundCard.width - 2 + Layout.preferredHeight: backgroundCard.height - gradientRect.height - 4 + Layout.bottomMargin: 4 - ColumnLayout { - spacing: 2 - anchors.fill: parent + property bool edit: false Rectangle { - id: gradientRect - width: 150 - height: 150 + id: nameBackgroundColor + enabled: tabBackground.editableName + color: "transparent" radius: 16 - Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter - Layout.topMargin: 2 + visible: true + anchors.fill: parent + } - gradient: Gradient { - id: showGr - } + ToolTipArea { + id: nameMouseArea + anchors.fill: parent + tooltip: nameText.text + propagateComposedEvents: true - Component { - id: stopComponent - GradientStop {} - } - - Component.onCompleted: { - var stopsAmount = stopListSize; - var newStops = []; - for (var i = 0; i < stopsAmount; i++) { - newStops.push( stopComponent.createObject(showGr, { "position": stopsPosList[i], "color": stopsColorList[i] }) ); + onClicked: { + if (!tabBackground.editableName) { + backgroundCard.selectPreset(index) + return } - showGr.stops = newStops; - } - AbstractButton { - id: removeButton - visible: editableName && (rectMouseArea.containsMouse || removeButton.hovered) - backgroundRadius: StudioTheme.Values.smallRectWidth - anchors.right: parent.right - anchors.rightMargin: 5 - anchors.top: parent.top - anchors.topMargin: 5 - width: Math.round(StudioTheme.Values.smallRectWidth) - height: Math.round(StudioTheme.Values.smallRectWidth) - buttonIcon: StudioTheme.Constants.closeCross - onClicked: tabBackground.deleteButtonClicked(index) + presetNameBox.edit = true + nameInput.forceActiveFocus() + // have to select text like this, otherwise there is an issue with long names + nameInput.cursorPosition = 0 + nameInput.cursorPosition = nameInput.length + nameInput.selectAll() } } - Item { - id: presetNameBox - Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter - Layout.preferredWidth: backgroundCard.width - 2 - Layout.preferredHeight: backgroundCard.height - gradientRect.height - 4 - Layout.bottomMargin: 4 - - property bool edit: false - - Rectangle { - id: nameBackgroundColor - enabled: tabBackground.editableName - color: "transparent" - radius: 16 - visible: true - anchors.fill: parent - } - - ToolTipArea { - id: nameMouseArea - anchors.fill: parent - tooltip: nameText.text - propagateComposedEvents: true - - onClicked: { - if (!tabBackground.editableName) { - backgroundCard.selectPreset(index) - return - } - - presetNameBox.edit = true - nameInput.forceActiveFocus() - // have to select text like this, otherwise there is an issue with long names - nameInput.cursorPosition = 0 - nameInput.cursorPosition = nameInput.length - nameInput.selectAll() - } - } - - Text { - id: nameText - text: presetName - anchors.fill: parent - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - color: StudioTheme.Values.themeTextColor - elide: Text.ElideMiddle - maximumLineCount: 1 - } - - TextInput { - id: nameInput - enabled: tabBackground.editableName - visible: false - text: presetName - anchors.fill: parent - anchors.leftMargin: 5 - anchors.rightMargin: 5 - horizontalAlignment: TextInput.AlignHCenter - verticalAlignment: TextInput.AlignVCenter - color: StudioTheme.Values.themeTextColor - selectionColor: StudioTheme.Values.themeInteraction - selectByMouse: true - activeFocusOnPress: true - wrapMode: TextInput.NoWrap - clip: true - - onEditingFinished: { - nameText.text = text - tabBackground.presetNameChanged(index, text) - presetNameBox.edit = false - } - - Keys.onPressed: { - if (event.key === Qt.Key_Enter || event.key === Qt.Key_Return) { - event.accepted = true - nameInput.editingFinished() - nameInput.focus = false - } - - if (event.key === Qt.Key_Escape) { - event.accepted = true - nameInput.text = nameText.text - nameInput.focus = false - } - } - } - - states: [ - State { - name: "default" - when: tabBackground.editableName && !nameMouseArea.containsMouse && !presetNameBox.edit - PropertyChanges { - target: nameBackgroundColor - color: "transparent" - border.width: 0 - } - PropertyChanges { target: nameText; visible: true } - PropertyChanges { target: nameInput; visible: false } - }, - State { - name: "hovered" - when: tabBackground.editableName && nameMouseArea.containsMouse && !presetNameBox.edit - PropertyChanges { - target: nameBackgroundColor - color: StudioTheme.Values.themeControlBackgroundPressed - border.width: 0 - } - PropertyChanges { target: nameText; visible: true } - PropertyChanges { target: nameInput; visible: false } - }, - State { - name: "edit" - when: tabBackground.editableName && presetNameBox.edit - PropertyChanges { - target: nameBackgroundColor - color: StudioTheme.Values.themeControlBackgroundPressed - border.color: StudioTheme.Values.themeInteraction - border.width: 1 - } - PropertyChanges { target: nameText; visible: false } - PropertyChanges { target: nameInput; visible: true } - } - ] + Text { + id: nameText + text: presetName + anchors.fill: parent + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + color: StudioTheme.Values.themeTextColor + elide: Text.ElideMiddle + maximumLineCount: 1 } + + TextInput { + id: nameInput + enabled: tabBackground.editableName + visible: false + text: presetName + anchors.fill: parent + anchors.leftMargin: 5 + anchors.rightMargin: 5 + horizontalAlignment: TextInput.AlignHCenter + verticalAlignment: TextInput.AlignVCenter + color: StudioTheme.Values.themeTextColor + selectionColor: StudioTheme.Values.themeInteraction + selectByMouse: true + activeFocusOnPress: true + wrapMode: TextInput.NoWrap + clip: true + + onEditingFinished: { + nameText.text = text + tabBackground.presetNameChanged(index, text) + presetNameBox.edit = false + } + + Keys.onPressed: { + if (event.key === Qt.Key_Enter || event.key === Qt.Key_Return) { + event.accepted = true + nameInput.editingFinished() + nameInput.focus = false + } + + if (event.key === Qt.Key_Escape) { + event.accepted = true + nameInput.text = nameText.text + nameInput.focus = false + } + } + } + + states: [ + State { + name: "default" + when: tabBackground.editableName && !nameMouseArea.containsMouse && !presetNameBox.edit + PropertyChanges { + target: nameBackgroundColor + color: "transparent" + border.width: 0 + } + PropertyChanges { target: nameText; visible: true } + PropertyChanges { target: nameInput; visible: false } + }, + State { + name: "hovered" + when: tabBackground.editableName && nameMouseArea.containsMouse && !presetNameBox.edit + PropertyChanges { + target: nameBackgroundColor + color: StudioTheme.Values.themeControlBackgroundPressed + border.width: 0 + } + PropertyChanges { target: nameText; visible: true } + PropertyChanges { target: nameInput; visible: false } + }, + State { + name: "edit" + when: tabBackground.editableName && presetNameBox.edit + PropertyChanges { + target: nameBackgroundColor + color: StudioTheme.Values.themeControlBackgroundPressed + border.color: StudioTheme.Values.themeInteraction + border.width: 1 + } + PropertyChanges { target: nameText; visible: false } + PropertyChanges { target: nameInput; visible: true } + } + ] } } } diff --git a/share/qtcreator/qmldesigner/statesEditorQmlSources/DesignerTextFieldStyle.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/HorizontalScrollBar.qml similarity index 62% rename from share/qtcreator/qmldesigner/statesEditorQmlSources/DesignerTextFieldStyle.qml rename to share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/HorizontalScrollBar.qml index 64a8835db70..12111f7e1c0 100644 --- a/share/qtcreator/qmldesigner/statesEditorQmlSources/DesignerTextFieldStyle.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/HorizontalScrollBar.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of Qt Creator. @@ -23,25 +23,29 @@ ** ****************************************************************************/ -import QtQuick 2.2 -import QtQuick.Controls 1.1 -import QtQuick.Controls.Styles 1.1 -import QtQuickDesignerTheme 1.0 +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import StudioTheme 1.0 as StudioTheme -TextFieldStyle { - selectionColor: Theme.color(Theme.PanelTextColorLight) - selectedTextColor: Theme.color(Theme.PanelTextColorDark) - textColor: Theme.color(Theme.PanelTextColorLight) - placeholderTextColor: Theme.color(Theme.PanelTextColorMid) +ScrollBar { + id: scrollBar - padding.top: 4 - padding.bottom: 4 + property bool scrollBarVisible: parent.childrenRect.width > parent.width + + orientation: Qt.Horizontal + policy: scrollBar.scrollBarVisible ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff + x: 0 + y: parent.height - height + width: parent.availableWidth + - (parent.bothVisible ? parent.verticalThickness : 0) + padding: 0 background: Rectangle { - implicitWidth: 100 - implicitHeight: font.pixelSize + padding.top + padding.bottom - color: Theme.color(Theme.FancyToolButtonSelectedColor) - border.color: Theme.qmlDesignerBackgroundColorDarker() + color: StudioTheme.Values.themeSectionHeadBackground + } + + contentItem: Rectangle { + implicitHeight: StudioTheme.Values.scrollBarThickness + color: StudioTheme.Values.themeScrollBarHandle } - renderType: Text.NativeRendering } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/IconLabel.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/IconLabel.qml index f61a057ae09..85ed936a6b0 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/IconLabel.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/IconLabel.qml @@ -23,31 +23,16 @@ ** ****************************************************************************/ -import QtQuick 2.1 -import QtQuick.Controls 2.0 as Controls -import QtQuick.Layouts 1.0 +import QtQuick 2.15 +import HelperWidgets 2.0 +import StudioTheme 1.0 as StudioTheme -Item { - id: label - width: parent.width < 300 ? 80 : Math.min(140, parent.width - 220) - height: 16 - property alias source: image.source +Label { + id: myLabel - Item { - width: 16 - height: 16 - Image { - id: image - anchors.fill: parent - } + property alias icon: myLabel.text - } - - Layout.preferredWidth: width - Layout.minimumWidth: width - Layout.maximumWidth: width - -// Component.onCompleted: { -// label.Layout.preferredWidth = width -// } + text: StudioTheme.Constants.actionIcon + font.family: StudioTheme.Constants.iconFont.family + font.pixelSize: StudioTheme.Values.myIconFontSize } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ScrollView.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ScrollView.qml index 7dc4a0e395b..c101bff09c7 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ScrollView.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ScrollView.qml @@ -23,13 +23,37 @@ ** ****************************************************************************/ -import QtQuick 2.1 -import QtQuick.Controls 1.0 as Controls -import "../../../common/" +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import StudioTheme 1.0 as StudioTheme -Controls.ScrollView { - style: DesignerScrollViewStyle { +Flickable { + id: flickable + property alias horizontalThickness: horizontalScrollBar.height + property alias verticalThickness: verticalScrollBar.width + property bool bothVisible: verticalScrollBar.scrollBarVisible + && horizontalScrollBar.scrollBarVisible + + contentWidth: areaItem.childrenRect.width + contentHeight: areaItem.childrenRect.height + boundsBehavior: Flickable.StopAtBounds + + default property alias content: areaItem.children + + Item { + id: areaItem + } + + ScrollBar.horizontal: HorizontalScrollBar { + id: horizontalScrollBar + parent: flickable + scrollBarVisible: areaItem.childrenRect.width > flickable.width + } + + ScrollBar.vertical: VerticalScrollBar { + id: verticalScrollBar + parent: flickable + scrollBarVisible: areaItem.childrenRect.height > flickable.height } - frameVisible: false } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/Tab.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/VerticalScrollBar.qml similarity index 60% rename from share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/Tab.qml rename to share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/VerticalScrollBar.qml index 79806d2bcc5..97234524d44 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/Tab.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/VerticalScrollBar.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of Qt Creator. @@ -23,9 +23,29 @@ ** ****************************************************************************/ -import QtQuick 2.1 -import QtQuick.Controls 1.0 as Controls +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import StudioTheme 1.0 as StudioTheme -Controls.Tab { +ScrollBar { + id: scrollBar + property bool scrollBarVisible: parent.childrenRect.height > parent.height + + orientation: Qt.Vertical + policy: scrollBar.scrollBarVisible ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff + x: parent.width - width + y: 0 + height: parent.availableHeight + - (parent.bothVisible ? parent.horizontalThickness : 0) + padding: 0 + + background: Rectangle { + color: StudioTheme.Values.themeSectionHeadBackground + } + + contentItem: Rectangle { + implicitWidth: StudioTheme.Values.scrollBarThickness + color: StudioTheme.Values.themeScrollBarHandle + } } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/qmldir b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/qmldir index f77c9e19348..59573217c53 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/qmldir +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/qmldir @@ -39,11 +39,11 @@ SimpleColorPalette 2.0 SimpleColorPalette.qml DoubleSpinBox 2.0 DoubleSpinBox.qml SpinBox 2.0 SpinBox.qml StandardTextSection 2.0 StandardTextSection.qml -Tab 2.0 Tab.qml -TabView 2.0 TabView.qml ToolTipArea 2.0 ToolTipArea.qml UrlChooser 2.0 UrlChooser.qml PaddingSection 2.0 PaddingSection.qml RoundedPanel 2.0 RoundedPanel.qml ExpressionTextField 2.0 ExpressionTextField.qml MarginSection 2.0 MarginSection.qml +HorizontalScrollBar 2.0 HorizontalScrollBar.qml +VerticalScrollBar 2.0 VerticalScrollBar.qml diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ActionIndicator.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ActionIndicator.qml index 908f2274e6a..a055447d967 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ActionIndicator.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ActionIndicator.qml @@ -116,7 +116,6 @@ Rectangle { color: StudioTheme.Values.themeHoverHighlight border.color: StudioTheme.Values.themeControlOutline } - }, State { name: "edit" diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/CheckBox.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/CheckBox.qml index 0faaf7e0a8d..5e55a4855be 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/CheckBox.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/CheckBox.qml @@ -46,8 +46,7 @@ T.CheckBox { implicitWidth: Math.max( implicitBackgroundWidth + leftInset + rightInset, - implicitContentWidth + leftPadding + rightPadding - + implicitIndicatorWidth + spacing + actionIndicator.width) + implicitContentWidth + leftPadding + rightPadding) implicitHeight: Math.max( implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding, diff --git a/share/qtcreator/qmldesigner/common/DesignerScrollViewStyle.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/TabBar.qml similarity index 54% rename from share/qtcreator/qmldesigner/common/DesignerScrollViewStyle.qml rename to share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/TabBar.qml index b8284e7d4d2..1b71f1f4dea 100644 --- a/share/qtcreator/qmldesigner/common/DesignerScrollViewStyle.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/TabBar.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of Qt Creator. @@ -23,38 +23,33 @@ ** ****************************************************************************/ -import QtQuick 2.2 -import QtQuick.Controls 1.1 -import QtQuick.Controls.Styles 1.1 -import QtQuickDesignerTheme 1.0 +import QtQuick 2.15 +import QtQuick.Templates 2.15 as T +import StudioTheme 1.0 as StudioTheme -ScrollViewStyle { - readonly property color scrollbarColor: Theme.color(Theme.BackgroundColorDark) - readonly property color scrollBarHandleColor: Theme.color(Theme.QmlDesigner_ScrollBarHandleColor) +T.TabBar { + id: myButton - padding {left: 0; top: 0; right: 0; bottom: 0} + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, + implicitContentWidth + leftPadding + rightPadding) + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, + implicitContentHeight + topPadding + bottomPadding) - scrollBarBackground: Rectangle { - height: 10 - width: 10 - color: scrollbarColor - } - handle: Item { - implicitWidth: 10 - implicitHeight: 10 - Rectangle { - anchors.fill: parent - color: scrollBarHandleColor - } + spacing: 0 + bottomPadding: 4 + + contentItem: ListView { + model: myButton.contentModel + currentIndex: myButton.currentIndex + + spacing: myButton.spacing + orientation: ListView.Horizontal + boundsBehavior: Flickable.StopAtBounds + flickableDirection: Flickable.AutoFlickIfNeeded + snapMode: ListView.SnapToItem } - decrementControl: Item {} - incrementControl: Item {} - corner: Item {} - - //Even if the platform style reports touch support a scrollview should not be flickable. - Component.onCompleted: { - control.flickableItem.interactive = false + background: Rectangle { + color: StudioTheme.Values.themeTabLight } - transientScrollBars: false } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/TabView.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/TabButton.qml similarity index 50% rename from share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/TabView.qml rename to share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/TabButton.qml index b5e0ac02214..3b8efdfe55a 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/TabView.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/TabButton.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of Qt Creator. @@ -23,40 +23,38 @@ ** ****************************************************************************/ -import QtQuick 2.1 -import QtQuick.Controls 1.0 as Controls -import QtQuick.Controls.Styles 1.1 -import QtQuickDesignerTheme 1.0 +import QtQuick 2.15 +import QtQuick.Templates 2.15 as T import StudioTheme 1.0 as StudioTheme -Controls.TabView { - id: root +T.TabButton { + id: myButton - frameVisible: false - style: TabViewStyle { - frameOverlap: 0 - frame: Item { } - tab: Rectangle { - color: styleData.selected ? Theme.qmlDesignerTabLight() : Theme.qmlDesignerTabDark() - implicitWidth: root.width/root.count + 2 - implicitHeight: 28 - Text { - id: text - font.bold: true - font.pixelSize: StudioTheme.Values.myFontSize - anchors.centerIn: parent - anchors.verticalCenterOffset: -1 - text: styleData.title - renderType: Text.NativeRendering - color: styleData.selected ? Theme.qmlDesignerTabDark() : Theme.qmlDesignerTabLight() - } + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, + implicitContentWidth + leftPadding + rightPadding) + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, + implicitContentHeight + topPadding + bottomPadding) - Rectangle { - color:Theme.qmlDesignerTabLight() - width: parent.width - height: 4 - anchors.bottom: parent.bottom - } - } + padding: 1 + + background: Rectangle { + id: buttonBackground + color: myButton.checked ? StudioTheme.Values.themeTabLight : StudioTheme.Values.themeTabDark + border.color: StudioTheme.Values.themeControlOutline + border.width: 0 + } + + contentItem: T.Label { + id: buttonIcon + color: myButton.checked ? StudioTheme.Values.themeTabDark : StudioTheme.Values.themeTabLight + font.weight: Font.Bold + //font.family: StudioTheme.Constants.font.family + font.pixelSize: StudioTheme.Values.myFontSize + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + anchors.fill: parent + renderType: Text.QtRendering + + text: myButton.text } } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/qmldir b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/qmldir index ee876cc9353..75cf4f0cfad 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/qmldir +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/qmldir @@ -28,6 +28,8 @@ SliderPopup 1.0 SliderPopup.qml SpinBox 1.0 SpinBox.qml SpinBoxIndicator 1.0 SpinBoxIndicator.qml SpinBoxInput 1.0 SpinBoxInput.qml +TabBar 1.0 TabBar.qml +TabButton 1.0 TabButton.qml TextArea 1.0 TextArea.qml TextField 1.0 TextField.qml TranslationIndicator 1.0 TranslationIndicator.qml diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Values.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Values.qml index 9f04812af91..65cc7f3cfcd 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Values.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/Values.qml @@ -79,6 +79,8 @@ QtObject { property real inputHorizontalPadding: Math.round(4 * values.scaleFactor) + property real scrollBarThickness: 10 + // Theme Colors // COLORS NOW COME FROM THE THEME FILES @@ -117,6 +119,9 @@ QtObject { property string themeTranslationIndicatorBorder: Theme.color(Theme.DStranlsationIndicatorBorder) property string themeSectionHeadBackground: Theme.color(Theme.DSsectionHeadBackground) + property string themeTabDark: Theme.color(Theme.QmlDesigner_TabDark) + property string themeTabLight: Theme.color(Theme.QmlDesigner_TabLight) + // Taken out of Constants.js property string themeChangedStateText: Theme.color(Theme.DSchangedStateText) } diff --git a/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesDelegate.qml b/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesDelegate.qml index e6e5be75239..29f019e6c68 100644 --- a/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesDelegate.qml +++ b/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesDelegate.qml @@ -23,13 +23,15 @@ ** ****************************************************************************/ -import QtQuick 2.2 -import QtQuick.Controls 1.1 -import QtQuick.Controls.Styles 1.1 -import HelperWidgets 2.0 +import QtQuick 2.15 import QtQuickDesignerTheme 1.0 +import HelperWidgets 2.0 +import StudioControls 1.0 as StudioControls +import StudioTheme 1.0 as StudioTheme Rectangle { + id: myRoot + border.width: 1 property bool isBaseState property bool isCurrentState @@ -41,6 +43,8 @@ Rectangle { property string delegateWhenConditionString readonly property bool isDefaultState: isDefault + signal delegateInteraction + color: baseColor border.color: Theme.qmlDesignerBorderColor() @@ -50,38 +54,28 @@ Rectangle { } MouseArea { + id: mouseArea anchors.fill: parent acceptedButtons: Qt.LeftButton onClicked: { focus = true root.currentStateInternalId = internalNodeId + contextMenu.dismiss() // close potentially open context menu + myRoot.delegateInteraction() } } - ToolButton { + StudioControls.AbstractButton { id: removeStateButton - - style: ButtonStyle { - background: Rectangle { - color: control.hovered ? Qt.lighter(baseColor, 1.2) : "transparent" - Image { - source: "image://icons/close" - height: 16 - width: 16 - } - } - } - - + buttonIcon: StudioTheme.Constants.closeCross anchors.right: parent.right - anchors.rightMargin: 2 + anchors.rightMargin: 4 anchors.verticalCenter: stateNameField.verticalCenter - height: 16 - width: 16 visible: !isBaseState onClicked: { + myRoot.delegateInteraction() if (isDefaultState) statesEditorModel.resetDefaultState() @@ -89,86 +83,78 @@ Rectangle { } } - Image { - id: whenButton - visible: !isBaseState || (isBaseState && modelHasDefaultState) - width: 14 - height: 14 - x: 4 - y: 6 - source: { - if (whenMouseArea.containsMouse) - return "image://icons/submenu" - - return delegateHasWhenCondition ? "image://icons/expression" : "image://icons/placeholder" + StudioControls.Menu { + id: contextMenu + StudioControls.MenuItem { + enabled: !isBaseState + text: qsTr("Set when Condition") + onTriggered: { + bindingEditor.showWidget() + bindingEditor.text = delegateWhenConditionString + bindingEditor.prepareBindings() + } } - MouseArea { - id: whenMouseArea - hoverEnabled: true - anchors.fill: parent - onClicked: contextMenu.popup() + StudioControls.MenuItem { + enabled: !isBaseState && delegateHasWhenCondition + text: qsTr("Reset when Condition") + onTriggered: { + statesEditorModel.resetWhenCondition(internalNodeId) + } } - Menu { - id: contextMenu - MenuItem { - visible: !isBaseState - text: qsTr("Set when Condition") - onTriggered: { - bindingEditor.showWidget() - bindingEditor.text = delegateWhenConditionString - bindingEditor.prepareBindings() - } + StudioControls.MenuItem { + enabled: !isBaseState && !isDefaultState + text: qsTr("Set as Default") + onTriggered: { + statesEditorModel.setStateAsDefault(internalNodeId) } + } - MenuItem { - visible: !isBaseState && delegateHasWhenCondition - text: qsTr("Reset when Condition") - onTriggered: { - statesEditorModel.resetWhenCondition(internalNodeId) - } + StudioControls.MenuItem { + enabled: (!isBaseState && isDefaultState) || (isBaseState && modelHasDefaultState) + text: qsTr("Reset Default") + onTriggered: { + statesEditorModel.resetDefaultState() } + } - MenuItem { - visible: !isBaseState && !isDefaultState - text: qsTr("Set as Default") - onTriggered: { - statesEditorModel.setStateAsDefault(internalNodeId) - } - } + onClosed: { + stateNameField.actionIndicator.forceVisible = false + } - MenuItem { - visible: (!isBaseState && isDefaultState) || (isBaseState && modelHasDefaultState) - text: qsTr("Reset Default") - onTriggered: { - statesEditorModel.resetDefaultState() - } - } + onOpened: { + myRoot.delegateInteraction() } } - TextField { + + StudioControls.TextField { id: stateNameField - y: 4 - font.pixelSize: Theme.smallFontPixelSize() - anchors.left: whenButton.right - // use the spacing which the image to the delegate rectangle has - anchors.leftMargin: 4 - anchors.right: removeStateButton.left - anchors.rightMargin: 4 - style: DesignerTextFieldStyle { - background: Rectangle { - implicitWidth: 100 - implicitHeight: font.pixelSize + padding.top + padding.bottom - color: ((isBaseState && modelHasDefaultState) ? "transparent" - : Theme.color(Theme.FancyToolButtonSelectedColor)) - border.color: ((isBaseState && !modelHasDefaultState) || isDefaultState) ? "#ffd700" - : (isBaseState && modelHasDefaultState) ? "transparent" - : Theme.qmlDesignerBackgroundColorDarker() - } + actionIndicatorVisible: !isBaseState || (isBaseState && modelHasDefaultState) + + actionIndicator.onClicked: { + stateNameField.actionIndicator.forceVisible = true + contextMenu.popup() } + + onEditChanged: { + if (contextMenu.open && stateNameField.edit) + contextMenu.dismiss() + } + + actionIndicator.icon.text: delegateHasWhenCondition + ? StudioTheme.Constants.actionIconBinding : StudioTheme.Constants.actionIcon + + translationIndicatorVisible: false + y: 4 + anchors.left: parent.left + // use the spacing which the image to the delegate rectangle has + anchors.leftMargin: (isBaseState ? StudioTheme.Values.height : 0) + 4 + anchors.right: removeStateButton.left + anchors.rightMargin: 2 + readOnly: isBaseState onActiveFocusChanged: { @@ -188,7 +174,7 @@ Rectangle { stateNameField.oldValue = stateNameField.text - if (stateNameField.text != delegateStateName) + if (stateNameField.text !== delegateStateName) statesEditorModel.renameState(internalNodeId, stateNameField.text) } } @@ -220,8 +206,8 @@ Rectangle { Text { id: stateDefaultIndicator - anchors.left: whenButton.left - anchors.leftMargin: 0 + anchors.left: parent.left + anchors.leftMargin: StudioTheme.Values.height anchors.right: removeStateButton.left anchors.rightMargin: 4 anchors.bottom: parent.bottom diff --git a/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesList.qml b/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesList.qml index c512b7098a8..8eb80fbfc66 100644 --- a/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesList.qml +++ b/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesList.qml @@ -23,32 +23,33 @@ ** ****************************************************************************/ -import QtQuick 2.2 -import QtQuick.Controls 1.1 -import QtQuick.Controls.Styles 1.1 -import "../common" +import QtQuick 2.15 +import QtQuick.Controls 2.15 import QtQuickDesignerTheme 1.0 +import HelperWidgets 2.0 +import StudioControls 1.0 as StudioControls +import StudioTheme 1.0 as StudioTheme FocusScope { id: root - height: expanded ? 192 : 40 + height: (root.expanded ? 192 : 40) + StudioTheme.Values.scrollBarThickness signal createNewState signal deleteState(int internalNodeId) signal duplicateCurrentState property int stateImageSize: 180 - property int delegateWidth: stateImageSize + 44 property int padding: 2 - property int delegateHeight: root.height - padding * 2 + 1 + property int delegateWidth: root.stateImageSize + 44 + property int delegateHeight: root.height - StudioTheme.Values.scrollBarThickness - root.padding * 2 + 1 property int innerSpacing: 0 - property int currentStateInternalId : 0 + property int currentStateInternalId: 0 property bool expanded: true Connections { target: statesEditorModel - onChangedToState: root.currentStateInternalId = n + function onChangedToState(n) { root.currentStateInternalId = n } } SystemPalette { @@ -66,35 +67,41 @@ FocusScope { acceptedButtons: Qt.LeftButton | Qt.RightButton onClicked: { - if (mouse.button === Qt.LeftButton) + if (mouse.button === Qt.LeftButton) { + contextMenu.dismiss() focus = true - else if (mouse.button === Qt.RightButton) + } else if (mouse.button === Qt.RightButton) { contextMenu.popup() + } } - Menu { + StudioControls.Menu { id: contextMenu - MenuItem { + StudioControls.MenuItem { text: root.expanded ? qsTr("Collapse") : qsTr("Expand") onTriggered: { root.expanded = !root.expanded } - } } } + function closeContextMenu() { + if (contextMenu.open) + contextMenu.dismiss() + } + Item { id: addStateItem - property int buttonLeftSpacing: 8 * (expanded ? 1 : 2) + property int buttonLeftSpacing: 8 * (root.expanded ? 1 : 2) anchors.right: parent.right - width: delegateHeight / 2 + buttonLeftSpacing - height: delegateHeight + width: root.delegateHeight / 2 + buttonLeftSpacing + height: root.delegateHeight - Button { + AbstractButton { id: addStateButton visible: canAddNewStates @@ -106,56 +113,69 @@ FocusScope { width: Math.max(parent.height / 2 - 8, 18) height: width - onClicked: root.createNewState() + onClicked: { + root.closeContextMenu() + root.createNewState() + } - style: ButtonStyle { - background: Rectangle { - property color buttonBaseColor: Qt.darker(Theme.qmlDesignerBackgroundColorDarkAlternate(), 1.1) - color: control.hovered ? Qt.lighter(buttonBaseColor, 1.2) : buttonBaseColor - border.color: Theme.qmlDesignerBorderColor() - border.width: 1 - Image { - source: "image://icons/plus" - width: 16 - height: 16 - anchors.centerIn: parent - smooth: false - } + background: Rectangle { + property color buttonBaseColor: Qt.darker(Theme.qmlDesignerBackgroundColorDarkAlternate(), 1.1) + color: addStateButton.hovered ? Qt.lighter(buttonBaseColor, 1.2) : buttonBaseColor + border.color: Theme.qmlDesignerBorderColor() + border.width: 1 + Image { + source: "image://icons/plus" + width: 16 + height: 16 + anchors.centerIn: parent + smooth: false } } } } - ScrollView { + ListView { + id: flickable + + boundsBehavior: Flickable.StopAtBounds + clip: true + anchors.left: parent.left anchors.right: addStateItem.left - height: delegateHeight - y: padding - anchors.leftMargin: padding - anchors.rightMargin: padding + height: root.delegateHeight + StudioTheme.Values.scrollBarThickness + y: root.padding + anchors.leftMargin: root.padding + anchors.rightMargin: root.padding - style: DesignerScrollViewStyle { + model: statesEditorModel + orientation: ListView.Horizontal + spacing: root.innerSpacing + + delegate: StatesDelegate { + id: statesDelegate + width: root.delegateWidth + height: root.delegateHeight + isBaseState: 0 == internalNodeId + isCurrentState: root.currentStateInternalId == internalNodeId + baseColor: isCurrentState ? Theme.color(Theme.QmlDesigner_HighlightColor) : background.color + delegateStateName: stateName + delegateStateImageSource: stateImageSource + delegateStateImageSize: stateImageSize + delegateHasWhenCondition: hasWhenCondition + delegateWhenConditionString: whenConditionString + onDelegateInteraction: root.closeContextMenu() } - ListView { - anchors.fill: parent - model: statesEditorModel - orientation: ListView.Horizontal - spacing: innerSpacing + property bool bothVisible: horizontal.scrollBarVisible && vertical.scrollBarVisible - delegate: StatesDelegate { - id: statesDelegate - width: delegateWidth - height: delegateHeight - isBaseState: 0 == internalNodeId - isCurrentState: root.currentStateInternalId == internalNodeId - baseColor: isCurrentState ? Theme.color(Theme.QmlDesigner_HighlightColor) : background.color - delegateStateName: stateName - delegateStateImageSource: stateImageSource - delegateStateImageSize: stateImageSize - delegateHasWhenCondition: hasWhenCondition - delegateWhenConditionString: whenConditionString - } + ScrollBar.horizontal: HorizontalScrollBar { + id: horizontal + parent: flickable + } + + ScrollBar.vertical: VerticalScrollBar { + id: vertical + parent: flickable } } } diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp index 6dee5a6d3a3..ea81fb4fcfa 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp @@ -110,6 +110,7 @@ ItemLibraryWidget::ItemLibraryWidget(QWidget *parent) : {{"highlightColor"}, Utils::StyleHelper::notTooBrightHighlightColor()} } ); + m_itemViewQuickWidget->setClearColor(Theme::getColor(Theme::Color::QmlDesigner_BackgroundColorDarkAlternate)); /* create Resources view and its model */ m_resourcesFileSystemModel = new CustomFileSystemModel(this); From c8981526212cb74f6151cd262ff6215f34c3f62f Mon Sep 17 00:00:00 2001 From: Henning Gruendl Date: Thu, 9 Jul 2020 11:13:11 +0200 Subject: [PATCH 004/108] QmlDesigner: Add change type name dialog * Add a change type name dialog showing all incompatible properties * Fix ExpressionTextField triggering twice on pressing enter * Fix compare operator Task-number: QDS-1946 Change-Id: Ic384f6dcce44297b43839c17874108b39af909da Reviewed-by: Thomas Hartmann --- .../QtQuick/ItemPane.qml | 9 ++++ .../HelperWidgets/ExpressionTextField.qml | 2 +- .../propertyeditorcontextobject.cpp | 48 +++++++++++++++++-- 3 files changed, 54 insertions(+), 5 deletions(-) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml index 77af9247cf5..db877b65cd7 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml @@ -99,10 +99,19 @@ Rectangle { showButtons: false fixedSize: true + property bool blockEditingFinished: false + onEditingFinished: { + if (typeLineEdit.blockEditingFinished) + return + + typeLineEdit.blockEditingFinished = true + if (visible) changeTypeName(typeLineEdit.text.trim()) visible = false + + typeLineEdit.blockEditingFinished = false } } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ExpressionTextField.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ExpressionTextField.qml index 6209325e7e3..e0de0d3b88f 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ExpressionTextField.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ExpressionTextField.qml @@ -132,7 +132,7 @@ StudioControls.TextField { event.accepted = true; - if (list.length == 1) + if (list.length === 1) textField.commitCompletion() } else { diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.cpp index a479dfeba0b..524debfe176 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.cpp @@ -40,6 +40,7 @@ #include #include #include +#include #include #include @@ -180,7 +181,6 @@ void PropertyEditorContextObject::toogleExportAlias() void PropertyEditorContextObject::changeTypeName(const QString &typeName) { - QTC_ASSERT(m_model && m_model->rewriterView(), return); /* Ideally we should not missuse the rewriterView @@ -189,19 +189,59 @@ void PropertyEditorContextObject::changeTypeName(const QString &typeName) QTC_ASSERT(!rewriterView->selectedModelNodes().isEmpty(), return); - rewriterView->executeInTransaction("PropertyEditorContextObject:changeTypeName", [this, rewriterView, typeName](){ + try { + auto transaction = RewriterTransaction(rewriterView, "PropertyEditorContextObject:changeTypeName"); + ModelNode selectedNode = rewriterView->selectedModelNodes().constFirst(); NodeMetaInfo metaInfo = m_model->metaInfo(typeName.toLatin1()); if (!metaInfo.isValid()) { - Core::AsynchronousMessageBox::warning(tr("Invalid Type"), tr("%1 is an invalid type.").arg(typeName)); + Core::AsynchronousMessageBox::warning(tr("Invalid Type"), tr("%1 is an invalid type.").arg(typeName)); return; } + + QList incompatibleProperties; + for (auto property : selectedNode.properties()) { + if (!metaInfo.propertyNames().contains(property.name())) + incompatibleProperties.append(property.name()); + } + + if (!incompatibleProperties.empty()) { + QString detailedText = QString("Incompatible properties:
"); + + for (auto p : incompatibleProperties) + detailedText.append("- " + QString::fromUtf8(p) + "
"); + + detailedText.chop(QString("
").size()); + + QMessageBox msgBox; + msgBox.setTextFormat(Qt::RichText); + msgBox.setIcon(QMessageBox::Question); + msgBox.setWindowTitle("Change Type"); + msgBox.setText(QString("Changing the type from %1 to %2 can't be done without removing incompatible properties.

%3") + .arg(selectedNode.simplifiedTypeName()) + .arg(typeName) + .arg(detailedText)); + msgBox.setInformativeText("Do you want to continue by removing incompatible properties?"); + msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); + msgBox.setDefaultButton(QMessageBox::Ok); + + if (msgBox.exec() == QMessageBox::Cancel) + return; + + for (auto p : incompatibleProperties) + selectedNode.removeProperty(p); + } + if (selectedNode.isRootNode()) rewriterView->changeRootNodeType(metaInfo.typeName(), metaInfo.majorVersion(), metaInfo.minorVersion()); else selectedNode.changeType(metaInfo.typeName(), metaInfo.majorVersion(), metaInfo.minorVersion()); - }); + + transaction.commit(); + } catch (const Exception &e) { + e.showException(); + } } void PropertyEditorContextObject::insertKeyframe(const QString &propertyName) From f3bc2d609f1d09fe8869eb30d9a39ba2ea25c445 Mon Sep 17 00:00:00 2001 From: Mahmoud Badri Date: Wed, 20 May 2020 00:12:55 +0300 Subject: [PATCH 005/108] Add/remove the simulink component when the import is added/removed Task-number: QDS-2122 Change-Id: Ib4e2ff14ed9cfef1534f9c3edb0a8279fbabfd6a Reviewed-by: Thomas Hartmann --- .../importmanager/importswidget.cpp | 9 +++++- .../itemlibrary/itemlibraryview.cpp | 32 ++++++++++++++++++- .../designercore/include/itemlibraryinfo.h | 1 - .../designercore/metainfo/itemlibraryinfo.cpp | 11 ------- 4 files changed, 39 insertions(+), 14 deletions(-) diff --git a/src/plugins/qmldesigner/components/importmanager/importswidget.cpp b/src/plugins/qmldesigner/components/importmanager/importswidget.cpp index d3aaf3c9b14..650033a42d8 100644 --- a/src/plugins/qmldesigner/components/importmanager/importswidget.cpp +++ b/src/plugins/qmldesigner/components/importmanager/importswidget.cpp @@ -122,8 +122,15 @@ void ImportsWidget::removePossibleImports() void ImportsWidget::setUsedImports(const QList &usedImports) { + const QStringList excludeList = {"SimulinkConnector"}; + + // exclude imports in the excludeList from being readonly (i.e. always enable their x button) + QList filteredImports = Utils::filtered(usedImports, [excludeList](const Import &import) { + return !excludeList.contains(import.url()); + }); + foreach (ImportLabel *importLabel, m_importLabels) - importLabel->setReadOnly(usedImports.contains(importLabel->import())); + importLabel->setReadOnly(filteredImports.contains(importLabel->import())); } void ImportsWidget::removeUsedImports() diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibraryview.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibraryview.cpp index cad7189698c..ea2e472f43d 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibraryview.cpp +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibraryview.cpp @@ -29,6 +29,10 @@ #include #include #include +#include +#include +#include +#include "metainfo.h" namespace QmlDesigner { @@ -82,9 +86,35 @@ void ItemLibraryView::modelAboutToBeDetached(Model *model) m_widget->setModel(nullptr); } -void ItemLibraryView::importsChanged(const QList &/*addedImports*/, const QList &/*removedImports*/) +void ItemLibraryView::importsChanged(const QList &addedImports, const QList &removedImports) { updateImports(); + + // TODO: generalize the logic below to allow adding/removing any Qml component when its import is added/removed + bool simulinkImportAdded = std::any_of(addedImports.cbegin(), addedImports.cend(), [](const Import &import) { + return import.url() == "SimulinkConnector"; + }); + if (simulinkImportAdded) { + // add SLConnector component when SimulinkConnector import is added + ModelNode node = createModelNode("SLConnector", 1, 0); + node.bindingProperty("root").setExpression(rootModelNode().validId()); + rootModelNode().defaultNodeListProperty().reparentHere(node); + } else { + bool simulinkImportRemoved = std::any_of(removedImports.cbegin(), removedImports.cend(), [](const Import &import) { + return import.url() == "SimulinkConnector"; + }); + + if (simulinkImportRemoved) { + // remove SLConnector component when SimulinkConnector import is removed + const QList slConnectors = Utils::filtered(rootModelNode().directSubModelNodes(), + [](const ModelNode &node) { + return node.type() == "SLConnector" || node.type() == "SimulinkConnector.SLConnector"; + }); + + for (ModelNode node : slConnectors) + node.destroy(); + } + } } void ItemLibraryView::setResourcePath(const QString &resourcePath) diff --git a/src/plugins/qmldesigner/designercore/include/itemlibraryinfo.h b/src/plugins/qmldesigner/designercore/include/itemlibraryinfo.h index 58d24137870..7cfa0ae1ab5 100644 --- a/src/plugins/qmldesigner/designercore/include/itemlibraryinfo.h +++ b/src/plugins/qmldesigner/designercore/include/itemlibraryinfo.h @@ -98,7 +98,6 @@ public: QList entries() const; QList entriesForType(const QByteArray &typeName, int majorVersion, int minorVersion) const; - ItemLibraryEntry entry(const QString &name) const; void addEntries(const QList &entries, bool overwriteDuplicate = false); bool containsEntry(const ItemLibraryEntry &entry); diff --git a/src/plugins/qmldesigner/designercore/metainfo/itemlibraryinfo.cpp b/src/plugins/qmldesigner/designercore/metainfo/itemlibraryinfo.cpp index e76fe609f07..1464084b67e 100644 --- a/src/plugins/qmldesigner/designercore/metainfo/itemlibraryinfo.cpp +++ b/src/plugins/qmldesigner/designercore/metainfo/itemlibraryinfo.cpp @@ -272,17 +272,6 @@ QList ItemLibraryInfo::entriesForType(const QByteArray &typeNa return entries; } -ItemLibraryEntry ItemLibraryInfo::entry(const QString &name) const -{ - if (m_nameToEntryHash.contains(name)) - return m_nameToEntryHash.value(name); - - if (m_baseInfo) - return m_baseInfo->entry(name); - - return ItemLibraryEntry(); -} - QList ItemLibraryInfo::entries() const { QList list = m_nameToEntryHash.values(); From 4aba3da7bd7465b882c8d39ebb5dace170c9f343 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 10 Jul 2020 14:33:37 +0200 Subject: [PATCH 006/108] CompilationDatabase: Fix unit test Amends be97943372. Change-Id: Ic840f5eca8a83b5bdf3e3864e8859234472911b7 Reviewed-by: Marco Bubke --- tests/unit/unittest/compilationdatabaseutils-test.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/unit/unittest/compilationdatabaseutils-test.cpp b/tests/unit/unittest/compilationdatabaseutils-test.cpp index cae74fa807f..3cbb8ac8eb5 100644 --- a/tests/unit/unittest/compilationdatabaseutils-test.cpp +++ b/tests/unit/unittest/compilationdatabaseutils-test.cpp @@ -90,7 +90,6 @@ TEST_F(CompilationDatabaseUtils, FilterArguments) "-DUNICODE", "-DRELATIVE_PLUGIN_PATH=\"../lib/qtcreator/plugins\"", "-DQT_CREATOR", - "-fPIC", "-I", QString::fromUtf8(HostOsInfo::isWindowsHost() ? winPath1 : otherPath1), "-I", From 2fa261c132973bc828440a3d80c770f02cf6aa59 Mon Sep 17 00:00:00 2001 From: Henning Gruendl Date: Fri, 10 Jul 2020 12:08:58 +0200 Subject: [PATCH 007/108] QmlDesigner: Move zoom buttons to FormEditorWidget * Move the zoom all and zoom selection button to the FormEditorWidget taskbar * Add zoom in and zoom out actions/buttons * Fix ZoomAction in and out direction * Add update icon font Change-Id: I9addba5652cafa5884450bc633a1e16087aae8dd Reviewed-by: Thomas Hartmann --- .../imports/StudioTheme/InternalConstants.qml | 48 ++++++----- .../imports/StudioTheme/icons.ttf | Bin 12576 -> 13620 bytes .../componentcore/componentcore_constants.h | 8 -- .../componentcore/designeractionmanager.cpp | 21 ----- .../componentcore/modelnodeoperations.cpp | 17 ---- .../componentcore/modelnodeoperations.h | 2 - .../components/componentcore/theme.h | 14 +++- .../components/componentcore/zoomaction.cpp | 8 +- .../components/formeditor/formeditorview.cpp | 13 ++- .../formeditor/formeditorwidget.cpp | 75 +++++++++++++++++- .../components/formeditor/formeditorwidget.h | 5 ++ 11 files changed, 131 insertions(+), 80 deletions(-) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/InternalConstants.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/InternalConstants.qml index c326cc08f1d..3d17883c544 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/InternalConstants.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/InternalConstants.qml @@ -94,27 +94,33 @@ QtObject { readonly property string fontStyleItalic: "\u0057" readonly property string fontStyleStrikethrough: "\u0058" readonly property string fontStyleUnderline: "\u0059" - readonly property string mergeCells: "\u005A" - readonly property string redo: "\u005B" - readonly property string splitColumns: "\u005C" - readonly property string splitRows: "\u005D" - readonly property string startNode: "\u005E" - readonly property string testIcon: "\u005F" - readonly property string textAlignBottom: "\u0060" - readonly property string textAlignCenter: "\u0061" - readonly property string textAlignLeft: "\u0062" - readonly property string textAlignMiddle: "\u0063" - readonly property string textAlignRight: "\u0064" - readonly property string textAlignTop: "\u0065" - readonly property string textBulletList: "\u0066" - readonly property string textFullJustification: "\u0067" - readonly property string textNumberedList: "\u0068" - readonly property string tickIcon: "\u0069" - readonly property string triState: "\u006A" - readonly property string undo: "\u006B" - readonly property string upDownIcon: "\u006C" - readonly property string upDownSquare2: "\u006D" - readonly property string wildcard: "\u006E" + readonly property string idAliasOff: "\u005A" + readonly property string idAliasOn: "\u005B" + readonly property string mergeCells: "\u005C" + readonly property string redo: "\u005D" + readonly property string splitColumns: "\u005E" + readonly property string splitRows: "\u005F" + readonly property string startNode: "\u0060" + readonly property string testIcon: "\u0061" + readonly property string textAlignBottom: "\u0062" + readonly property string textAlignCenter: "\u0063" + readonly property string textAlignLeft: "\u0064" + readonly property string textAlignMiddle: "\u0065" + readonly property string textAlignRight: "\u0066" + readonly property string textAlignTop: "\u0067" + readonly property string textBulletList: "\u0068" + readonly property string textFullJustification: "\u0069" + readonly property string textNumberedList: "\u006A" + readonly property string tickIcon: "\u006B" + readonly property string triState: "\u006C" + readonly property string undo: "\u006D" + readonly property string upDownIcon: "\u006E" + readonly property string upDownSquare2: "\u006F" + readonly property string wildcard: "\u0070" + readonly property string zoomAll: "\u0071" + readonly property string zoomIn: "\u0072" + readonly property string zoomOut: "\u0073" + readonly property string zoomSelection: "\u0074" readonly property font iconFont: Qt.font({ "family": controlIcons.name, diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/icons.ttf b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/icons.ttf index 47becb68731714de31a05a18e07c9c60a2f72c93..46a677784ac73630e3e5156da147872031d01bda 100644 GIT binary patch delta 1579 zcmZ3Gv?Z&afsuiMftR6yftew|%`L=tf_u(W1_o0J1_lNh|6qNi$ktR|1_s6m1_p+N zZ8`bLi4&4%J!4>C2JtuKCRP+MEM-{4z`$t1z`&r8mzbN{X>PxrfkAr; z0|V2Ag8bqV)t#I97#Q?Y7#P^rfIY{^z>u@PT_v91<|_j?^9u$B28P>O<~b0W$vkHg zqb+MVLm>mtWGBW*#*)c%80RwgFtAUyVA5viV*ta+NldzoC6gyGwXy{U1&4%&O;%*? zm~6nzHhCp;o#{57AG{8{RlHkx-|+t8liUvDd zN^I=vc8o@1;&O~4Z0u};qKcxrjG|252e-Lv+s+FMpKBXzZ5^zclxrC_&sN)Q=kA^E z?p|K*ZvVdi`^d_}=|s4NF-^TV0T(`_4T(-Q5@u+tt?3nN!Qaz{J2# zk|UUjb;N^zU;lk#PKYz+%&FaMA-j;Po|%E~zdQ4FW+4V41~~>Z1_nkWIYtpa zMr9>+Ms-FtQxiKTCL=pW6Fo*HK1LBSRdaE5b9Hucc5`uab#`@ec5!ocb9QxhrihG< zY3Um>x^w>B)L~SQu}$ygTsJu^Y%+*o^wHLur|IONHBU>^!9h!Fo~DB{i0#BIRG+@# z!iMzde>b%mHL`pC`qFIwI)+VNHzhQ5%DTyGHRow*Izlu!Y0cNta&p!L8N`6f=qQb7coPhz&AxeZCVs5I4=74&% zpz>q1z;F3!J3CM|;z5Zv6$T9k9R?!?GX@(52L=}gF9ttCPEiF12YbD;sWCegiyEt& z8jFI$NmN-8DkcsNH+IZ`LkqWkdi?SQPEM_kj;(s~{Ce{8di;!%VE$Jy7ni3LATb@K zz^|{MprD}7@9*T)q9-p8GC+QllM}<_8|udDCX906a)p6`g+Y?B9m-~95MVqEWwS9z zGI2~c($H1UVA#UI%)rRP$-u&3#25@^voa_!E`+k#7>pRNY;M!wWn?vH&}A^6JWJDp z!(7)~*T}%gU~-IBz+`Q$#>s276d1!NpVL~z!x+FA$QZ;J%oxHLy178xghe7V#W5!{ zvDiN?O|Q5tofpQ<+dN-Cn$eWIDnCEhF((Hk#|2`0=7E@CVgJ$+5L*x=9Gseynp~2Z R50;($$3TJyQAnES0052gpi}?= delta 514 zcmdmzwIHdUfsuiMftR6yftew|%`L>YfATRy1_nbG1_lNh|6qNi$ktSL1_s6m1_p+N z50V!|Nk>EGcXwZVPIh3NYANE zdvxDMiGhJ7fPq1|BO^62MaGIdg@J+L4g&*&Sw==`eInPd|C1OP7)2Nu7*sNHODY7) z+4&e47PU|_mjkY8L{`2_<51H-KgDMApM zDMe@!qb+M7Lm>mlWGBW*#=OaM80Sv5Wzw3Q&!hw5F||%MWNw-4z$`F%D|4OZ9-eQ! z2D}-(WxP{(U-4P+wej8I*Wz#BzayX_a75sRAcLTlV3=T$;E~N4EH5QCN6IbWnmkq8 zNZpiC0qhzE1{MZM#x5wEl|g{<7?jP%Aj!l%`JJ||dKSYL24)6E7ET5h1|!BWD4Uf* zfpH0x&BkEFczv^z4lg6SF@phvE`!PB5M2uvV*_22$^E+5Ca35rG6qg=(_6IJMBjvE VbE|O}BNGF|WC2qN9)#ahgaB$Fd%6Gs diff --git a/src/plugins/qmldesigner/components/componentcore/componentcore_constants.h b/src/plugins/qmldesigner/components/componentcore/componentcore_constants.h index a8db25f4176..806da7f4286 100644 --- a/src/plugins/qmldesigner/components/componentcore/componentcore_constants.h +++ b/src/plugins/qmldesigner/components/componentcore/componentcore_constants.h @@ -83,8 +83,6 @@ const char decreaseIndexOfStackedContainerCommandId[] = "DecreaseIndexOfStackedC const char flowAssignEffectCommandId[] = "AssignFlowEffect"; const char flowAssignCustomEffectCommandId[] = "AssignFlowCustomEffect"; const char addToGroupItemCommandId[] = "AddToGroupItem"; -const char fitRootToScreenCommandId[] = "FitRootToScreen"; -const char fitSelectionToScreenCommandId[] = "FitSelectionToScreen"; const char selectionCategoryDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Selection"); const char flowConnectionCategoryDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Connect"); @@ -157,9 +155,6 @@ const char layoutFillHeightDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContext const char flowAssignEffectDisplayName[] = "Assign FlowEffect "; const char flowAssignCustomEffectDisplayName[] = "Assign Custom FlowEffect "; -const char fitRootToScreenDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Fit root to screen"); -const char fitSelectionToScreenDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Fit selection to screen"); - const char raiseToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Raise selected item."); const char lowerToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Lower selected item."); @@ -178,9 +173,6 @@ const char decreaseIndexOfStackedContainerToolTip[] = QT_TRANSLATE_NOOP("QmlDesi const char addItemToStackedContainerToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Add item to stacked container."); const char addFlowActionToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Add flow action."); -const char fitRootToScreenToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Fit the root element inside the available space."); -const char fitSelectionToScreenToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Fit the selected elements inside the available space."); - const char editListModelDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Edit List Model..."); diff --git a/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp b/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp index 73abc4ea296..8ccdef7acd2 100644 --- a/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp +++ b/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp @@ -883,27 +883,6 @@ void DesignerActionManager::createDefaultDesignerActions() &resetSize, &selectionNotEmptyAndHasWidthOrHeightProperty)); - addDesignerAction(new ModelNodeAction( - fitRootToScreenCommandId, - fitRootToScreenDisplayName, - Utils::Icon({{":/utils/images/fittoview.png", Utils::Theme::IconsBaseColor}}).icon(), - fitRootToScreenToolTip, - genericToolBarCategory, - QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_0), - 182, - &fitRootToScreen)); - - addDesignerAction(new ModelNodeAction( - fitSelectionToScreenCommandId, - fitSelectionToScreenDisplayName, - Utils::Icon({{":/utils/images/fittoview.png", Utils::Theme::IconsBaseColor}}).icon(), - fitSelectionToScreenToolTip, - genericToolBarCategory, - QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_I), - 183, - &fitSelectionToScreen, - &selectionNotEmpty)); - addDesignerAction(new SeperatorDesignerAction(editCategory, 170)); addDesignerAction(new VisiblityModelNodeAction( diff --git a/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp b/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp index da77f26af7e..98148b7bd3f 100644 --- a/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp +++ b/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp @@ -329,23 +329,6 @@ void resetPosition(const SelectionContext &selectionState) }); } -void fitRootToScreen(const SelectionContext &selectionState) -{ - if (!selectionState.view()) - return; - - selectionState.view()->emitCustomNotification(QStringLiteral("fit root to screen")); -} - -void fitSelectionToScreen(const SelectionContext &selectionState) -{ - if (!selectionState.view()) - return; - - selectionState.view()->emitCustomNotification(QStringLiteral("fit selection to screen"), - selectionState.selectedModelNodes()); -} - void goIntoComponentOperation(const SelectionContext &selectionState) { goIntoComponent(selectionState.currentSingleSelectedNode()); diff --git a/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.h b/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.h index 0a8e094a7e1..afd8416bf9f 100644 --- a/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.h +++ b/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.h @@ -49,8 +49,6 @@ void setFillWidth(const SelectionContext &selectionState); void setFillHeight(const SelectionContext &selectionState); void resetSize(const SelectionContext &selectionState); void resetPosition(const SelectionContext &selectionState); -void fitRootToScreen(const SelectionContext &selectionState); -void fitSelectionToScreen(const SelectionContext &selectionState); void goIntoComponentOperation(const SelectionContext &selectionState); void setId(const SelectionContext &selectionState); void resetZ(const SelectionContext &selectionState); diff --git a/src/plugins/qmldesigner/components/componentcore/theme.h b/src/plugins/qmldesigner/components/componentcore/theme.h index 4cc4deb2983..880a1d05caa 100644 --- a/src/plugins/qmldesigner/components/componentcore/theme.h +++ b/src/plugins/qmldesigner/components/componentcore/theme.h @@ -66,19 +66,21 @@ public: alignRight, alignTo, alignTop, - assign, anchorBaseline, anchorBottom, anchorFill, anchorLeft, anchorRight, anchorTop, + animatedProperty, annotationBubble, annotationDecal, + assign, centerHorizontal, centerVertical, - curveEditor, closeCross, + curveDesigner, + curveEditor, decisionNode, deleteColumn, deleteRow, @@ -101,6 +103,8 @@ public: fontStyleItalic, fontStyleStrikethrough, fontStyleUnderline, + idAliasOff, + idAliasOn, mergeCells, redo, splitColumns, @@ -121,7 +125,11 @@ public: undo, upDownIcon, upDownSquare2, - wildcard + wildcard, + zoomAll, + zoomIn, + zoomOut, + zoomSelection }; static Theme *instance(); diff --git a/src/plugins/qmldesigner/components/componentcore/zoomaction.cpp b/src/plugins/qmldesigner/components/componentcore/zoomaction.cpp index 4f1d1c3da90..c59c1ffe836 100644 --- a/src/plugins/qmldesigner/components/componentcore/zoomaction.cpp +++ b/src/plugins/qmldesigner/components/componentcore/zoomaction.cpp @@ -47,14 +47,14 @@ float ZoomAction::zoomLevel() const void ZoomAction::zoomIn() { - if (m_currentComboBoxIndex > 0) - emit indexChanged(m_currentComboBoxIndex - 1); + if (m_currentComboBoxIndex < (m_comboBoxModel->rowCount() - 1)) + emit indexChanged(m_currentComboBoxIndex + 1); } void ZoomAction::zoomOut() { - if (m_currentComboBoxIndex < (m_comboBoxModel->rowCount() - 1)) - emit indexChanged(m_currentComboBoxIndex + 1); + if (m_currentComboBoxIndex > 0) + emit indexChanged(m_currentComboBoxIndex - 1); } void ZoomAction::resetZoomLevel() diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp b/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp index f64b45f3517..6eec3f933c4 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp +++ b/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp @@ -384,6 +384,11 @@ void FormEditorView::selectedNodesChanged(const QList &selectedNodeLi m_currentTool->setItems(scene()->itemsForQmlItemNodes(toQmlItemNodeListKeppInvalid(selectedNodeList))); m_scene->update(); + + if (selectedNodeList.empty()) + m_formEditorWidget->zoomSelectionAction()->setEnabled(false); + else + m_formEditorWidget->zoomSelectionAction()->setEnabled(true); } void FormEditorView::variantPropertiesChanged(const QList &propertyList, @@ -448,7 +453,7 @@ void FormEditorView::customNotification(const AbstractView * /*view*/, const QSt m_dragTool->clearMoveDelay(); if (identifier == QLatin1String("reset QmlPuppet")) temporaryBlockView(); - if (identifier == QLatin1String("fit root to screen")) { + if (identifier == QLatin1String("zoom all")) { if (QmlItemNode(rootModelNode()).isFlowView()) { QRectF boundingRect; for (QGraphicsItem *item : scene()->items()) { @@ -469,7 +474,7 @@ void FormEditorView::customNotification(const AbstractView * /*view*/, const QSt float zoomLevel = ZoomAction::getClosestZoomLevel(scaleFactor); m_formEditorWidget->zoomAction()->forceZoomLevel(zoomLevel); } - if (identifier == QLatin1String("fit selection to screen")) { + if (identifier == QLatin1String("zoom selection")) { if (nodeList.isEmpty()) return; @@ -485,6 +490,10 @@ void FormEditorView::customNotification(const AbstractView * /*view*/, const QSt float zoomLevel = ZoomAction::getClosestZoomLevel(scaleFactor); m_formEditorWidget->zoomAction()->forceZoomLevel(zoomLevel); } + if (identifier == QLatin1String("zoom in")) + m_formEditorWidget->zoomAction()->zoomIn(); + if (identifier == QLatin1String("zoom out")) + m_formEditorWidget->zoomAction()->zoomOut(); } AbstractFormEditorTool *FormEditorView::currentTool() const diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp b/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp index 0380db2b081..303c79ea965 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp +++ b/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp @@ -48,6 +48,7 @@ #include #include +#include #include #include @@ -144,6 +145,46 @@ FormEditorWidget::FormEditorWidget(FormEditorView *view) : upperActions.append(m_backgroundAction.data()); m_toolBox->addRightSideAction(m_backgroundAction.data()); + // Zoom actions + const QString fontName = "qtds_propertyIconFont.ttf"; + QColor buttonColor(Theme::getColor(Theme::QmlDesigner_TabLight)); + const QIcon zoomAllIcon = Utils::StyleHelper::getIconFromIconFont(fontName, + Theme::getIconUnicode(Theme::Icon::zoomAll), + 28, 28, buttonColor); + const QIcon zoomSelectionIcon = Utils::StyleHelper::getIconFromIconFont(fontName, + Theme::getIconUnicode(Theme::Icon::zoomSelection), + 28, 28, buttonColor); + const QIcon zoomInIcon = Utils::StyleHelper::getIconFromIconFont(fontName, + Theme::getIconUnicode(Theme::Icon::zoomIn), + 28, 28, buttonColor); + const QIcon zoomOutIcon = Utils::StyleHelper::getIconFromIconFont(fontName, + Theme::getIconUnicode(Theme::Icon::zoomOut), + 28, 28, buttonColor); + + m_zoomInAction = new QAction(zoomInIcon, tr("Zoom in"), this); + m_zoomInAction->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Plus)); + connect(m_zoomInAction.data(), &QAction::triggered, this, [this] { + if (!m_formEditorView) + return; + + m_formEditorView->emitCustomNotification(QStringLiteral("zoom in")); + }); + addAction(m_zoomInAction.data()); + upperActions.append(m_zoomInAction.data()); + m_toolBox->addRightSideAction(m_zoomInAction.data()); + + m_zoomOutAction = new QAction(zoomOutIcon, tr("Zoom out"), this); + m_zoomOutAction->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Minus)); + connect(m_zoomOutAction.data(), &QAction::triggered, this, [this] { + if (!m_formEditorView) + return; + + m_formEditorView->emitCustomNotification(QStringLiteral("zoom out")); + }); + addAction(m_zoomOutAction.data()); + upperActions.append(m_zoomOutAction.data()); + m_toolBox->addRightSideAction(m_zoomOutAction.data()); + m_zoomAction = new ZoomAction(m_toolActionGroup.data()); connect(m_zoomAction.data(), &ZoomAction::zoomLevelChanged, this, &FormEditorWidget::setZoomLevel); @@ -151,6 +192,31 @@ FormEditorWidget::FormEditorWidget(FormEditorView *view) : upperActions.append(m_zoomAction.data()); m_toolBox->addRightSideAction(m_zoomAction.data()); + m_zoomAllAction = new QAction(zoomAllIcon, tr("Zoom screen to fit all content"), this); + m_zoomAllAction->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_0)); + connect(m_zoomAllAction.data(), &QAction::triggered, this, [this] { + if (!m_formEditorView) + return; + + m_formEditorView->emitCustomNotification(QStringLiteral("zoom all")); + }); + addAction(m_zoomAllAction.data()); + upperActions.append(m_zoomAllAction.data()); + m_toolBox->addRightSideAction(m_zoomAllAction.data()); + + m_zoomSelectionAction = new QAction(zoomSelectionIcon, tr("Zoom screen to fit current selection"), this); + m_zoomSelectionAction->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_I)); + connect(m_zoomSelectionAction.data(), &QAction::triggered, this, [this] { + if (!m_formEditorView) + return; + + m_formEditorView->emitCustomNotification(QStringLiteral("zoom selection"), + m_formEditorView->selectedModelNodes()); + }); + addAction(m_zoomSelectionAction.data()); + upperActions.append(m_zoomSelectionAction.data()); + m_toolBox->addRightSideAction(m_zoomSelectionAction.data()); + m_resetAction = new QAction(Utils::Icons::RESET_TOOLBAR.icon(), tr("Reset View"), this); registerActionAsCommand(m_resetAction, Constants::FORMEDITOR_REFRESH, QKeySequence(Qt::Key_R)); @@ -218,9 +284,9 @@ void FormEditorWidget::wheelEvent(QWheelEvent *event) { if (event->modifiers().testFlag(Qt::ControlModifier)) { if (event->angleDelta().y() > 0) - zoomAction()->zoomOut(); - else zoomAction()->zoomIn(); + else + zoomAction()->zoomOut(); event->accept(); } else { @@ -304,6 +370,11 @@ ZoomAction *FormEditorWidget::zoomAction() const return m_zoomAction.data(); } +QAction *FormEditorWidget::zoomSelectionAction() const +{ + return m_zoomSelectionAction.data(); +} + QAction *FormEditorWidget::resetAction() const { return m_resetAction.data(); diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorwidget.h b/src/plugins/qmldesigner/components/formeditor/formeditorwidget.h index eb01611682f..b2f50de6c0f 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditorwidget.h +++ b/src/plugins/qmldesigner/components/formeditor/formeditorwidget.h @@ -53,6 +53,7 @@ public: FormEditorWidget(FormEditorView *view); ZoomAction *zoomAction() const; + QAction *zoomSelectionAction() const; QAction *showBoundingRectAction() const; QAction *snappingAction() const; QAction *snappingAndAnchoringAction() const; @@ -112,6 +113,10 @@ private: QPointer m_rootHeightAction; QPointer m_backgroundAction; QPointer m_resetAction; + QPointer m_zoomAllAction; + QPointer m_zoomSelectionAction; + QPointer m_zoomInAction; + QPointer m_zoomOutAction; QPointer m_documentErrorWidget; Core::IContext *m_context = nullptr; }; From 5bb462e070c4f66ea0e250ae02b1948a4859a852 Mon Sep 17 00:00:00 2001 From: Assam Boudjelthia Date: Thu, 9 Jul 2020 14:12:50 +0300 Subject: [PATCH 008/108] Android: fix app logcat not always displayed Fixes: QTCREATORBUG-23919 Fixes: QTCREATORBUG-23177 Task-number: QTCREATORBUG-23291 Change-Id: Ib053a15f2fd8e491a581268f3630725593186a47 Reviewed-by: BogDan Vatra --- src/plugins/android/androidrunnerworker.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/plugins/android/androidrunnerworker.cpp b/src/plugins/android/androidrunnerworker.cpp index b6bb03aea3a..5496dbc6a82 100644 --- a/src/plugins/android/androidrunnerworker.cpp +++ b/src/plugins/android/androidrunnerworker.cpp @@ -127,21 +127,23 @@ static void findProcessPID(QFutureInterface &fi, QStringList selector, if (packageName.isEmpty()) return; + QStringList args = {selector}; + FilePath adbPath = AndroidConfigurations::currentConfig().adbToolPath(); + args.append("shell"); + args.append(preNougat ? pidScriptPreNougat : pidScript.arg(packageName)); + qint64 processPID = -1; chrono::high_resolution_clock::time_point start = chrono::high_resolution_clock::now(); do { QThread::msleep(200); - FilePath adbPath = AndroidConfigurations::currentConfig().adbToolPath(); - selector.append("shell"); - selector.append(preNougat ? pidScriptPreNougat : pidScript.arg(packageName)); - const auto out = SynchronousProcess().runBlocking({adbPath, selector}).allRawOutput(); + const auto out = SynchronousProcess().runBlocking({adbPath, args}).allRawOutput(); if (preNougat) { processPID = extractPID(out, packageName); } else { if (!out.isEmpty()) processPID = out.trimmed().toLongLong(); } - } while (processPID == -1 && !isTimedOut(start) && !fi.isCanceled()); + } while ((processPID == -1 || processPID == 0) && !isTimedOut(start) && !fi.isCanceled()); qCDebug(androidRunWorkerLog) << "PID found:" << processPID << ", PreNougat:" << preNougat; if (!fi.isCanceled()) From c0d4127d7023fe3597727ea2225ef5e527ab6766 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Thu, 9 Jul 2020 20:18:55 +0200 Subject: [PATCH 009/108] QmlDesigner: Add remove group action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QDS-2228 Change-Id: I4174a51b3de1c7ea82b69b85bef19e62a878aa28 Reviewed-by: Henning Gründl Reviewed-by: Thomas Hartmann --- .../componentcore/componentcore_constants.h | 5 ++ .../componentcore/designeractionmanager.cpp | 78 ++++++++++++------- .../componentcore/modelnodeoperations.cpp | 38 ++++++++- .../componentcore/modelnodeoperations.h | 1 + 4 files changed, 94 insertions(+), 28 deletions(-) diff --git a/src/plugins/qmldesigner/components/componentcore/componentcore_constants.h b/src/plugins/qmldesigner/components/componentcore/componentcore_constants.h index 806da7f4286..6186575e43c 100644 --- a/src/plugins/qmldesigner/components/componentcore/componentcore_constants.h +++ b/src/plugins/qmldesigner/components/componentcore/componentcore_constants.h @@ -83,6 +83,9 @@ const char decreaseIndexOfStackedContainerCommandId[] = "DecreaseIndexOfStackedC const char flowAssignEffectCommandId[] = "AssignFlowEffect"; const char flowAssignCustomEffectCommandId[] = "AssignFlowCustomEffect"; const char addToGroupItemCommandId[] = "AddToGroupItem"; +const char removeGroupItemCommandId[] = "RemoveToGroupItem"; +const char fitRootToScreenCommandId[] = "FitRootToScreen"; +const char fitSelectionToScreenCommandId[] = "FitSelectionToScreen"; const char selectionCategoryDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Selection"); const char flowConnectionCategoryDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Connect"); @@ -139,6 +142,8 @@ const char setFlowStartDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu const char removeLayoutDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Remove Layout"); const char addToGroupItemDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Group in GroupItem"); +const char removeGroupItemDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", + "Remove GroupItem"); const char addItemToStackedContainerDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Add Item"); const char addTabBarToStackedContainerDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Add Tab Bar"); diff --git a/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp b/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp index 8ccdef7acd2..cbc987651a6 100644 --- a/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp +++ b/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp @@ -660,6 +660,27 @@ bool isStackedContainerAndIndexCanBeIncreased(const SelectionContext &context) return value < maxValue; } +bool isGroup(const SelectionContext &context) +{ + if (!inBaseState(context)) + return false; + + if (!singleSelection(context)) + return false; + + ModelNode currentSelectedNode = context.currentSingleSelectedNode(); + + if (!currentSelectedNode.isValid()) + return false; + + NodeMetaInfo metaInfo = currentSelectedNode.metaInfo(); + + if (!metaInfo.isValid()) + return false; + + return metaInfo.isSubclassOf("QtQuick.Studio.Components.GroupItem"); +} + bool isLayout(const SelectionContext &context) { if (!inBaseState(context)) @@ -937,12 +958,10 @@ void DesignerActionManager::createDefaultDesignerActions() priorityLayoutCategory, &layoutOptionVisible)); - addDesignerAction(new ActionGroup( - groupCategoryDisplayName, - groupCategory, - priorityGroupCategory, - &positionOptionVisible, - &studioComponentsAvailable)); + addDesignerAction(new ActionGroup(groupCategoryDisplayName, + groupCategory, + priorityGroupCategory, + &studioComponentsAvailable)); addDesignerAction(new ActionGroup( flowCategoryDisplayName, @@ -1085,29 +1104,34 @@ void DesignerActionManager::createDefaultDesignerActions() &isLayout, &isLayout)); - addDesignerAction(new ModelNodeContextMenuAction( - addToGroupItemCommandId, - addToGroupItemDisplayName, - {}, - groupCategory, - QKeySequence(), - 110, - &addToGroupItem, - &selectionCanBeLayouted, - &selectionCanBeLayouted)); + addDesignerAction(new ModelNodeContextMenuAction(addToGroupItemCommandId, + addToGroupItemDisplayName, + {}, + groupCategory, + QKeySequence("Ctrl+Shift+g"), + 110, + &addToGroupItem, + &selectionCanBeLayouted)); + addDesignerAction(new ModelNodeContextMenuAction(removeGroupItemCommandId, + removeGroupItemDisplayName, + {}, + groupCategory, + QKeySequence(), + 110, + &removeGroup, + &isGroup)); - addDesignerAction(new ModelNodeFormEditorAction( - addItemToStackedContainerCommandId, - addItemToStackedContainerDisplayName, - addIcon.icon(), - addItemToStackedContainerToolTip, - stackedContainerCategory, - QKeySequence("Ctrl+Shift+a"), - 110, - &addItemToStackedContainer, - &isStackedContainer, - &isStackedContainer)); + addDesignerAction(new ModelNodeFormEditorAction(addItemToStackedContainerCommandId, + addItemToStackedContainerDisplayName, + addIcon.icon(), + addItemToStackedContainerToolTip, + stackedContainerCategory, + QKeySequence("Ctrl+Shift+a"), + 110, + &addItemToStackedContainer, + &isStackedContainer, + &isStackedContainer)); addDesignerAction(new ModelNodeContextMenuAction( addTabBarToStackedContainerCommandId, diff --git a/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp b/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp index 98148b7bd3f..7453807a835 100644 --- a/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp +++ b/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp @@ -1482,6 +1482,42 @@ void mergeWithTemplate(const SelectionContext &selectionContext) styleMerge(selectionContext, templateFile); } -} // namespace Mode +void removeGroup(const SelectionContext &selectionContext) +{ + if (!selectionContext.view() || !selectionContext.hasSingleSelectedModelNode()) + return; + + ModelNode group = selectionContext.currentSingleSelectedNode(); + + if (!QmlItemNode::isValidQmlItemNode(group)) + return; + + QmlItemNode groupItem(group); + + QmlItemNode parent = groupItem.instanceParentItem(); + + if (!parent.isValid()) + return; + + selectionContext.view()->executeInTransaction( + "DesignerActionManager::removeGroup", [selectionContext, &groupItem, parent]() { + for (const ModelNode &modelNode : + selectionContext.currentSingleSelectedNode().directSubModelNodes()) { + if (modelNode.isValid()) { + QmlItemNode qmlItem(modelNode); + + QPointF pos = qmlItem.instancePosition(); + pos = groupItem.instanceTransform().map(pos); + modelNode.variantProperty("x").setValue(pos.x()); + modelNode.variantProperty("y").setValue(pos.y()); + + parent.modelNode().defaultNodeListProperty().reparentHere(modelNode); + } + } + groupItem.destroy(); + }); +} + +} // namespace ModelNodeOperations } //QmlDesigner diff --git a/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.h b/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.h index afd8416bf9f..96dedf352ad 100644 --- a/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.h +++ b/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.h @@ -82,6 +82,7 @@ void setFlowStartItem(const SelectionContext &selectionContext); void addToGroupItem(const SelectionContext &selectionContext); void selectFlowEffect(const SelectionContext &selectionContext); void mergeWithTemplate(const SelectionContext &selectionContext); +void removeGroup(const SelectionContext &selectionContext); } // namespace ModelNodeOperationso } //QmlDesigner From 8c97f870b9ee42f91e296ae39c968d3d3a092fb9 Mon Sep 17 00:00:00 2001 From: Aleksei German Date: Fri, 10 Jul 2020 15:17:44 +0200 Subject: [PATCH 010/108] QmlDesigner: Add Singleton support to Connections Change-Id: I07eae4e381f172d7c6a23ee5b7e13273afa788b9 Reviewed-by: Thomas Hartmann --- .../connectioneditor/connectionmodel.cpp | 45 ++++++++++++++++++- .../components/connectioneditor/delegates.cpp | 24 ++++++++++ 2 files changed, 67 insertions(+), 2 deletions(-) diff --git a/src/plugins/qmldesigner/components/connectioneditor/connectionmodel.cpp b/src/plugins/qmldesigner/components/connectioneditor/connectionmodel.cpp index 2a17c2ec6d1..4bafa046474 100644 --- a/src/plugins/qmldesigner/components/connectioneditor/connectionmodel.cpp +++ b/src/plugins/qmldesigner/components/connectioneditor/connectionmodel.cpp @@ -34,6 +34,8 @@ #include #include #include +#include +#include #include #include @@ -209,10 +211,27 @@ void ConnectionModel::updateTargetNode(int rowNumber) ModelNode connectionNode = signalHandlerProperty.parentModelNode(); const bool isAlias = newTarget.contains("."); + bool isSingleton = false; + + if (RewriterView* rv = connectionView()->rewriterView()) { + for (const QmlTypeData &data : rv->getQMLTypes()) { + if (!data.typeName.isEmpty()) { + if (data.typeName == newTarget) { + if (connectionView()->model()->metaInfo(data.typeName.toUtf8()).isValid()) { + isSingleton = true; + break; + } + } + } + } + } if (!newTarget.isEmpty()) { - //if it's an alias, then let's reparent connections to alias property owner: - const ModelNode parent = connectionView()->modelNodeForId(isAlias + //if it's a singleton, then let's reparent connections to rootNode, + //if it's an alias, then reparent to alias property owner: + const ModelNode parent = connectionView()->modelNodeForId(isSingleton + ? connectionView()->rootModelNode().id() + : isAlias ? newTarget.split(".").constFirst() : newTarget); @@ -430,6 +449,28 @@ QStringList ConnectionModel::getPossibleSignalsForConnection(const ModelNode &co QStringList stringList; if (connection.isValid()) { + + //separate check for singletons + if (connection.hasBindingProperty("target")) { + BindingProperty bp = connection.bindingProperty("target"); + + if (bp.isValid()) { + if (RewriterView *rv = connectionView()->rewriterView()) { + for (const QmlTypeData &data : rv->getQMLTypes()) { + if (!data.typeName.isEmpty()) { + if (data.typeName == bp.expression()) { + NodeMetaInfo metaInfo = connectionView()->model()->metaInfo(data.typeName.toUtf8()); + if (metaInfo.isValid()) { + stringList.append(propertyNameListToStringList(metaInfo.signalNames())); + return stringList; + } + } + } + } + } + } + } + ModelNode targetNode = getTargetNodeForConnection(connection); if (targetNode.isValid() && targetNode.metaInfo().isValid()) { stringList.append(propertyNameListToStringList(targetNode.metaInfo().signalNames())); diff --git a/src/plugins/qmldesigner/components/connectioneditor/delegates.cpp b/src/plugins/qmldesigner/components/connectioneditor/delegates.cpp index 37232d202eb..864404047ee 100644 --- a/src/plugins/qmldesigner/components/connectioneditor/delegates.cpp +++ b/src/plugins/qmldesigner/components/connectioneditor/delegates.cpp @@ -30,6 +30,7 @@ #include "bindingmodel.h" #include "dynamicpropertiesmodel.h" #include "connectionview.h" +#include "nodemetainfo.h" #include @@ -152,11 +153,13 @@ QWidget *BindingDelegate::createEditor(QWidget *parent, const QStyleOptionViewIt bindingComboBox->addItems(model->possibleTargetProperties(bindingProperty)); } break; case BindingModel::SourceModelNodeRow: { + //common items for (const ModelNode &modelNode : model->connectionView()->allModelNodes()) { if (!modelNode.id().isEmpty()) { bindingComboBox->addItem(modelNode.id()); } } + //singletons: if (RewriterView* rv = model->connectionView()->rewriterView()) { for (const QmlTypeData &data : rv->getQMLTypes()) { if (!data.typeName.isEmpty()) { @@ -164,6 +167,7 @@ QWidget *BindingDelegate::createEditor(QWidget *parent, const QStyleOptionViewIt } } } + //parent: if (!bindingProperty.parentModelNode().isRootNode()) bindingComboBox->addItem(QLatin1String("parent")); } break; @@ -306,6 +310,26 @@ QWidget *ConnectionDelegate::createEditor(QWidget *parent, const QStyleOptionVie } } } + //singletons: + if (RewriterView* rv = connectionModel->connectionView()->rewriterView()) { + for (const QmlTypeData &data : rv->getQMLTypes()) { + if (!data.typeName.isEmpty()) { + connectionComboBox->addItem(data.typeName); + + NodeMetaInfo metaInfo = connectionModel->connectionView()->model()->metaInfo(data.typeName.toUtf8()); + + if (metaInfo.isValid()) { + for (const PropertyName &propertyName : metaInfo.propertyNames()) { + if (metaInfo.propertyTypeName(propertyName) == "alias") { + connectionComboBox->addItem(data.typeName + + "." + + QString::fromUtf8(propertyName)); + } + } + } + } + } + } } break; case ConnectionModel::TargetPropertyNameRow: { connectionComboBox->addItems(prependOnForSignalHandler(connectionModel->getSignalsForRow(index.row()))); From df49d6e40df4784733be34ffb71274e75c97d72c Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Tue, 7 Jul 2020 10:57:38 +0200 Subject: [PATCH 011/108] AutoTest: Persist check state to project settings Make it easier to switch between projects and restore the former check states of the found test items if we have these information. Change-Id: I99a5357388c36aa8cce6f5f82184d6ab2a8bf6e8 Reviewed-by: David Schulz --- src/plugins/autotest/CMakeLists.txt | 1 + src/plugins/autotest/autotest.pro | 1 + src/plugins/autotest/autotest.qbs | 1 + src/plugins/autotest/itemdatacache.h | 87 ++++++++++++++++++++ src/plugins/autotest/testnavigationwidget.h | 7 +- src/plugins/autotest/testprojectsettings.cpp | 4 + src/plugins/autotest/testprojectsettings.h | 3 + src/plugins/autotest/testtreemodel.cpp | 11 +-- src/plugins/autotest/testtreemodel.h | 37 +-------- 9 files changed, 110 insertions(+), 42 deletions(-) create mode 100644 src/plugins/autotest/itemdatacache.h diff --git a/src/plugins/autotest/CMakeLists.txt b/src/plugins/autotest/CMakeLists.txt index 1ee331dc5f2..18521d76084 100644 --- a/src/plugins/autotest/CMakeLists.txt +++ b/src/plugins/autotest/CMakeLists.txt @@ -40,6 +40,7 @@ add_qtc_plugin(AutoTest gtest/gtesttreeitem.cpp gtest/gtesttreeitem.h gtest/gtestvisitors.cpp gtest/gtestvisitors.h iframeworksettings.h + itemdatacache.h itestframework.cpp itestframework.h itestparser.cpp itestparser.h projectsettingswidget.cpp projectsettingswidget.h diff --git a/src/plugins/autotest/autotest.pro b/src/plugins/autotest/autotest.pro index 5d1db25e3ae..a751723017d 100644 --- a/src/plugins/autotest/autotest.pro +++ b/src/plugins/autotest/autotest.pro @@ -79,6 +79,7 @@ HEADERS += \ autotesticons.h \ autotestplugin.h \ iframeworksettings.h \ + itemdatacache.h \ itestframework.h \ itestparser.h \ projectsettingswidget.h \ diff --git a/src/plugins/autotest/autotest.qbs b/src/plugins/autotest/autotest.qbs index ea014bc06d9..92d6853b1ad 100644 --- a/src/plugins/autotest/autotest.qbs +++ b/src/plugins/autotest/autotest.qbs @@ -37,6 +37,7 @@ QtcPlugin { "autotestconstants.h", "autotestplugin.cpp", "autotestplugin.h", + "itemdatacache.h", "projectsettingswidget.cpp", "projectsettingswidget.h", "testcodeparser.cpp", diff --git a/src/plugins/autotest/itemdatacache.h b/src/plugins/autotest/itemdatacache.h new file mode 100644 index 00000000000..ae5569075b6 --- /dev/null +++ b/src/plugins/autotest/itemdatacache.h @@ -0,0 +1,87 @@ +/**************************************************************************** +** +** Copyright (C) 2020 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt Creator. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +****************************************************************************/ + +#pragma once + +#include "testtreeitem.h" + +#include + +#include + +namespace Autotest { +namespace Internal { + +template +class ItemDataCache +{ +public: + void insert(TestTreeItem *item, const T &value) { m_cache[item->cacheName()] = {0, value}; } + void evolve() + { + auto it = m_cache.begin(), end = m_cache.end(); + while (it != end) + it = it->generation++ >= maxGen ? m_cache.erase(it) : ++it; + } + + Utils::optional get(TestTreeItem *item) + { + auto entry = m_cache.find(item->cacheName()); + if (entry == m_cache.end()) + return Utils::nullopt; + entry->generation = 0; + return Utils::make_optional(entry->value); + }; + + void clear() { m_cache.clear(); } + bool isEmpty() const { return m_cache.isEmpty(); } + + QVariantHash toSettings() const + { + QVariantHash result; + for (auto it = m_cache.cbegin(), end = m_cache.cend(); it != end; ++it) + result.insert(it.key(), QVariant::fromValue(it.value().value)); + return result; + } + + void fromSettings(const QVariantHash &stored) + { + m_cache.clear(); + for (auto it = stored.cbegin(), end = stored.cend(); it != end; ++it) + m_cache[it.key()] = {0, qvariant_cast(it.value())}; + } + +private: + static constexpr int maxGen = 10; + struct Entry + { + int generation = 0; + T value; + }; + QHash m_cache; +}; + +} // namespace Internal +} // namespace Autotest diff --git a/src/plugins/autotest/testnavigationwidget.h b/src/plugins/autotest/testnavigationwidget.h index 454f893c6bb..f01bb6c3d5d 100644 --- a/src/plugins/autotest/testnavigationwidget.h +++ b/src/plugins/autotest/testnavigationwidget.h @@ -25,10 +25,9 @@ #pragma once +#include "itemdatacache.h" #include "testrunner.h" -#include "testtreemodel.h" - #include #include @@ -49,8 +48,12 @@ class ProgressIndicator; } namespace Autotest { + +class TestTreeModel; + namespace Internal { +class TestTreeSortFilterModel; class TestTreeView; class TestNavigationWidget : public QWidget diff --git a/src/plugins/autotest/testprojectsettings.cpp b/src/plugins/autotest/testprojectsettings.cpp index 2726bf95663..cfb3b60e31f 100644 --- a/src/plugins/autotest/testprojectsettings.cpp +++ b/src/plugins/autotest/testprojectsettings.cpp @@ -35,6 +35,7 @@ namespace Internal { static const char SK_ACTIVE_FRAMEWORKS[] = "AutoTest.ActiveFrameworks"; static const char SK_RUN_AFTER_BUILD[] = "AutoTest.RunAfterBuild"; +static const char SK_CHECK_STATES[] = "AutoTest.CheckStates"; static Q_LOGGING_CATEGORY(LOG, "qtc.autotest.frameworkmanager", QtWarningMsg) @@ -93,6 +94,7 @@ void TestProjectSettings::load() const QVariant runAfterBuild = m_project->namedSettings(SK_RUN_AFTER_BUILD); m_runAfterBuild = runAfterBuild.isValid() ? RunAfterBuildMode(runAfterBuild.toInt()) : RunAfterBuildMode::None; + m_checkStateCache.fromSettings(m_project->namedSettings(SK_CHECK_STATES).toHash()); } void TestProjectSettings::save() @@ -104,6 +106,8 @@ void TestProjectSettings::save() activeFrameworks.insert(it.key()->id().toString(), it.value()); m_project->setNamedSettings(SK_ACTIVE_FRAMEWORKS, activeFrameworks); m_project->setNamedSettings(SK_RUN_AFTER_BUILD, int(m_runAfterBuild)); + if (!m_checkStateCache.isEmpty()) + m_project->setNamedSettings(SK_CHECK_STATES, m_checkStateCache.toSettings()); } } // namespace Internal diff --git a/src/plugins/autotest/testprojectsettings.h b/src/plugins/autotest/testprojectsettings.h index a4ce6b34fca..7f7332197e2 100644 --- a/src/plugins/autotest/testprojectsettings.h +++ b/src/plugins/autotest/testprojectsettings.h @@ -26,6 +26,7 @@ #pragma once #include "testsettings.h" +#include "testtreemodel.h" #include @@ -50,6 +51,7 @@ public: { m_activeTestFrameworks = enabledFrameworks; } QMap activeFrameworks() const { return m_activeTestFrameworks; } void activateFramework(const Utils::Id &id, bool activate); + Internal::ItemDataCache *checkStateCache() { return &m_checkStateCache; } private: void load(); void save(); @@ -58,6 +60,7 @@ private: bool m_useGlobalSettings = true; RunAfterBuildMode m_runAfterBuild = RunAfterBuildMode::None; QMap m_activeTestFrameworks; + Internal::ItemDataCache m_checkStateCache; }; } // namespace Internal diff --git a/src/plugins/autotest/testtreemodel.cpp b/src/plugins/autotest/testtreemodel.cpp index 95330d5fc97..b42e0311489 100644 --- a/src/plugins/autotest/testtreemodel.cpp +++ b/src/plugins/autotest/testtreemodel.cpp @@ -91,7 +91,8 @@ void TestTreeModel::setupParsingConnections() connect(sm, &SessionManager::startupProjectChanged, [this](Project *project) { synchronizeTestFrameworks(); // we might have project settings m_parser->onStartupProjectChanged(project); - m_checkStateCache.clear(); // TODO persist to project settings? + m_checkStateCache = project ? AutotestPlugin::projectSettings(project)->checkStateCache() + : nullptr; }); CppTools::CppModelManager *cppMM = CppTools::CppModelManager::instance(); @@ -294,12 +295,12 @@ void TestTreeModel::rebuild(const QList &frameworkIds) void TestTreeModel::updateCheckStateCache() { - m_checkStateCache.evolve(); + m_checkStateCache->evolve(); for (Utils::TreeItem *rootNode : *rootItem()) { rootNode->forAllChildren([this](Utils::TreeItem *child) { auto childItem = static_cast(child); - m_checkStateCache.insert(childItem, childItem->checked()); + m_checkStateCache->insert(childItem, childItem->checked()); }); } } @@ -425,7 +426,7 @@ void TestTreeModel::insertItemInParent(TestTreeItem *item, TestTreeItem *root, b delete item; } else { // restore former check state if available - Utils::optional cached = m_checkStateCache.get(item); + Utils::optional cached = m_checkStateCache->get(item); if (cached.has_value()) item->setData(0, cached.value(), Qt::CheckStateRole); else @@ -515,7 +516,7 @@ void TestTreeModel::handleParseResult(const TestParseResult *result, TestTreeIte // restore former check state if available newItem->forAllChildren([this](Utils::TreeItem *child) { auto childItem = static_cast(child); - Utils::optional cached = m_checkStateCache.get(childItem); + Utils::optional cached = m_checkStateCache->get(childItem); if (cached.has_value()) childItem->setData(0, cached.value(), Qt::CheckStateRole); }); diff --git a/src/plugins/autotest/testtreemodel.h b/src/plugins/autotest/testtreemodel.h index 4ca3cb27b41..34f51cf7bb4 100644 --- a/src/plugins/autotest/testtreemodel.h +++ b/src/plugins/autotest/testtreemodel.h @@ -27,6 +27,7 @@ #include "autotest_global.h" +#include "itemdatacache.h" #include "testconfiguration.h" #include "testtreeitem.h" @@ -39,40 +40,6 @@ namespace Autotest { namespace Internal { class AutotestPluginPrivate; class TestCodeParser; - -template -class ItemDataCache -{ -public: - void insert(TestTreeItem *item, const T &value) { m_cache[item->cacheName()] = {0, value}; } - void evolve() - { - auto it = m_cache.begin(), end = m_cache.end(); - while (it != end) - it = it->generation++ >= maxGen ? m_cache.erase(it) : ++it; - } - - Utils::optional get(TestTreeItem *item) - { - auto entry = m_cache.find(item->cacheName()); - if (entry == m_cache.end()) - return Utils::nullopt; - entry->generation = 0; - return Utils::make_optional(entry->value); - }; - - void clear() { m_cache.clear(); } - -private: - static constexpr int maxGen = 10; - struct Entry - { - int generation = 0; - T value; - }; - QHash m_cache; -}; - } // namespace Internal class TestParseResult; @@ -139,7 +106,7 @@ private: QList testItemsByName(TestTreeItem *root, const QString &testName); Internal::TestCodeParser *m_parser = nullptr; - Internal::ItemDataCache m_checkStateCache; + Internal::ItemDataCache *m_checkStateCache = nullptr; // not owned }; namespace Internal { From 74961369921d5112aed3014e24b71930a664e696 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 7 Jul 2020 10:11:53 +0200 Subject: [PATCH 012/108] Utils/copyRecursively: Avoid copying of copy helper instance The function took a const reference to a std::function. When passing some other callable object, this leads to a copy, which is bad if the callable is supposed to carry along state. Change-Id: Iedc22644fb0f314b15de0eaaa7c0b2e73dd30f38 Reviewed-by: Assam Boudjelthia --- src/libs/utils/fileutils.cpp | 47 ++++++++------------------------- src/libs/utils/fileutils.h | 51 +++++++++++++++++++++++++++++++++--- 2 files changed, 58 insertions(+), 40 deletions(-) diff --git a/src/libs/utils/fileutils.cpp b/src/libs/utils/fileutils.cpp index 4b55c083019..23be3486981 100644 --- a/src/libs/utils/fileutils.cpp +++ b/src/libs/utils/fileutils.cpp @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include @@ -202,46 +201,22 @@ bool FileUtils::removeRecursively(const FilePath &filePath, QString *error) Returns whether the operation succeeded. */ -bool FileUtils::copyRecursively(const FilePath &srcFilePath, const FilePath &tgtFilePath, - QString *error, const std::function ©Helper) + +bool FileUtils::copyRecursively(const FilePath &srcFilePath, const FilePath &tgtFilePath, QString *error) { - QFileInfo srcFileInfo = srcFilePath.toFileInfo(); - if (srcFileInfo.isDir()) { - if (!tgtFilePath.exists()) { - QDir targetDir(tgtFilePath.toString()); - targetDir.cdUp(); - if (!targetDir.mkdir(tgtFilePath.fileName())) { + return copyRecursively( + srcFilePath, tgtFilePath, error, [](const QFileInfo &src, const QFileInfo &dest, QString *error) { + if (!QFile::copy(src.filePath(), dest.filePath())) { if (error) { - *error = QCoreApplication::translate("Utils::FileUtils", "Failed to create directory \"%1\".") - .arg(tgtFilePath.toUserOutput()); + *error = QCoreApplication::translate("Utils::FileUtils", + "Could not copy file \"%1\" to \"%2\".") + .arg(FilePath::fromFileInfo(src).toUserOutput(), + FilePath::fromFileInfo(dest).toUserOutput()); } return false; } - } - QDir sourceDir(srcFilePath.toString()); - const QStringList fileNames = sourceDir.entryList( - QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot | QDir::Hidden | QDir::System); - for (const QString &fileName : fileNames) { - const FilePath newSrcFilePath = srcFilePath / fileName; - const FilePath newTgtFilePath = tgtFilePath / fileName; - if (!copyRecursively(newSrcFilePath, newTgtFilePath, error, copyHelper)) - return false; - } - } else { - if (copyHelper) { - if (!copyHelper(srcFileInfo, tgtFilePath.toFileInfo(), error)) - return false; - } else { - if (!QFile::copy(srcFilePath.toString(), tgtFilePath.toString())) { - if (error) { - *error = QCoreApplication::translate("Utils::FileUtils", "Could not copy file \"%1\" to \"%2\".") - .arg(srcFilePath.toUserOutput(), tgtFilePath.toUserOutput()); - } - return false; - } - } - } - return true; + return true; + }); } /*! diff --git a/src/libs/utils/fileutils.h b/src/libs/utils/fileutils.h index dc57d1add15..5db3a0a1c28 100644 --- a/src/libs/utils/fileutils.h +++ b/src/libs/utils/fileutils.h @@ -30,10 +30,12 @@ #include "hostosinfo.h" #include -#include // Mac. +#include +#include #include #include #include +#include // Mac. #include #include @@ -179,9 +181,14 @@ public: #endif // QT_GUI_LIB static bool removeRecursively(const FilePath &filePath, QString *error = nullptr); - static bool copyRecursively( - const FilePath &srcFilePath, const FilePath &tgtFilePath, QString *error = nullptr, - const std::function ©Helper = nullptr); + static bool copyRecursively(const FilePath &srcFilePath, + const FilePath &tgtFilePath, + QString *error = nullptr); + template + static bool copyRecursively(const FilePath &srcFilePath, + const FilePath &tgtFilePath, + QString *error, + T &©Helper); static FilePath resolveSymlinks(const FilePath &path); static QString fileSystemFriendlyName(const QString &name); static int indexOfQmakeUnfriendly(const QString &name, int startpos = 0); @@ -195,6 +202,42 @@ public: static QByteArray fileId(const FilePath &fileName); }; +template +bool FileUtils::copyRecursively(const FilePath &srcFilePath, + const FilePath &tgtFilePath, + QString *error, + T &©Helper) +{ + const QFileInfo srcFileInfo = srcFilePath.toFileInfo(); + if (srcFileInfo.isDir()) { + if (!tgtFilePath.exists()) { + QDir targetDir(tgtFilePath.toString()); + targetDir.cdUp(); + if (!targetDir.mkdir(tgtFilePath.fileName())) { + if (error) { + *error = QCoreApplication::translate("Utils::FileUtils", + "Failed to create directory \"%1\".") + .arg(tgtFilePath.toUserOutput()); + } + return false; + } + } + const QDir sourceDir(srcFilePath.toString()); + const QStringList fileNames = sourceDir.entryList( + QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot | QDir::Hidden | QDir::System); + for (const QString &fileName : fileNames) { + const FilePath newSrcFilePath = srcFilePath / fileName; + const FilePath newTgtFilePath = tgtFilePath / fileName; + if (!copyRecursively(newSrcFilePath, newTgtFilePath, error, copyHelper)) + return false; + } + } else { + if (!copyHelper(srcFileInfo, tgtFilePath.toFileInfo(), error)) + return false; + } + return true; +} + // for actually finding out if e.g. directories are writable on Windows #ifdef Q_OS_WIN From 92cd8e60050c350b0e800ca198c4cfe4014049ce Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 11 Jun 2020 16:24:42 +0200 Subject: [PATCH 013/108] Android: Use re-usable "copy and ask for overwrite" callable Change-Id: I73779b5eaeebbd44fa6333f067adf220ddd77be4 Reviewed-by: Alessandro Portale --- .../android/createandroidmanifestwizard.cpp | 76 +++---------------- .../android/createandroidmanifestwizard.h | 8 -- 2 files changed, 10 insertions(+), 74 deletions(-) diff --git a/src/plugins/android/createandroidmanifestwizard.cpp b/src/plugins/android/createandroidmanifestwizard.cpp index 097828ce388..ed5e5382005 100644 --- a/src/plugins/android/createandroidmanifestwizard.cpp +++ b/src/plugins/android/createandroidmanifestwizard.cpp @@ -245,7 +245,7 @@ void ChooseDirectoryPage::initializePage() // CreateAndroidManifestWizard // CreateAndroidManifestWizard::CreateAndroidManifestWizard(BuildSystem *buildSystem) - : m_buildSystem(buildSystem), m_copyState(Ask) + : m_buildSystem(buildSystem) { setWindowTitle(tr("Create Android Template Files Wizard")); @@ -290,70 +290,12 @@ void CreateAndroidManifestWizard::setCopyGradle(bool copy) m_copyGradle = copy; } -bool CreateAndroidManifestWizard::copy(const QFileInfo &src, const QFileInfo &dst, QStringList * addedFiles) -{ - bool copyFile = true; - if (dst.exists()) { - switch (m_copyState) { - case Ask: - { - int res = QMessageBox::question(this, - tr("Overwrite %1 file").arg(dst.fileName()), - tr("Overwrite existing \"%1\"?") - .arg(QDir(m_directory).relativeFilePath(dst.absoluteFilePath())), - QMessageBox::Yes | QMessageBox::YesToAll | - QMessageBox::No | QMessageBox::NoToAll | - QMessageBox::Cancel); - switch (res) { - case QMessageBox::YesToAll: - m_copyState = OverwriteAll; - break; - - case QMessageBox::Yes: - break; - - case QMessageBox::NoToAll: - m_copyState = SkipAll; - copyFile = false; - break; - - case QMessageBox::No: - copyFile = false; - break; - default: - return false; - } - } - break; - case SkipAll: - copyFile = false; - break; - default: - break; - } - if (copyFile) - QFile::remove(dst.filePath()); - } - - if (!dst.absoluteDir().exists()) - dst.absoluteDir().mkpath(dst.absolutePath()); - - if (copyFile && !QFile::copy(src.filePath(), dst.filePath())) { - QMessageBox::warning(this, tr("File Creation Error"), - tr("Could not copy file \"%1\" to \"%2\".") - .arg(src.filePath()).arg(dst.filePath())); - return false; - } - addedFiles->append(dst.absoluteFilePath()); - return true; -} - void CreateAndroidManifestWizard::createAndroidTemplateFiles() { if (m_directory.isEmpty()) return; - QStringList addedFiles; + FileUtils::CopyAskingForOverwrite copy(this); Target *target = m_buildSystem->target(); QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(target->kit()); if (!version) @@ -361,21 +303,23 @@ void CreateAndroidManifestWizard::createAndroidTemplateFiles() if (version->qtVersion() < QtSupport::QtVersionNumber(5, 4, 0)) { const QString src = version->prefix().toString() + "/src/android/java/AndroidManifest.xml"; FileUtils::copyRecursively(FilePath::fromString(src), - FilePath::fromString(m_directory + QLatin1String("/AndroidManifest.xml")), - nullptr, [this, &addedFiles](QFileInfo src, QFileInfo dst, QString *){return copy(src, dst, &addedFiles);}); + FilePath::fromString(m_directory + + QLatin1String("/AndroidManifest.xml")), + nullptr, + copy); } else { const QString src = version->prefix().toString() + "/src/android/templates"; FileUtils::copyRecursively(FilePath::fromString(src), FilePath::fromString(m_directory), - nullptr, [this, &addedFiles](QFileInfo src, QFileInfo dst, QString *){return copy(src, dst, &addedFiles);}); + nullptr, + copy); if (m_copyGradle) { FilePath gradlePath = version->prefix().pathAppended("src/3rdparty/gradle"); if (!gradlePath.exists()) gradlePath = AndroidConfigurations::currentConfig().sdkLocation().pathAppended("/tools/templates/gradle/wrapper"); - FileUtils::copyRecursively(gradlePath, FilePath::fromString(m_directory), - nullptr, [this, &addedFiles](QFileInfo src, QFileInfo dst, QString *){return copy(src, dst, &addedFiles);}); + FileUtils::copyRecursively(gradlePath, FilePath::fromString(m_directory), nullptr, copy); } AndroidManager::updateGradleProperties(target, m_buildKey); @@ -385,7 +329,7 @@ void CreateAndroidManifestWizard::createAndroidTemplateFiles() QString androidPackageDir; ProjectNode *node = target->project()->findNodeForBuildKey(m_buildKey); if (node) { - node->addFiles(addedFiles); + node->addFiles(copy.files()); androidPackageDir = node->data(Android::Constants::AndroidPackageSourceDir).toString(); if (androidPackageDir.isEmpty()) { diff --git a/src/plugins/android/createandroidmanifestwizard.h b/src/plugins/android/createandroidmanifestwizard.h index eee030ff339..694e4b8cb78 100644 --- a/src/plugins/android/createandroidmanifestwizard.h +++ b/src/plugins/android/createandroidmanifestwizard.h @@ -54,19 +54,11 @@ public: ProjectExplorer::BuildSystem *buildSystem() const; private: - enum CopyState { - Ask, - OverwriteAll, - SkipAll - }; - bool copy(const QFileInfo &src, const QFileInfo &dst, QStringList *addedFiles); - void createAndroidManifestFile(); void createAndroidTemplateFiles(); ProjectExplorer::BuildSystem *m_buildSystem; QString m_buildKey; QString m_directory; - CopyState m_copyState; bool m_copyGradle; }; From d3583256bad323044cb07d735da26c2b16f8f65d Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 13 Jul 2020 10:58:36 +0200 Subject: [PATCH 014/108] Changelog: It is Catch2 with a 2 Change-Id: I74b1c29fb0b0e1f865dedde2b3af0fb606ecbad2 Reviewed-by: Christian Stenger --- dist/changes-4.13.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/changes-4.13.0.md b/dist/changes-4.13.0.md index 33b8a00b53a..c9d7affb569 100644 --- a/dist/changes-4.13.0.md +++ b/dist/changes-4.13.0.md @@ -146,7 +146,7 @@ Version Control Systems Test Integration ---------------- -* Added support for Catch test framework (QTCREATORBUG-19740) +* Added support for Catch2 test framework (QTCREATORBUG-19740) ### Google Test From bc517e6d928af1ad5a01e41fb3dec78a2e6dfeb4 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 7 Jul 2020 13:33:54 +0200 Subject: [PATCH 015/108] GccParser: Recognize "required from" as a continuation marker Change-Id: Iaea98cbccc6aa95e7eeaab23a2ef85a3eaa4b2e0 Reviewed-by: hjk --- src/plugins/projectexplorer/gccparser.cpp | 40 +++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/src/plugins/projectexplorer/gccparser.cpp b/src/plugins/projectexplorer/gccparser.cpp index 6176bf41c34..db794e668a1 100644 --- a/src/plugins/projectexplorer/gccparser.cpp +++ b/src/plugins/projectexplorer/gccparser.cpp @@ -218,6 +218,7 @@ bool GccParser::isContinuation(const QString &newLine) const return !m_currentTask.isNull() && (m_currentTask.details.last().endsWith(':') || m_currentTask.details.last().endsWith(',') + || m_currentTask.details.last().contains(" required from ") || newLine.contains("within this context") || newLine.contains("note:")); } @@ -1142,6 +1143,45 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() " | ~~~~~~~~~~~~^~~", FilePath::fromUserInput("smallstring.h"), 465)} << QString(); + + QTest::newRow(R"("required from")") + << QString( + "In file included from qmap.h:1,\n" + " from qvariant.h:47,\n" + " from ilocatorfilter.h:33,\n" + " from helpindexfilter.h:28,\n" + " from moc_helpindexfilter.cpp:10:\n" + "qmap.h: In instantiation of ‘struct QMapNode’:\n" + "qmap.h:606:30: required from ‘QMap::QMap(const QMap&) [with Key = QString; T = QUrl]’\n" + "qmap.h:1090:7: required from ‘static constexpr void (* QtPrivate::QMetaTypeForType::getCopyCtr())(const QtPrivate::QMetaTypeInterface*, void*, const void*) [with T = QMultiMap; S = QMultiMap; QtPrivate::QMetaTypeInterface::CopyCtrFn = void (*)(const QtPrivate::QMetaTypeInterface*, void*, const void*)]’\n" + "qmetatype.h:2765:32: required from ‘QtPrivate::QMetaTypeInterface QtPrivate::QMetaTypeForType >::metaType’\n" + "qmetatype.h:2865:16: required from ‘constexpr QtPrivate::QMetaTypeInterface* QtPrivate::qTryMetaTypeInterfaceForType() [with Unique = qt_meta_stringdata_Help__Internal__HelpIndexFilter_t; T = const QMultiMap&]’\n" + "qmetatype.h:2884:55: required from ‘QtPrivate::QMetaTypeInterface* const qt_incomplete_metaTypeArray [4]&, const QString&, QStringList>’\n" + "moc_helpindexfilter.cpp:105:1: required from here\n" + "qmap.h:110:7: error: ‘QMapNode::value’ has incomplete type\n" + " 110 | T value;\n" + " | ^~~~~") + << OutputParserTester::STDERR + << QString() << QString() + << Tasks{CompileTask(Task::Error, + "‘QMapNode::value’ has incomplete type\n" + "In file included from qmap.h:1,\n" + " from qvariant.h:47,\n" + " from ilocatorfilter.h:33,\n" + " from helpindexfilter.h:28,\n" + " from moc_helpindexfilter.cpp:10:\n" + "qmap.h: In instantiation of ‘struct QMapNode’:\n" + "qmap.h:606:30: required from ‘QMap::QMap(const QMap&) [with Key = QString; T = QUrl]’\n" + "qmap.h:1090:7: required from ‘static constexpr void (* QtPrivate::QMetaTypeForType::getCopyCtr())(const QtPrivate::QMetaTypeInterface*, void*, const void*) [with T = QMultiMap; S = QMultiMap; QtPrivate::QMetaTypeInterface::CopyCtrFn = void (*)(const QtPrivate::QMetaTypeInterface*, void*, const void*)]’\n" + "qmetatype.h:2765:32: required from ‘QtPrivate::QMetaTypeInterface QtPrivate::QMetaTypeForType >::metaType’\n" + "qmetatype.h:2865:16: required from ‘constexpr QtPrivate::QMetaTypeInterface* QtPrivate::qTryMetaTypeInterfaceForType() [with Unique = qt_meta_stringdata_Help__Internal__HelpIndexFilter_t; T = const QMultiMap&]’\n" + "qmetatype.h:2884:55: required from ‘QtPrivate::QMetaTypeInterface* const qt_incomplete_metaTypeArray [4]&, const QString&, QStringList>’\n" + "moc_helpindexfilter.cpp:105:1: required from here\n" + "qmap.h:110:7: error: ‘QMapNode::value’ has incomplete type\n" + " 110 | T value;\n" + " | ^~~~~", + FilePath::fromUserInput("qmap.h"), 110)} + << QString(); } void ProjectExplorerPlugin::testGccOutputParsers() From 72bf4cd15fa9bf6842cfd1ea08dad142b3690f92 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 8 Jul 2020 16:14:40 +0200 Subject: [PATCH 016/108] iOS: Fix slow debugger startup on devices We need to pass the path to the device symbols, that Xcode downloaded for the device's OS version, as the sysroot to the debugger. Otherwise debugger startup is very slow. We already tried to do that, but it looks like, depending on the devices, this path can contain an architecture specific part, e.g. "iOS DeviceSupport/13.5.1 (17F80) arm64e" instead of just "iOS DeviceSupport/13.5.1 (17F80)". It can still be just the latter, so we get the devices architecture information, try the architecture specific directory first, and fall back to the architecture agnostic name as before if the former doesn't exist. Fixes: QTCREATORBUG-21682 Change-Id: I2efdbfda0282f1cf0f8d10bd4e5217a298027fcf Reviewed-by: hjk Reviewed-by: Eike Ziller --- src/plugins/ios/iosdevice.cpp | 5 ++++ src/plugins/ios/iosdevice.h | 1 + src/plugins/ios/iosrunner.cpp | 40 ++++++++++++-------------- src/tools/iostool/iosdevicemanager.cpp | 13 +++++++++ 4 files changed, 38 insertions(+), 21 deletions(-) diff --git a/src/plugins/ios/iosdevice.cpp b/src/plugins/ios/iosdevice.cpp index d6a6cb2274e..c11794fb963 100644 --- a/src/plugins/ios/iosdevice.cpp +++ b/src/plugins/ios/iosdevice.cpp @@ -171,6 +171,11 @@ QString IosDevice::osVersion() const return m_extraInfo.value(QLatin1String("osVersion")); } +QString IosDevice::cpuArchitecture() const +{ + return m_extraInfo.value("cpuArchitecture"); +} + Utils::Port IosDevice::nextPort() const { // use qrand instead? diff --git a/src/plugins/ios/iosdevice.h b/src/plugins/ios/iosdevice.h index 533a319f32b..329ef8e2687 100644 --- a/src/plugins/ios/iosdevice.h +++ b/src/plugins/ios/iosdevice.h @@ -59,6 +59,7 @@ public: QVariantMap toMap() const override; QString uniqueDeviceID() const; QString osVersion() const; + QString cpuArchitecture() const; Utils::Port nextPort() const; bool canAutoDetectPorts() const override; diff --git a/src/plugins/ios/iosrunner.cpp b/src/plugins/ios/iosrunner.cpp index 1aa5fc52331..61501f9d752 100644 --- a/src/plugins/ios/iosrunner.cpp +++ b/src/plugins/ios/iosrunner.cpp @@ -436,28 +436,26 @@ void IosDebugSupport::start() IosDevice::ConstPtr dev = device().dynamicCast(); setStartMode(AttachToRemoteProcess); setIosPlatform("remote-ios"); - QString osVersion = dev->osVersion(); - FilePath deviceSdk1 = FilePath::fromString(QDir::homePath() - + "/Library/Developer/Xcode/iOS DeviceSupport/" - + osVersion + "/Symbols"); - QString deviceSdk; - if (deviceSdk1.isDir()) { - deviceSdk = deviceSdk1.toString(); - } else { - const FilePath deviceSdk2 = IosConfigurations::developerPath() - .pathAppended("Platforms/iPhoneOS.platform/DeviceSupport/" - + osVersion + "/Symbols"); - if (deviceSdk2.isDir()) { - deviceSdk = deviceSdk2.toString(); - } else { - TaskHub::addTask(DeploymentTask(Task::Warning, tr( - "Could not find device specific debug symbols at %1. " - "Debugging initialization will be slow until you open the Organizer window of " - "Xcode with the device connected to have the symbols generated.") - .arg(deviceSdk1.toUserOutput()))); - } + const QString osVersion = dev->osVersion(); + const QString cpuArchitecture = dev->cpuArchitecture(); + const FilePaths symbolsPathCandidates = { + FilePath::fromString(QDir::homePath() + "/Library/Developer/Xcode/iOS DeviceSupport/" + + osVersion + " " + cpuArchitecture + "/Symbols"), + FilePath::fromString(QDir::homePath() + "/Library/Developer/Xcode/iOS DeviceSupport/" + + osVersion + "/Symbols"), + IosConfigurations::developerPath().pathAppended( + "Platforms/iPhoneOS.platform/DeviceSupport/" + osVersion + "/Symbols")}; + const FilePath deviceSdk = Utils::findOrDefault(symbolsPathCandidates, &FilePath::isDir); + + if (deviceSdk.isEmpty()) { + TaskHub::addTask(DeploymentTask( + Task::Warning, + tr("Could not find device specific debug symbols at %1. " + "Debugging initialization will be slow until you open the Organizer window of " + "Xcode with the device connected to have the symbols generated.") + .arg(symbolsPathCandidates.constFirst().toUserOutput()))); } - setDeviceSymbolsRoot(deviceSdk); + setDeviceSymbolsRoot(deviceSdk.toString()); } else { setStartMode(AttachExternal); setIosPlatform("ios-simulator"); diff --git a/src/tools/iostool/iosdevicemanager.cpp b/src/tools/iostool/iosdevicemanager.cpp index 0c09ee61f4a..ce3ff88c4dc 100644 --- a/src/tools/iostool/iosdevicemanager.cpp +++ b/src/tools/iostool/iosdevicemanager.cpp @@ -1593,6 +1593,7 @@ void DevInfoSession::deviceCallbackReturned() QString developerStatusKey = QLatin1String("developerStatus"); QString deviceConnectedKey = QLatin1String("deviceConnected"); QString osVersionKey = QLatin1String("osVersion"); + QString cpuArchitectureKey = "cpuArchitecture"; bool failure = !device; if (!failure) { failure = !connectDevice(); @@ -1631,6 +1632,18 @@ void DevInfoSession::deviceCallbackReturned() 0, CFSTR("BuildVersion")); //CFShow(cfBuildVersion); + CFPropertyListRef cfCpuArchitecture = lib()->deviceCopyValue(device, + 0, + CFSTR("CPUArchitecture")); + //CFShow(cfCpuArchitecture); + if (cfCpuArchitecture) { + if (CFGetTypeID(cfCpuArchitecture) == CFStringGetTypeID()) { + res[cpuArchitectureKey] = QString::fromCFString( + reinterpret_cast(cfCpuArchitecture)); + } + CFRelease(cfCpuArchitecture); + } + //CFShow(cfBuildVersion); QString versionString; if (cfProductVersion) { if (CFGetTypeID(cfProductVersion) == CFStringGetTypeID()) From f4af71a3dd66afe90464692cadeb02fbd14a3d96 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Fri, 10 Jul 2020 14:40:38 +0200 Subject: [PATCH 017/108] iOS Device: Show some more information in device options Show iOS device name, identifier, OS version and cpu architecture. Task-number: QTCREATORBUG-23016 Change-Id: I5fff2986a173800dabc585f17830cc242e436457 Reviewed-by: hjk Reviewed-by: Eike Ziller --- src/plugins/ios/iosdevice.cpp | 62 +++++++++++---- src/plugins/ios/iosdevice.h | 2 + src/tools/iostool/iosdevicemanager.cpp | 104 ++++++++++--------------- 3 files changed, 90 insertions(+), 78 deletions(-) diff --git a/src/plugins/ios/iosdevice.cpp b/src/plugins/ios/iosdevice.cpp index c11794fb963..d53550c2e43 100644 --- a/src/plugins/ios/iosdevice.cpp +++ b/src/plugins/ios/iosdevice.cpp @@ -24,18 +24,21 @@ ****************************************************************************/ #include "iosdevice.h" -#include "iossimulator.h" -#include "iosconstants.h" #include "iosconfigurations.h" +#include "iosconstants.h" +#include "iossimulator.h" #include "iostoolhandler.h" -#include -#include #include +#include +#include +#include #include +#include +#include +#include #include #include -#include #ifdef Q_OS_MAC #include @@ -57,6 +60,9 @@ using namespace ProjectExplorer; +static const char kDeviceName[] = "deviceName"; +static const char kUniqueDeviceId[] = "uniqueDeviceId"; + namespace { static Q_LOGGING_CATEGORY(detectLog, "qtc.ios.deviceDetect", QtWarningMsg) } @@ -87,6 +93,14 @@ static QString CFStringRef2QString(CFStringRef s) namespace Ios { namespace Internal { +class IosDeviceInfoWidget : public IDeviceWidget +{ +public: + IosDeviceInfoWidget(const ProjectExplorer::IDevice::Ptr &device); + + void updateDeviceFromUi() {} +}; + IosDevice::IosDevice(CtorHelper) : m_lastPort(Constants::IOS_DEVICE_PORT_START) { @@ -128,7 +142,7 @@ IDevice::DeviceInfo IosDevice::deviceInformation() const IDeviceWidget *IosDevice::createWidget() { - return nullptr; + return new IosDeviceInfoWidget(sharedFromThis()); } DeviceProcessSignalOperation::Ptr IosDevice::signalOperation() const @@ -156,11 +170,21 @@ QVariantMap IosDevice::toMap() const return res; } +QString IosDevice::deviceName() const +{ + return m_extraInfo.value(kDeviceName); +} + QString IosDevice::uniqueDeviceID() const { return id().suffixAfter(Utils::Id(Constants::IOS_DEVICE_ID)); } +QString IosDevice::uniqueInternalDeviceId() const +{ + return m_extraInfo.value(kUniqueDeviceId); +} + QString IosDevice::name() { return QCoreApplication::translate("Ios::Internal::IosDevice", "iOS Device"); @@ -198,7 +222,7 @@ IosDeviceManager::TranslationMap IosDeviceManager::translationMap() if (translationMap) return *translationMap; TranslationMap &tMap = *new TranslationMap; - tMap[QLatin1String("deviceName")] = tr("Device name"); + tMap[kDeviceName] = tr("Device name"); //: Whether the device is in developer mode. tMap[QLatin1String("developerStatus")] = tr("Developer status"); tMap[QLatin1String("deviceConnected")] = tr("Connected"); @@ -248,7 +272,7 @@ void IosDeviceManager::deviceDisconnected(const QString &uid) } else { auto iosDev = static_cast(dev.data()); if (iosDev->m_extraInfo.isEmpty() - || iosDev->m_extraInfo.value(QLatin1String("deviceName")) == QLatin1String("*unknown*")) { + || iosDev->m_extraInfo.value(kDeviceName) == QLatin1String("*unknown*")) { devManager->removeDevice(iosDev->id()); } else if (iosDev->deviceState() != IDevice::DeviceDisconnected) { qCDebug(detectLog) << "disconnecting device " << iosDev->uniqueDeviceID(); @@ -290,9 +314,8 @@ void IosDeviceManager::deviceInfo(IosToolHandler *, const QString &uid, newDev = new IosDevice(uid); } if (!skipUpdate) { - QString devNameKey = QLatin1String("deviceName"); - if (info.contains(devNameKey)) - newDev->setDisplayName(info.value(devNameKey)); + if (info.contains(kDeviceName)) + newDev->setDisplayName(info.value(kDeviceName)); newDev->m_extraInfo = info; qCDebug(detectLog) << "updated info of ios device " << uid; dev = IDevice::ConstPtr(newDev); @@ -551,11 +574,24 @@ IosDeviceFactory::IosDeviceFactory() bool IosDeviceFactory::canRestore(const QVariantMap &map) const { QVariantMap vMap = map.value(QLatin1String(Constants::EXTRA_INFO_KEY)).toMap(); - if (vMap.isEmpty() - || vMap.value(QLatin1String("deviceName")).toString() == QLatin1String("*unknown*")) + if (vMap.isEmpty() || vMap.value(kDeviceName).toString() == QLatin1String("*unknown*")) return false; // transient device (probably generated during an activation) return true; } +IosDeviceInfoWidget::IosDeviceInfoWidget(const IDevice::Ptr &device) + : IDeviceWidget(device) +{ + const auto iosDevice = qSharedPointerCast(device); + const auto formLayout = new QFormLayout(this); + formLayout->setContentsMargins(0, 0, 0, 0); + setLayout(formLayout); + formLayout->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow); + formLayout->addRow(IosDevice::tr("Device name:"), new QLabel(iosDevice->deviceName())); + formLayout->addRow(IosDevice::tr("Identifier:"), new QLabel(iosDevice->uniqueInternalDeviceId())); + formLayout->addRow(IosDevice::tr("OS Version:"), new QLabel(iosDevice->osVersion())); + formLayout->addRow(IosDevice::tr("CPU Architecture:"), new QLabel(iosDevice->cpuArchitecture())); +} + } // namespace Internal } // namespace Ios diff --git a/src/plugins/ios/iosdevice.h b/src/plugins/ios/iosdevice.h index 329ef8e2687..80674de526c 100644 --- a/src/plugins/ios/iosdevice.h +++ b/src/plugins/ios/iosdevice.h @@ -57,7 +57,9 @@ public: void fromMap(const QVariantMap &map) override; QVariantMap toMap() const override; + QString deviceName() const; QString uniqueDeviceID() const; + QString uniqueInternalDeviceId() const; QString osVersion() const; QString cpuArchitecture() const; Utils::Port nextPort() const; diff --git a/src/tools/iostool/iosdevicemanager.cpp b/src/tools/iostool/iosdevicemanager.cpp index ce3ff88c4dc..890dec82c9d 100644 --- a/src/tools/iostool/iosdevicemanager.cpp +++ b/src/tools/iostool/iosdevicemanager.cpp @@ -452,6 +452,10 @@ public: void deviceCallbackReturned(); QString commandName(); + QString getStringValue(AMDevice *device, + CFStringRef domain, + CFStringRef key, + const QString &fallback = QString()); }; class AppOpSession: public CommandSession { @@ -1584,82 +1588,52 @@ QString DevInfoSession::commandName() return QString::fromLatin1("DevInfoSession(%1, %2)").arg(deviceId); } +QString DevInfoSession::getStringValue(AMDevice *device, + CFStringRef domain, + CFStringRef key, + const QString &fallback) +{ + QString value = fallback; + CFPropertyListRef cfValue = lib()->deviceCopyValue(device, domain, key); + if (cfValue) { + if (CFGetTypeID(cfValue) == CFStringGetTypeID()) + value = QString::fromCFString(reinterpret_cast(cfValue)); + CFRelease(cfValue); + } + return value; +} + void DevInfoSession::deviceCallbackReturned() { if (debugAll) qDebug() << "device available"; QMap res; - QString deviceNameKey = QLatin1String("deviceName"); - QString developerStatusKey = QLatin1String("developerStatus"); - QString deviceConnectedKey = QLatin1String("deviceConnected"); - QString osVersionKey = QLatin1String("osVersion"); - QString cpuArchitectureKey = "cpuArchitecture"; + const QString deviceNameKey = "deviceName"; + const QString developerStatusKey = "developerStatus"; + const QString deviceConnectedKey = "deviceConnected"; + const QString osVersionKey = "osVersion"; + const QString cpuArchitectureKey = "cpuArchitecture"; + const QString uniqueDeviceId = "uniqueDeviceId"; bool failure = !device; if (!failure) { failure = !connectDevice(); if (!failure) { res[deviceConnectedKey] = QLatin1String("YES"); - CFPropertyListRef cfDeviceName = lib()->deviceCopyValue(device, 0, - CFSTR("DeviceName")); - // CFShow(cfDeviceName); - if (cfDeviceName) { - if (CFGetTypeID(cfDeviceName) == CFStringGetTypeID()) - res[deviceNameKey] = QString::fromCFString(reinterpret_cast(cfDeviceName)); - CFRelease(cfDeviceName); - } - if (!res.contains(deviceNameKey)) - res[deviceNameKey] = QString(); - } - if (!failure) { - CFPropertyListRef cfDevStatus = lib()->deviceCopyValue(device, - CFSTR("com.apple.xcode.developerdomain"), - CFSTR("DeveloperStatus")); - // CFShow(cfDevStatus); - if (cfDevStatus) { - if (CFGetTypeID(cfDevStatus) == CFStringGetTypeID()) - res[developerStatusKey] = QString::fromCFString(reinterpret_cast(cfDevStatus)); - CFRelease(cfDevStatus); - } - if (!res.contains(developerStatusKey)) - res[developerStatusKey] = QLatin1String("*off*"); - } - if (!failure) { - CFPropertyListRef cfProductVersion = lib()->deviceCopyValue(device, - 0, - CFSTR("ProductVersion")); - //CFShow(cfProductVersion); - CFPropertyListRef cfBuildVersion = lib()->deviceCopyValue(device, - 0, - CFSTR("BuildVersion")); - //CFShow(cfBuildVersion); - CFPropertyListRef cfCpuArchitecture = lib()->deviceCopyValue(device, - 0, - CFSTR("CPUArchitecture")); - //CFShow(cfCpuArchitecture); - if (cfCpuArchitecture) { - if (CFGetTypeID(cfCpuArchitecture) == CFStringGetTypeID()) { - res[cpuArchitectureKey] = QString::fromCFString( - reinterpret_cast(cfCpuArchitecture)); - } - CFRelease(cfCpuArchitecture); - } - //CFShow(cfBuildVersion); - QString versionString; - if (cfProductVersion) { - if (CFGetTypeID(cfProductVersion) == CFStringGetTypeID()) - versionString = QString::fromCFString(reinterpret_cast(cfProductVersion)); - CFRelease(cfProductVersion); - } - if (cfBuildVersion) { - if (!versionString.isEmpty() && CFGetTypeID(cfBuildVersion) == CFStringGetTypeID()) - versionString += QString::fromLatin1(" (%1)").arg( - QString::fromCFString(reinterpret_cast(cfBuildVersion))); - CFRelease(cfBuildVersion); - } - if (!versionString.isEmpty()) - res[osVersionKey] = versionString; + res[deviceNameKey] = getStringValue(device, nullptr, CFSTR("DeviceName")); + res[developerStatusKey] = getStringValue(device, + CFSTR("com.apple.xcode.developerdomain"), + CFSTR("DeveloperStatus"), + "*off*"); + res[cpuArchitectureKey] = getStringValue(device, nullptr, CFSTR("CPUArchitecture")); + res[uniqueDeviceId] = getStringValue(device, nullptr, CFSTR("UniqueDeviceID")); + const QString productVersion = getStringValue(device, nullptr, CFSTR("ProductVersion")); + const QString buildVersion = getStringValue(device, nullptr, CFSTR("BuildVersion")); + if (!productVersion.isEmpty() && !buildVersion.isEmpty()) + res[osVersionKey] = QString("%1 (%2)").arg(productVersion, buildVersion); + else if (!productVersion.isEmpty()) + res[osVersionKey] = productVersion; else - res[osVersionKey] = QLatin1String("*unknown*"); + res[osVersionKey] = "*unknown*"; } disconnectDevice(); } From 69c8221885981c17b8bdeb497076b75edb6e2246 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 9 Jul 2020 17:46:13 +0200 Subject: [PATCH 018/108] GCC Parser: Recognize lines with "cc1plus" Change-Id: I73a548b58c96fe944a80e36ee72ea9d3965ca6dc Reviewed-by: hjk --- src/plugins/projectexplorer/gccparser.cpp | 32 +++++++++++++++++++++++ src/plugins/projectexplorer/gccparser.h | 1 + 2 files changed, 33 insertions(+) diff --git a/src/plugins/projectexplorer/gccparser.cpp b/src/plugins/projectexplorer/gccparser.cpp index db794e668a1..6a2f8a73dea 100644 --- a/src/plugins/projectexplorer/gccparser.cpp +++ b/src/plugins/projectexplorer/gccparser.cpp @@ -56,6 +56,10 @@ GccParser::GccParser() + FILE_PATTERN + "(\\d+)(:\\d+)?[,:]?$"); QTC_CHECK(m_regExpInlined.isValid()); + m_regExpCc1plus.setPattern(QLatin1Char('^') + "cc1plus.*(error|warning): ((?:" + + FILE_PATTERN + " No such file or directory)?.*)"); + QTC_CHECK(m_regExpCc1plus.isValid()); + // optional path with trailing slash // optional arm-linux-none-thingy // name of executable @@ -181,6 +185,18 @@ OutputLineParser::Result GccParser::handleLine(const QString &line, OutputFormat return {Status::InProgress, linkSpecs}; } + match = m_regExpCc1plus.match(lne); + if (match.hasMatch()) { + const Task::TaskType type = match.captured(1) == "error" ? Task::Error : Task::Warning; + const FilePath filePath = absoluteFilePath(FilePath::fromUserInput(match.captured(3))); + LinkSpecs linkSpecs; + if (!filePath.isEmpty()) + addLinkSpecForAbsoluteFilePath(linkSpecs, filePath, -1, match, 3); + createOrAmendTask(type, match.captured(2), lne, false, filePath, -1, linkSpecs); + flush(); + return {Status::Done, linkSpecs}; + } + match = m_regExp.match(lne); if (match.hasMatch()) { int lineno = match.captured(3).toInt(); @@ -1182,6 +1198,22 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() " | ^~~~~", FilePath::fromUserInput("qmap.h"), 110)} << QString(); + + QTest::newRow("cc1plus") + << QString( + "cc1plus: error: one or more PCH files were found, but they were invalid\n" + "cc1plus: error: use -Winvalid-pch for more information\n" + "cc1plus: fatal error: .pch/Qt6Core5Compat: No such file or directory\n" + "cc1plus: warning: -Wformat-security ignored without -Wformat [-Wformat-security]\n" + "compilation terminated.") + << OutputParserTester::STDERR + << QString() << QString("compilation terminated.\n") + << Tasks{ + CompileTask(Task::Error, "one or more PCH files were found, but they were invalid"), + CompileTask(Task::Error, "use -Winvalid-pch for more information"), + CompileTask(Task::Error, ".pch/Qt6Core5Compat: No such file or directory", FilePath::fromString(".pch/Qt6Core5Compat")), + CompileTask(Task::Warning, "-Wformat-security ignored without -Wformat [-Wformat-security]")} + << QString(); } void ProjectExplorerPlugin::testGccOutputParsers() diff --git a/src/plugins/projectexplorer/gccparser.h b/src/plugins/projectexplorer/gccparser.h index 220fc314441..7e60f103d44 100644 --- a/src/plugins/projectexplorer/gccparser.h +++ b/src/plugins/projectexplorer/gccparser.h @@ -65,6 +65,7 @@ private: QRegularExpression m_regExpIncluded; QRegularExpression m_regExpInlined; QRegularExpression m_regExpGccNames; + QRegularExpression m_regExpCc1plus; Task m_currentTask; LinkSpecs m_linkSpecs; From eac46f7f24169dc5a1052a9c6c20b90e00147355 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 13 Jul 2020 14:34:04 +0200 Subject: [PATCH 019/108] Bump version to 4.13 beta2 Change-Id: I836987b4c4e28c65cb67c2efba595ed92d071b6a Reviewed-by: Eike Ziller --- cmake/QtCreatorIDEBranding.cmake | 6 +++--- qbs/modules/qtc/qtc.qbs | 6 +++--- qtcreator_ide_branding.pri | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cmake/QtCreatorIDEBranding.cmake b/cmake/QtCreatorIDEBranding.cmake index e82e06f29d7..d88c798f76a 100644 --- a/cmake/QtCreatorIDEBranding.cmake +++ b/cmake/QtCreatorIDEBranding.cmake @@ -1,8 +1,8 @@ #PROJECT_USER_FILE_EXTENSION = .user -set(IDE_VERSION "4.12.82") # The IDE version. -set(IDE_VERSION_COMPAT "4.12.82") # The IDE Compatibility version. -set(IDE_VERSION_DISPLAY "4.13.0-beta1") # The IDE display version. +set(IDE_VERSION "4.12.83") # The IDE version. +set(IDE_VERSION_COMPAT "4.12.83") # The IDE Compatibility version. +set(IDE_VERSION_DISPLAY "4.13.0-beta2") # The IDE display version. set(IDE_COPYRIGHT_YEAR "2020") # The IDE current copyright year. set(IDE_SETTINGSVARIANT "QtProject") # The IDE settings variation. diff --git a/qbs/modules/qtc/qtc.qbs b/qbs/modules/qtc/qtc.qbs index 92245dfc170..065a9fdd2cd 100644 --- a/qbs/modules/qtc/qtc.qbs +++ b/qbs/modules/qtc/qtc.qbs @@ -4,16 +4,16 @@ import qbs.FileInfo import "qtc.js" as HelperFunctions Module { - property string qtcreator_display_version: '4.13.0-beta1' + property string qtcreator_display_version: '4.13.0-beta2' property string ide_version_major: '4' property string ide_version_minor: '12' - property string ide_version_release: '82' + property string ide_version_release: '83' property string qtcreator_version: ide_version_major + '.' + ide_version_minor + '.' + ide_version_release property string ide_compat_version_major: '4' property string ide_compat_version_minor: '12' - property string ide_compat_version_release: '82' + property string ide_compat_version_release: '83' property string qtcreator_compat_version: ide_compat_version_major + '.' + ide_compat_version_minor + '.' + ide_compat_version_release diff --git a/qtcreator_ide_branding.pri b/qtcreator_ide_branding.pri index 465db489e6b..28a6df17009 100644 --- a/qtcreator_ide_branding.pri +++ b/qtcreator_ide_branding.pri @@ -1,6 +1,6 @@ -QTCREATOR_VERSION = 4.12.82 -QTCREATOR_COMPAT_VERSION = 4.12.82 -QTCREATOR_DISPLAY_VERSION = 4.13.0-beta1 +QTCREATOR_VERSION = 4.12.83 +QTCREATOR_COMPAT_VERSION = 4.12.83 +QTCREATOR_DISPLAY_VERSION = 4.13.0-beta2 QTCREATOR_COPYRIGHT_YEAR = 2020 IDE_DISPLAY_NAME = Qt Creator From b4d5ab2fb5eb67891e71d72950d68f4017b2f49e Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Mon, 13 Jul 2020 16:58:04 +0300 Subject: [PATCH 020/108] README: Bump LLVM version in build instructions Change-Id: I3321d422f109f8f9c96adef2f944415ce2ec9569 Reviewed-by: Eike Ziller --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a686b0c6813..725744339c6 100644 --- a/README.md +++ b/README.md @@ -258,7 +258,7 @@ http://llvm.org/docs/GettingStarted.html#git-mirror: 1. Clone LLVM/Clang and checkout a suitable branch - git clone -b release_80-based --recursive https://code.qt.io/clang/llvm-project.git + git clone -b release_100-based --recursive https://code.qt.io/clang/llvm-project.git 2. Build and install LLVM/Clang @@ -278,7 +278,7 @@ http://llvm.org/docs/GettingStarted.html#git-mirror: For Windows: cmake ^ - -G "NMake Makefiles JOM" ^ + -G Ninja ^ -D CMAKE_BUILD_TYPE=Release ^ -D LLVM_ENABLE_RTTI=ON ^ -D LLVM_ENABLE_PROJECTS="clang;clang-tools-extra" ^ @@ -290,7 +290,7 @@ http://llvm.org/docs/GettingStarted.html#git-mirror: The ClangFormat plugin depends on the additional patch - https://code.qt.io/cgit/clang/clang.git/commit/?h=release_80-based&id=fa1b9053729ec6a4425a44ec5502dd388928274a + https://code.qt.io/cgit/clang/llvm-project.git/commit/?h=release_100-based&id=9b992a0f7f160dd6c75f20a4dcfcf7c60a4894df While the plugin builds without it, it will be disabled on start with an error message. From 2ad3a021503038cc128c1b55caac7024a42b0cbc Mon Sep 17 00:00:00 2001 From: David Schulz Date: Tue, 14 Jul 2020 11:18:13 +0200 Subject: [PATCH 021/108] QMake: highlight REPC qmake variables in pro files Fixes: QTCREATORBUG-24346 Change-Id: I07b8533b58233f15224341d1e9544f21a4fc2047 Reviewed-by: Christian Stenger --- src/plugins/qmakeprojectmanager/profilecompletionassist.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/qmakeprojectmanager/profilecompletionassist.cpp b/src/plugins/qmakeprojectmanager/profilecompletionassist.cpp index 94f82eba97f..ec405f67f7c 100644 --- a/src/plugins/qmakeprojectmanager/profilecompletionassist.cpp +++ b/src/plugins/qmakeprojectmanager/profilecompletionassist.cpp @@ -208,6 +208,7 @@ const TextEditor::Keywords &QmakeProjectManager::Internal::qmakeKeywords() "QMAKE_RUN_CXX_IMP", "QMAKE_TARGET", "QMAKE_UIC", + "QOBJECT_REP", "QT", "QTPLUGIN", "QT_MAJOR_VERSION", @@ -216,6 +217,9 @@ const TextEditor::Keywords &QmakeProjectManager::Internal::qmakeKeywords() "QT_VERSION", "RCC_DIR", "RC_FILE", + "REPC_MERGED", + "REPC_REPLICA", + "REPC_SOURCE", "REQUIRES", "RESOURCES", "RES_FILE", From cda204aa34e671631bb612287432ba80c72d6a7e Mon Sep 17 00:00:00 2001 From: David Schulz Date: Fri, 10 Jul 2020 11:37:12 +0200 Subject: [PATCH 022/108] Cdbext: Fix fetching partial variable Avoid calling PyValue::childCount as it expands the values in front of the partial variable recursively. This outdates scopeEnd as it is fetched before the items are expanded, which again results in a too early return from that function. Fixes: QTCREATORBUG-24108 Change-Id: I0848cde88c6ff8019a4ab22ac1153598c20e563d Reviewed-by: Christian Stenger --- src/libs/qtcreatorcdbext/pycdbextmodule.cpp | 12 ++++-------- src/libs/qtcreatorcdbext/pyvalue.cpp | 7 ++++++- src/libs/qtcreatorcdbext/pyvalue.h | 1 + 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/libs/qtcreatorcdbext/pycdbextmodule.cpp b/src/libs/qtcreatorcdbext/pycdbextmodule.cpp index c1584587c0c..49eed21616c 100644 --- a/src/libs/qtcreatorcdbext/pycdbextmodule.cpp +++ b/src/libs/qtcreatorcdbext/pycdbextmodule.cpp @@ -220,17 +220,13 @@ static PyObject *cdbext_listOfLocals(PyObject *, PyObject *args) // -> [ Value ] ++currentPartialIname; // skip "local" part ULONG symbolGroupIndex = 0; - ULONG childEndIndex = 0; for (;symbolGroupIndex < scopeEnd; ++symbolGroupIndex) { PyValue value(symbolGroupIndex, symbolGroup); - if (childEndIndex <= symbolGroupIndex) { // do not return a child value - if (value.name() == *currentPartialIname) { - PyList_Append(locals, createPythonObject(value)); - return locals; - } - ++childEndIndex; + if (value.name() == *currentPartialIname) { + PyList_Append(locals, createPythonObject(value)); + return locals; } - childEndIndex += ULONG(value.childCount()); + symbolGroupIndex += value.currentNumberOfDescendants(); } } diff --git a/src/libs/qtcreatorcdbext/pyvalue.cpp b/src/libs/qtcreatorcdbext/pyvalue.cpp index a56cb08ba9c..c92b694bf37 100644 --- a/src/libs/qtcreatorcdbext/pyvalue.cpp +++ b/src/libs/qtcreatorcdbext/pyvalue.cpp @@ -278,13 +278,18 @@ PyValue PyValue::childFromIndex(int index) int offset = index + 1; for (ULONG childIndex = m_index + 1; childIndex < m_index + offset; ) { - const ULONG childDescendantCount = currentNumberOfDescendants(childIndex, m_symbolGroup); + const ULONG childDescendantCount = ::currentNumberOfDescendants(childIndex, m_symbolGroup); childIndex += childDescendantCount + 1; offset += childDescendantCount; } return PyValue(m_index + offset, m_symbolGroup); } +ULONG PyValue::currentNumberOfDescendants() +{ + return ::currentNumberOfDescendants(m_index, m_symbolGroup); +} + PyValue PyValue::createValue(ULONG64 address, const PyType &type) { if (debuggingValueEnabled()) { diff --git a/src/libs/qtcreatorcdbext/pyvalue.h b/src/libs/qtcreatorcdbext/pyvalue.h index fa89c730621..045658a01b3 100644 --- a/src/libs/qtcreatorcdbext/pyvalue.h +++ b/src/libs/qtcreatorcdbext/pyvalue.h @@ -55,6 +55,7 @@ public: PyValue childFromName(const std::string &name); PyValue childFromField(const PyField &field); PyValue childFromIndex(int index); + ULONG currentNumberOfDescendants(); static PyValue createValue(ULONG64 address, const PyType &type); static int tag(const std::string &typeName); From 8541650096216aa72bd90d94c26182351a83f311 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Thu, 9 Jul 2020 11:19:57 +0200 Subject: [PATCH 023/108] Debugger: disable load qml stack action for cdb Since collecting the qml stack relies on calling functions it has a high risk of getting stuck in that call at least with Qt 5.15. Never the less I added the correct function in the cdbextension so when the action get's re-enabled in the future we already start with an updated extension. Task-number: QTCREATORBUG-22209 Change-Id: I535f8db5a64ae48b4163d9b67e133cc3de338432 Reviewed-by: Christian Stenger --- src/libs/qtcreatorcdbext/qtcreatorcdbextension.cpp | 2 +- src/plugins/debugger/cdb/cdbengine.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/libs/qtcreatorcdbext/qtcreatorcdbextension.cpp b/src/libs/qtcreatorcdbext/qtcreatorcdbextension.cpp index f60ad90cc95..e9bdd5af927 100644 --- a/src/libs/qtcreatorcdbext/qtcreatorcdbextension.cpp +++ b/src/libs/qtcreatorcdbext/qtcreatorcdbextension.cpp @@ -1250,7 +1250,7 @@ extern "C" HRESULT CALLBACK qmlstack(CIDebugClient *client, PCSTR argsIn) // the start assuming this is invoked for crashed applications. std::ostringstream callStr; const QtInfo &qtInfo = QtInfo::get(SymbolGroupValueContext(exc.dataSpaces(), exc.symbols())); - callStr << qtInfo.prependQtModule("qt_v4StackTrace(", QtInfo::Qml) << std::showbase << std::hex + callStr << qtInfo.prependQtModule("qt_v4StackTraceForEngine(", QtInfo::Qml) << std::showbase << std::hex << jsExecutionEngine << std::dec << std::noshowbase << ')'; std::wstring wOutput; if (!ExtensionContext::instance().call(callStr.str(), ExtensionContext::CallWithExceptionsHandled, &wOutput, &errorMessage)) diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp index 472f8597d36..0472c3617de 100644 --- a/src/plugins/debugger/cdb/cdbengine.cpp +++ b/src/plugins/debugger/cdb/cdbengine.cpp @@ -730,8 +730,7 @@ bool CdbEngine::hasCapability(unsigned cap) const | CreateFullBacktraceCapability | OperateByInstructionCapability | RunToLineCapability - | MemoryAddressCapability - | AdditionalQmlStackCapability); + | MemoryAddressCapability); } void CdbEngine::executeStepIn(bool byInstruction) From ac2c487e2ec0eec6cd2ffb2ba6262c69ce04dd3e Mon Sep 17 00:00:00 2001 From: David Schulz Date: Thu, 25 Jun 2020 13:42:35 +0200 Subject: [PATCH 024/108] LSP: Use document contents to collect search result texts Otherwise search results in modified files will get wrong line texts. Change-Id: I7be4b27ebc5b250da3a3a0050de8646bcfcd010b Reviewed-by: Christian Stenger --- .../languageclientsymbolsupport.cpp | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/src/plugins/languageclient/languageclientsymbolsupport.cpp b/src/plugins/languageclient/languageclientsymbolsupport.cpp index efd019c2eab..8dc5f7bd516 100644 --- a/src/plugins/languageclient/languageclientsymbolsupport.cpp +++ b/src/plugins/languageclient/languageclientsymbolsupport.cpp @@ -139,23 +139,40 @@ struct ItemData QVariant userData; }; +static QStringList getFileContents(const QString &filePath) +{ + QString fileContent; + if (TextEditor::TextDocument *document = TextEditor::TextDocument::textDocumentForFilePath( + Utils::FilePath::fromString(filePath))) { + fileContent = document->plainText(); + } else { + Utils::TextFileFormat format; + format.lineTerminationMode = Utils::TextFileFormat::LFLineTerminator; + QString error; + const QTextCodec *codec = Core::EditorManager::defaultTextCodec(); + if (Utils::TextFileFormat::readFile(filePath, codec, &fileContent, &format, &error) + != Utils::TextFileFormat::ReadSuccess) { + qDebug() << "Failed to read file" << filePath << ":" << error; + } + } + return fileContent.split("\n"); +} + QList generateSearchResultItems( const QMap> &rangesInDocument) { QList result; for (auto it = rangesInDocument.begin(); it != rangesInDocument.end(); ++it) { const QString &fileName = it.key(); - QFile file(fileName); - file.open(QFile::ReadOnly); Core::SearchResultItem item; item.path = QStringList() << fileName; item.useTextEditorFont = true; - QStringList lines = QString::fromLocal8Bit(file.readAll()).split(QChar::LineFeed); + QStringList lines = getFileContents(fileName); for (const ItemData &data : it.value()) { item.mainRange = data.range; - if (file.isOpen() && data.range.begin.line > 0 && data.range.begin.line <= lines.size()) + if (data.range.begin.line > 0 && data.range.begin.line <= lines.size()) item.text = lines[data.range.begin.line - 1]; else item.text.clear(); From 9d16d735abf78f2c37f0240fd175f6e4a2e3d208 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Wed, 8 Jul 2020 16:40:39 +0200 Subject: [PATCH 025/108] Debugger: Do not send empty message on shutdown This triggered a soft assert in DebuggerEngine::showMessage() and cleaning up the status bar is not necessary at all. Change-Id: I12d3d5cbc79f178af58ecb0a5c7a3130c880bdad Reviewed-by: hjk --- src/plugins/debugger/qml/qmlengine.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp index a94e3982639..6c566d04752 100644 --- a/src/plugins/debugger/qml/qmlengine.cpp +++ b/src/plugins/debugger/qml/qmlengine.cpp @@ -570,7 +570,6 @@ void QmlEngine::shutdownEngine() stopApplicationLauncher(); notifyEngineShutdownFinished(); - showMessage(QString(), StatusBar); } void QmlEngine::setupEngine() From ec65d43b65ddc8b7425a9e031e5ab63bf634ea09 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 9 Jul 2020 09:14:03 +0200 Subject: [PATCH 026/108] AutoTest: Fix auto expansion of test results We may add items that have sub-items already, so apply the expansion to them as well if necessary. Change-Id: Ibff4433c5a7c0a110461e46998cd39864f4ec929 Reviewed-by: David Schulz --- src/plugins/autotest/testresultmodel.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/autotest/testresultmodel.cpp b/src/plugins/autotest/testresultmodel.cpp index f91bda8ac01..7ea5f7d9d8f 100644 --- a/src/plugins/autotest/testresultmodel.cpp +++ b/src/plugins/autotest/testresultmodel.cpp @@ -289,8 +289,11 @@ void TestResultModel::addTestResult(const TestResultPtr &testResult, bool autoEx addFileName(testResult->fileName()); // ensure we calculate the results pane correctly if (parentItem) { parentItem->appendChild(newItem); - if (autoExpand) + if (autoExpand) { parentItem->expand(); + newItem->expand(); + newItem->forAllChildren([](Utils::TreeItem *it) { it->expand(); }); + } updateParent(newItem); } else { if (lastRow >= 0) { From 52a4a831547ed9e9924cd62196f486c19735adc2 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Mon, 6 Jul 2020 15:24:44 +0200 Subject: [PATCH 027/108] Debugger: Remove ConsoleViewStyle This interferes with the general theming of the output pane and the purpose is no more obvious. This patch fixes using a wrong scrollbar style on the QML Debugger Console. Change-Id: I4dfeecb77746b345f35809dd5e1bcb27a0fcd604 Reviewed-by: Robert Loehning Reviewed-by: hjk --- src/plugins/debugger/console/consoleview.cpp | 40 -------------------- 1 file changed, 40 deletions(-) diff --git a/src/plugins/debugger/console/consoleview.cpp b/src/plugins/debugger/console/consoleview.cpp index 823e37ae6ba..13115cb43b2 100644 --- a/src/plugins/debugger/console/consoleview.cpp +++ b/src/plugins/debugger/console/consoleview.cpp @@ -48,35 +48,6 @@ namespace Debugger { namespace Internal { -class ConsoleViewStyle : public ManhattanStyle -{ -public: - ConsoleViewStyle(const QString &baseStyleName) : ManhattanStyle(baseStyleName) {} - - void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, - const QWidget *widget = nullptr) const final - { - if (element != QStyle::PE_PanelItemViewRow) - ManhattanStyle::drawPrimitive(element, option, painter, widget); - } - - int styleHint(StyleHint hint, const QStyleOption *option = nullptr, - const QWidget *widget = nullptr, - QStyleHintReturn *returnData = nullptr) const final - { - if (hint == SH_ItemView_ShowDecorationSelected) - return 0; - else - return ManhattanStyle::styleHint(hint, option, widget, returnData); - } -}; - -/////////////////////////////////////////////////////////////////////// -// -// ConsoleView -// -/////////////////////////////////////////////////////////////////////// - ConsoleView::ConsoleView(ConsoleItemModel *model, QWidget *parent) : Utils::TreeView(parent), m_model(model) { @@ -102,17 +73,6 @@ ConsoleView::ConsoleView(ConsoleItemModel *model, QWidget *parent) : "border-image: none;" "image: none; }"); - QString baseName = QApplication::style()->objectName(); - if (Utils::HostOsInfo::isAnyUnixHost() && !Utils::HostOsInfo::isMacHost() - && baseName == "windows") { - // Sometimes we get the standard windows 95 style as a fallback - if (QStyleFactory::keys().contains("Fusion")) { - baseName = "fusion"; // Qt5 - } - } - auto style = new ConsoleViewStyle(baseName); - setStyle(style); - style->setParent(this); setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); setVerticalScrollMode(QAbstractItemView::ScrollPerPixel); From b20fa85bc082ef6bb6789bc6878f820a0c896d02 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Wed, 15 Jul 2020 16:11:26 +0200 Subject: [PATCH 028/108] ClangCodeModel: Fix race condition ... between semantic re-highlighting and document visibility update. Make semanticRehighlight() a no-op if the document is not currently visible, and call it explicitly on an editor change. Fixes: QTCREATORBUG-24290 Change-Id: Ife61f61d3fb82e8b283bf93ab77d16517f6c6f9c Reviewed-by: David Schulz --- .../clangcodemodel/clangeditordocumentprocessor.cpp | 7 ++++++- src/plugins/clangcodemodel/clangmodelmanagersupport.cpp | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/plugins/clangcodemodel/clangeditordocumentprocessor.cpp b/src/plugins/clangcodemodel/clangeditordocumentprocessor.cpp index ed9917a7737..789ba940d26 100644 --- a/src/plugins/clangcodemodel/clangeditordocumentprocessor.cpp +++ b/src/plugins/clangcodemodel/clangeditordocumentprocessor.cpp @@ -139,8 +139,13 @@ void ClangEditorDocumentProcessor::recalculateSemanticInfoDetached(bool force) void ClangEditorDocumentProcessor::semanticRehighlight() { - m_semanticHighlighter.updateFormatMapFromFontSettings(); + const auto matchesEditor = [this](const Core::IEditor *editor) { + return editor->document()->filePath() == m_document.filePath(); + }; + if (!Utils::contains(Core::EditorManager::visibleEditors(), matchesEditor)) + return; + m_semanticHighlighter.updateFormatMapFromFontSettings(); if (m_projectPart) requestAnnotationsFromBackend(); } diff --git a/src/plugins/clangcodemodel/clangmodelmanagersupport.cpp b/src/plugins/clangcodemodel/clangmodelmanagersupport.cpp index 3f441fc54d5..9e56b54b914 100644 --- a/src/plugins/clangcodemodel/clangmodelmanagersupport.cpp +++ b/src/plugins/clangcodemodel/clangmodelmanagersupport.cpp @@ -155,8 +155,10 @@ void ClangModelManagerSupport::onCurrentEditorChanged(Core::IEditor *editor) return; const ::Utils::FilePath filePath = editor->document()->filePath(); - if (auto processor = ClangEditorDocumentProcessor::get(filePath.toString())) + if (auto processor = ClangEditorDocumentProcessor::get(filePath.toString())) { + processor->semanticRehighlight(); processor->generateTaskHubIssues(); + } } void ClangModelManagerSupport::connectTextDocumentToTranslationUnit(TextEditor::TextDocument *textDocument) From cc7caee1339f94795b3d7057d6d1336a51572e86 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 16 Jul 2020 13:32:30 +0200 Subject: [PATCH 029/108] FakeVim: Fix case insensitivity handling for forward searching Change-Id: I1f5b13022f3ae06916434b48cf3c6ba6d4722746 Reviewed-by: Lukas Holecek Reviewed-by: Christian Stenger --- src/plugins/fakevim/fakevimhandler.cpp | 57 +++++++++++++++++--------- 1 file changed, 38 insertions(+), 19 deletions(-) diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp index 66ebe44a461..0af3938b79a 100644 --- a/src/plugins/fakevim/fakevimhandler.cpp +++ b/src/plugins/fakevim/fakevimhandler.cpp @@ -278,6 +278,23 @@ QDebug operator<<(QDebug ts, const CursorPosition &pos) return ts << "(line: " << pos.line << ", column: " << pos.column << ")"; } +// vi style configuration +static QVariant config(int code) +{ + return theFakeVimSetting(code)->value(); +} + +static bool hasConfig(int code) +{ + return config(code).toBool(); +} + +static bool hasConfig(int code, const QString &value) +{ + return config(code).toString().contains(value); +} + + class Mark { public: @@ -387,7 +404,7 @@ static bool eatString(const QString &prefix, QString *str) return true; } -static QRegularExpression vimPatternToQtPattern(QString needle, bool ignoreCaseOption, bool smartCaseOption) +static QRegularExpression vimPatternToQtPattern(const QString &needle) { /* Transformations (Vim regexp -> QRegularExpression): * \a -> [A-Za-z] @@ -418,9 +435,15 @@ static QRegularExpression vimPatternToQtPattern(QString needle, bool ignoreCaseO * \c - set ignorecase for rest * \C - set noignorecase for rest */ + // FIXME: Option smartcase should be used only if search was typed by user. - bool ignorecase = ignoreCaseOption + const bool ignoreCaseOption = hasConfig(ConfigIgnoreCase); + const bool smartCaseOption = hasConfig(ConfigSmartCase); + const bool initialIgnoreCase = ignoreCaseOption && !(smartCaseOption && needle.contains(QRegularExpression("[A-Z]"))); + + bool ignorecase = initialIgnoreCase; + QString pattern; pattern.reserve(2 * needle.size()); @@ -429,7 +452,7 @@ static QRegularExpression vimPatternToQtPattern(QString needle, bool ignoreCaseO bool embraced = false; bool range = false; bool curly = false; - foreach (const QChar &c, needle) { + for (const QChar &c : needle) { if (brace) { brace = false; if (c == ']') { @@ -530,7 +553,8 @@ static QRegularExpression vimPatternToQtPattern(QString needle, bool ignoreCaseO else if (brace) pattern.append('['); - return QRegularExpression(pattern); + return QRegularExpression(pattern, initialIgnoreCase ? QRegularExpression::CaseInsensitiveOption + : QRegularExpression::NoPatternOption); } static bool afterEndOfLine(const QTextDocument *doc, int position) @@ -544,17 +568,21 @@ static void searchForward(QTextCursor *tc, const QRegularExpression &needleExp, const QTextDocument *doc = tc->document(); const int startPos = tc->position(); + QTextDocument::FindFlags flags = {}; + if (!(needleExp.patternOptions() & QRegularExpression::CaseInsensitiveOption)) + flags |= QTextDocument::FindCaseSensitively; + // Search from beginning of line so that matched text is the same. tc->movePosition(StartOfLine); // forward to current position - *tc = doc->find(needleExp, *tc); + *tc = doc->find(needleExp, *tc, flags); while (!tc->isNull() && tc->anchor() < startPos) { if (!tc->hasSelection()) tc->movePosition(Right); if (tc->atBlockEnd()) tc->movePosition(NextBlock); - *tc = doc->find(needleExp, *tc); + *tc = doc->find(needleExp, *tc, flags); } if (tc->isNull()) @@ -567,7 +595,7 @@ static void searchForward(QTextCursor *tc, const QRegularExpression &needleExp, tc->movePosition(Right); if (tc->atBlockEnd()) tc->movePosition(NextBlock); - *tc = doc->find(needleExp, *tc); + *tc = doc->find(needleExp, *tc, flags); if (tc->isNull()) return; --*repeat; @@ -2117,12 +2145,6 @@ public: CursorPosition markLessPosition() const { return mark('<').position(document()); } CursorPosition markGreaterPosition() const { return mark('>').position(document()); } - // vi style configuration - QVariant config(int code) const { return theFakeVimSetting(code)->value(); } - bool hasConfig(int code) const { return config(code).toBool(); } - bool hasConfig(int code, const QString &value) const - { return config(code).toString().contains(value); } - int m_targetColumn; // -1 if past end of line int m_visualTargetColumn; // 'l' can move past eol in visual mode only int m_targetColumnWrapped; // column in current part of wrapped line @@ -5559,9 +5581,7 @@ bool FakeVimHandler::Private::handleExSubstituteCommand(const ExCommand &cmd) if (g.lastSubstituteFlags.contains('i')) needle.prepend("\\c"); - const QRegularExpression pattern = vimPatternToQtPattern(needle, - hasConfig(ConfigIgnoreCase), - hasConfig(ConfigSmartCase)); + const QRegularExpression pattern = vimPatternToQtPattern(needle); QTextBlock lastBlock; QTextBlock firstBlock; @@ -6355,9 +6375,8 @@ void FakeVimHandler::Private::searchBalanced(bool forward, QChar needle, QChar o QTextCursor FakeVimHandler::Private::search(const SearchData &sd, int startPos, int count, bool showMessages) { - const QRegularExpression needleExp = vimPatternToQtPattern(sd.needle, - hasConfig(ConfigIgnoreCase), - hasConfig(ConfigSmartCase)); + const QRegularExpression needleExp = vimPatternToQtPattern(sd.needle); + if (!needleExp.isValid()) { if (showMessages) { QString error = needleExp.errorString(); From ded5c64d5391185214f45f01e6661dff6cffdea5 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 14 Jul 2020 16:58:24 +0200 Subject: [PATCH 030/108] Fix deployment of clazy-standalone On Linux and macOS, clazy-standalone links against some dynamic libraries which we need to ship. Fixes: QTCREATORBUG-24344 Change-Id: I4946d2ae22fc9363445e6a3eecb8d9e40be5ef0e Reviewed-by: Christian Kandeler Reviewed-by: Christian Stenger --- scripts/deployqt.py | 41 +++++++++++++++++++++-------------- scripts/deployqtHelper_mac.sh | 3 +++ 2 files changed, 28 insertions(+), 16 deletions(-) diff --git a/scripts/deployqt.py b/scripts/deployqt.py index 5d7011e068d..851a6426336 100755 --- a/scripts/deployqt.py +++ b/scripts/deployqt.py @@ -253,25 +253,29 @@ def deploy_libclang(install_dir, llvm_install_dir, chrpath_bin): clangbindirtarget)) resourcetarget = os.path.join(clanglibdirtarget, 'clang') else: + # libclang -> Qt Creator libraries libsources = glob(os.path.join(llvm_install_dir, 'lib', 'libclang.so*')) for libsource in libsources: deployinfo.append((libsource, os.path.join(install_dir, 'lib', 'qtcreator'))) - clangbinary = os.path.join(llvm_install_dir, 'bin', 'clang') - clangdbinary = os.path.join(llvm_install_dir, 'bin', 'clangd') - clangtidybinary = os.path.join(llvm_install_dir, 'bin', 'clang-tidy') - clazybinary = os.path.join(llvm_install_dir, 'bin', 'clazy-standalone') + # clang binaries -> clang libexec clangbinary_targetdir = os.path.join(install_dir, 'libexec', 'qtcreator', 'clang', 'bin') if not os.path.exists(clangbinary_targetdir): os.makedirs(clangbinary_targetdir) - deployinfo.append((clangbinary, clangbinary_targetdir)) - deployinfo.append((clangdbinary, clangbinary_targetdir)) - deployinfo.append((clangtidybinary, clangbinary_targetdir)) - deployinfo.append((clazybinary, clangbinary_targetdir)) - # copy link target if clang is actually a symlink - if os.path.islink(clangbinary): - linktarget = os.readlink(clangbinary) - deployinfo.append((os.path.join(os.path.dirname(clangbinary), linktarget), - os.path.join(clangbinary_targetdir, linktarget))) + for binary in ['clang', 'clangd', 'clang-tidy', 'clazy-standalone']: + binary_filepath = os.path.join(llvm_install_dir, 'bin', binary) + deployinfo.append((binary_filepath, clangbinary_targetdir)) + # add link target if binary is actually a symlink (to a binary in the same directory) + if os.path.islink(binary_filepath): + linktarget = os.readlink(binary_filepath) + deployinfo.append((os.path.join(os.path.dirname(binary_filepath), linktarget), + os.path.join(clangbinary_targetdir, linktarget))) + clanglibs_targetdir = os.path.join(install_dir, 'libexec', 'qtcreator', 'clang', 'lib') + # support libraries (for clazy) -> clang libexec + if not os.path.exists(clanglibs_targetdir): + os.makedirs(clanglibs_targetdir) + for lib_pattern in ['ClazyPlugin.so', 'libclang-cpp.so*']: + for lib in glob(os.path.join(llvm_install_dir, 'lib', lib_pattern)): + deployinfo.append((lib, clanglibs_targetdir)) resourcetarget = os.path.join(install_dir, 'libexec', 'qtcreator', 'clang', 'lib', 'clang') print("copying libclang...") @@ -281,10 +285,15 @@ def deploy_libclang(install_dir, llvm_install_dir, chrpath_bin): if common.is_linux_platform(): # libclang was statically compiled, so there is no need for the RPATHs - # and they are confusing when fixing RPATHs later in the process - print("removing libclang RPATHs...") + # and they are confusing when fixing RPATHs later in the process. + # Also fix clazy-standalone RPATH. + print("fixing Clang RPATHs...") for source, target in deployinfo: - if not os.path.islink(target): + filename = os.path.basename(source) + targetfilepath = target if not os.path.isdir(target) else os.path.join(target, filename) + if filename == 'clazy-standalone': + subprocess.check_call([chrpath_bin, '-r', '$ORIGIN/../lib', targetfilepath]) + elif not os.path.islink(target): targetfilepath = target if not os.path.isdir(target) else os.path.join(target, os.path.basename(source)) subprocess.check_call([chrpath_bin, '-d', targetfilepath]) diff --git a/scripts/deployqtHelper_mac.sh b/scripts/deployqtHelper_mac.sh index 8844f8502d9..f91423accb9 100755 --- a/scripts/deployqtHelper_mac.sh +++ b/scripts/deployqtHelper_mac.sh @@ -133,6 +133,8 @@ if [ $LLVM_INSTALL_DIR ]; then mkdir -p "$libexec_path/clang/lib" cp -Rf "$LLVM_INSTALL_DIR"/lib/libclang.*dylib "$app_path/Contents/Frameworks/" || exit 1 cp -Rf "$LLVM_INSTALL_DIR"/lib/clang "$libexec_path/clang/lib/" || exit 1 + cp -Rf "$LLVM_INSTALL_DIR"/lib/libclang-cpp.dylib "$libexec_path/clang/lib/" || exit 1 + cp -Rf "$LLVM_INSTALL_DIR"/lib/ClazyPlugin.dylib "$libexec_path/clang/lib/" || exit 1 clangsource="$LLVM_INSTALL_DIR"/bin/clang clanglinktarget="$(readlink "$clangsource")" cp -Rf "$clangsource" "$libexec_path/clang/bin/" || exit 1 @@ -145,6 +147,7 @@ if [ $LLVM_INSTALL_DIR ]; then cp -Rf "$clangtidysource" "$libexec_path/clang/bin/" || exit 1 clazysource="$LLVM_INSTALL_DIR"/bin/clazy-standalone cp -Rf "$clazysource" "$libexec_path/clang/bin/" || exit 1 + install_name_tool -add_rpath "@executable_path/../lib" "$libexec_path/clang/bin/clazy-standalone" || exit 1 fi clangbackendArgument="-executable=$libexec_path/clangbackend" clangpchmanagerArgument="-executable=$libexec_path/clangpchmanagerbackend" From a065175d58c04f3919886e1e7e3d1103dac59eb1 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 15 Jul 2020 16:25:56 +0200 Subject: [PATCH 031/108] CMake build: Fix configuring with CMake 3.10 and external yaml-cpp CMake 3.10 does not allow using target_include_directories with INTERFACE on imported targets. https://gitlab.kitware.com/cmake/cmake/-/issues/15689 Fixes: QTCREATORBUG-24356 Change-Id: I2427276f0851010cda2321c45eff0628713af2ff Reviewed-by: Cristian Adam --- cmake/Findyaml-cpp.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/Findyaml-cpp.cmake b/cmake/Findyaml-cpp.cmake index 3d5828ebd8b..d8e92f070d4 100644 --- a/cmake/Findyaml-cpp.cmake +++ b/cmake/Findyaml-cpp.cmake @@ -15,7 +15,7 @@ if (yaml-cpp_FOUND) unset(yaml_cpp_include_dir CACHE) find_path(yaml_cpp_include_dir yaml-cpp/yaml.h) endif() - target_include_directories(yaml-cpp INTERFACE ${yaml_cpp_include_dir}) + set_target_properties(yaml-cpp PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${yaml_cpp_include_dir}") else() set(yaml-cpp_FOUND 1) set_package_properties(yaml-cpp PROPERTIES DESCRIPTION "using internal src/libs/3rdparty/yaml-cpp") From f905fcea71fe29aba11a8cfc0757eb089edc12d5 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 16 Jul 2020 11:15:28 +0200 Subject: [PATCH 032/108] Wizards: Fix function parameter type in CppToolsJsExtension We did not notice because the JS array was auto-converted into a string. Amends bcc2b5e08d. Change-Id: I06ee43f78cb3081bdff0a02f8d446326a01bc2d1 Reviewed-by: Eike Ziller --- src/plugins/cpptools/cpptoolsjsextension.cpp | 2 +- src/plugins/cpptools/cpptoolsjsextension.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/cpptools/cpptoolsjsextension.cpp b/src/plugins/cpptools/cpptoolsjsextension.cpp index 03a0d3df99d..fec48854657 100644 --- a/src/plugins/cpptools/cpptoolsjsextension.cpp +++ b/src/plugins/cpptools/cpptoolsjsextension.cpp @@ -121,7 +121,7 @@ QString CppToolsJsExtension::closeNamespaces(const QString &klass) const QString CppToolsJsExtension::includeStatement( const QString &fullyQualifiedClassName, const QString &suffix, - const QString &specialClasses, + const QStringList &specialClasses, const QString &pathOfIncludingFile ) { diff --git a/src/plugins/cpptools/cpptoolsjsextension.h b/src/plugins/cpptools/cpptoolsjsextension.h index 065e0ca8d5e..b026465b0c4 100644 --- a/src/plugins/cpptools/cpptoolsjsextension.h +++ b/src/plugins/cpptools/cpptoolsjsextension.h @@ -60,7 +60,7 @@ public: Q_INVOKABLE QString includeStatement( const QString &fullyQualifiedClassName, const QString &suffix, - const QString &specialClasses, + const QStringList &specialClasses, const QString &pathOfIncludingFile ); }; From 4db32606e0ef0d7d9ff88a8898fe30608fea144f Mon Sep 17 00:00:00 2001 From: Venugopal Shivashankar Date: Wed, 15 Jul 2020 12:12:35 +0200 Subject: [PATCH 033/108] Doc: Add Qt for MCUs video tutorial The youtube video demonstrates how to develop your first app on NXP i.MX RT1050 device. Change-Id: Ie706a6ff6a5395816a5ec9daef13c0baad1daf2d Reviewed-by: Eike Ziller --- src/plugins/qtsupport/qtcreator_tutorials.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/qtsupport/qtcreator_tutorials.xml b/src/plugins/qtsupport/qtcreator_tutorials.xml index a694d4cd6f9..422ddce483e 100644 --- a/src/plugins/qtsupport/qtcreator_tutorials.xml +++ b/src/plugins/qtsupport/qtcreator_tutorials.xml @@ -180,5 +180,9 @@ qt quick,ui,webos,talk,2019 + + + qtformcus,mcus,qt,talk,NXP IMXRT1050-EVKB,2020 + From 536dd779fca8503864bc64ffb8af74993a9af5d2 Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 17 Jul 2020 07:32:29 +0200 Subject: [PATCH 034/108] Core: Improve handling of long output chunks Single chunks exceeding the limit were truncated and then shown in a single line, potentially resulting in only a few chars if there was a newline close to the cut-off point. Now, don't restrict to a single line in that csae. Additionally elide in the middle, assuming this is a better compromise than truncating at either end. Also, make the truncation more obvious, and mention the amount of elided characters. Change-Id: I850e2833e7f1f8be0f584d8e4439dd1a64f851d0 Reviewed-by: Christian Kandeler --- src/plugins/coreplugin/outputwindow.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/plugins/coreplugin/outputwindow.cpp b/src/plugins/coreplugin/outputwindow.cpp index 7c05ee6630f..fb5df625111 100644 --- a/src/plugins/coreplugin/outputwindow.cpp +++ b/src/plugins/coreplugin/outputwindow.cpp @@ -408,10 +408,14 @@ void OutputWindow::handleOutputChunk(const QString &output, OutputFormat format) { QString out = output; if (out.size() > d->maxCharCount) { - // Current line alone exceeds limit, we need to cut it. - out.truncate(d->maxCharCount); - out.append("[...]"); - setMaximumBlockCount(1); + // Current chunk alone exceeds limit, we need to cut it. + const int elided = out.size() - d->maxCharCount; + out = out.left(d->maxCharCount / 2) + + "[[[... " + + tr("Elided %1 characters due to Application Output settings").arg(elided) + + " ...]]]" + + out.right(d->maxCharCount / 2); + setMaximumBlockCount(out.count('\n') + 1); } else { int plannedChars = document()->characterCount() + out.size(); if (plannedChars > d->maxCharCount) { From df0ffd8bb864049b5f25f283906c5900dd9acaed Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Wed, 15 Jul 2020 13:03:28 +0200 Subject: [PATCH 035/108] CPlusPlus: Fix handling incomplete macro invocations It looks very much as though the original author simply forgot to add that return statement. Fixes: QTCREATORBUG-23881 Change-Id: Ie93d2451bf1b491d01137285f983d657133c81c3 Reviewed-by: Christian Stenger --- src/libs/cplusplus/pp-engine.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libs/cplusplus/pp-engine.cpp b/src/libs/cplusplus/pp-engine.cpp index 107e2ed4b7b..6ce879ea53c 100644 --- a/src/libs/cplusplus/pp-engine.cpp +++ b/src/libs/cplusplus/pp-engine.cpp @@ -1557,7 +1557,8 @@ bool Preprocessor::collectActualArguments(PPToken *tk, QVector } if (!tk->is(T_RPAREN)) { - //###TODO: else error message + return false; + //###TODO: error message } return true; } From 32af4d9e70b8a5f16a48fe85dba59b4a47a2af90 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Fri, 17 Jul 2020 10:02:09 +0200 Subject: [PATCH 036/108] Fix lupdate issues Change-Id: I950d2f53fcc03ba447140f3c6957422ca40111b5 Reviewed-by: hjk --- .../android/androidmanifesteditoriconcontainerwidget.h | 4 ++++ .../baremetal/debugservers/uvsc/jlinkuvscserverprovider.cpp | 2 +- .../settings/general/generalsettingspage.h | 4 ++++ .../settings/tools/kitaspect/mesontoolkitaspect.h | 2 ++ .../settings/tools/kitaspect/ninjatoolkitaspect.h | 2 ++ .../mesonprojectmanager/settings/tools/toolssettingspage.h | 4 ++++ src/plugins/qmakeprojectmanager/qmakeprojectmanagerplugin.cpp | 2 +- src/plugins/qmldesigner/assetexporterplugin/filepathmodel.h | 2 ++ 8 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/plugins/android/androidmanifesteditoriconcontainerwidget.h b/src/plugins/android/androidmanifesteditoriconcontainerwidget.h index b155dc80af6..2e657d017ac 100644 --- a/src/plugins/android/androidmanifesteditoriconcontainerwidget.h +++ b/src/plugins/android/androidmanifesteditoriconcontainerwidget.h @@ -29,6 +29,8 @@ #include #include +#include + namespace TextEditor { class TextEditorWidget; } @@ -40,6 +42,8 @@ class AndroidManifestEditorIconWidget; class AndroidManifestEditorIconContainerWidget : public QWidget { + Q_DECLARE_TR_FUNCTIONS(Android::Internal::AndroidManifestEditorIconContainerWidget) + public: explicit AndroidManifestEditorIconContainerWidget(QWidget *parent, TextEditor::TextEditorWidget *textEditorWidget); diff --git a/src/plugins/baremetal/debugservers/uvsc/jlinkuvscserverprovider.cpp b/src/plugins/baremetal/debugservers/uvsc/jlinkuvscserverprovider.cpp index 955b285a2ef..47a27f126f0 100644 --- a/src/plugins/baremetal/debugservers/uvsc/jlinkuvscserverprovider.cpp +++ b/src/plugins/baremetal/debugservers/uvsc/jlinkuvscserverprovider.cpp @@ -177,7 +177,7 @@ bool JLinkUvscAdapterOptions::operator==(const JLinkUvscAdapterOptions &other) c JLinkUvscServerProvider::JLinkUvscServerProvider() : UvscServerProvider(Constants::UVSC_JLINK_PROVIDER_ID) { - setTypeDisplayName(tr("uVision JLink")); + setTypeDisplayName(UvscServerProvider::tr("uVision JLink")); setConfigurationWidgetCreator([this] { return new JLinkUvscServerProviderConfigWidget(this); }); setSupportedDrivers({"Segger\\JL2CM3.dll"}); } diff --git a/src/plugins/mesonprojectmanager/settings/general/generalsettingspage.h b/src/plugins/mesonprojectmanager/settings/general/generalsettingspage.h index 8b086e70f4c..bbcbe67990c 100644 --- a/src/plugins/mesonprojectmanager/settings/general/generalsettingspage.h +++ b/src/plugins/mesonprojectmanager/settings/general/generalsettingspage.h @@ -27,11 +27,15 @@ #include +#include + namespace MesonProjectManager { namespace Internal { class MesonTools; class GeneralSettingsPage final : public Core::IOptionsPage { + Q_DECLARE_TR_FUNCTIONS(MesonProjectManager::Internal::GeneralSettingsPage) + public: GeneralSettingsPage(); void saveAll(); diff --git a/src/plugins/mesonprojectmanager/settings/tools/kitaspect/mesontoolkitaspect.h b/src/plugins/mesonprojectmanager/settings/tools/kitaspect/mesontoolkitaspect.h index ea2bd8fc8b5..a35bdc083c2 100644 --- a/src/plugins/mesonprojectmanager/settings/tools/kitaspect/mesontoolkitaspect.h +++ b/src/plugins/mesonprojectmanager/settings/tools/kitaspect/mesontoolkitaspect.h @@ -33,6 +33,8 @@ namespace MesonProjectManager { namespace Internal { class MesonToolKitAspect final : public ProjectExplorer::KitAspect { + Q_DECLARE_TR_FUNCTIONS(MesonProjectManager::Internal::MesonToolKitAspect) + public: MesonToolKitAspect(); diff --git a/src/plugins/mesonprojectmanager/settings/tools/kitaspect/ninjatoolkitaspect.h b/src/plugins/mesonprojectmanager/settings/tools/kitaspect/ninjatoolkitaspect.h index 64c10c6a9ba..91863212ef0 100644 --- a/src/plugins/mesonprojectmanager/settings/tools/kitaspect/ninjatoolkitaspect.h +++ b/src/plugins/mesonprojectmanager/settings/tools/kitaspect/ninjatoolkitaspect.h @@ -33,6 +33,8 @@ namespace MesonProjectManager { namespace Internal { class NinjaToolKitAspect final : public ProjectExplorer::KitAspect { + Q_DECLARE_TR_FUNCTIONS(MesonProjectManager::Internal::NinjaToolKitAspect) + public: NinjaToolKitAspect(); diff --git a/src/plugins/mesonprojectmanager/settings/tools/toolssettingspage.h b/src/plugins/mesonprojectmanager/settings/tools/toolssettingspage.h index 66f2d3bf70e..8550f5dbd4b 100644 --- a/src/plugins/mesonprojectmanager/settings/tools/toolssettingspage.h +++ b/src/plugins/mesonprojectmanager/settings/tools/toolssettingspage.h @@ -27,11 +27,15 @@ #include +#include + namespace MesonProjectManager { namespace Internal { class MesonTools; class ToolsSettingsPage final : public Core::IOptionsPage { + Q_DECLARE_TR_FUNCTIONS(MesonProjectManager::Internal::ToolsSettingsPage) + public: ToolsSettingsPage(); }; diff --git a/src/plugins/qmakeprojectmanager/qmakeprojectmanagerplugin.cpp b/src/plugins/qmakeprojectmanager/qmakeprojectmanagerplugin.cpp index 7a896d4999f..2659b22e9e2 100644 --- a/src/plugins/qmakeprojectmanager/qmakeprojectmanagerplugin.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeprojectmanagerplugin.cpp @@ -435,7 +435,7 @@ void QmakeProjectManagerPluginPrivate::runQMakeImpl(Project *p, Node *node) if (auto *profile = dynamic_cast(node)) bc->setSubNodeBuild(profile); - BuildManager::appendStep(qs, tr("QMake")); + BuildManager::appendStep(qs, QmakeProjectManagerPlugin::tr("QMake")); bc->setSubNodeBuild(nullptr); } diff --git a/src/plugins/qmldesigner/assetexporterplugin/filepathmodel.h b/src/plugins/qmldesigner/assetexporterplugin/filepathmodel.h index 91a800c0362..0921e718641 100644 --- a/src/plugins/qmldesigner/assetexporterplugin/filepathmodel.h +++ b/src/plugins/qmldesigner/assetexporterplugin/filepathmodel.h @@ -38,6 +38,8 @@ class Project; namespace QmlDesigner { class FilePathModel : public QAbstractListModel { + Q_DECLARE_TR_FUNCTIONS(QmlDesigner::FilePathModel) + public: FilePathModel(ProjectExplorer::Project *project, QObject *parent = nullptr); ~FilePathModel() override; From c0c5773345480df8cec8d6959f89ae255eeb7d8a Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Sat, 13 Jun 2020 23:15:29 +0300 Subject: [PATCH 037/108] Git: Add new files with --intent-to-add MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sometimes the file is modified after adding it, either by Qt Creator itself or by the user. Running Diff on such a file may look strange. Instead of showing the entire file, it shows the diff since it was added with its initial content. Fixes: QTCREATORBUG-23441 Change-Id: I712cc574053f39753250685aec148d2b6d7db192 Reviewed-by: André Hartmann --- src/plugins/git/gitclient.cpp | 11 +++++++---- src/plugins/git/gitclient.h | 3 ++- src/plugins/git/gitplugin.cpp | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index 70f34604ae3..79b0ea657b0 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -1438,10 +1438,13 @@ bool GitClient::synchronousLog(const QString &workingDirectory, const QStringLis } } -bool GitClient::synchronousAdd(const QString &workingDirectory, const QStringList &files) +bool GitClient::synchronousAdd(const QString &workingDirectory, + const QStringList &files, + const QStringList &extraOptions) { - return vcsFullySynchronousExec(workingDirectory, QStringList({"add"}) + files).result - == SynchronousProcessResponse::Finished; + QStringList args{"add"}; + args += extraOptions + files; + return vcsFullySynchronousExec(workingDirectory, args).result == SynchronousProcessResponse::Finished; } bool GitClient::synchronousDelete(const QString &workingDirectory, @@ -2890,7 +2893,7 @@ bool GitClient::addAndCommit(const QString &repositoryDirectory, filesToReset.removeAll(file); filesToAdd.append(file); } else if (state == AddedFile && checked) { - QTC_ASSERT(false, continue); // these should be untracked! + filesToAdd.append(file); } else if (state == DeletedFile && checked) { filesToReset.removeAll(file); filesToRemove.append(file); diff --git a/src/plugins/git/gitclient.h b/src/plugins/git/gitclient.h index 925e7dc56c4..9588bec3663 100644 --- a/src/plugins/git/gitclient.h +++ b/src/plugins/git/gitclient.h @@ -185,7 +185,8 @@ public: bool synchronousLog(const QString &workingDirectory, const QStringList &arguments, QString *output, QString *errorMessage = nullptr, unsigned flags = 0); - bool synchronousAdd(const QString &workingDirectory, const QStringList &files); + bool synchronousAdd(const QString &workingDirectory, const QStringList &files, + const QStringList &extraOptions = {}); bool synchronousDelete(const QString &workingDirectory, bool force, const QStringList &files); diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp index aa1d36d13b9..bb7de098187 100644 --- a/src/plugins/git/gitplugin.cpp +++ b/src/plugins/git/gitplugin.cpp @@ -1859,7 +1859,7 @@ bool GitPluginPrivate::vcsOpen(const QString & /*fileName*/) bool GitPluginPrivate::vcsAdd(const QString & fileName) { const QFileInfo fi(fileName); - return m_gitClient.synchronousAdd(fi.absolutePath(), {fi.fileName()}); + return m_gitClient.synchronousAdd(fi.absolutePath(), {fi.fileName()}, {"--intent-to-add"}); } bool GitPluginPrivate::vcsDelete(const QString & fileName) From e978f59654c53fa63c3f500183a49325e02974fd Mon Sep 17 00:00:00 2001 From: David Schulz Date: Wed, 15 Jul 2020 14:57:59 +0200 Subject: [PATCH 038/108] Editor: set default text foreground color explicit Amends 9182d4eda75033bbbebf50e87e518adc33d499f6. Fixes: QTCREATORBUG-24352 Change-Id: I16171874cf2f2e9fde95b404f7510a502a39f26e Reviewed-by: Christian Stenger --- src/plugins/texteditor/fontsettingspage.cpp | 4 +++- src/plugins/texteditor/texteditorsettings.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/texteditor/fontsettingspage.cpp b/src/plugins/texteditor/fontsettingspage.cpp index 4b60642372e..56ecb8f0238 100644 --- a/src/plugins/texteditor/fontsettingspage.cpp +++ b/src/plugins/texteditor/fontsettingspage.cpp @@ -279,7 +279,9 @@ FormatDescription::FormatDescription(TextStyle id, QColor FormatDescription::defaultForeground(TextStyle id) { - if (id == C_LINE_NUMBER) { + if (id == C_TEXT) { + return Qt::black; + } else if (id == C_LINE_NUMBER) { const QPalette palette = Utils::Theme::initialPalette(); const QColor bg = palette.window().color(); if (bg.value() < 128) diff --git a/src/plugins/texteditor/texteditorsettings.cpp b/src/plugins/texteditor/texteditorsettings.cpp index 49a44639a95..e9a49cbc8aa 100644 --- a/src/plugins/texteditor/texteditorsettings.cpp +++ b/src/plugins/texteditor/texteditorsettings.cpp @@ -90,7 +90,7 @@ FormatDescriptions TextEditorSettingsPrivate::initialFormats() formatDescr.emplace_back(C_TEXT, tr("Text"), tr("Generic text and punctuation tokens.\n" "Applied to text that matched no other rule."), - Format{QColor{}, Qt::white}); + Format{Qt::black, Qt::white}); // Special categories const QPalette p = QApplication::palette(); From 014a57c76499cdbb9803dca5a6b40d4e9b4e197f Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 17 Jul 2020 09:04:53 +0200 Subject: [PATCH 039/108] Utils::Environment: Fix NameValueDictionary::diff() We missed the case where only the enabled/disabled status was different. Change-Id: Ic23e15f6843015feff2242cb67444dfa17cc5f2d Reviewed-by: hjk --- src/libs/utils/namevaluedictionary.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/utils/namevaluedictionary.cpp b/src/libs/utils/namevaluedictionary.cpp index b6218d95927..57eb2ffe995 100644 --- a/src/libs/utils/namevaluedictionary.cpp +++ b/src/libs/utils/namevaluedictionary.cpp @@ -154,7 +154,7 @@ NameValueItems NameValueDictionary::diff(const NameValueDictionary &other, bool const QString &newValue = otherIt.value().first; const bool oldEnabled = thisIt.value().second; const bool newEnabled = otherIt.value().second; - if (oldValue != newValue) { + if (oldValue != newValue || oldEnabled != newEnabled) { if (checkAppendPrepend && newValue.startsWith(oldValue) && oldEnabled == newEnabled) { QString appended = newValue.right(newValue.size() - oldValue.size()); From fed5a851100015a795be9d40924af4f1cd68eb1d Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 6 Jul 2020 15:44:37 +0200 Subject: [PATCH 040/108] Debugger: Remove name demangler Never been used, completely outdated, fails autotest. Change-Id: I2c1808b4a66e9abdb839670eeae3e5226c7246ba Reviewed-by: hjk --- src/plugins/debugger/CMakeLists.txt | 4 - src/plugins/debugger/debugger.pro | 1 - src/plugins/debugger/debugger.qbs | 11 - .../namedemangler/demanglerexceptions.h | 75 - .../namedemangler/globalparsestate.cpp | 69 - .../debugger/namedemangler/globalparsestate.h | 69 - .../debugger/namedemangler/namedemangler.cpp | 116 - .../debugger/namedemangler/namedemangler.h | 71 - .../debugger/namedemangler/namedemangler.pri | 10 - .../debugger/namedemangler/parsetreenodes.cpp | 3138 ----------------- .../debugger/namedemangler/parsetreenodes.h | 830 ----- tests/auto/debugger/CMakeLists.txt | 9 - tests/auto/debugger/debugger.pro | 2 - tests/auto/debugger/debugger.qbs | 1 - tests/auto/debugger/namedemangler.pro | 10 - tests/auto/debugger/namedemangler.qbs | 18 - tests/auto/debugger/tst_namedemangler.cpp | 616 ---- 17 files changed, 5050 deletions(-) delete mode 100644 src/plugins/debugger/namedemangler/demanglerexceptions.h delete mode 100644 src/plugins/debugger/namedemangler/globalparsestate.cpp delete mode 100644 src/plugins/debugger/namedemangler/globalparsestate.h delete mode 100644 src/plugins/debugger/namedemangler/namedemangler.cpp delete mode 100644 src/plugins/debugger/namedemangler/namedemangler.h delete mode 100644 src/plugins/debugger/namedemangler/namedemangler.pri delete mode 100644 src/plugins/debugger/namedemangler/parsetreenodes.cpp delete mode 100644 src/plugins/debugger/namedemangler/parsetreenodes.h delete mode 100644 tests/auto/debugger/namedemangler.pro delete mode 100644 tests/auto/debugger/namedemangler.qbs delete mode 100644 tests/auto/debugger/tst_namedemangler.cpp diff --git a/src/plugins/debugger/CMakeLists.txt b/src/plugins/debugger/CMakeLists.txt index 025125a1a57..bc05b7dbb19 100644 --- a/src/plugins/debugger/CMakeLists.txt +++ b/src/plugins/debugger/CMakeLists.txt @@ -58,10 +58,6 @@ add_qtc_plugin(Debugger logwindow.cpp logwindow.h memoryagent.cpp memoryagent.h moduleshandler.cpp moduleshandler.h - namedemangler/demanglerexceptions.h - namedemangler/globalparsestate.cpp namedemangler/globalparsestate.h - namedemangler/namedemangler.cpp namedemangler/namedemangler.h - namedemangler/parsetreenodes.cpp namedemangler/parsetreenodes.h outputcollector.cpp outputcollector.h pdb/pdbengine.cpp pdb/pdbengine.h peripheralregisterhandler.cpp peripheralregisterhandler.h diff --git a/src/plugins/debugger/debugger.pro b/src/plugins/debugger/debugger.pro index ec492d859fa..14fe9796fed 100644 --- a/src/plugins/debugger/debugger.pro +++ b/src/plugins/debugger/debugger.pro @@ -135,7 +135,6 @@ include(pdb/pdb.pri) include(lldb/lldb.pri) include(uvsc/uvsc.pri) include(qml/qml.pri) -include(namedemangler/namedemangler.pri) include(console/console.pri) include(analyzer/analyzer.pri) diff --git a/src/plugins/debugger/debugger.qbs b/src/plugins/debugger/debugger.qbs index 2c624a34791..a50a2b48cfe 100644 --- a/src/plugins/debugger/debugger.qbs +++ b/src/plugins/debugger/debugger.qbs @@ -138,17 +138,6 @@ Project { ] } - Group { - name: "Name Demangler" - prefix: "namedemangler/" - files: [ - "demanglerexceptions.h", - "globalparsestate.cpp", "globalparsestate.h", - "namedemangler.cpp", "namedemangler.h", - "parsetreenodes.cpp", "parsetreenodes.h", - ] - } - Group { name: "QML Debugger" prefix: "qml/" diff --git a/src/plugins/debugger/namedemangler/demanglerexceptions.h b/src/plugins/debugger/namedemangler/demanglerexceptions.h deleted file mode 100644 index aa03d80e4f9..00000000000 --- a/src/plugins/debugger/namedemangler/demanglerexceptions.h +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -****************************************************************************/ - -#pragma once - -#include -#include -#include - -namespace Debugger { -namespace Internal { - -class ParseTreeNode; - -class ParseException -{ -public: - ParseException(const QString &error) : error(error) {} - - const QString error; -}; - -class InternalDemanglerException -{ -public: - InternalDemanglerException(const QString &func, const QString &file, int line) - : func(func), file(file), line(line) {} - - QString func; - QString file; - int line; -}; - -#define DEMANGLER_ASSERT(cond) \ - do { \ - if (!(cond)) { \ - throw InternalDemanglerException(Q_FUNC_INFO, __FILE__, __LINE__); \ - } \ - } while (0) - -template QSharedPointer demanglerCast(const QSharedPointer &node, - const QString &func, const QString &file, int line) -{ - const QSharedPointer out = node.dynamicCast(); - if (!out) - throw InternalDemanglerException(func, file, line); - return out; -} - -#define DEMANGLER_CAST(type, input) demanglerCast(input, Q_FUNC_INFO, __FILE__, __LINE__) - -} // namespace Internal -} // namespace Debugger diff --git a/src/plugins/debugger/namedemangler/globalparsestate.cpp b/src/plugins/debugger/namedemangler/globalparsestate.cpp deleted file mode 100644 index 25e019816af..00000000000 --- a/src/plugins/debugger/namedemangler/globalparsestate.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -****************************************************************************/ - -#include "globalparsestate.h" - -#include "demanglerexceptions.h" -#include "parsetreenodes.h" - -namespace Debugger { -namespace Internal { - -char GlobalParseState::peek(int ahead) -{ - Q_ASSERT(m_pos >= 0); - if (m_pos + ahead < m_mangledName.size()) - return m_mangledName[m_pos + ahead]; - return eoi; -} - -char GlobalParseState::advance(int steps) -{ - Q_ASSERT(steps > 0); - if (m_pos + steps > m_mangledName.size()) - throw ParseException("Unexpected end of input"); - - const char c = m_mangledName[m_pos]; - m_pos += steps; - return c; -} - -QByteArray GlobalParseState::readAhead(int charCount) const -{ - QByteArray str; - if (m_pos + charCount <= m_mangledName.size()) - str = m_mangledName.mid(m_pos, charCount); - else - str.fill(eoi, charCount); - return str; -} - -void GlobalParseState::addSubstitution(const QSharedPointer &node) -{ - m_substitutions << node->clone(); -} - -} // namespace Internal -} // namespace Debugger diff --git a/src/plugins/debugger/namedemangler/globalparsestate.h b/src/plugins/debugger/namedemangler/globalparsestate.h deleted file mode 100644 index 2544c78d739..00000000000 --- a/src/plugins/debugger/namedemangler/globalparsestate.h +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -****************************************************************************/ - -#pragma once - -#include -#include -#include - -namespace Debugger { -namespace Internal { -class NameDemanglerPrivate; -class ParseTreeNode; - -class GlobalParseState -{ - friend class NameDemanglerPrivate; -public: - char peek(int ahead = 0); - char advance(int steps = 1); - QByteArray readAhead(int charCount) const; - - int stackElementCount() const { return m_parseStack.count(); } - QSharedPointer stackTop() const { return m_parseStack.top(); } - QSharedPointer stackElementAt(int index) const { return m_parseStack.at(index); } - void pushToStack(const QSharedPointer &node) { m_parseStack.push(node); } - QSharedPointer popFromStack() { return m_parseStack.pop(); } - - int substitutionCount() const { return m_substitutions.count(); } - QSharedPointer substitutionAt(int index) const { return m_substitutions.at(index); } - void addSubstitution(const QSharedPointer &node); - - int templateParamCount() const { return m_templateParams.count(); } - QSharedPointer templateParamAt(int index) const { return m_templateParams.at(index); } - void addTemplateParam(const QSharedPointer &node) { m_templateParams << node; } -private: - int m_pos = 0; - QByteArray m_mangledName; - QList > m_substitutions; - QList > m_templateParams; - QStack > m_parseStack; - - static const char eoi = '$'; -}; - -} // namespace Internal -} // namespace Debugger diff --git a/src/plugins/debugger/namedemangler/namedemangler.cpp b/src/plugins/debugger/namedemangler/namedemangler.cpp deleted file mode 100644 index 9041543fd0a..00000000000 --- a/src/plugins/debugger/namedemangler/namedemangler.cpp +++ /dev/null @@ -1,116 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -****************************************************************************/ - -#include "namedemangler.h" - -#include "demanglerexceptions.h" -#include "parsetreenodes.h" - -#include - -namespace Debugger { -namespace Internal { - -class NameDemanglerPrivate -{ -public: - bool demangle(const QString &mangledName); - const QString &errorString() const { return m_errorString; } - const QString &demangledName() const { return m_demangledName; } - -private: - GlobalParseState m_parseState; - QString m_errorString; - QString m_demangledName; -}; - - -bool NameDemanglerPrivate::demangle(const QString &mangledName) -{ - bool success; - try { - m_parseState.m_mangledName = mangledName.toLatin1(); - m_parseState.m_pos = 0; - m_demangledName.clear(); - - if (!MangledNameRule::mangledRepresentationStartsWith(m_parseState.peek())) { - m_demangledName = QLatin1String(m_parseState.m_mangledName); - return true; - } - - MangledNameRule::parse(&m_parseState, ParseTreeNode::Ptr()); - if (m_parseState.m_pos != m_parseState.m_mangledName.size()) - throw ParseException("Unconsumed input"); - if (m_parseState.m_parseStack.count() != 1) { - throw ParseException(QString::fromLatin1("There are %1 elements on the parse stack; " - "expected one.").arg(m_parseState.m_parseStack.count())); - } - - // Uncomment for debugging. - //m_parseState.stackTop()->print(0); - - m_demangledName = QLatin1String(m_parseState.stackTop()->toByteArray()); - success = true; - } catch (const ParseException &p) { - m_errorString = QString::fromLatin1("Parse error at index %1 of mangled name \"%2\": %3.") - .arg(m_parseState.m_pos).arg(mangledName, p.error); - success = false; - } catch (const InternalDemanglerException &e) { - m_errorString = QString::fromLatin1("Internal demangler error at function %1, file %2, " - "line %3").arg(e.func, e.file).arg(e.line); - success = false; - } - - m_parseState.m_parseStack.clear(); - m_parseState.m_substitutions.clear(); - m_parseState.m_templateParams.clear(); - return success; -} - - -NameDemangler::NameDemangler() : d(new NameDemanglerPrivate) { } - -NameDemangler::~NameDemangler() -{ - delete d; -} - -bool NameDemangler::demangle(const QString &mangledName) -{ - return d->demangle(mangledName); -} - -QString NameDemangler::errorString() const -{ - return d->errorString(); -} - -QString NameDemangler::demangledName() const -{ - return d->demangledName(); -} - -} // namespace Internal -} // namespace Debugger diff --git a/src/plugins/debugger/namedemangler/namedemangler.h b/src/plugins/debugger/namedemangler/namedemangler.h deleted file mode 100644 index 9e57e5fba92..00000000000 --- a/src/plugins/debugger/namedemangler/namedemangler.h +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -****************************************************************************/ - -#pragma once - -#include - -QT_BEGIN_NAMESPACE -class QString; -QT_END_NAMESPACE - -namespace Debugger { -namespace Internal { - -class NameDemanglerPrivate; - -class NameDemangler -{ -public: - NameDemangler(); - ~NameDemangler(); - - /* - * Demangles a mangled name. Also accepts a non-demangled name, - * in which case it is not transformed. - * Returns true <=> the name is not mangled or it is mangled correctly - * according to the specification. - */ - bool demangle(const QString &mangledName); - - /* - * A textual description of the error encountered, if there was one. - * Only valid if demangle() returned false. - */ - QString errorString() const; - - /* - * The demangled name. If the original name was not mangled, this - * is identical to the input. - * Only valid if demangle() returned true. - */ - QString demangledName() const; - -private: - NameDemanglerPrivate *d; -}; - -} // namespace Internal -} // namespace Debugger diff --git a/src/plugins/debugger/namedemangler/namedemangler.pri b/src/plugins/debugger/namedemangler/namedemangler.pri deleted file mode 100644 index 92083e82148..00000000000 --- a/src/plugins/debugger/namedemangler/namedemangler.pri +++ /dev/null @@ -1,10 +0,0 @@ -HEADERS += \ - $$PWD/namedemangler.h \ - $$PWD/parsetreenodes.h \ - $$PWD/demanglerexceptions.h \ - $$PWD/globalparsestate.h - -SOURCES += \ - $$PWD/namedemangler.cpp \ - $$PWD/parsetreenodes.cpp \ - $$PWD/globalparsestate.cpp diff --git a/src/plugins/debugger/namedemangler/parsetreenodes.cpp b/src/plugins/debugger/namedemangler/parsetreenodes.cpp deleted file mode 100644 index a84c1361644..00000000000 --- a/src/plugins/debugger/namedemangler/parsetreenodes.cpp +++ /dev/null @@ -1,3138 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -****************************************************************************/ - -#include "parsetreenodes.h" - -#include "demanglerexceptions.h" - -#include -#include -#include - -#define PEEK() (parseState()->peek()) -#define ADVANCE() (parseState()->advance()) - -#define PARSE_RULE_AND_ADD_RESULT_AS_CHILD_TO_NODE(NodeType, parseState, parentNode) \ - do { \ - ParseTreeNode::parseRule(parseState); \ - DEMANGLER_ASSERT(parseState->stackElementCount() > 0); \ - DEMANGLER_ASSERT(parseState->stackTop().dynamicCast()); \ - if (parentNode) \ - (parentNode)->addChild(parseState->popFromStack()); \ - } while (0) - -#define PARSE_RULE_AND_ADD_RESULT_AS_CHILD_TO_THIS(NodeType, parseState) \ - do { \ - ParseTreeNode::parseRule(parseState); \ - DEMANGLER_ASSERT(parseState->stackElementCount() > 0); \ - DEMANGLER_ASSERT(parseState->stackTop().dynamicCast()); \ - addChild(parseState->popFromStack()); \ - } while (0) - - -#define PARSE_RULE_AND_ADD_RESULT_AS_CHILD(nodeType) \ - PARSE_RULE_AND_ADD_RESULT_AS_CHILD_TO_THIS(nodeType, parseState()) -#define CHILD_AT(obj, index) obj->childAt(index, Q_FUNC_INFO, __FILE__, __LINE__) -#define MY_CHILD_AT(index) CHILD_AT(this, index) -#define CHILD_TO_BYTEARRAY(index) MY_CHILD_AT(index)->toByteArray() - -namespace Debugger { -namespace Internal { - -template static int getNonNegativeNumber(GlobalParseState *parseState) -{ - ParseTreeNode::parseRule >(parseState); - const typename NonNegativeNumberNode::Ptr numberNode - = DEMANGLER_CAST(NonNegativeNumberNode, parseState->popFromStack()); - const int value = static_cast(numberNode->number()); - return value; -} - -ParseTreeNode::ParseTreeNode(const ParseTreeNode &other) : m_parseState(other.m_parseState) -{ - for (const ParseTreeNode::Ptr &child : other.m_children) - addChild(child->clone()); -} - -ParseTreeNode::~ParseTreeNode() = default; - -ParseTreeNode::Ptr ParseTreeNode::childAt(int i, const QString &func, const QString &file, - int line) const -{ - if (i < 0 || i >= m_children.count()) - throw InternalDemanglerException(func, file, line); - return m_children.at(i); -} - -QByteArray ParseTreeNode::pasteAllChildren() const -{ - QByteArray repr; - for (const ParseTreeNode::Ptr &node : m_children) - repr += node->toByteArray(); - return repr; -} - -void ParseTreeNode::print(int indentation) const -{ - for (int i = 0; i < indentation; ++i) - std::cerr << ' '; - std::cerr << description().constData() << std::endl; - for (const ParseTreeNode::Ptr &n : m_children) - n->print(indentation + 2); -} - -QByteArray ParseTreeNode::bool2String(bool b) const -{ - return b ? "true" : "false"; -} - -bool ArrayTypeNode::mangledRepresentationStartsWith(char c) -{ - return c == 'A'; -} - -/* - * ::= A _ - * ::= A [] _ - * Note that can also start with a number, so we have to do a non-constant look-ahead. - */ -void ArrayTypeNode::parse() -{ - if (!ArrayTypeNode::mangledRepresentationStartsWith(ADVANCE())) - throw ParseException(QString::fromLatin1("Invalid array-type")); - - bool isNumber = NonNegativeNumberNode<10>::mangledRepresentationStartsWith(PEEK()); - int i = 1; - while (isNumber) { - const char next = parseState()->peek(i); - if (next == '_') - break; - if (!std::isdigit(parseState()->peek(i))) - isNumber = false; - ++i; - } - if (isNumber) - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(NonNegativeNumberNode<10>); - else if (ExpressionNode::mangledRepresentationStartsWith(PEEK())) - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(ExpressionNode); - - if (ADVANCE() != '_') - throw ParseException(QString::fromLatin1("Invalid array-type")); - - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TypeNode); -} - -QByteArray ArrayTypeNode::toByteArray() const -{ - // Note: This is not used for things like "reference to array", which need to - // combine the child nodes in a different way at a higher level. - return CHILD_TO_BYTEARRAY(1) + '[' + CHILD_TO_BYTEARRAY(0) + ']'; -} - - -BareFunctionTypeNode::BareFunctionTypeNode(GlobalParseState *parseState) - : ParseTreeNode(parseState) -{ -} - -BareFunctionTypeNode::BareFunctionTypeNode(const BareFunctionTypeNode &other) - : ParseTreeNode(other), m_hasReturnType(other.hasReturnType()) -{ -} - -bool BareFunctionTypeNode::mangledRepresentationStartsWith(char c) -{ - return TypeNode::mangledRepresentationStartsWith(c); -} - -/* ::= + */ -void BareFunctionTypeNode::parse() -{ - /* - * The following is verbatim from the spec: - * Whether the mangling of a function type includes the return type depends on the context - * and the nature of the function. The rules for deciding whether the return type is included - * are: - * (1) Template functions (names or types) have return types encoded, with the exceptions - * listed below. - * (2) Function types not appearing as part of a function name mangling, e.g. parameters, - * pointer types, etc., have return type encoded, with the exceptions listed below. - * (3) Non-template function names do not have return types encoded. - * The exceptions mentioned in (1) and (2) above, for which the return type is never included, - * are constructors, destructors and conversion operator functions, e.g. operator int. - */ - const EncodingNode::Ptr encodingNode = parseState()->stackElementAt(parseState() - ->stackElementCount() - 2).dynamicCast(); - if (encodingNode) { // Case 1: Function name. - const NameNode::Ptr nameNode = DEMANGLER_CAST(NameNode, CHILD_AT(encodingNode, 0)); - m_hasReturnType = nameNode->isTemplate() - && !nameNode->isConstructorOrDestructorOrConversionOperator(); - } else { // Case 2: function type. - // TODO: What do the exceptions look like for this case? - m_hasReturnType = true; - } - - do - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TypeNode); - while (TypeNode::mangledRepresentationStartsWith(PEEK())); -} - -QByteArray BareFunctionTypeNode::description() const -{ - QByteArray desc = "BareFunctionType"; - if (m_hasReturnType) - desc += "[with return type]"; - else - desc += "[without return type]"; - return desc; -} - -QByteArray BareFunctionTypeNode::toByteArray() const -{ - // This is only the parameter list, including parentheses. Where the return type is placed - // must be decided at a higher level. - QByteArray repr = "("; - for (int i = m_hasReturnType ? 1 : 0; i < childCount(); ++i) { - const QByteArray paramRepr = CHILD_TO_BYTEARRAY(i); - if (paramRepr != "void") - repr += paramRepr; - if (i < childCount() - 1) - repr += ", "; - } - return repr += ')'; -} - - -BuiltinTypeNode::BuiltinTypeNode(const BuiltinTypeNode &other) - : ParseTreeNode(other), m_type(other.type()) -{ -} - -bool BuiltinTypeNode::mangledRepresentationStartsWith(char c) -{ - return std::strchr("vwbcahstijlmxynofgedzDu", c); -} - -/* - * ::= v # void - * ::= w # wchar_t - * ::= b # bool - * ::= c # char - * ::= a # signed char - * ::= h # unsigned char - * ::= s # short - * ::= t # unsigned short - * ::= i # int - * ::= j # unsigned int - * ::= l # long - * ::= m # unsigned long - * ::= x # long long, __int64 - * ::= y # unsigned long long, __int64 - * ::= n # __int128 - * ::= o # unsigned __int128 - * ::= f # float - * ::= d # double - * ::= e # long double, __float80 - * ::= g # __float128 - * ::= z # ellipsis - * ::= Dd # IEEE 754r decimal floating point (64 bits) - * ::= De # IEEE 754r decimal floating point (128 bits) - * ::= Df # IEEE 754r decimal floating point (32 bits) - * ::= Dh # IEEE 754r half-precision floating point (16 bits) - * ::= Di # char32_t - * ::= Ds # char16_t - * ::= Da # auto (in dependent new-expressions) - * ::= Dn # std::nullptr_t (i.e., decltype(nullptr)) - * ::= u # vendor extended type - */ -void BuiltinTypeNode::parse() -{ - const char next = ADVANCE(); - if (next == 'u') { - m_type = VendorType; - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(SourceNameNode); - parseState()->addSubstitution(parseState()->stackTop()); - return; - } - - switch (next) { - case 'v': m_type = VoidType; break; - case 'w': m_type = WCharType; break; - case 'b': m_type = BoolType; break; - case 'c': m_type = PlainCharType; break; - case 'a': m_type = SignedCharType; break; - case 'h': m_type = UnsignedCharType; break; - case 's': m_type = SignedShortType; break; - case 't': m_type = UnsignedShortType; break; - case 'i': m_type = SignedIntType; break; - case 'j': m_type = UnsignedIntType; break; - case 'l': m_type = SignedLongType; break; - case 'm': m_type = UnsignedLongType; break; - case 'x': m_type = SignedLongLongType; break; - case 'y': m_type = UnsignedLongLongType; break; - case 'n': m_type = SignedInt128Type; break; - case 'o': m_type = UnsignedInt128Type; break; - case 'f': m_type = FloatType; break; - case 'd': m_type = DoubleType; break; - case 'e': m_type = LongDoubleType; break; - case 'g': m_type = Float128Type; break; - case 'z': m_type = EllipsisType; break; - case 'D': - switch (ADVANCE()) { - case 'd': - m_type = DecimalFloatingType64; - break; - case 'e': - m_type = DecimalFloatingType128; - break; - case 'f': - m_type = DecimalFloatingType32; - break; - case 'h': - m_type = DecimalFloatingType16; break; - case 'i': m_type = Char32Type; break; - case 's': m_type = Char16Type; break; - case 'a': m_type = AutoType; break; - case 'n': m_type = NullPtrType; break; - default: throw ParseException(QString::fromLatin1("Invalid built-in type")); - } - break; - default: - DEMANGLER_ASSERT(false); - } -} - -QByteArray BuiltinTypeNode::description() const -{ - return "BuiltinType[" + toByteArray() + ']'; -} - -QByteArray BuiltinTypeNode::toByteArray() const -{ - switch (m_type) { - case VoidType: return "void"; - case WCharType: return "wchar_t"; - case BoolType: return "bool"; - case PlainCharType: return "char"; - case SignedCharType: return "signed char"; - case UnsignedCharType: return "unsigned char"; - case SignedShortType: return "signed short"; - case UnsignedShortType: return "unsigned short"; - case SignedIntType: return "int"; - case UnsignedIntType: return "unsigned int"; - case SignedLongType: return "long"; - case UnsignedLongType: return "unsigned long"; - case SignedLongLongType: return "long long"; - case UnsignedLongLongType: return "unsigned long long"; - case SignedInt128Type: return "__int128"; - case UnsignedInt128Type: return "unsigned __int128"; - case FloatType: return "float"; - case DoubleType: return "double"; - case LongDoubleType: return "long double"; - case Float128Type: return "__float128"; - case EllipsisType: return "..."; - case DecimalFloatingType16: return "[IEEE 754r half-precision floating point]"; - case DecimalFloatingType32: return "[IEEE 754r decimal floating point (32 bits)]"; - case DecimalFloatingType64: return "[IEEE 754r decimal floating point (64 bits)]"; - case DecimalFloatingType128: return "[IEEE 754r decimal floating point (128 bits)]"; - case Char32Type: return "char32_t"; - case Char16Type: return "char16_t"; - case AutoType: return "auto"; - case NullPtrType: return "std::nullptr_t"; - case VendorType: return CHILD_TO_BYTEARRAY(0); - } - - DEMANGLER_ASSERT(false); - return QByteArray(); -} - - -bool CallOffsetRule::mangledRepresentationStartsWith(char c) -{ - return c == 'h' || c == 'v'; -} - -/* - * ::= h _ - * ::= v _ - */ -void CallOffsetRule::parse(GlobalParseState *parseState) -{ - const ParseTreeNode::Ptr parentNode = parseState->stackTop(); - switch (parseState->advance()) { - case 'h': PARSE_RULE_AND_ADD_RESULT_AS_CHILD_TO_NODE(NvOffsetNode, parseState, parentNode); break; - case 'v': PARSE_RULE_AND_ADD_RESULT_AS_CHILD_TO_NODE(VOffsetNode, parseState, parentNode); break; - default: DEMANGLER_ASSERT(false); - } - if (parseState->advance() != '_') - throw ParseException(QString::fromLatin1("Invalid call-offset")); -} - -bool ClassEnumTypeRule::mangledRepresentationStartsWith(char c) -{ - /* - * The first set of is much smaller than - * the grammar claims. - * firstSetClassEnumType = firstSetName; - */ - return NonNegativeNumberNode<10>::mangledRepresentationStartsWith(c) - || c == 'N' || c == 'D' || c == 'Z'; -} - -/* ::= */ -void ClassEnumTypeRule::parse(GlobalParseState *parseState) -{ - PARSE_RULE_AND_ADD_RESULT_AS_CHILD_TO_NODE(NameNode, parseState, parseState->stackTop()); -} - - -bool DiscriminatorRule::mangledRepresentationStartsWith(char c) -{ - return c == '_'; -} - -/* - * - * := _ # when number < 10 - * := __ _ # when number >= 10 - */ -void DiscriminatorRule::parse(GlobalParseState *parseState) -{ - if (parseState->advance() != '_') - throw ParseException(QString::fromLatin1("Invalid discriminator")); - bool ge10 = false; - if (parseState->peek() == '_') { - ge10 = true; - parseState->advance(); - } - const ParseTreeNode::Ptr parentNode = parseState->stackTop(); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD_TO_NODE(NonNegativeNumberNode<10>, parseState, parentNode); - const NonNegativeNumberNode<10>::Ptr number - = DEMANGLER_CAST(NonNegativeNumberNode<10>, CHILD_AT(parentNode, parentNode->childCount() - 1)); - if ((ge10 && number->number() < 10) || (!ge10 && number->number() >= 10)) - throw ParseException(QString::fromLatin1("Invalid discriminator")); - if (ge10 && parseState->advance() != '_') - throw ParseException(QString::fromLatin1("Invalid discriminator")); -} - - -CtorDtorNameNode::CtorDtorNameNode(const CtorDtorNameNode &other) = default; - -bool CtorDtorNameNode::mangledRepresentationStartsWith(char c) -{ - return c == 'C' || c == 'D'; -} - -/* - * ::= C1 # complete object constructor - * ::= C2 # base object constructor - * ::= C3 # complete object allocating constructor - * ::= D0 # deleting destructor - * ::= D1 # complete object destructor - * ::= D2 # base object destructor - */ -void CtorDtorNameNode::parse() -{ - switch (ADVANCE()) { - case 'C': - switch (ADVANCE()) { - case '1': case '2': case '3': m_isDestructor = false; break; - default: throw ParseException(QString::fromLatin1("Invalid ctor-dtor-name")); - } - break; - case 'D': - switch (ADVANCE()) { - case '0': case '1': case '2': m_isDestructor = true; break; - default: throw ParseException(QString::fromLatin1("Invalid ctor-dtor-name")); - } - break; - default: - throw ParseException(QString::fromLatin1("Invalid ctor-dtor-name")); - } - - m_representation = parseState()->substitutionAt(parseState()->substitutionCount() - 1)->toByteArray(); -} - -QByteArray CtorDtorNameNode::description() const -{ - return "CtorDtor[isDestructor:" + bool2String(m_isDestructor) - + ";repr=" + m_representation + ']'; -} - -QByteArray CtorDtorNameNode::toByteArray() const -{ - QByteArray repr = m_representation; - const int templateArgStart = repr.indexOf('<'); - if (templateArgStart != -1) - repr.truncate(templateArgStart); - const int prefixEnd = repr.lastIndexOf("::"); - if (prefixEnd != -1) - repr.remove(0, prefixEnd + 2); - if (m_isDestructor) - repr.prepend('~'); - return repr; -} - - -CvQualifiersNode::CvQualifiersNode(GlobalParseState *parseState) - : ParseTreeNode(parseState) -{ -} - -CvQualifiersNode::CvQualifiersNode(const CvQualifiersNode &other) = default; - -bool CvQualifiersNode::mangledRepresentationStartsWith(char c) -{ - return c == 'K' || c == 'V' || c == 'r'; -} - -/* ::= [r] [V] [K] # restrict (C99), volatile, const */ -void CvQualifiersNode::parse() -{ - while (true) { - if (PEEK() == 'V') { - if (hasQualifiers()) - throw ParseException("Invalid qualifiers: unexpected 'volatile'"); - m_hasVolatile = true; - ADVANCE(); - } else if (PEEK() == 'K') { - if (m_hasConst) - throw ParseException("Invalid qualifiers: 'const' appears twice"); - m_hasConst = true; - ADVANCE(); - } else { - break; - } - } -} - -QByteArray CvQualifiersNode::toByteArray() const -{ - QByteArray repr; - if (m_hasConst) - repr = "const"; - if (m_hasVolatile) { - if (m_hasConst) - repr +=' '; - repr += "volatile"; - } - return repr; -} - - -bool EncodingNode::mangledRepresentationStartsWith(char c) -{ - return NameNode::mangledRepresentationStartsWith(c) - || SpecialNameNode::mangledRepresentationStartsWith(c); -} - -/* - * ::= - * ::= - * ::= - */ -void EncodingNode::parse() -{ - const char next = PEEK(); - if (NameNode::mangledRepresentationStartsWith(next)) { - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(NameNode); - if (BareFunctionTypeNode::mangledRepresentationStartsWith(PEEK())) - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(BareFunctionTypeNode); - parseState()->addSubstitution(parseState()->stackTop()); - } else if (SpecialNameNode::mangledRepresentationStartsWith(next)) { - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(SpecialNameNode); - } else { - throw ParseException(QString::fromLatin1("Invalid encoding")); - } -} - -QByteArray EncodingNode::toByteArray() const -{ - if (childCount() == 1) - return CHILD_TO_BYTEARRAY(0); - - const ParseTreeNode::Ptr firstChild = MY_CHILD_AT(0); - const NameNode::Ptr nameNode = firstChild.dynamicCast(); - const CvQualifiersNode::Ptr cvQualifiersNode - = nameNode ? nameNode->cvQualifiers() : CvQualifiersNode::Ptr(); - - QByteArray repr; - const BareFunctionTypeNode::Ptr funcNode = DEMANGLER_CAST(BareFunctionTypeNode, MY_CHILD_AT(1)); - if (funcNode->hasReturnType()) - repr = CHILD_AT(funcNode, 0)->toByteArray() + ' '; - if (cvQualifiersNode && cvQualifiersNode->hasQualifiers()) { - return repr + firstChild->toByteArray() + funcNode->toByteArray() + ' ' - + cvQualifiersNode->toByteArray(); - } - return repr + firstChild->toByteArray() + funcNode->toByteArray(); -} - - -ExpressionNode::ExpressionNode(GlobalParseState *parseState) - : ParseTreeNode(parseState), m_type(OtherType) -{ -} - -ExpressionNode::ExpressionNode(const ExpressionNode &other) = default; - -bool ExpressionNode::mangledRepresentationStartsWith(char c) -{ - return OperatorNameNode::mangledRepresentationStartsWith(c) - || TemplateParamNode::mangledRepresentationStartsWith(c) - || FunctionParamNode::mangledRepresentationStartsWith(c) - || ExprPrimaryNode::mangledRepresentationStartsWith(c) - || UnresolvedNameNode::mangledRepresentationStartsWith(c) - || c == 'c' || c == 's' || c == 'a' || c == 'd' || c == 't'; -} - -/* - * ::= - * ::= - * ::= - * ::= cl + E # call - * ::= cv expression # conversion with one argument - * ::= cv _ * E # conversion with a different number of arguments - * ::= [gs] nw * _ E # new (expr-list) type - * ::= [gs] nw * _ # new (expr-list) type (init) - * ::= [gs] na * _ E # new[] (expr-list) type - * ::= [gs] na * _ # new[] (expr-list) type (init) - * ::= [gs] dl # delete expression - * ::= [gs] da # delete[] expression - * ::= pp_ # prefix ++ - * ::= mm_ # prefix -- - * ::= ti # typeid (type) - * ::= te # typeid (expression) - * ::= dc # dynamic_cast (expression) - * ::= sc # static_cast (expression) - * ::= cc # const_cast (expression) - * ::= rc # reinterpret_cast (expression) - * ::= st # sizeof (a type) - * ::= at # alignof (a type) - * ::= - * ::= - * ::= dt # expr.name - * ::= pt # expr->name - * ::= ds # expr.*expr - * ::= sZ # size of a parameter pack - * ::= sp # pack expansion - * ::= sZ # size of a function parameter pack - * ::= tw # throw expression - * ::= tr # throw with no operand (rethrow) - * ::= # f(p), N::f(p), ::f(p), - * # freestanding dependent name (e.g., T::x), - * ::= - */ -void ExpressionNode::parse() -{ - /* - * Some of the terminals in the productions of - * also appear in the productions of . The direct - * productions have higher precedence and are checked first to prevent - * erroneous parsing by the operator rule. - */ - QByteArray str = parseState()->readAhead(2); - if (str == "cl") { - parseState()->advance(2); - do - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(ExpressionNode); - while (ExpressionNode::mangledRepresentationStartsWith(PEEK())); - if (ADVANCE() != 'E') - throw ParseException(QString::fromLatin1("Invalid expression")); - } else if (str == "cv") { - m_type = ConversionType; - parseState()->advance(2); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TypeNode); - if (PEEK() == '_') { - ADVANCE(); - while (ExpressionNode::mangledRepresentationStartsWith(PEEK())) - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(ExpressionNode); - if (ADVANCE() != 'E') - throw ParseException(QString::fromLatin1("Invalid expression")); - } else { - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(ExpressionNode); - } - } else if (str == "nw" || str == "na" - || parseState()->readAhead(4) == "gsnw" || parseState()->readAhead(4) == "gsna") { - if (str == "gs") { - m_globalNamespace = true; - parseState()->advance(2); - } - m_type = parseState()->readAhead(2) == "nw" ? NewType : ArrayNewType; - parseState()->advance(2); - while (ExpressionNode::mangledRepresentationStartsWith(PEEK())) - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(ExpressionNode); - if (ADVANCE() != '_') - throw ParseException("Invalid expression"); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TypeNode); - if (PEEK() == 'E') - ADVANCE(); - else - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(InitializerNode); - } else if (str == "dl" || str == "da" || parseState()->readAhead(4) == "gsdl" - || parseState()->readAhead(4) == "gsda") { - if (str == "gs") { - m_globalNamespace = true; - parseState()->advance(2); - } - m_type = parseState()->readAhead(2) == "dl" ? DeleteType : ArrayDeleteType; - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(ExpressionNode); - } else if (parseState()->readAhead(3) == "pp_") { - m_type = PrefixIncrementType; - parseState()->advance(3); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(ExpressionNode); - } else if (parseState()->readAhead(3) == "mm_") { - m_type = PrefixDecrementType; - parseState()->advance(3); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(ExpressionNode); - } else if (str == "ti") { - m_type = TypeIdTypeType; - parseState()->advance(2); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TypeNode); - } else if (str == "te") { - m_type = TypeIdExpressionType; - parseState()->advance(2); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(ExpressionNode); - } else if (str == "dc" || str == "sc" || str == "cc" || str == "rc") { - m_type = str == "dc" ? DynamicCastType : str == "sc" ? StaticCastType : str == "cc" - ? ConstCastType : ReinterpretCastType; - parseState()->advance(2); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TypeNode); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(ExpressionNode); - } else if (str == "st") { - m_type = SizeofType; - parseState()->advance(2); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TypeNode); - } else if (str == "at") { - m_type = AlignofType; - parseState()->advance(2); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TypeNode); - } else if (str == "sZ") { - m_type = ParameterPackSizeType; - parseState()->advance(2); - if (TemplateParamNode::mangledRepresentationStartsWith(PEEK())) - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TemplateParamNode); - else - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(FunctionParamNode); - } else if (str == "dt") { - m_type = MemberAccessType; - parseState()->advance(2); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(ExpressionNode); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(UnresolvedNameNode); - } else if (str == "pt") { - m_type = PointerMemberAccessType; - parseState()->advance(2); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(ExpressionNode); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(UnresolvedNameNode); - } else if (str == "ds") { - m_type = MemberDerefType; - parseState()->advance(2); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(ExpressionNode); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(ExpressionNode); - } else if (str == "ps") { - m_type = PackExpansionType; - parseState()->advance(2); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(ExpressionNode); - } else if (str == "tw") { - m_type = ThrowType; - parseState()->advance(2); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(ExpressionNode); - } else if (str == "tr") { - m_type = RethrowType; - } else { - const char next = PEEK(); - if (OperatorNameNode::mangledRepresentationStartsWith(next) && str != "dn" && str != "on" - && str != "gs" && str != "sr") { - m_type = OperatorType; - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(OperatorNameNode); - const OperatorNameNode::Ptr opNode - = DEMANGLER_CAST(OperatorNameNode, MY_CHILD_AT(childCount() - 1)); - - int expressionCount; - switch (opNode->type()) { - case OperatorNameNode::TernaryType: - expressionCount = 3; - break; - case OperatorNameNode::ArrayNewType: case OperatorNameNode::BinaryPlusType: - case OperatorNameNode::BinaryMinusType: case OperatorNameNode::MultType: - case OperatorNameNode::DivType: case OperatorNameNode::ModuloType: - case OperatorNameNode::BitwiseAndType: case OperatorNameNode::BitwiseOrType: - case OperatorNameNode::XorType: case OperatorNameNode::AssignType: - case OperatorNameNode::IncrementAndAssignType: - case OperatorNameNode::DecrementAndAssignType: - case OperatorNameNode::MultAndAssignType: case OperatorNameNode::DivAndAssignType: - case OperatorNameNode::ModuloAndAssignType: - case OperatorNameNode::BitwiseAndAndAssignType: - case OperatorNameNode::BitwiseOrAndAssignType: - case OperatorNameNode::XorAndAssignType: case OperatorNameNode::LeftShiftType: - case OperatorNameNode::RightShiftType: case OperatorNameNode::LeftShiftAndAssignType: - case OperatorNameNode::RightShiftAndAssignType: case OperatorNameNode::EqualsType: - case OperatorNameNode::NotEqualsType: case OperatorNameNode::LessType: - case OperatorNameNode::GreaterType: case OperatorNameNode::LessEqualType: - case OperatorNameNode::GreaterEqualType: case OperatorNameNode::LogicalAndType: - case OperatorNameNode::LogicalOrType: case OperatorNameNode::CommaType: - case OperatorNameNode::ArrowStarType: case OperatorNameNode::ArrowType: - case OperatorNameNode::IndexType: - expressionCount = 2; - break; - default: - expressionCount = 1; - } - - for (int i = 0; i < expressionCount; ++i) - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(ExpressionNode); - } else if (TemplateParamNode::mangledRepresentationStartsWith(next)) { - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TemplateParamNode); - } else if (FunctionParamNode::mangledRepresentationStartsWith(next)) { - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(FunctionParamNode); - } else if (ExprPrimaryNode::mangledRepresentationStartsWith(next)) { - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(ExprPrimaryNode); - } else if (UnresolvedNameNode::mangledRepresentationStartsWith(next)) { - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(UnresolvedNameNode); - } else { - throw ParseException(QString::fromLatin1("Invalid expression")); - } - } -} - -QByteArray ExpressionNode::description() const -{ - return "Expression[global:" + bool2String(m_globalNamespace) - + ";type:" + QByteArray::number(m_type) + ']'; -} - -QByteArray ExpressionNode::toByteArray() const -{ - QByteArray repr; - - switch (m_type) { - case ConversionType: - repr = CHILD_TO_BYTEARRAY(0) + '('; - for (int i = 1; i < childCount(); ++i) - repr += CHILD_TO_BYTEARRAY(i); - repr += ')'; - break; - case NewType: case ArrayNewType: { - if (m_globalNamespace) - repr += "::"; - repr += "new"; - if (m_type == ArrayNewType) - repr += "[]"; - repr += ' '; - - // TODO: I don't understand what the first expression list means. Putting it into - // parentheses for now. - QByteArray exprList; - int i = 0; - for (; i < childCount(); ++i) { - if (!MY_CHILD_AT(i).dynamicCast()) - break; - if (i > 0) - repr += ", "; - repr += CHILD_TO_BYTEARRAY(i); - } - if (i > 0) - repr.append('(').append(exprList).append(')'); - - repr += CHILD_TO_BYTEARRAY(i++); // - if (i < childCount()) - repr += CHILD_TO_BYTEARRAY(i); // - break; - } - case DeleteType: case ArrayDeleteType: - if (m_globalNamespace) - repr += "::"; - repr += "delete"; - if (m_type == ArrayDeleteType) - repr += "[]"; - repr.append(' ').append(CHILD_TO_BYTEARRAY(0)); - break; - case PrefixIncrementType: - repr.append("++").append(CHILD_TO_BYTEARRAY(0)); - break; - case PrefixDecrementType: - repr.append("--").append(CHILD_TO_BYTEARRAY(0)); - break; - case TypeIdTypeType: case TypeIdExpressionType: - repr.append("typeid(").append(CHILD_TO_BYTEARRAY(0)).append(')'); - break; - case DynamicCastType: case StaticCastType: case ConstCastType: case ReinterpretCastType: - if (m_type == DynamicCastType) - repr += "dynamic"; - else if (m_type == StaticCastType) - repr += "static"; - else if (m_type == ConstCastType) - repr += "const"; - else - repr += "reinterpret"; - repr.append("_cast<").append(CHILD_TO_BYTEARRAY(0)).append(">(") - .append(CHILD_TO_BYTEARRAY(1)).append(')'); - break; - case SizeofType: - repr = "sizeof(" + CHILD_TO_BYTEARRAY(0) + ')'; - break; - case AlignofType: - repr = "alignof(" + CHILD_TO_BYTEARRAY(0) + ')'; - break; - case MemberAccessType: - repr.append(CHILD_TO_BYTEARRAY(0)).append('.').append(CHILD_TO_BYTEARRAY(1)); - break; - case PointerMemberAccessType: - repr.append(CHILD_TO_BYTEARRAY(0)).append("->").append(CHILD_TO_BYTEARRAY(1)); - break; - case MemberDerefType: - repr.append(CHILD_TO_BYTEARRAY(0)).append(".*").append(CHILD_TO_BYTEARRAY(1)); - break; - case ParameterPackSizeType: - repr = "sizeof...(" + CHILD_TO_BYTEARRAY(0) + ')'; - break; - case PackExpansionType: - repr = CHILD_TO_BYTEARRAY(0) + "..."; - break; - case ThrowType: - repr.append("throw ").append(CHILD_TO_BYTEARRAY(0)); - break; - case RethrowType: - repr.append("throw"); - break; - case OperatorType: { - const OperatorNameNode::Ptr opNode = DEMANGLER_CAST(OperatorNameNode, MY_CHILD_AT(0)); - switch (opNode->type()) { - case OperatorNameNode::CallType: - repr = CHILD_TO_BYTEARRAY(1) + opNode->toByteArray(); - break; - case OperatorNameNode::SizeofExprType: case OperatorNameNode::AlignofExprType: - repr = opNode->toByteArray() + '(' + CHILD_TO_BYTEARRAY(1) + ')'; - break; - case OperatorNameNode::ArrayNewType: - repr = "new " + CHILD_TO_BYTEARRAY(1) + '[' + CHILD_TO_BYTEARRAY(2) + ']'; - break; - case OperatorNameNode::IndexType: - repr = CHILD_TO_BYTEARRAY(1) + '[' + CHILD_TO_BYTEARRAY(2) + ']'; - break; - case OperatorNameNode::TernaryType: - repr = CHILD_TO_BYTEARRAY(1) + " ? " + CHILD_TO_BYTEARRAY(2) + " : " + CHILD_TO_BYTEARRAY(3); - break; - case OperatorNameNode::ArrowStarType: case OperatorNameNode::ArrowType: - repr = CHILD_TO_BYTEARRAY(1) + opNode->toByteArray() + CHILD_TO_BYTEARRAY(2); - break; - case OperatorNameNode::BinaryPlusType: - case OperatorNameNode::BinaryMinusType: - case OperatorNameNode::MultType: - case OperatorNameNode::DivType: - case OperatorNameNode::ModuloType: - case OperatorNameNode::BitwiseAndType: - case OperatorNameNode::BitwiseOrType: - case OperatorNameNode::XorType: - case OperatorNameNode::AssignType: - case OperatorNameNode::IncrementAndAssignType: - case OperatorNameNode::DecrementAndAssignType: - case OperatorNameNode::MultAndAssignType: - case OperatorNameNode::DivAndAssignType: - case OperatorNameNode::ModuloAndAssignType: - case OperatorNameNode::BitwiseAndAndAssignType: - case OperatorNameNode::BitwiseOrAndAssignType: - case OperatorNameNode::XorAndAssignType: - case OperatorNameNode::LeftShiftType: - case OperatorNameNode::RightShiftType: - case OperatorNameNode::LeftShiftAndAssignType: - case OperatorNameNode::RightShiftAndAssignType: - case OperatorNameNode::EqualsType: - case OperatorNameNode::NotEqualsType: - case OperatorNameNode::LessType: - case OperatorNameNode::GreaterType: - case OperatorNameNode::LessEqualType: - case OperatorNameNode::GreaterEqualType: - case OperatorNameNode::LogicalAndType: - case OperatorNameNode::LogicalOrType: - case OperatorNameNode::CommaType: - repr = CHILD_TO_BYTEARRAY(1) + ' ' + opNode->toByteArray() + ' ' + CHILD_TO_BYTEARRAY(2); - break; - case OperatorNameNode::NewType: - case OperatorNameNode::DeleteType: - case OperatorNameNode::ArrayDeleteType: - repr = opNode->toByteArray() + ' ' + CHILD_TO_BYTEARRAY(1); - break; - default: // Other unary Operators; - repr = opNode->toByteArray() + CHILD_TO_BYTEARRAY(1); - } - break; - } - case OtherType: - repr = pasteAllChildren(); - } - - return repr; -} - - -OperatorNameNode::OperatorNameNode(const OperatorNameNode &other) = default; - -bool OperatorNameNode::mangledRepresentationStartsWith(char c) -{ - return strchr("ndpacmroelgiqsv", c); -} - -/* - * ::= nw # new - * ::= na # new[] - * ::= dl # delete - * ::= da # delete[] - * ::= ps # + (unary) - * ::= ng # - (unary) - * ::= ad # & (unary) - * ::= de # * (unary) - * ::= co # ~ - * ::= pl # + - * ::= mi # - - * ::= ml # * - * ::= dv # / - * ::= rm # % - * ::= an # & - * ::= or # | - * ::= eo # ^ - * ::= aS # = - * ::= pL # += - * ::= mI # -= - * ::= mL # *= - * ::= dV # /= - * ::= rM # %= - * ::= aN # &= - * ::= oR # |= - * ::= eO # ^= - * ::= ls # << - * ::= rs # >> - * ::= lS # <<= - * ::= rS # >>= - * ::= eq # == - * ::= ne # != - * ::= lt # < - * ::= gt # > - * ::= le # <= - * ::= ge # >= - * ::= nt # ! - * ::= aa # && - * ::= oo # || - * ::= pp # ++ - * ::= mm # -- - * ::= cm # , - * ::= pm # ->* - * ::= pt # -> - * ::= cl # () - * ::= ix # [] - * ::= qu # ? - * ::= st # sizeof (a type) - * ::= sz # sizeof (an expression) - * ::= at # alignof (a type) - * ::= az # alignof (an expression) - * ::= cv # (cast) - * ::= v # vendor extended operator - */ -void OperatorNameNode::parse() -{ - if (PEEK() == 'v') { - m_type = VendorType; - ADVANCE(); - const int digit = ADVANCE(); - if (!std::isdigit(digit)) - throw ParseException(QString::fromLatin1("Invalid digit")); - // Throw away digit for now; we don't know what to do with it anyway. - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(SourceNameNode); - } else { - const QByteArray id = parseState()->readAhead(2); - parseState()->advance(2); - if (id == "cv") { - m_type = CastType; - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TypeNode); - } else if (id == "nw") { - m_type = NewType; - } else if (id == "na") { - m_type = ArrayNewType; - } else if (id == "dl") { - m_type = DeleteType; - } else if (id == "da") { - m_type = ArrayDeleteType; - } else if (id == "ps") { - m_type = UnaryPlusType; - } else if (id == "ng") { - m_type = UnaryMinusType; - } else if (id == "ad") { - m_type = UnaryAmpersandType; - } else if (id == "de") { - m_type = UnaryStarType; - } else if (id == "co") { - m_type = BitwiseNotType; - } else if (id == "pl") { - m_type = BinaryPlusType; - } else if (id == "mi") { - m_type = BinaryMinusType; - } else if (id == "ml") { - m_type = MultType; - } else if (id == "dv") { - m_type = DivType; - } else if (id == "rm") { - m_type = ModuloType; - } else if (id == "an") { - m_type = BitwiseAndType; - } else if (id == "or") { - m_type = BitwiseOrType; - } else if (id == "eo") { - m_type = XorType; - } else if (id == "aS") { - m_type = AssignType; - } else if (id == "pL") { - m_type = IncrementAndAssignType; - } else if (id == "mI") { - m_type = DecrementAndAssignType; - } else if (id == "mL") { - m_type = MultAndAssignType; - } else if (id == "dV") { - m_type = DivAndAssignType; - } else if (id == "rM") { - m_type = ModuloAndAssignType; - } else if (id == "aN") { - m_type = BitwiseAndAndAssignType; - } else if (id == "oR") { - m_type = BitwiseOrAndAssignType; - } else if (id == "eO") { - m_type = XorAndAssignType; - } else if (id == "ls") { - m_type = LeftShiftType; - } else if (id == "rs") { - m_type = RightShiftType; - } else if (id == "lS") { - m_type = LeftShiftAndAssignType; - } else if (id == "rS") { - m_type = RightShiftAndAssignType; - } else if (id == "eq") { - m_type = EqualsType; - } else if (id == "ne") { - m_type = NotEqualsType; - } else if (id == "lt") { - m_type = LessType; - } else if (id == "gt") { - m_type = GreaterType; - } else if (id == "le") { - m_type = LessEqualType; - } else if (id == "ge") { - m_type = GreaterEqualType; - } else if (id == "nt") { - m_type = LogicalNotType; - } else if (id == "aa") { - m_type = LogicalAndType; - } else if (id == "oo") { - m_type = LogicalOrType; - } else if (id == "pp") { - m_type = IncrementType; - } else if (id == "mm") { - m_type = DecrementType; - } else if (id == "cm") { - m_type = CommaType; - } else if (id == "pm") { - m_type = ArrowStarType; - } else if (id == "pt") { - m_type = ArrowType; - } else if (id == "cl") { - m_type = CallType; - } else if (id == "ix") { - m_type = IndexType; - } else if (id == "qu") { - m_type = TernaryType; - } else if (id == "st") { - m_type = SizeofTypeType; - } else if (id == "sz") { - m_type = SizeofExprType; - } else if (id == "at") { - m_type = AlignofTypeType; - } else if (id == "az") { - m_type = AlignofExprType; - } else { - throw ParseException(QString::fromLatin1("Invalid operator encoding \"%1\"") - .arg(QString::fromLocal8Bit(id))); - } - } -} - -QByteArray OperatorNameNode::description() const -{ - return "OperatorName[type:" + toByteArray() + ']'; -} - -QByteArray OperatorNameNode::toByteArray() const -{ - switch (m_type) { - case NewType: return "new"; - case ArrayNewType: return "new[]"; - case DeleteType: return "delete"; - case ArrayDeleteType: return "delete[]"; - case UnaryPlusType: case BinaryPlusType: return "+"; - case UnaryMinusType: case BinaryMinusType: return "-"; - case UnaryAmpersandType: case BitwiseAndType: return "&"; - case UnaryStarType: case MultType: return "*"; - case BitwiseNotType: return "~"; - case DivType: return "/"; - case ModuloType: return "%"; - case BitwiseOrType: return "|"; - case XorType: return "^"; - case AssignType: return "="; - case IncrementAndAssignType: return "+="; - case DecrementAndAssignType: return "-="; - case MultAndAssignType: return "*="; - case DivAndAssignType: return "/="; - case ModuloAndAssignType: return "%="; - case BitwiseAndAndAssignType: return "&="; - case BitwiseOrAndAssignType: return "|="; - case XorAndAssignType: return "^="; - case LeftShiftType: return "<<"; - case RightShiftType: return ">>"; - case LeftShiftAndAssignType: return "<<="; - case RightShiftAndAssignType: return ">>="; - case EqualsType: return "=="; - case NotEqualsType: return "!="; - case LessType: return "<"; - case GreaterType: return ">"; - case LessEqualType: return "<="; - case GreaterEqualType: return ">="; - case LogicalNotType: return "!"; - case LogicalAndType: return "&&"; - case LogicalOrType: return "||"; - case IncrementType: return "++"; - case DecrementType: return "--"; - case CommaType: return ","; - case ArrowStarType: return "->*"; - case ArrowType: return "->"; - case CallType: return "()"; - case IndexType: return "[]"; - case TernaryType: return "?"; - case SizeofTypeType: case SizeofExprType: return "sizeof"; - case AlignofTypeType: case AlignofExprType: return "alignof"; - case CastType: return ' ' + CHILD_TO_BYTEARRAY(0); - case VendorType: return "[vendor extended operator]"; - } - - DEMANGLER_ASSERT(false); - return QByteArray(); -} - - -ExprPrimaryNode::ExprPrimaryNode(GlobalParseState *parseState) - : ParseTreeNode(parseState) -{ -} - -ExprPrimaryNode::ExprPrimaryNode(const ExprPrimaryNode &other) = default; - -bool ExprPrimaryNode::mangledRepresentationStartsWith(char c) -{ - return c == 'L'; -} - -/* - * ::= L E # integer literal - * ::= L E # floating literal - * ::= L # string literal - * ::= L E # nullptr literal (i.e., "LDnE") - * ::= L _ E # complex floating point literal (C 2000) - * ::= L E # external name - * Note that we ignore C 2000 features. - */ -void ExprPrimaryNode::parse() -{ - if (!ExprPrimaryNode::mangledRepresentationStartsWith(ADVANCE())) - throw ParseException(QString::fromLatin1("Invalid primary expression")); - bool needsSuffix = true; - const char next = PEEK(); - if (TypeNode::mangledRepresentationStartsWith(next)) { - const ParseTreeNode::Ptr topLevelTypeNode = parseRule(parseState()); - const BuiltinTypeNode::Ptr typeNode = topLevelTypeNode->childCount() == 0 - ? BuiltinTypeNode::Ptr() - : CHILD_AT(topLevelTypeNode, 0).dynamicCast(); - if (!typeNode) - throw ParseException("Invalid type in expr-primary"); - - switch (typeNode->type()) { - case BuiltinTypeNode::UnsignedShortType: - case BuiltinTypeNode::UnsignedIntType: - m_suffix = "U"; - Q_FALLTHROUGH(); - case BuiltinTypeNode::SignedShortType: - case BuiltinTypeNode::SignedIntType: - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(NumberNode); - break; - case BuiltinTypeNode::UnsignedLongType: - m_suffix = "U"; - Q_FALLTHROUGH(); - case BuiltinTypeNode::SignedLongType: - m_suffix = "L"; - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(NumberNode); - break; - case BuiltinTypeNode::UnsignedLongLongType: - m_suffix = "U"; - Q_FALLTHROUGH(); - case BuiltinTypeNode::SignedLongLongType: - m_suffix = "LL"; - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(NumberNode); - break; - case BuiltinTypeNode::FloatType: - m_suffix = "f"; - Q_FALLTHROUGH(); - case BuiltinTypeNode::DoubleType: - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(FloatValueNode); - break; - case BuiltinTypeNode::NullPtrType: - m_isNullPtr = true; - break; - case BuiltinTypeNode::PlainCharType: case BuiltinTypeNode::WCharType: - case BuiltinTypeNode::Char16Type: case BuiltinTypeNode::Char32Type: - needsSuffix = false; - break; // string type - default: - throw ParseException(QString::fromLatin1("Invalid type in expr-primary")); - } - parseState()->popFromStack(); // No need to keep the type node in the tree. - } else if (MangledNameRule::mangledRepresentationStartsWith(next)) { - MangledNameRule::parse(parseState(), parseState()->stackTop()); - } else { - throw ParseException(QString::fromLatin1("Invalid expr-primary")); - } - if (needsSuffix && ADVANCE() != 'E') - throw ParseException(QString::fromLatin1("Invalid expr-primary")); -} - -QByteArray ExprPrimaryNode::description() const -{ - return "ExprPrimary[m_suffix:" + m_suffix + ";m_isNullPtr:" + bool2String(m_isNullPtr) + ']'; -} - -QByteArray ExprPrimaryNode::toByteArray() const -{ - if (m_isNullPtr) - return "nullptr"; - return CHILD_TO_BYTEARRAY(0) + m_suffix; -} - - -FunctionTypeNode::FunctionTypeNode(GlobalParseState *parseState) - : ParseTreeNode(parseState) -{ -} - -FunctionTypeNode::FunctionTypeNode(const FunctionTypeNode &other) - : ParseTreeNode(other), m_isExternC(other.isExternC()) -{ -} - -bool FunctionTypeNode::mangledRepresentationStartsWith(char c) -{ - return c == 'F'; -} - -/* ::= F [Y] E */ -void FunctionTypeNode::parse() -{ - if (!mangledRepresentationStartsWith(ADVANCE())) - throw ParseException(QString::fromLatin1("Invalid function type")); - - if (PEEK() == 'Y') { - ADVANCE(); - m_isExternC = true; - } - - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(BareFunctionTypeNode); - if (ADVANCE() != 'E') - throw ParseException(QString::fromLatin1("Invalid function type")); -} - -QByteArray FunctionTypeNode::description() const -{ - return "FunctionType[isExternC:" + bool2String(m_isExternC) + ']'; -} - -QByteArray FunctionTypeNode::toByteArray() const -{ - return QByteArray(); // Not enough knowledge here to generate a string representation. -} - - -LocalNameNode::LocalNameNode(GlobalParseState *parseState) - : ParseTreeNode(parseState) -{ -} - -LocalNameNode::LocalNameNode(const LocalNameNode &other) = default; - -bool LocalNameNode::mangledRepresentationStartsWith(char c) -{ - return c == 'Z'; -} - -/* - * := Z E [] - * := Z E s [] - * := Z Ed [ ] _ - * - * Note that can start with 's', so we need to do read-ahead. - * Also, can start with 'd' (via ). - * The last rule is for member functions with default closure type arguments. - */ -void LocalNameNode::parse() -{ - if (!mangledRepresentationStartsWith(ADVANCE())) - throw ParseException(QString::fromLatin1("Invalid local-name")); - - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(EncodingNode); - - if (ADVANCE() != 'E') - throw ParseException(QString::fromLatin1("Invalid local-name")); - - QByteArray str = parseState()->readAhead(2); - const char next = PEEK(); - if (next == 'd' && str != "dl" && str != "da" && str != "de" && str != "dv" && str != "dV") { - m_isDefaultArg = true; - ADVANCE(); - if (NonNegativeNumberNode<10>::mangledRepresentationStartsWith(PEEK())) - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(NonNegativeNumberNode<10>); - if (ADVANCE() != '_') - throw ParseException(QString::fromLatin1("Invalid local-name")); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(NameNode); - } else if (str == "sp" || str == "sr" || str == "st" || str == "sz" || str == "sZ" - || (next != 's' && NameNode::mangledRepresentationStartsWith(next))) { - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(NameNode); - } else if (next == 's') { - m_isStringLiteral = true; - ADVANCE(); - } else { - throw ParseException(QString::fromLatin1("Invalid local-name")); - } - if (DiscriminatorRule::mangledRepresentationStartsWith(PEEK())) - DiscriminatorRule::parse(parseState()); -} - -QByteArray LocalNameNode::description() const -{ - return "LocalName[isStringLiteral:" + bool2String(m_isStringLiteral) + ";isDefaultArg:" - + bool2String(m_isDefaultArg) + ']'; -} - -QByteArray LocalNameNode::toByteArray() const -{ - QByteArray name; - bool hasDiscriminator; - if (m_isDefaultArg) { - const ParseTreeNode::Ptr encodingNode = MY_CHILD_AT(0); - const BareFunctionTypeNode::Ptr funcNode - = DEMANGLER_CAST(BareFunctionTypeNode, CHILD_AT(encodingNode, 1)); - const int functionParamCount - = funcNode->hasReturnType() ? funcNode->childCount() - 1 : funcNode->childCount(); - const NonNegativeNumberNode<10>::Ptr numberNode - = MY_CHILD_AT(1).dynamicCast >(); - - // "_" means last argument, "n" means (n+1)th to last. - // Note that c++filt in binutils 2.22 does this wrong. - const int argNumber = functionParamCount - (numberNode ? numberNode->number() + 1 : 0); - - name = encodingNode->toByteArray(); - name.append("::{default arg#").append(QByteArray::number(argNumber)).append("}::") - .append(MY_CHILD_AT(childCount() - 1)->toByteArray()); - hasDiscriminator = false; - } else if (m_isStringLiteral) { - name = CHILD_TO_BYTEARRAY(0) + "::{string literal}"; - hasDiscriminator = childCount() == 2; - } else { - name = CHILD_TO_BYTEARRAY(0) + "::" + CHILD_TO_BYTEARRAY(1); - hasDiscriminator = childCount() == 3; - } - if (hasDiscriminator) { - // TODO: Does this information serve any purpose? Names seem to demangle fine without printing anything here. -// const QByteArray discriminator = MY_CHILD_AT(childCount() - 1)->toByteArray(); -// const int rawDiscriminatorValue = discriminator.toInt(); -// name += " (occurrence number " + QByteArray::number(rawDiscriminatorValue - 2) + ')'; - } - return name; -} - -bool LocalNameNode::isTemplate() const -{ - if (childCount() == 1 || MY_CHILD_AT(1).dynamicCast >()) - return false; - return DEMANGLER_CAST(NameNode, MY_CHILD_AT(1))->isTemplate(); -} - -bool LocalNameNode::isConstructorOrDestructorOrConversionOperator() const -{ - if (childCount() == 1 || MY_CHILD_AT(1).dynamicCast >()) - return false; - return DEMANGLER_CAST(NameNode, MY_CHILD_AT(1))->isConstructorOrDestructorOrConversionOperator(); -} - -CvQualifiersNode::Ptr LocalNameNode::cvQualifiers() const -{ - if (m_isDefaultArg) - return DEMANGLER_CAST(NameNode, MY_CHILD_AT(childCount() - 1))->cvQualifiers(); - if (childCount() == 1 || MY_CHILD_AT(1).dynamicCast >()) - return CvQualifiersNode::Ptr(); - return DEMANGLER_CAST(NameNode, MY_CHILD_AT(1))->cvQualifiers(); -} - - -bool MangledNameRule::mangledRepresentationStartsWith(char c) -{ - return c == '_'; -} - -/* - * Grammar: http://www.codesourcery.com/public/cxx-abi/abi.html#mangling - * The grammar as given there is not LL(k), so a number of transformations - * were necessary, which we will document at the respective parsing function. - * ::= _Z - */ -void MangledNameRule::parse(GlobalParseState *parseState, const ParseTreeNode::Ptr &parentNode) -{ - parseState->advance(2); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD_TO_NODE(EncodingNode, parseState, parentNode); -} - - -SourceNameNode::SourceNameNode(const SourceNameNode &other) = default; - -bool SourceNameNode::mangledRepresentationStartsWith(char c) -{ - return strchr("123456789", c); -} - -/* ::= */ -void SourceNameNode::parse() -{ - const int idLen = getNonNegativeNumber<10>(parseState()); - m_name = parseState()->readAhead(idLen); - parseState()->advance(idLen); -} - -QByteArray SourceNameNode::description() const -{ - return "SourceName[name:" + m_name + ']'; -} - - -bool UnqualifiedNameNode::mangledRepresentationStartsWith(char c) -{ - return OperatorNameNode::mangledRepresentationStartsWith(c) - || CtorDtorNameNode::mangledRepresentationStartsWith(c) - || SourceNameNode::mangledRepresentationStartsWith(c) - || UnnamedTypeNameNode::mangledRepresentationStartsWith(c); -} - -QByteArray UnqualifiedNameNode::toByteArray() const -{ - QByteArray repr; - if (MY_CHILD_AT(0).dynamicCast()) - repr = "operator"; - return repr += CHILD_TO_BYTEARRAY(0); -} - -bool UnqualifiedNameNode::isConstructorOrDestructorOrConversionOperator() const -{ - if (MY_CHILD_AT(0).dynamicCast()) - return true; - const OperatorNameNode::Ptr opNode = MY_CHILD_AT(0).dynamicCast(); - return opNode && opNode->type() == OperatorNameNode::CastType; -} - -/* - * ::= - * ::= - * ::= - * ::= - */ -void UnqualifiedNameNode::parse() -{ - const char next = PEEK(); - if (OperatorNameNode::mangledRepresentationStartsWith(next)) - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(OperatorNameNode); - else if (CtorDtorNameNode::mangledRepresentationStartsWith(next)) - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(CtorDtorNameNode); - else if (SourceNameNode::mangledRepresentationStartsWith(next)) - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(SourceNameNode); - else if (UnnamedTypeNameNode::mangledRepresentationStartsWith(next)) - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(UnnamedTypeNameNode); - else - throw ParseException(QString::fromLatin1("Invalid unqualified-name")); -} - - -UnscopedNameNode::UnscopedNameNode(GlobalParseState *parseState) - : ParseTreeNode(parseState) -{ -} - -UnscopedNameNode::UnscopedNameNode(const UnscopedNameNode &other) = default; - -bool UnscopedNameNode::mangledRepresentationStartsWith(char c) -{ - return UnqualifiedNameNode::mangledRepresentationStartsWith(c) || c == 'S'; -} - -QByteArray UnscopedNameNode::toByteArray() const -{ - QByteArray name = CHILD_TO_BYTEARRAY(0); - if (m_inStdNamespace) - name.prepend("std::"); - return name; -} - -bool UnscopedNameNode::isConstructorOrDestructorOrConversionOperator() const -{ - const UnqualifiedNameNode::Ptr childNode = DEMANGLER_CAST(UnqualifiedNameNode, MY_CHILD_AT(0)); - return childNode->isConstructorOrDestructorOrConversionOperator(); -} - -/* - * ::= - * ::= St # ::std:: - */ -void UnscopedNameNode::parse() -{ - if (parseState()->readAhead(2) == "St") { - m_inStdNamespace = true; - parseState()->advance(2); - } - - if (!UnqualifiedNameNode::mangledRepresentationStartsWith(PEEK())) - throw ParseException(QString::fromLatin1("Invalid unscoped-name")); - - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(UnqualifiedNameNode); -} - -QByteArray UnscopedNameNode::description() const -{ - return "UnscopedName[isInStdNamespace:" + bool2String(m_inStdNamespace) + ']'; -} - - -bool NestedNameNode::mangledRepresentationStartsWith(char c) -{ - return c == 'N'; -} - -QByteArray NestedNameNode::toByteArray() const -{ - // cv-qualifiers are not encoded here, since they only make sense at a higher level. - if (MY_CHILD_AT(0).dynamicCast()) - return CHILD_TO_BYTEARRAY(1); - return CHILD_TO_BYTEARRAY(0); -} - -bool NestedNameNode::isTemplate() const -{ - const PrefixNode::Ptr childNode = DEMANGLER_CAST(PrefixNode, MY_CHILD_AT(childCount() - 1)); - return childNode->isTemplate(); -} - -bool NestedNameNode::isConstructorOrDestructorOrConversionOperator() const -{ - const PrefixNode::Ptr childNode = DEMANGLER_CAST(PrefixNode, MY_CHILD_AT(childCount() - 1)); - return childNode->isConstructorOrDestructorOrConversionOperator(); -} - -CvQualifiersNode::Ptr NestedNameNode::cvQualifiers() const -{ - return MY_CHILD_AT(0).dynamicCast(); -} - -/* - * ::= N [] E - * ::= N [] E - * ::= - * ::= - * ::= - * - * The rule leads to an indirect recursion with , so - * we integrate it into : - * ::= N [] - * [] E - * ::= N [] E - * ::= N [] E - * - * The occurrence of in the first expansion makes this rule - * completely unmanageable, because 's first and follow sets are - * not distinct and it also shares elements of its first set with - * and . However, can expand - * to both the non-terminals it is followed by as well as the two competing - * non-terminal sequences in the other rules, so we can just write: - * ::= N [] E - * - * That's not all, though: Both and can start - * with an 'r', so we have to do a two-character-look-ahead for that case. - */ -void NestedNameNode::parse() -{ - if (!mangledRepresentationStartsWith(ADVANCE())) - throw ParseException(QString::fromLatin1("Invalid nested-name")); - - if (CvQualifiersNode::mangledRepresentationStartsWith(PEEK()) && parseState()->peek(1) != 'm' - && parseState()->peek(1) != 'M' && parseState()->peek(1) != 's' - && parseState()->peek(1) != 'S') { - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(CvQualifiersNode); - } - - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(PrefixNode); - - if (ADVANCE() != 'E') - throw ParseException(QString::fromLatin1("Invalid nested-name")); -} - - -SubstitutionNode::SubstitutionNode(const SubstitutionNode &other) - : ParseTreeNode(other), m_type(other.type()) -{ -} - -bool SubstitutionNode::mangledRepresentationStartsWith(char c) -{ - return c == 'S'; -} - -/* - * ::= S _ # 36-bit number - * ::= S_ - * ::= St # ::std:: - * ::= Sa # ::std::allocator - * ::= Sb # ::std::basic_string - * ::= Ss # ::std::basic_string < char, - * ::std::char_traits, - * ::std::allocator > - * ::= Si # ::std::basic_istream > - * ::= So # ::std::basic_ostream > - * ::= Sd # ::std::basic_iostream > - * ::= St # ::std:: - */ -void SubstitutionNode::parse() -{ - if (!mangledRepresentationStartsWith(ADVANCE())) - throw ParseException(QString::fromLatin1("Invalid substitution")); - - if (NonNegativeNumberNode<36>::mangledRepresentationStartsWith(PEEK())) { - const int substIndex = getNonNegativeNumber<36>(parseState()) + 1; - if (substIndex >= parseState()->substitutionCount()) { - throw ParseException(QString::fromLatin1("Invalid substitution: substitution %1 " - "was requested, but there are only %2"). - arg(substIndex + 1).arg(parseState()->substitutionCount())); - } - m_type = ActualSubstitutionType; - addChild(parseState()->substitutionAt(substIndex)); - if (ADVANCE() != '_') - throw ParseException(QString::fromLatin1("Invalid substitution")); - } else { - switch (ADVANCE()) { - case '_': - if (parseState()->substitutionCount() == 0) - throw ParseException(QString::fromLatin1("Invalid substitution: " - "There are no substitutions")); - m_type = ActualSubstitutionType; - addChild(parseState()->substitutionAt(0)); - break; - case 't': - m_type = StdType; - if (UnqualifiedNameNode::mangledRepresentationStartsWith(PEEK())) { - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(UnqualifiedNameNode); - parseState()->addSubstitution(parseState()->stackTop()); - } - break; - case 'a': m_type = StdAllocType; break; - case 'b': m_type = StdBasicStringType; break; - case 's': m_type = FullStdBasicStringType; break; - case 'i': m_type = StdBasicIStreamType; break; - case 'o': m_type = StdBasicOStreamType; break; - case 'd': m_type = StdBasicIoStreamType; break; - default: throw ParseException(QString::fromLatin1("Invalid substitution")); - } - } -} - -QByteArray SubstitutionNode::description() const -{ - return "Substitution[type:" + QByteArray::number(m_type) + ']'; -} - -QByteArray SubstitutionNode::toByteArray() const -{ - switch (m_type) { - case ActualSubstitutionType: return CHILD_TO_BYTEARRAY(0); - case StdType: { - QByteArray repr = "std"; - if (childCount() > 0) - repr.append("::").append(CHILD_TO_BYTEARRAY(0)); - return repr; - } - case StdAllocType: return "std::allocator"; - case StdBasicStringType: return "std::basic_string"; - case FullStdBasicStringType: return "std::basic_string, " - "std::allocator >"; - case StdBasicIStreamType: return "std::basic_istream >"; - case StdBasicOStreamType: return "std::basic_ostream >"; - case StdBasicIoStreamType: return "std::basic_iostream >"; - } - - DEMANGLER_ASSERT(false); - return QByteArray(); -} - - -bool PointerToMemberTypeNode::mangledRepresentationStartsWith(char c) -{ - return c == 'M'; -} - -/* ::= M */ -void PointerToMemberTypeNode::parse() -{ - if (!mangledRepresentationStartsWith(ADVANCE())) - throw ParseException(QString::fromLatin1("Invalid pointer-to-member-type")); - - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TypeNode); // Class type. - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TypeNode); // Member type. -} - -QByteArray PointerToMemberTypeNode::toByteArray() const -{ - // Gather all qualifiers first, because we have to move them to the end en bloc. - QByteArray qualRepr; - TypeNode::Ptr memberTypeNode = DEMANGLER_CAST(TypeNode, MY_CHILD_AT(1)); - while (memberTypeNode->type() == TypeNode::QualifiedType) { - const CvQualifiersNode::Ptr cvNode - = DEMANGLER_CAST(CvQualifiersNode, CHILD_AT(memberTypeNode, 0)); - if (cvNode->hasQualifiers()) { - if (!qualRepr.isEmpty()) - qualRepr += ' '; - qualRepr += cvNode->toByteArray(); - } - memberTypeNode = DEMANGLER_CAST(TypeNode, CHILD_AT(memberTypeNode, 1)); - } - - QByteArray repr; - const QByteArray classTypeRepr = CHILD_TO_BYTEARRAY(0); - const FunctionTypeNode::Ptr functionNode - = CHILD_AT(memberTypeNode, 0).dynamicCast(); - if (functionNode) { - const BareFunctionTypeNode::Ptr bareFunctionNode - = DEMANGLER_CAST(BareFunctionTypeNode, CHILD_AT(functionNode, 0)); - if (functionNode->isExternC()) - repr += "extern \"C\" "; - if (bareFunctionNode->hasReturnType()) - repr += CHILD_AT(bareFunctionNode, 0)->toByteArray() + ' '; - repr += '(' + classTypeRepr + "::*)" + bareFunctionNode->toByteArray(); - if (!qualRepr.isEmpty()) - repr += ' ' + qualRepr; - } else { - repr = memberTypeNode->toByteArray() + ' ' + classTypeRepr + "::"; - if (!qualRepr.isEmpty()) - repr += qualRepr + ' '; - repr += '*'; - } - return repr; -} - - -TemplateParamNode::TemplateParamNode(const TemplateParamNode &other) - : ParseTreeNode(other), m_index(other.index()) -{ -} - -bool TemplateParamNode::mangledRepresentationStartsWith(char c) -{ - return c == 'T'; -} - -/* - * ::= T_ # first template parameter - * ::= T _ - */ -void TemplateParamNode::parse() -{ - if (!mangledRepresentationStartsWith(ADVANCE())) - throw ParseException(QString::fromLatin1("Invalid template-param")); - - if (PEEK() == '_') - m_index = 0; - else - m_index = getNonNegativeNumber<10>(parseState()) + 1; - if (ADVANCE() != '_') - throw ParseException(QString::fromLatin1("Invalid template-param")); - if (m_index >= parseState()->templateParamCount()) { - bool isConversionOperator = false; - for (int i = parseState()->stackElementCount() - 1; i >= 0; --i) { - const OperatorNameNode::Ptr opNode - = parseState()->stackElementAt(i).dynamicCast(); - if (opNode && opNode->type() == OperatorNameNode::CastType) { - isConversionOperator = true; - break; - } - } - if (!isConversionOperator) { - throw ParseException(QString::fromLatin1("Invalid template parameter index %1") - .arg(m_index)); - } - } else { - addChild(parseState()->templateParamAt(m_index)); - } -} - -QByteArray TemplateParamNode::description() const -{ - return "TemplateParam[index:" + QByteArray::number(m_index) + ']'; -} - -QByteArray TemplateParamNode::toByteArray() const -{ - return CHILD_TO_BYTEARRAY(0); -} - - -bool TemplateArgsNode::mangledRepresentationStartsWith(char c) -{ - return c == 'I'; -} - -/* - * ::= I + E - */ -void TemplateArgsNode::parse() -{ - if (!mangledRepresentationStartsWith(ADVANCE())) - throw ParseException(QString::fromLatin1("Invalid template args")); - - do - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TemplateArgNode); - while (TemplateArgNode::mangledRepresentationStartsWith(PEEK())); - - if (ADVANCE() != 'E') - throw ParseException(QString::fromLatin1("Invalid template args")); -} - -QByteArray TemplateArgsNode::toByteArray() const -{ - QByteArray repr = "<"; - for (int i = 0; i < childCount(); ++i) { - repr += CHILD_TO_BYTEARRAY(i); - if (i < childCount() - 1) - repr += ", "; - } - return repr += '>'; -} - - -SpecialNameNode::SpecialNameNode(const SpecialNameNode &other) = default; - -bool SpecialNameNode::mangledRepresentationStartsWith(char c) -{ - return c == 'T' || c == 'G'; -} - -/* - * ::= TV # virtual table - * ::= TT # VTT structure (construction vtable index) - * ::= TI # typeinfo structure - * ::= TS # typeinfo name (null-terminated byte string) - * ::= GV # Guard variable for one-time initialization - * ::= T - * ::= Tc - * # base is the nominal target function of thunk - * # first call-offset is 'this' adjustment - * # second call-offset is result adjustment - */ -void SpecialNameNode::parse() -{ - QByteArray str = parseState()->readAhead(2); - if (str == "TV") { - m_type = VirtualTableType; - parseState()->advance(2); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TypeNode); - } else if (str == "TT") { - m_type = VttStructType; - parseState()->advance(2); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TypeNode); - } else if (str == "TI") { - m_type = TypeInfoType; - parseState()->advance(2); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TypeNode); - } else if (str == "TS") { - m_type = TypeInfoNameType; - parseState()->advance(2); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TypeNode); - } else if (str == "GV") { - m_type = GuardVarType; - parseState()->advance(2); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(NameNode); - } else if (str == "Tc") { - m_type = DoubleCallOffsetType; - parseState()->advance(2); - CallOffsetRule::parse(parseState()); - CallOffsetRule::parse(parseState()); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(EncodingNode); - } else if (ADVANCE() == 'T') { - m_type = SingleCallOffsetType; - CallOffsetRule::parse(parseState()); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(EncodingNode); - } else { - throw ParseException(QString::fromLatin1("Invalid special-name")); - } -} - -QByteArray SpecialNameNode::description() const -{ - return "SpecialName[type:" + QByteArray::number(m_type) + ']'; -} - -QByteArray SpecialNameNode::toByteArray() const -{ - switch (m_type) { - case VirtualTableType: - return "[virtual table of " + CHILD_TO_BYTEARRAY(0) + ']'; - case VttStructType: - return "[VTT struct of " + CHILD_TO_BYTEARRAY(0) + ']'; - case TypeInfoType: - return "typeid(" + CHILD_TO_BYTEARRAY(0) + ')'; - case TypeInfoNameType: - return "typeid(" + CHILD_TO_BYTEARRAY(0) + ").name()"; - case GuardVarType: - return "[guard variable of " + CHILD_TO_BYTEARRAY(0) + ']'; - case SingleCallOffsetType: - return "[offset:" + CHILD_TO_BYTEARRAY(0) + ']' + CHILD_TO_BYTEARRAY(1); - case DoubleCallOffsetType: - return "[this-adjustment:" + CHILD_TO_BYTEARRAY(0) + "][result-adjustment:" - + CHILD_TO_BYTEARRAY(1) + ']' + CHILD_TO_BYTEARRAY(2); - } - - DEMANGLER_ASSERT(false); - return QByteArray(); -} - - -NumberNode::NumberNode(GlobalParseState *parseState) - : ParseTreeNode(parseState) -{ -} - -NumberNode::NumberNode(const NumberNode &other) = default; - -bool NumberNode::mangledRepresentationStartsWith(char c) -{ - return NonNegativeNumberNode<10>::mangledRepresentationStartsWith(c) || c == 'n'; -} - -/* ::= [n] */ -void NumberNode::parse() -{ - const char next = PEEK(); - if (!mangledRepresentationStartsWith(next)) - throw ParseException("Invalid number"); - - if (next == 'n') { - m_isNegative = true; - ADVANCE(); - } - - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(NonNegativeNumberNode<10>); -} - -QByteArray NumberNode::description() const -{ - return "Number[isNegative:" + bool2String(m_isNegative) + ']'; -} - -QByteArray NumberNode::toByteArray() const -{ - QByteArray repr = CHILD_TO_BYTEARRAY(0); - if (m_isNegative) - repr.prepend('-'); - return repr; -} - - -template NonNegativeNumberNode::NonNegativeNumberNode(const NonNegativeNumberNode &other) - : ParseTreeNode(other), m_number(other.m_number) -{ -} - -template void NonNegativeNumberNode::parse() -{ - QByteArray numberRepr; - while (mangledRepresentationStartsWith(PEEK())) - numberRepr += ADVANCE(); - if (numberRepr.count() == 0) - throw ParseException(QString::fromLatin1("Invalid non-negative number")); - m_number = numberRepr.toULongLong(nullptr, base); -} - -template QByteArray NonNegativeNumberNode::description() const -{ - return "NonNegativeNumber[base:" + QByteArray::number(base) + ";number:" - + QByteArray::number(m_number) + ']'; -} - -template QByteArray NonNegativeNumberNode::toByteArray() const -{ - return QByteArray::number(m_number); -} - - -bool NameNode::mangledRepresentationStartsWith(char c) -{ - return NestedNameNode::mangledRepresentationStartsWith(c) - || UnscopedNameNode::mangledRepresentationStartsWith(c) - || SubstitutionNode::mangledRepresentationStartsWith(c) - || LocalNameNode::mangledRepresentationStartsWith(c); -} - -QByteArray NameNode::toByteArray() const -{ - return pasteAllChildren(); -} - -bool NameNode::isTemplate() const -{ - if (childCount() > 1 && MY_CHILD_AT(1).dynamicCast()) - return true; - const NestedNameNode::Ptr nestedNameNode = MY_CHILD_AT(0).dynamicCast(); - if (nestedNameNode) - return nestedNameNode->isTemplate(); - const LocalNameNode::Ptr localNameNode = MY_CHILD_AT(0).dynamicCast(); - if (localNameNode) - return localNameNode->isTemplate(); - - return false; -} - -bool NameNode::isConstructorOrDestructorOrConversionOperator() const -{ - NestedNameNode::Ptr nestedNameNode = MY_CHILD_AT(0).dynamicCast(); - if (nestedNameNode) - return nestedNameNode->isConstructorOrDestructorOrConversionOperator(); - const LocalNameNode::Ptr localNameNode = MY_CHILD_AT(0).dynamicCast(); - if (localNameNode) - return localNameNode->isConstructorOrDestructorOrConversionOperator(); - - return false; -} - -CvQualifiersNode::Ptr NameNode::cvQualifiers() const -{ - const NestedNameNode::Ptr nestedNameNode = MY_CHILD_AT(0).dynamicCast(); - if (nestedNameNode) - return nestedNameNode->cvQualifiers(); - const LocalNameNode::Ptr localNameNode = MY_CHILD_AT(0).dynamicCast(); - if (localNameNode) - return localNameNode->cvQualifiers(); - return CvQualifiersNode::Ptr(); -} - -/* - * ::= - * ::= - * ::= - * ::= # See Scope Encoding below - * - * We can't use this rule directly, because - * can expand to . We therefore integrate it directly - * into the production for : - * ::= [] - * ::= - * - * Secondly, shares an expansion ("St") with , - * so we have to look further ahead to see which one matches. - */ -void NameNode::parse() -{ - if ((parseState()->readAhead(2) == "St" - && UnqualifiedNameNode::mangledRepresentationStartsWith(parseState()->peek(2))) - || UnscopedNameNode::mangledRepresentationStartsWith(PEEK())) { - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(UnscopedNameNode); - if (TemplateArgsNode::mangledRepresentationStartsWith(PEEK())) { - parseState()->addSubstitution(parseState()->stackTop()); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TemplateArgsNode); - } - } else { - const char next = PEEK(); - if (NestedNameNode::mangledRepresentationStartsWith(next)) { - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(NestedNameNode); - } else if (SubstitutionNode::mangledRepresentationStartsWith(next)) { - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(SubstitutionNode); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TemplateArgsNode); - } else if (LocalNameNode::mangledRepresentationStartsWith(next)) { - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(LocalNameNode); - } else { - throw ParseException(QString::fromLatin1("Invalid name")); - } - } -} - - -TemplateArgNode::TemplateArgNode(GlobalParseState *parseState) - : ParseTreeNode(parseState) -{ -} - -TemplateArgNode::TemplateArgNode(const TemplateArgNode &other) = default; - -bool TemplateArgNode::mangledRepresentationStartsWith(char c) -{ - return TypeNode::mangledRepresentationStartsWith(c) - || ExprPrimaryNode::mangledRepresentationStartsWith(c) - || c == 'X' || c == 'J'; -} - -/* - * ::= # type or template - * ::= X E # expression - * ::= # simple expressions - * ::= J * E # argument pack - */ -void TemplateArgNode::parse() -{ - const char next = PEEK(); - if (TypeNode::mangledRepresentationStartsWith(next)) { - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TypeNode); - } else if (ExprPrimaryNode::mangledRepresentationStartsWith(next)) { - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(ExprPrimaryNode); - } else if (next == 'X') { - ADVANCE(); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(ExpressionNode); - if (ADVANCE() != 'E') - throw ParseException(QString::fromLatin1("Invalid template-arg")); - } else if (next == 'J') { - m_isTemplateArgumentPack = true; - ADVANCE(); - while (TemplateArgNode::mangledRepresentationStartsWith(PEEK())) - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TemplateArgNode); - if (ADVANCE() != 'E') - throw ParseException(QString::fromLatin1("Invalid template-arg")); - } else { - throw ParseException(QString::fromLatin1("Invalid template-arg")); - } - - parseState()->addTemplateParam(parseState()->stackTop()); -} - -QByteArray TemplateArgNode::description() const -{ - return "TemplateArg[isPack:" + bool2String(m_isTemplateArgumentPack) + ']'; -} - -QByteArray TemplateArgNode::toByteArray() const -{ - if (m_isTemplateArgumentPack) { - QByteArray repr; - for (int i = 0; i < childCount(); ++i) - repr.append(CHILD_TO_BYTEARRAY(i)).append(", "); - return repr += "typename..."; - } - return CHILD_TO_BYTEARRAY(0); -} - - -bool PrefixNode::mangledRepresentationStartsWith(char c) -{ - return TemplateParamNode::mangledRepresentationStartsWith(c) - || SubstitutionNode::mangledRepresentationStartsWith(c) - || UnqualifiedNameNode::mangledRepresentationStartsWith(c) - || SourceNameNode::mangledRepresentationStartsWith(c) - || DeclTypeNode::mangledRepresentationStartsWith(c); -} - -bool PrefixNode::isTemplate() const -{ - return childCount() > 0 && MY_CHILD_AT(childCount() - 1).dynamicCast(); -} - -bool PrefixNode::isConstructorOrDestructorOrConversionOperator() const -{ - for (int i = childCount() - 1; i >= 0; --i) { - const UnqualifiedNameNode::Ptr n = MY_CHILD_AT(i).dynamicCast(); - if (n) - return n->isConstructorOrDestructorOrConversionOperator(); - } - return false; -} - -/* - * ::= - * ::= - * ::= - * ::= - * ::= # empty - * ::= - * ::= - * ::= - * ::= - * ::= - * := M - * - * We have to eliminate the left-recursion and the template-prefix rule - * and end up with this: - * ::= [] - * ::= [] - * ::= [] - * ::= - * ::= [] - * ::= - * ::= # empty - * has overlap in its rhs with , so we cannot make it - * a node of its own. Instead, we just check whether a source name is followed by 'M' and - * remember that. - */ -void PrefixNode::parse() -{ - const char next = PEEK(); - bool canAddSubstitution = false; - if (TemplateParamNode::mangledRepresentationStartsWith(next)) { - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TemplateParamNode); - if (TemplateArgsNode::mangledRepresentationStartsWith(PEEK())) { - parseState()->addSubstitution(parseState()->stackTop()); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TemplateArgsNode); - } - canAddSubstitution = true; - } else if (SubstitutionNode::mangledRepresentationStartsWith(next)) { - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(SubstitutionNode); - if (TemplateArgsNode::mangledRepresentationStartsWith(PEEK())) { - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TemplateArgsNode); - canAddSubstitution = true; - } - } else if (DeclTypeNode::mangledRepresentationStartsWith(next)) { - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(SubstitutionNode); - if (TemplateArgsNode::mangledRepresentationStartsWith(PEEK())) { - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TemplateArgsNode); - canAddSubstitution = true; - } - } - - while (UnqualifiedNameNode::mangledRepresentationStartsWith(PEEK())) { - if (canAddSubstitution) - parseState()->addSubstitution(parseState()->stackTop()); - else - canAddSubstitution = true; - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(UnqualifiedNameNode); - const bool isDataMember = CHILD_AT(MY_CHILD_AT(childCount() - 1), 0) - .dynamicCast() && PEEK() == 'M'; - if (isDataMember) { - // TODO: Being a data member is apparently relevant for initializers, but what does - // this mean for the demangled string? - ADVANCE(); - continue; - } - if (TemplateArgsNode::mangledRepresentationStartsWith(PEEK())) { - parseState()->addSubstitution(parseState()->stackTop()); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TemplateArgsNode); - } - } -} - -QByteArray PrefixNode::toByteArray() const -{ - if (childCount() == 0) - return QByteArray(); - QByteArray repr = CHILD_TO_BYTEARRAY(0); - for (int i = 1; i < childCount(); ++i) { - if (!MY_CHILD_AT(i).dynamicCast()) - repr += "::"; - repr += CHILD_TO_BYTEARRAY(i); - } - return repr; -} - - -TypeNode::TypeNode(const TypeNode &other) - : ParseTreeNode(other), m_type(other.type()) -{ -} - -bool TypeNode::mangledRepresentationStartsWith(char c) -{ - return BuiltinTypeNode::mangledRepresentationStartsWith(c) - || FunctionTypeNode::mangledRepresentationStartsWith(c) - || ClassEnumTypeRule::mangledRepresentationStartsWith(c) - || ArrayTypeNode::mangledRepresentationStartsWith(c) - || PointerToMemberTypeNode::mangledRepresentationStartsWith(c) - || TemplateParamNode::mangledRepresentationStartsWith(c) - || SubstitutionNode::mangledRepresentationStartsWith(c) - || CvQualifiersNode::mangledRepresentationStartsWith(c) - || DeclTypeNode::mangledRepresentationStartsWith(c) - || strchr("PROCGUD", c); - -} - -/* - * ::= - * ::= - * ::= - * ::= - * ::= - * ::= - * ::= - * ::= - * ::= # See Compression below - * ::= - * ::= P # pointer-to - * ::= R # reference-to - * ::= O # rvalue reference-to (C++0x) - * ::= C # complex pair (C 2000) - * ::= G # imaginary (C 2000) - * ::= U # vendor extended type qualifier - * ::= Dp # pack expansion of (C++0x) - * - * Because can expand to , we have to - * do a slight transformation: We get rid of and - * integrate its rhs into 's rhs. This leads to the following - * identical prefixes: - * ::= - * ::= - * ::= - * ::= - * - * Also, the first set of has some overlap with - * direct productions of , so these have to be worked around as well. - */ -void TypeNode::parse() -{ - QByteArray str = parseState()->readAhead(2); - if (str == "Dp") { - m_type = PackExpansionType; - parseState()->advance(2); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TypeNode); - } else { - const char next = PEEK(); - if (str == "Dt" || str == "DT") { - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(DeclTypeNode); - } else if (str == "Dd" || str == "De" || str == "Df" || str == "Dh" || str == "Di" || str == "Ds" - || (next != 'D' && BuiltinTypeNode::mangledRepresentationStartsWith(next))) { - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(BuiltinTypeNode); - } else if (FunctionTypeNode::mangledRepresentationStartsWith(next)) { - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(FunctionTypeNode); - parseState()->addSubstitution(parseState()->stackTop()); - } else if (ClassEnumTypeRule::mangledRepresentationStartsWith(next)) { - ClassEnumTypeRule::parse(parseState()); - parseState()->addSubstitution(parseState()->stackTop()); - } else if (ArrayTypeNode::mangledRepresentationStartsWith(next)) { - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(ArrayTypeNode); - parseState()->addSubstitution(parseState()->stackTop()); - } else if (PointerToMemberTypeNode::mangledRepresentationStartsWith(next)) { - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(PointerToMemberTypeNode); - parseState()->addSubstitution(parseState()->stackTop()); - } else if (TemplateParamNode::mangledRepresentationStartsWith(next)) { - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TemplateParamNode); - // The type is now a substitution candidate, but the child node may contain a forward - // reference, so we delay the substitution until it is resolved. - // TODO: Check whether this is really safe, i.e. whether the following parse function - // might indirectly expect this substitution to already exist. - - if (TemplateArgsNode::mangledRepresentationStartsWith(PEEK())) { - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TemplateArgsNode); - // Substitution delayed, see above. - } - - // Resolve forward reference, if necessary. - const TemplateParamNode::Ptr templateParamNode - = DEMANGLER_CAST(TemplateParamNode, MY_CHILD_AT(0)); - if (templateParamNode->childCount() == 0) { - if (templateParamNode->index() >= parseState()->templateParamCount()) { - throw ParseException(QString::fromLatin1("Invalid template parameter " - "index %1 in forwarding").arg(templateParamNode->index())); - } - templateParamNode->addChild(parseState() - ->templateParamAt(templateParamNode->index())); - } - - // Delayed substitutions from above. - parseState()->addSubstitution(templateParamNode); - if (childCount() > 1) - parseState()->addSubstitution(parseState()->stackTop()); - } else if (SubstitutionNode::mangledRepresentationStartsWith(next)) { - m_type = SubstitutionType; - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(SubstitutionNode); - if (TemplateArgsNode::mangledRepresentationStartsWith(PEEK())) { - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TemplateArgsNode); - parseState()->addSubstitution(parseState()->stackTop()); - } - } else if (CvQualifiersNode::mangledRepresentationStartsWith(next)) { - m_type = QualifiedType; - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(CvQualifiersNode); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TypeNode); - const CvQualifiersNode::Ptr cvNode = DEMANGLER_CAST(CvQualifiersNode, MY_CHILD_AT(0)); - if (cvNode->hasQualifiers()) - parseState()->addSubstitution(parseState()->stackTop()); - } else if (next == 'P') { - m_type = PointerType; - ADVANCE(); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TypeNode); - parseState()->addSubstitution(parseState()->stackTop()); - } else if (next == 'R') { - m_type = ReferenceType; - ADVANCE(); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TypeNode); - parseState()->addSubstitution(parseState()->stackTop()); - } else if (next == 'O') { - m_type = RValueType; - ADVANCE(); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TypeNode); - parseState()->addSubstitution(parseState()->stackTop()); - } else if (next == 'C') { - ADVANCE(); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TypeNode); - parseState()->addSubstitution(parseState()->stackTop()); - } else if (next == 'G') { - ADVANCE(); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TypeNode); - parseState()->addSubstitution(parseState()->stackTop()); - } else if (next == 'U') { - m_type = VendorType; - ADVANCE(); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(SourceNameNode); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TypeNode); - } else { - throw ParseException(QString::fromLatin1("Invalid type")); - } - } -} - -QByteArray TypeNode::description() const -{ - return "Type[type:" + QByteArray::number(m_type) + ']'; -} - -QByteArray TypeNode::toByteArray() const -{ - // A pure top-down approach is not possible to due to the weird function pointer syntax, - // e.g. things like (* const &)(int) etc. - // Instead, we have to gather all successive qualifiers, pointers and references first - // and then apply them as a whole to whatever follows. - // Note that "qualifier to function" is not possible here, since that is handled by - // PointerToMemberType. - QList qualPtrRefList; - const TypeNode *currentNode = this; - bool leafType = false; - Type lastType = TypeNode::OtherType; - while (!leafType) { - Type currentType = currentNode->m_type; - switch (currentType) { - case QualifiedType: { - const CvQualifiersNode::Ptr cvNode - = DEMANGLER_CAST(CvQualifiersNode, CHILD_AT(currentNode, 0)); - if (cvNode->hasQualifiers()) - qualPtrRefList << cvNode.data(); - currentNode = DEMANGLER_CAST(TypeNode, CHILD_AT(currentNode, 1)).data(); - break; - } - case PointerType: case ReferenceType: case RValueType: - /* - * The Standard says (8.3.2/6) that nested references collapse according - * to the following rules: - * (1) Reference to reference -> reference - * (2) Reference to rvalue -> reference - * (3) Rvalue to reference -> reference - * (4) Rvalue to Rvalue -> Rvalue - */ - if (currentType == ReferenceType - && (lastType == ReferenceType || lastType == RValueType)) { // (1) and (3) - qualPtrRefList.removeLast(); - qualPtrRefList << currentNode; - } else if (currentType == RValueType - && (lastType == ReferenceType || lastType == RValueType)) { // (2) and (4) - // Ignore current element. - currentType = lastType; - } else { - qualPtrRefList << currentNode; - } - currentNode = DEMANGLER_CAST(TypeNode, CHILD_AT(currentNode, 0)).data(); - break; - default: { - ParseTreeNode::Ptr childNode = CHILD_AT(currentNode, 0); - while (true) { - if (childCount() != 1) - break; - SubstitutionNode::Ptr substNode = childNode.dynamicCast(); - if (substNode && substNode->type() == SubstitutionNode::ActualSubstitutionType) { - childNode = CHILD_AT(childNode, 0); - } else if (childNode.dynamicCast()) { - childNode = CHILD_AT(childNode, 0); - if (childNode.dynamicCast()) - childNode = CHILD_AT(childNode, 0); - } else { - break; - } - } - if (childNode != CHILD_AT(currentNode, 0)) { - const TypeNode::Ptr nextCurrent = childNode.dynamicCast(); - if (nextCurrent) { - currentNode = nextCurrent.data(); - continue; - } - } - - leafType = true; - break; - } - } - lastType = currentType; - } - - if (qualPtrRefList.isEmpty()) { - switch (currentNode->m_type) { - case PackExpansionType: return CHILD_TO_BYTEARRAY(0) + "..."; - case VendorType: return pasteAllChildren(); - case OtherType: return pasteAllChildren(); - - // Can happen if qualifier node does not actually have qualifiers, e.g. in . - default: return pasteAllChildren(); - } - } - - return toByteArrayQualPointerRef(currentNode, qualPtrRefListToByteArray(qualPtrRefList)); -} - -QByteArray TypeNode::toByteArrayQualPointerRef(const TypeNode *typeNode, - const QByteArray &qualPtrRef) const -{ - const FunctionTypeNode::Ptr functionNode - = CHILD_AT(typeNode, 0).dynamicCast(); - if (functionNode) { - const BareFunctionTypeNode::Ptr bareFunctionNode - = DEMANGLER_CAST(BareFunctionTypeNode, CHILD_AT(functionNode, 0)); - QByteArray repr; - if (functionNode->isExternC()) - repr += "extern \"C\" "; - if (bareFunctionNode->hasReturnType()) - repr += CHILD_AT(bareFunctionNode, 0)->toByteArray() + ' '; - return repr += '(' + qualPtrRef + ')' + bareFunctionNode->toByteArray(); - } - - const ArrayTypeNode::Ptr arrayNode = CHILD_AT(typeNode, 0).dynamicCast(); - if (arrayNode) { - return CHILD_AT(arrayNode, 1)->toByteArray() + " (" + qualPtrRef + ")[" - + CHILD_AT(arrayNode, 0)->toByteArray() + ']'; - } - - if (CHILD_AT(typeNode, 0).dynamicCast()) - return typeNode->toByteArray() + qualPtrRef; - - return typeNode->toByteArray() + ' ' + qualPtrRef; -} - -QByteArray TypeNode::qualPtrRefListToByteArray(const QList &nodeList) const -{ - QByteArray repr; - for (const ParseTreeNode * const n : nodeList) { - const auto typeNode = dynamic_cast(n); - if (typeNode) { - switch (typeNode->m_type) { - case PointerType: - if (!repr.isEmpty() && !repr.startsWith('*')) - repr.prepend(' '); - repr.prepend('*'); - break; - case ReferenceType: - if (!repr.isEmpty()) - repr.prepend(' '); - repr.prepend('&'); - break; - case RValueType: - if (!repr.isEmpty()) - repr.prepend(' '); - repr.prepend("&&"); - break; - default: - DEMANGLER_ASSERT(false); - } - } else { - if (!repr.isEmpty()) - repr.prepend(' '); - repr.prepend(n->toByteArray()); - } - } - - return repr; -} - - -FloatValueNode::FloatValueNode(const FloatValueNode &other) = default; - -bool FloatValueNode::mangledRepresentationStartsWith(char c) -{ - return strchr("0123456789abcdef", c); -} - -/* - * Floating-point literals are encoded using a fixed-length lowercase - * hexadecimal string corresponding to the internal representation - * (IEEE on Itanium), high-order bytes first, without leading zeroes. - * For example: "Lf bf800000 E" is -1.0f on Itanium. - */ -void FloatValueNode::parse() -{ - m_value = 0; - while (mangledRepresentationStartsWith(PEEK())) { - // TODO: Construct value; - ADVANCE(); - } -} - -QByteArray FloatValueNode::description() const -{ - return "FloatValue[value:" + QByteArray::number(m_value) + ']'; -} - -QByteArray FloatValueNode::toByteArray() const -{ - return QByteArray::number(m_value); -} - - -/* ::= # non-virtual base override */ -void NvOffsetNode::parse() -{ - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(NumberNode); -} - -/* - * ::= _ - * # virtual base override, with vcall offset - */ -void VOffsetNode::parse() -{ - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(NumberNode); - if (ADVANCE() != '_') - throw ParseException(QString::fromLatin1("Invalid v-offset")); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(NumberNode); -} - - -bool LambdaSigNode::mangledRepresentationStartsWith(char c) -{ - return TypeNode::mangledRepresentationStartsWith(c); -} - -// ::= + # Parameter types or "v" if the lambda has no parameters -void LambdaSigNode::parse() -{ - do - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TypeNode); - while (TypeNode::mangledRepresentationStartsWith(PEEK())); -} - -QByteArray LambdaSigNode::toByteArray() const -{ - QByteArray repr = "lambda("; - for (int i = 0; i < childCount(); ++i) { - const QByteArray paramRepr = CHILD_TO_BYTEARRAY(i); - if (paramRepr != "void") - repr += paramRepr; - if (i < childCount() - 1) - repr += ", "; - } - return repr += ')'; -} - - -// ::= Ul E [ ] _ -void ClosureTypeNameNode::parse() -{ - if (parseState()->readAhead(2) != "Ul") - throw ParseException("Invalid closure-type-name"); - parseState()->advance(2); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(LambdaSigNode); - if (ADVANCE() != 'E') - throw ParseException("invalid closure-type-name"); - if (NonNegativeNumberNode<10>::mangledRepresentationStartsWith(PEEK())) - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(NonNegativeNumberNode<10>); - if (ADVANCE() != '_') - throw ParseException("Invalid closure-type-name"); -} - -QByteArray ClosureTypeNameNode::toByteArray() const -{ - QByteArray repr = CHILD_TO_BYTEARRAY(0) + '#'; - quint64 number; - if (childCount() == 2) { - const NonNegativeNumberNode<10>::Ptr numberNode - = DEMANGLER_CAST(NonNegativeNumberNode<10>, MY_CHILD_AT(1)); - number = numberNode->number() + 2; - } else { - number = 1; - } - return repr += QByteArray::number(number); -} - - -bool UnnamedTypeNameNode::mangledRepresentationStartsWith(char c) -{ - return c == 'U'; -} - -/* - * ::= Ut [ ] _ - * ::= - */ -void UnnamedTypeNameNode::parse() -{ - if (parseState()->readAhead(2) == "Ut") { - parseState()->advance(2); - if (NonNegativeNumberNode<10>::mangledRepresentationStartsWith(PEEK())) - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(NonNegativeNumberNode<10>); - if (ADVANCE() != '_') - throw ParseException("Invalid unnamed-type-node"); - } else { - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(ClosureTypeNameNode); - } -} - -QByteArray UnnamedTypeNameNode::toByteArray() const -{ - QByteArray repr(1, '{'); - if (childCount() == 0) { - repr += "unnamed type#1"; - } else { - const NonNegativeNumberNode<10>::Ptr numberNode - = MY_CHILD_AT(0).dynamicCast >(); - if (numberNode) - repr += "unnamed type#" + QByteArray::number(numberNode->number() + 2); - else - repr += CHILD_TO_BYTEARRAY(0); - } - return repr += '}'; -} - - -bool DeclTypeNode::mangledRepresentationStartsWith(char c) -{ - return c == 'D'; -} - -/* - * ::= Dt E # decltype of an id-expression or class member access (C++0x) - * ::= DT E # decltype of an expression (C++0x) - */ -void DeclTypeNode::parse() -{ - const QByteArray start = parseState()->readAhead(2); - if (start != "DT" && start != "Dt") - throw ParseException("Invalid decltype"); - parseState()->advance(2); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(ExpressionNode); - if (ADVANCE() != 'E') - throw ParseException(QString::fromLatin1("Invalid type")); -} - -QByteArray DeclTypeNode::toByteArray() const -{ - return "decltype(" + CHILD_TO_BYTEARRAY(0) + ')'; -} - - -bool UnresolvedTypeRule::mangledRepresentationStartsWith(char c) -{ - return TemplateParamNode::mangledRepresentationStartsWith(c) - || DeclTypeNode::mangledRepresentationStartsWith(c) - || SubstitutionNode::mangledRepresentationStartsWith(c); -} - -/* - * ::= - * ::= - * ::= - */ -void UnresolvedTypeRule::parse(GlobalParseState *parseState) -{ - const char next = parseState->peek(); - const ParseTreeNode::Ptr parentNode = parseState->stackTop(); - if (TemplateParamNode::mangledRepresentationStartsWith(next)) - PARSE_RULE_AND_ADD_RESULT_AS_CHILD_TO_NODE(TemplateParamNode, parseState, parentNode); - else if (DeclTypeNode::mangledRepresentationStartsWith(next)) - PARSE_RULE_AND_ADD_RESULT_AS_CHILD_TO_NODE(DeclTypeNode, parseState, parentNode); - else if (SubstitutionNode::mangledRepresentationStartsWith(next)) - PARSE_RULE_AND_ADD_RESULT_AS_CHILD_TO_NODE(SubstitutionNode, parseState, parentNode); - else - throw ParseException("Invalid unresolved-type"); -} - - -bool SimpleIdNode::mangledRepresentationStartsWith(char c) -{ - return SourceNameNode::mangledRepresentationStartsWith(c); -} - -// ::= [ ] -void SimpleIdNode::parse() -{ - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(SourceNameNode); - if (TemplateArgsNode::mangledRepresentationStartsWith(PEEK())) - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TemplateArgsNode); -} - -QByteArray SimpleIdNode::toByteArray() const -{ - return pasteAllChildren(); -} - - -bool DestructorNameNode::mangledRepresentationStartsWith(char c) -{ - return UnresolvedTypeRule::mangledRepresentationStartsWith(c) - || SimpleIdNode::mangledRepresentationStartsWith(c); -} - -/* - * ::= # e.g., ~T or ~decltype(f()) - * ::= # e.g., ~A<2*N> - */ -void DestructorNameNode::parse() -{ - const char next = PEEK(); - if (UnresolvedTypeRule::mangledRepresentationStartsWith(next)) - UnresolvedTypeRule::parse(parseState()); - else if (SimpleIdNode::mangledRepresentationStartsWith(next)) - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(SimpleIdNode); - else - throw ParseException("Invalid destructor-name"); -} - -QByteArray DestructorNameNode::toByteArray() const -{ - return '~' + CHILD_TO_BYTEARRAY(0); -} - - -bool UnresolvedQualifierLevelRule::mangledRepresentationStartsWith(char c) -{ - return SimpleIdNode::mangledRepresentationStartsWith(c); -} - -// ::= - void UnresolvedQualifierLevelRule::parse(GlobalParseState *parseState) -{ - PARSE_RULE_AND_ADD_RESULT_AS_CHILD_TO_NODE(SimpleIdNode, parseState, parseState->stackTop()); -} - - -BaseUnresolvedNameNode::BaseUnresolvedNameNode(GlobalParseState *parseState) - : ParseTreeNode(parseState) -{ -} - -BaseUnresolvedNameNode::BaseUnresolvedNameNode(const BaseUnresolvedNameNode &other) = default; - -bool BaseUnresolvedNameNode::mangledRepresentationStartsWith(char c) -{ - return SimpleIdNode::mangledRepresentationStartsWith(c) || c == 'o' || c == 'd'; -} - -/* - * ::= # unresolved name - * ::= on # unresolved operator-function-id - * ::= on # unresolved operator template-id - * ::= dn # destructor or pseudo-destructor; - * # e.g. ~X or ~X - */ -void BaseUnresolvedNameNode::parse() -{ - if (SimpleIdNode::mangledRepresentationStartsWith(PEEK())) { - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(SimpleIdNode); - } else if (parseState()->readAhead(2) == "on") { - m_isOperator = true; - parseState()->advance(2); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(OperatorNameNode); - if (TemplateArgsNode::mangledRepresentationStartsWith(PEEK())) - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TemplateArgsNode); - } else if (parseState()->readAhead(2) == "dn") { - parseState()->advance(2); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(DestructorNameNode); - } else { - throw ParseException("Invalid "); - } -} - -QByteArray BaseUnresolvedNameNode::description() const -{ - return "BaseUnresolvedName[isOperator:" + bool2String(m_isOperator) + ']'; -} - -QByteArray BaseUnresolvedNameNode::toByteArray() const -{ - QByteArray repr; - if (m_isOperator) - repr += "operator"; - return repr += pasteAllChildren(); -} - - -bool InitializerNode::mangledRepresentationStartsWith(char c) -{ - return c == 'p'; -} - -// ::= pi * E # parenthesized initialization -void InitializerNode::parse() -{ - if (parseState()->readAhead(2) != "pi") - throw ParseException("Invalid initializer"); - parseState()->advance(2); - while (ExpressionNode::mangledRepresentationStartsWith(PEEK())) - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(ExpressionNode); - if (ADVANCE() != 'E') - throw ParseException("Invalid initializer"); -} - -QByteArray InitializerNode::toByteArray() const -{ - QByteArray repr = "("; - for (int i = 0; i < childCount(); ++i) { - repr += CHILD_TO_BYTEARRAY(i); - if (i < childCount() - 1) - repr += ", "; - } - return repr += ')'; -} - - -UnresolvedNameNode::UnresolvedNameNode(const UnresolvedNameNode &other) = default; - -bool UnresolvedNameNode::mangledRepresentationStartsWith(char c) -{ - return BaseUnresolvedNameNode::mangledRepresentationStartsWith(c) || c == 'g' || c == 's'; -} - -/* - * ::= [gs] # x or (with "gs") ::x - * ::= sr # T::x / decltype(p)::x - * ::= srN + E - * # T::N::x /decltype(p)::N::x - * ::= [gs] sr + E - * # A::x, N::y, A::z; "gs" means leading "::" - */ -void UnresolvedNameNode::parse() -{ - if (parseState()->readAhead(2) == "gs") { - m_globalNamespace = true; - parseState()->advance(2); - } else { - m_globalNamespace = false; - } - if (parseState()->readAhead(2) == "sr") { - parseState()->advance(2); - if (PEEK() == 'N') { - ADVANCE(); - UnresolvedTypeRule::parse(parseState()); - do - UnresolvedQualifierLevelRule::parse(parseState()); - while (UnresolvedQualifierLevelRule::mangledRepresentationStartsWith(PEEK())); - if (ADVANCE() != 'E') - throw ParseException("Invalid unresolved-name"); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(BaseUnresolvedNameNode); - } else if (UnresolvedTypeRule::mangledRepresentationStartsWith(PEEK())) { - if (m_globalNamespace) - throw ParseException("Invalid unresolved-name"); - UnresolvedTypeRule::parse(parseState()); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(BaseUnresolvedNameNode); - } else { - if (!UnresolvedQualifierLevelRule::mangledRepresentationStartsWith(PEEK())) - throw ParseException("Invalid unresolved-name"); - while (UnresolvedQualifierLevelRule::mangledRepresentationStartsWith(PEEK())) - UnresolvedQualifierLevelRule::parse(parseState()); - if (ADVANCE() != 'E') - throw ParseException("Invalid unresolved-name"); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(BaseUnresolvedNameNode); - } - } else { - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(BaseUnresolvedNameNode); - } -} - -QByteArray UnresolvedNameNode::description() const -{ - return "UnresolvedName[globalNamespace:" + bool2String(m_globalNamespace) + ']'; -} - -QByteArray UnresolvedNameNode::toByteArray() const -{ - QByteArray repr; - if (m_globalNamespace) - repr += "::"; - for (int i = 0; i < childCount(); ++i) { - repr += CHILD_TO_BYTEARRAY(i); - if (i < childCount() - 1) - repr += "::"; - } - return repr; -} - - -bool FunctionParamNode::mangledRepresentationStartsWith(char c) -{ - return c == 'f'; -} - -/* - * ::= fp _ # L == 0, first parameter - * ::= fp _ # L == 0, second and later parameters - * ::= fL p _ # L > 0, first parameter - * ::= fL p _ # L > 0, second and later parameters - */ -void FunctionParamNode::parse() -{ - if (parseState()->readAhead(2) == "fp") { - parseState()->advance(2); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(CvQualifiersNode); - if (NonNegativeNumberNode<10>::mangledRepresentationStartsWith(PEEK())) - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(NonNegativeNumberNode<10>); - if (ADVANCE() != '_') - throw ParseException("Invalid function-param"); - } else if (parseState()->readAhead(2) == "fL") { - parseState()->advance(2); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(NonNegativeNumberNode<10>); - if (ADVANCE() != 'p') - throw ParseException("Invalid function-param"); - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(CvQualifiersNode); - if (NonNegativeNumberNode<10>::mangledRepresentationStartsWith(PEEK())) - PARSE_RULE_AND_ADD_RESULT_AS_CHILD(NonNegativeNumberNode<10>); - if (ADVANCE() != '_') - throw ParseException("Invalid function-param"); - } else { - throw ParseException("Invalid function-param"); - } -} - -QByteArray FunctionParamNode::toByteArray() const -{ - // We ignore L for now. - const NonNegativeNumberNode<10>::Ptr numberNode - = MY_CHILD_AT(childCount() - 1).dynamicCast >(); - const int paramNumber = numberNode ? numberNode->number() + 2 : 1; - const int cvIndex = MY_CHILD_AT(0).dynamicCast() ? 0 : 1; - const CvQualifiersNode::Ptr cvNode = DEMANGLER_CAST(CvQualifiersNode, MY_CHILD_AT(cvIndex)); - QByteArray repr = "{param#" + QByteArray::number(paramNumber); - if (cvNode->hasQualifiers()) - repr.append(' ').append(cvNode->toByteArray()); - repr += '}'; - return repr; -} - -} // namespace Internal -} // namespace Debugger diff --git a/src/plugins/debugger/namedemangler/parsetreenodes.h b/src/plugins/debugger/namedemangler/parsetreenodes.h deleted file mode 100644 index fb746fc271d..00000000000 --- a/src/plugins/debugger/namedemangler/parsetreenodes.h +++ /dev/null @@ -1,830 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -****************************************************************************/ - -#pragma once - -#include "globalparsestate.h" - -namespace Debugger { -namespace Internal { - -class ParseTreeNode -{ -public: - using Ptr = QSharedPointer; - - virtual ~ParseTreeNode(); - virtual QByteArray toByteArray() const = 0; - virtual ParseTreeNode::Ptr clone() const = 0; - - int childCount() const { return m_children.count(); } - void addChild(ParseTreeNode::Ptr childNode) { m_children << childNode; } - ParseTreeNode::Ptr childAt(int i, const QString &func, const QString &file, int line) const; - QByteArray pasteAllChildren() const; - - void print(int indentation) const; // For debugging. - - template static Ptr parseRule(GlobalParseState *parseState) - { - const Ptr node = Ptr(new T(parseState)); - parseState->pushToStack(node); - parseState->stackTop()->parse(); - return node; - } - -protected: - ParseTreeNode(GlobalParseState *parseState) : m_parseState(parseState) {} - ParseTreeNode(const ParseTreeNode &other); - QByteArray bool2String(bool b) const; - - GlobalParseState *parseState() const { return m_parseState; } - -private: - virtual void parse() = 0; - virtual QByteArray description() const = 0; // For debugging. - - QList m_children; // Convention: Children are inserted in parse order. - GlobalParseState * const m_parseState; -}; - -class ArrayTypeNode : public ParseTreeNode -{ -public: - ArrayTypeNode(GlobalParseState *parseState) : ParseTreeNode(parseState) {} - - static bool mangledRepresentationStartsWith(char c); - - QByteArray toByteArray() const override; - -private: - ArrayTypeNode(const ArrayTypeNode &other) = default; - ParseTreeNode::Ptr clone() const override { return Ptr(new ArrayTypeNode(*this)); } - - void parse() override; - QByteArray description() const override { return "ArrayType"; } -}; - -class BareFunctionTypeNode : public ParseTreeNode -{ -public: - using Ptr = QSharedPointer; - BareFunctionTypeNode(GlobalParseState *parseState); - static bool mangledRepresentationStartsWith(char c); - bool hasReturnType() const { return m_hasReturnType; } - QByteArray toByteArray() const override; - -private: - BareFunctionTypeNode(const BareFunctionTypeNode &other); - ParseTreeNode::Ptr clone() const override { return Ptr(new BareFunctionTypeNode(*this)); } - void parse() override; - QByteArray description() const override; - - bool m_hasReturnType = false; -}; - -class BuiltinTypeNode : public ParseTreeNode -{ -public: - using Ptr = QSharedPointer; - BuiltinTypeNode(GlobalParseState *parseState) : ParseTreeNode(parseState) {} - static bool mangledRepresentationStartsWith(char c); - QByteArray toByteArray() const override; - - enum Type { - VoidType, WCharType, BoolType, - PlainCharType, SignedCharType, UnsignedCharType, SignedShortType, UnsignedShortType, - SignedIntType, UnsignedIntType, SignedLongType, UnsignedLongType, - SignedLongLongType, UnsignedLongLongType, SignedInt128Type, UnsignedInt128Type, - FloatType, DoubleType, LongDoubleType, Float128Type, EllipsisType, - DecimalFloatingType64, DecimalFloatingType128, DecimalFloatingType32, - DecimalFloatingType16, Char32Type, Char16Type, AutoType, NullPtrType, VendorType - }; - Type type() const { return m_type; } - -private: - BuiltinTypeNode(const BuiltinTypeNode &other); - ParseTreeNode::Ptr clone() const override { return Ptr(new BuiltinTypeNode(*this)); } - void parse() override; - QByteArray description() const override; - - Type m_type; // TODO: define? -}; - -class CallOffsetRule -{ -public: - static bool mangledRepresentationStartsWith(char c); - static void parse(GlobalParseState *parseState); - -private: - CallOffsetRule(); -}; - -class NvOffsetNode : public ParseTreeNode -{ -public: - NvOffsetNode(GlobalParseState *parseState) : ParseTreeNode(parseState) {} - QByteArray toByteArray() const override { return QByteArray(); } // TODO: How to encode this? - -private: - NvOffsetNode(const NvOffsetNode &other) = default; - ParseTreeNode::Ptr clone() const override { return Ptr(new NvOffsetNode(*this)); } - void parse() override; - QByteArray description() const override { return "NvOffset"; } -}; - -class VOffsetNode : public ParseTreeNode -{ -public: - VOffsetNode(GlobalParseState *parseState) : ParseTreeNode(parseState) {} - QByteArray toByteArray() const override { return QByteArray(); } // TODO: How to encode this? - -private: - VOffsetNode(const VOffsetNode &other) = default; - ParseTreeNode::Ptr clone() const override { return Ptr(new VOffsetNode(*this)); } - void parse() override; - QByteArray description() const override { return "VOffset"; } -}; - -class ClassEnumTypeRule -{ -public: - static bool mangledRepresentationStartsWith(char c); - static void parse(GlobalParseState *parseState); - -private: - ClassEnumTypeRule(); -}; - -class DiscriminatorRule -{ -public: - static bool mangledRepresentationStartsWith(char c); - static void parse(GlobalParseState *parseState); - -private: - DiscriminatorRule(); -}; - -class CtorDtorNameNode : public ParseTreeNode -{ -public: - CtorDtorNameNode(GlobalParseState *parseState) : ParseTreeNode(parseState) {} - static bool mangledRepresentationStartsWith(char c); - QByteArray toByteArray() const override; - -private: - CtorDtorNameNode(const CtorDtorNameNode &other); - ParseTreeNode::Ptr clone() const override { return Ptr(new CtorDtorNameNode(*this)); } - void parse() override; - QByteArray description() const override; - - bool m_isDestructor; // TODO: define? - QByteArray m_representation; -}; - -class CvQualifiersNode : public ParseTreeNode -{ -public: - using Ptr = QSharedPointer; - CvQualifiersNode(GlobalParseState *parseState); - static bool mangledRepresentationStartsWith(char c); - bool hasQualifiers() const { return m_hasConst || m_hasVolatile; } - QByteArray toByteArray() const override; -private: - CvQualifiersNode(const CvQualifiersNode &other); - ParseTreeNode::Ptr clone() const override { return Ptr(new CvQualifiersNode(*this)); } - void parse() override; - QByteArray description() const override { return "CvQualifiers[" + toByteArray() + ']'; } - - bool m_hasConst = false; - bool m_hasVolatile = false; -}; - -class EncodingNode : public ParseTreeNode -{ -public: - EncodingNode(GlobalParseState *parseState) : ParseTreeNode(parseState) {} - static bool mangledRepresentationStartsWith(char c); - QByteArray toByteArray() const override; - -private: - EncodingNode(const EncodingNode &other) = default; - ParseTreeNode::Ptr clone() const override { return Ptr(new EncodingNode(*this)); } - void parse() override; - QByteArray description() const override { return "Encoding"; } -}; - -class ExpressionNode : public ParseTreeNode -{ -public: - ExpressionNode(GlobalParseState *parseState); - static bool mangledRepresentationStartsWith(char c); - QByteArray toByteArray() const override; - -private: - ExpressionNode(const ExpressionNode &other); - ParseTreeNode::Ptr clone() const override { return Ptr(new ExpressionNode(*this)); } - void parse() override; - QByteArray description() const override; - - enum Type { - ConversionType, SizeofType, AlignofType, OperatorType, ParameterPackSizeType, - NewType, ArrayNewType, DeleteType, ArrayDeleteType, PrefixIncrementType, - PrefixDecrementType, TypeIdTypeType, TypeIdExpressionType, DynamicCastType, - StaticCastType, ConstCastType, ReinterpretCastType, MemberAccessType, - PointerMemberAccessType, MemberDerefType, PackExpansionType, ThrowType, - RethrowType, OtherType - } m_type; // TODO: define? - bool m_globalNamespace = false; -}; - -class OperatorNameNode : public ParseTreeNode -{ -public: - using Ptr = QSharedPointer; - OperatorNameNode(GlobalParseState *parseState) : ParseTreeNode(parseState) {} - static bool mangledRepresentationStartsWith(char c); - - enum Type { - NewType, ArrayNewType, DeleteType, ArrayDeleteType, UnaryPlusType, UnaryMinusType, - UnaryAmpersandType, UnaryStarType, BitwiseNotType, BinaryPlusType, BinaryMinusType, - MultType, DivType, ModuloType, BitwiseAndType, BitwiseOrType, XorType, AssignType, - IncrementAndAssignType, DecrementAndAssignType, MultAndAssignType, DivAndAssignType, - ModuloAndAssignType, BitwiseAndAndAssignType, BitwiseOrAndAssignType, XorAndAssignType, - LeftShiftType, RightShiftType, LeftShiftAndAssignType, RightShiftAndAssignType, EqualsType, - NotEqualsType, LessType, GreaterType, LessEqualType, GreaterEqualType, LogicalNotType, - LogicalAndType, LogicalOrType, IncrementType, DecrementType, CommaType, ArrowStarType, - ArrowType, CallType, IndexType, TernaryType, SizeofTypeType, SizeofExprType, - AlignofTypeType, AlignofExprType, CastType, VendorType - }; - Type type() const { return m_type; } - - QByteArray toByteArray() const override; - -private: - OperatorNameNode(const OperatorNameNode &other); - ParseTreeNode::Ptr clone() const override { return Ptr(new OperatorNameNode(*this)); } - void parse() override; - QByteArray description() const override; - - Type m_type = VendorType; -}; - -class ExprPrimaryNode : public ParseTreeNode -{ -public: - ExprPrimaryNode(GlobalParseState *parseState); - static bool mangledRepresentationStartsWith(char c); - - QByteArray toByteArray() const override; - -private: - ExprPrimaryNode(const ExprPrimaryNode &other); - ParseTreeNode::Ptr clone() const override { return Ptr(new ExprPrimaryNode(*this)); } - void parse() override; - QByteArray description() const override; - - QByteArray m_suffix; - bool m_isNullPtr = false; -}; - -class FunctionTypeNode : public ParseTreeNode -{ -public: - using Ptr = QSharedPointer; - FunctionTypeNode(GlobalParseState *parseState); - static bool mangledRepresentationStartsWith(char c); - bool isExternC() const { return m_isExternC; } - QByteArray toByteArray() const override; - -private: - FunctionTypeNode(const FunctionTypeNode &other); - ParseTreeNode::Ptr clone() const override { return Ptr(new FunctionTypeNode(*this)); } - void parse() override; - QByteArray description() const override; - - bool m_isExternC = false; -}; - -class LocalNameNode : public ParseTreeNode -{ -public: - using Ptr = QSharedPointer; - LocalNameNode(GlobalParseState *parseState); - static bool mangledRepresentationStartsWith(char c); - QByteArray toByteArray() const override; - bool isTemplate() const; - bool isConstructorOrDestructorOrConversionOperator() const; - CvQualifiersNode::Ptr cvQualifiers() const; - -private: - LocalNameNode(const LocalNameNode &other); - ParseTreeNode::Ptr clone() const override { return Ptr(new LocalNameNode(*this)); } - void parse() override; - QByteArray description() const override; - - bool m_isStringLiteral = false; - bool m_isDefaultArg = false; -}; - -class MangledNameRule -{ -public: - static bool mangledRepresentationStartsWith(char c); - static void parse(GlobalParseState *parseState, const ParseTreeNode::Ptr &parentNode); - -private: - MangledNameRule(); -}; - -class NumberNode : public ParseTreeNode -{ -public: - NumberNode(GlobalParseState *parseState); - static bool mangledRepresentationStartsWith(char c); - QByteArray toByteArray() const override; - -private: - NumberNode(const NumberNode &other); - ParseTreeNode::Ptr clone() const override { return Ptr(new NumberNode(*this)); } - void parse() override; - QByteArray description() const override; - - bool m_isNegative = false; -}; - -class SourceNameNode : public ParseTreeNode -{ -public: - SourceNameNode(GlobalParseState *parseState) : ParseTreeNode(parseState) {} - static bool mangledRepresentationStartsWith(char c); - QByteArray toByteArray() const override { return m_name; } - -private: - SourceNameNode(const SourceNameNode &other); - ParseTreeNode::Ptr clone() const override { return Ptr(new SourceNameNode(*this)); } - void parse() override; - QByteArray description() const override; - - QByteArray m_name; -}; - -class UnqualifiedNameNode : public ParseTreeNode -{ -public: - using Ptr = QSharedPointer; - UnqualifiedNameNode(GlobalParseState *parseState) : ParseTreeNode(parseState) {} - static bool mangledRepresentationStartsWith(char c); - bool isConstructorOrDestructorOrConversionOperator() const; - QByteArray toByteArray() const override; - -private: - UnqualifiedNameNode(const UnqualifiedNameNode &other) = default; - ParseTreeNode::Ptr clone() const override { return Ptr(new UnqualifiedNameNode(*this)); } - void parse() override; - QByteArray description() const override { return "UnqualifiedName"; } -}; - -class UnscopedNameNode : public ParseTreeNode -{ -public: - UnscopedNameNode(GlobalParseState *parseState); - static bool mangledRepresentationStartsWith(char c); - bool isConstructorOrDestructorOrConversionOperator() const; - QByteArray toByteArray() const override; - -private: - UnscopedNameNode(const UnscopedNameNode &other); - ParseTreeNode::Ptr clone() const override { return Ptr(new UnscopedNameNode(*this)); } - void parse() override; - QByteArray description() const override; - - bool m_inStdNamespace = false; -}; - -class NestedNameNode : public ParseTreeNode -{ -public: - using Ptr = QSharedPointer; - NestedNameNode(GlobalParseState *parseState) : ParseTreeNode(parseState ){} - - static bool mangledRepresentationStartsWith(char c); - - bool isTemplate() const; - bool isConstructorOrDestructorOrConversionOperator() const; - CvQualifiersNode::Ptr cvQualifiers() const; - - QByteArray toByteArray() const override; - -private: - NestedNameNode(const NestedNameNode &other) = default; - ParseTreeNode::Ptr clone() const override { return Ptr(new NestedNameNode(*this)); } - void parse() override; - QByteArray description() const override { return "NestedName"; } -}; - -class SubstitutionNode : public ParseTreeNode -{ -public: - using Ptr = QSharedPointer; - SubstitutionNode(GlobalParseState *parseState) : ParseTreeNode(parseState) {} - static bool mangledRepresentationStartsWith(char c); - QByteArray toByteArray() const override; - - enum Type { - ActualSubstitutionType, StdType, StdAllocType, StdBasicStringType, FullStdBasicStringType, - StdBasicIStreamType, StdBasicOStreamType, StdBasicIoStreamType - }; - Type type() const { return m_type; } - -private: - SubstitutionNode(const SubstitutionNode &other); - ParseTreeNode::Ptr clone() const override { return Ptr(new SubstitutionNode(*this)); } - void parse() override; - QByteArray description() const override; - - Type m_type; // TODO: define? -}; - -class PointerToMemberTypeNode : public ParseTreeNode -{ -public: - PointerToMemberTypeNode(GlobalParseState *parseState) : ParseTreeNode(parseState) {} - static bool mangledRepresentationStartsWith(char c); - QByteArray toByteArray() const override; - -private: - PointerToMemberTypeNode(const PointerToMemberTypeNode &other) = default; - ParseTreeNode::Ptr clone() const override { return Ptr(new PointerToMemberTypeNode(*this)); } - void parse() override; - QByteArray description() const override { return "PointerToMember"; } -}; - -class TemplateParamNode : public ParseTreeNode -{ -public: - using Ptr = QSharedPointer; - - TemplateParamNode(GlobalParseState *parseState) : ParseTreeNode(parseState) {} - - static bool mangledRepresentationStartsWith(char c); - - int index() const { return m_index; } - - QByteArray toByteArray() const override; - -private: - TemplateParamNode(const TemplateParamNode &other); - ParseTreeNode::Ptr clone() const override { return Ptr(new TemplateParamNode(*this)); } - void parse() override; - QByteArray description() const override; - - int m_index; // TODO: define? -}; - -class TemplateArgsNode : public ParseTreeNode -{ -public: - TemplateArgsNode(GlobalParseState *parseState) : ParseTreeNode(parseState) {} - static bool mangledRepresentationStartsWith(char c); - QByteArray toByteArray() const override; - -private: - TemplateArgsNode(const TemplateArgsNode &other) = default; - ParseTreeNode::Ptr clone() const override { return Ptr(new TemplateArgsNode(*this)); } - void parse() override; - QByteArray description() const override { return "TemplateArgs"; } -}; - -class SpecialNameNode : public ParseTreeNode -{ -public: - SpecialNameNode(GlobalParseState *parseState) : ParseTreeNode(parseState) {} - static bool mangledRepresentationStartsWith(char c); - QByteArray toByteArray() const override; - -private: - SpecialNameNode(const SpecialNameNode &other); - ParseTreeNode::Ptr clone() const override { return Ptr(new SpecialNameNode(*this)); } - void parse() override; - QByteArray description() const override; - - enum Type { - VirtualTableType, VttStructType, TypeInfoType, TypeInfoNameType, GuardVarType, - SingleCallOffsetType, DoubleCallOffsetType - } m_type; // TODO: define? -}; - -template class NonNegativeNumberNode : public ParseTreeNode -{ -public: - using Ptr = QSharedPointer >; - NonNegativeNumberNode(GlobalParseState *parseState) : ParseTreeNode(parseState) {} - static bool mangledRepresentationStartsWith(char c) { - // Base can only be 10 or 36. - return (c >= '0' && c <= '9') || (base == 36 && c >= 'A' && c <= 'Z'); - } - quint64 number() const { return m_number; } - QByteArray toByteArray() const override; - -private: - NonNegativeNumberNode(const NonNegativeNumberNode &other); - ParseTreeNode::Ptr clone() const override { return Ptr(new NonNegativeNumberNode(*this)); } - void parse() override; - QByteArray description() const override; - - quint64 m_number; // TODO: define? -}; - -class NameNode : public ParseTreeNode -{ -public: - using Ptr = QSharedPointer; - - NameNode(GlobalParseState *parseState) : ParseTreeNode(parseState) {} - - static bool mangledRepresentationStartsWith(char c); - - bool isTemplate() const; - bool isConstructorOrDestructorOrConversionOperator() const; - CvQualifiersNode::Ptr cvQualifiers() const; - - QByteArray toByteArray() const override; - -private: - NameNode(const NameNode &other) = default; - ParseTreeNode::Ptr clone() const override { return Ptr(new NameNode(*this)); } - void parse() override; - QByteArray description() const override { return "Name"; } -}; - -class TemplateArgNode : public ParseTreeNode -{ -public: - TemplateArgNode(GlobalParseState *parseState); - static bool mangledRepresentationStartsWith(char c); - QByteArray toByteArray() const override; - -private: - TemplateArgNode(const TemplateArgNode &other); - ParseTreeNode::Ptr clone() const override { return Ptr(new TemplateArgNode(*this)); } - void parse() override; - QByteArray description() const override; - - bool m_isTemplateArgumentPack = false; -}; - -class PrefixNode : public ParseTreeNode -{ -public: - using Ptr = QSharedPointer; - PrefixNode(GlobalParseState *parseState) : ParseTreeNode(parseState) {} - - static bool mangledRepresentationStartsWith(char c); - - bool isTemplate() const; - bool isConstructorOrDestructorOrConversionOperator() const; - - QByteArray toByteArray() const override; - -private: - PrefixNode(const PrefixNode &other) = default; - ParseTreeNode::Ptr clone() const override { return Ptr(new PrefixNode(*this)); } - void parse() override; - QByteArray description() const override { return "Prefix"; } -}; - -class TypeNode : public ParseTreeNode -{ -public: - using Ptr = QSharedPointer; - - TypeNode(GlobalParseState *parseState) : ParseTreeNode(parseState) {} - - static bool mangledRepresentationStartsWith(char c); - - enum Type { - QualifiedType, PointerType, ReferenceType, RValueType, VendorType, PackExpansionType, - SubstitutionType, OtherType - }; - Type type() const { return m_type; } - - QByteArray toByteArray() const override; - -private: - TypeNode(const TypeNode &other); - ParseTreeNode::Ptr clone() const override { return Ptr(new TypeNode(*this)); } - void parse() override; - QByteArray description() const override; - - QByteArray toByteArrayQualPointerRef(const TypeNode *typeNode, - const QByteArray &qualPtrRef) const; - QByteArray qualPtrRefListToByteArray(const QList &nodeList) const; - - Type m_type = OtherType; -}; - -class FloatValueNode : public ParseTreeNode -{ -public: - FloatValueNode(GlobalParseState *parseState) : ParseTreeNode(parseState) {} - static bool mangledRepresentationStartsWith(char c); - QByteArray toByteArray() const override; - -private: - FloatValueNode(const FloatValueNode &other); - ParseTreeNode::Ptr clone() const override { return Ptr(new FloatValueNode(*this)); } - void parse() override; - QByteArray description() const override; - - double m_value; // TODO: define? -}; - -class LambdaSigNode : public ParseTreeNode -{ -public: - LambdaSigNode(GlobalParseState *parseState) : ParseTreeNode(parseState) {} - static bool mangledRepresentationStartsWith(char c); - QByteArray toByteArray() const override; - -private: - LambdaSigNode(const LambdaSigNode &other) = default; - ParseTreeNode::Ptr clone() const override { return Ptr(new LambdaSigNode(*this)); } - void parse() override; - QByteArray description() const override { return "LambdaSig"; } -}; - -class ClosureTypeNameNode : public ParseTreeNode -{ -public: - ClosureTypeNameNode(GlobalParseState *parseState) : ParseTreeNode(parseState) {} - QByteArray toByteArray() const override; - -private: - ClosureTypeNameNode(const ClosureTypeNameNode &other) = default; - ParseTreeNode::Ptr clone() const override { return Ptr(new ClosureTypeNameNode(*this)); } - void parse() override; - QByteArray description() const override { return "ClosureType"; } -}; - -class UnnamedTypeNameNode : public ParseTreeNode -{ -public: - UnnamedTypeNameNode(GlobalParseState *parseState) : ParseTreeNode(parseState) {} - static bool mangledRepresentationStartsWith(char c); - QByteArray toByteArray() const override; - -private: - UnnamedTypeNameNode(const UnnamedTypeNameNode &other) = default; - ParseTreeNode::Ptr clone() const override { return Ptr(new UnnamedTypeNameNode(*this)); } - void parse() override; - QByteArray description() const override { return "UnnnamedType"; } -}; - -class DeclTypeNode : public ParseTreeNode -{ -public: - DeclTypeNode(GlobalParseState *parseState) : ParseTreeNode(parseState) {} - static bool mangledRepresentationStartsWith(char c); - QByteArray toByteArray() const override; - -private: - DeclTypeNode(const DeclTypeNode &other) = default; - ParseTreeNode::Ptr clone() const override { return Ptr(new DeclTypeNode(*this)); } - void parse() override; - QByteArray description() const override { return "DeclType"; } -}; - -class UnresolvedTypeRule -{ -public: - static bool mangledRepresentationStartsWith(char c); - static void parse(GlobalParseState *parseState); - -private: - UnresolvedTypeRule(); -}; - -class SimpleIdNode : public ParseTreeNode -{ -public: - SimpleIdNode(GlobalParseState *parseState) : ParseTreeNode(parseState) {} - static bool mangledRepresentationStartsWith(char c); - QByteArray toByteArray() const override; - -private: - SimpleIdNode(const SimpleIdNode &other) = default; - ParseTreeNode::Ptr clone() const override { return Ptr(new SimpleIdNode(*this)); } - void parse() override; - QByteArray description() const override { return "SimpleId"; } -}; - -class DestructorNameNode : public ParseTreeNode -{ -public: - DestructorNameNode(GlobalParseState *parseState) : ParseTreeNode(parseState) {} - static bool mangledRepresentationStartsWith(char c); - QByteArray toByteArray() const override; - -private: - DestructorNameNode(const DestructorNameNode &other) = default; - ParseTreeNode::Ptr clone() const override { return Ptr(new DestructorNameNode(*this)); } - void parse() override; - QByteArray description() const override { return "DesctuctorName"; } -}; - -class UnresolvedQualifierLevelRule -{ -public: - static bool mangledRepresentationStartsWith(char c); - static void parse(GlobalParseState *parseState); - -private: - UnresolvedQualifierLevelRule(); -}; - -class BaseUnresolvedNameNode : public ParseTreeNode -{ -public: - BaseUnresolvedNameNode(GlobalParseState *parseState); - static bool mangledRepresentationStartsWith(char c); - QByteArray toByteArray() const override; - -private: - BaseUnresolvedNameNode(const BaseUnresolvedNameNode &other); - ParseTreeNode::Ptr clone() const override { return Ptr(new BaseUnresolvedNameNode(*this)); } - void parse() override; - QByteArray description() const override; - - bool m_isOperator = false; -}; - -class InitializerNode : public ParseTreeNode -{ -public: - InitializerNode(GlobalParseState *parseState) : ParseTreeNode(parseState) {} - static bool mangledRepresentationStartsWith(char c); - QByteArray toByteArray() const override; - -private: - InitializerNode(const InitializerNode &other) = default; - ParseTreeNode::Ptr clone() const override { return Ptr(new InitializerNode(*this)); } - void parse() override; - QByteArray description() const override { return "Initializer"; } -}; - -class UnresolvedNameNode : public ParseTreeNode -{ -public: - UnresolvedNameNode(GlobalParseState *parseState) : ParseTreeNode(parseState) {} - static bool mangledRepresentationStartsWith(char c); - QByteArray toByteArray() const override; - -private: - UnresolvedNameNode(const UnresolvedNameNode &other); - ParseTreeNode::Ptr clone() const override { return Ptr(new UnresolvedNameNode(*this)); } - void parse() override; - QByteArray description() const override; - - bool m_globalNamespace; // TODO: define? -}; - -class FunctionParamNode : public ParseTreeNode -{ -public: - FunctionParamNode(GlobalParseState *parseState) : ParseTreeNode(parseState) {} - static bool mangledRepresentationStartsWith(char c); - QByteArray toByteArray() const override; - -private: - FunctionParamNode(const FunctionParamNode &other) = default; - ParseTreeNode::Ptr clone() const override { return Ptr(new FunctionParamNode(*this)); } - void parse() override; - QByteArray description() const override { return "FunctionParam"; } -}; - -} // namespace Internal -} // namespace Debugger diff --git a/tests/auto/debugger/CMakeLists.txt b/tests/auto/debugger/CMakeLists.txt index 794c43bdc66..66900623c34 100644 --- a/tests/auto/debugger/CMakeLists.txt +++ b/tests/auto/debugger/CMakeLists.txt @@ -32,15 +32,6 @@ add_qtc_test(tst_debugger_gdb "${DEBUGGERDIR}/debuggerprotocol.cpp" "${DEBUGGERDIR}/debuggerprotocol.h" ) -add_qtc_test(tst_debugger_namedemangler - INCLUDES "${DEBUGGERDIR}" - SOURCES - tst_namedemangler.cpp - "${DEBUGGERDIR}/namedemangler/globalparsestate.cpp" "${DEBUGGERDIR}/namedemangler/globalparsestate.h" - "${DEBUGGERDIR}/namedemangler/namedemangler.cpp" "${DEBUGGERDIR}/namedemangler/namedemangler.h" - "${DEBUGGERDIR}/namedemangler/parsetreenodes.cpp" "${DEBUGGERDIR}/namedemangler/parsetreenodes.h" -) - add_qtc_test(tst_debugger_offsets DEPENDS Qt5::CorePrivate INCLUDES "${DEBUGGERDIR}" diff --git a/tests/auto/debugger/debugger.pro b/tests/auto/debugger/debugger.pro index 12a115c9195..284db38b0c8 100644 --- a/tests/auto/debugger/debugger.pro +++ b/tests/auto/debugger/debugger.pro @@ -10,7 +10,5 @@ CONFIG += ordered SUBDIRS += gdb.pro SUBDIRS += simplifytypes.pro SUBDIRS += dumpers.pro -SUBDIRS += namedemangler.pro SUBDIRS += disassembler.pro SUBDIRS += offsets.pro - diff --git a/tests/auto/debugger/debugger.qbs b/tests/auto/debugger/debugger.qbs index 5f3fffecafb..456c604b261 100644 --- a/tests/auto/debugger/debugger.qbs +++ b/tests/auto/debugger/debugger.qbs @@ -7,7 +7,6 @@ Project { "disassembler.qbs", "dumpers.qbs", "gdb.qbs", - "namedemangler.qbs", "offsets.qbs", "simplifytypes.qbs", ] diff --git a/tests/auto/debugger/namedemangler.pro b/tests/auto/debugger/namedemangler.pro deleted file mode 100644 index 241e1e2759b..00000000000 --- a/tests/auto/debugger/namedemangler.pro +++ /dev/null @@ -1,10 +0,0 @@ -QT -= gui - -include(../qttest.pri) - -DEBUGGERDIR = $$IDE_SOURCE_TREE/src/plugins/debugger -INCLUDEPATH += $$DEBUGGERDIR - -SOURCES = tst_namedemangler.cpp -include($$DEBUGGERDIR/namedemangler/namedemangler.pri) - diff --git a/tests/auto/debugger/namedemangler.qbs b/tests/auto/debugger/namedemangler.qbs deleted file mode 100644 index d6356728d6f..00000000000 --- a/tests/auto/debugger/namedemangler.qbs +++ /dev/null @@ -1,18 +0,0 @@ -import qbs - -QtcAutotest { - name: "Name demangler autotest" - - cpp.enableExceptions: true - - Group { - name: "Sources from Debugger plugin" - prefix: project.debuggerDir + "namedemangler/" - files: ["*.h", "*.cpp"] - } - Group { - name: "Test sources" - files: "tst_namedemangler.cpp" - } - cpp.includePaths: base.concat([project.debuggerDir]) -} diff --git a/tests/auto/debugger/tst_namedemangler.cpp b/tests/auto/debugger/tst_namedemangler.cpp deleted file mode 100644 index 42bafab0aaf..00000000000 --- a/tests/auto/debugger/tst_namedemangler.cpp +++ /dev/null @@ -1,616 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -****************************************************************************/ - -#include -#include - -#include -#include -#include - -#include - -const char *toString(char c) { return (QByteArray("'") + c + "'").constData(); } - -using namespace Debugger::Internal; -using namespace QTest; - -class NameDemanglerAutoTest : public QObject -{ - Q_OBJECT -private slots: - void testUnmangledName(); - void testDisjunctFirstSets(); - void testCorrectlyMangledNames(); - void testCorrectlyMangledNames_data(); - void testIncorrectlyMangledNames(); - -private: - void testIncorrectlyMangledName(const QString &mangledName); - NameDemangler demangler; -}; - -void NameDemanglerAutoTest::testUnmangledName() -{ - QVERIFY(demangler.demangle(QLatin1String("f")) - && demangler.demangledName() == QLatin1String("f")); -} - -void NameDemanglerAutoTest::testCorrectlyMangledNames() -{ - QFETCH(QString, demangled); - QString mangled = QString::fromLatin1(currentDataTag()); - - QVERIFY2(demangler.demangle(mangled), qPrintable(demangler.errorString())); - QCOMPARE(demangler.demangledName(), demangled); -} - -void NameDemanglerAutoTest::testCorrectlyMangledNames_data() -{ - addColumn("demangled"); - - newRow("_Z1fv") - << "f()"; - newRow("_Z1fi") - << "f(int)"; -#ifdef Q_OS_LINUX - newRow("_Z3foo3bar") - << "foo(bar)"; - newRow("_Zrm1XS_") - << "operator%(X, X)"; - newRow("_ZplR1XS0_") - << "operator+(X &, X &)"; - newRow("_ZlsRK1XS1_") - << "operator<<(X const &, X const &)"; - newRow("_ZN3FooIA4_iE3barE") - << "Foo::bar"; - newRow("_Z5firstI3DuoEvS0_") - << "void first(Duo)"; - newRow("_Z5firstI3DuoEvT_") - << "void first(Duo)"; - newRow("_Z3fooIiPFidEiEvv") - << "void foo()"; - newRow("_ZN1N1fE") - << "N::f"; - newRow("_ZN6System5Sound4beepEv") - << "System::Sound::beep()"; - newRow("_ZN5Arena5levelE") - << "Arena::level"; - newRow("_ZN5StackIiiE5levelE") - << "Stack::level"; - newRow("_Z1fI1XEvPVN1AIT_E1TE") - << "void f(A::T volatile *)"; - newRow("_ZngILi42EEvN1AIXplT_Li2EEE1TE") - << "void operator-<42>(A<42 + 2>::T)"; - newRow("_Z4makeI7FactoryiET_IT0_Ev") - << "Factory make()"; - newRow("_Z3foo5Hello5WorldS0_S_") - << "foo(Hello, World, World, Hello)"; - newRow("_Z3fooPM2ABi") - << "foo(int AB::**)"; - newRow("_ZlsRSoRKSs") - << "operator<<(std::basic_ostream > &, " - "std::basic_string, " - "std::allocator > const &)"; - newRow("_ZTI7a_class") - << "typeid(a_class)"; - newRow("_ZZN1A3fooEiE1B") - << "A::foo(int)::B"; - newRow("_ZZ3foovEN1C1DE") - << "foo()::C::D"; - newRow("_ZZZ3foovEN1C3barEvEN1E3bazEv") - << "foo()::C::bar()::E::baz()"; - newRow("_ZZN1N1fEiE1p") - << "N::f(int)::p"; - newRow("_ZZN1N1fEiEs") - << "N::f(int)::{string literal}"; - newRow("_Z41__static_initialization_and_destruction_0ii") - << "__static_initialization_and_destruction_0(int, int)"; - newRow("_ZN20NameDemanglerPrivate3eoiE") - << "NameDemanglerPrivate::eoi"; - newRow("_ZZN20NameDemanglerPrivate15parseIdentifierEiE8__func__") - << "NameDemanglerPrivate::parseIdentifier(int)::__func__"; - newRow("_ZN4QSetI5QCharED1Ev") - << "QSet::~QSet()"; - newRow("_Zne5QCharS_") - << "operator!=(QChar, QChar)"; - newRow("_ZN20NameDemanglerPrivate17parseFunctionTypeEv") - << "NameDemanglerPrivate::parseFunctionType()"; - newRow("_ZNK20NameDemanglerPrivate16ArrayNewOperator8makeExprERK11QStringList") - << "NameDemanglerPrivate::ArrayNewOperator::makeExpr(QStringList const &) const"; - newRow("_ZN13QLatin1StringC1EPKc") - << "QLatin1String::QLatin1String(char const *)"; - newRow("_ZN15QtSharedPointer16ExternalRefCountIN20NameDemanglerPrivate8OperatorEE12internalCopyIS2_EEvRKNS0_IT_EE") - << "void QtSharedPointer::ExternalRefCount" - "::internalCopy(QtSharedPointer" - "::ExternalRefCount const &)"; - newRow("_ZN15QtSharedPointer16ExternalRefCountIN20NameDemanglerPrivate8OperatorEE11internalSetEPNS_20ExternalRefCountDataEPS2_") - << "QtSharedPointer::ExternalRefCount" - "::internalSet(QtSharedPointer::ExternalRefCountData *, NameDemanglerPrivate::Operator *)"; - newRow("_ZN20NameDemanglerPrivate17parseUnscopedNameEv") - << "NameDemanglerPrivate::parseUnscopedName()"; - newRow("_ZNK7QString3argExiiRK5QChar") - << "QString::arg(long long, int, int, QChar const &) const"; - newRow("_ZN20NameDemanglerPrivate8OperatorC2ERK7QStringS3_") - << "NameDemanglerPrivate::Operator::Operator(QString const &, QString const &)"; - newRow("_ZN15QtSharedPointer16ExternalRefCountIN20NameDemanglerPrivate8OperatorEEC2EN2Qt14InitializationE") - << "QtSharedPointer::ExternalRefCount::ExternalRefCount(Qt::Initialization)"; - newRow("_ZN7QString5clearEv") - << "QString::clear()"; - newRow("_ZNK5QListI7QStringE2atEi") - << "QList::at(int) const"; - newRow("_ZNK7QString10startsWithERKS_N2Qt15CaseSensitivityE") - << "QString::startsWith(QString const &, Qt::CaseSensitivity) const"; - newRow("_ZNK4QSetI5QCharE8constEndEv") - << "QSet::constEnd() const"; - newRow("_Z11qt_assert_xPKcS0_S0_i") - << "qt_assert_x(char const *, char const *, char const *, int)"; - newRow("_ZN9QHashData8willGrowEv") - << "QHashData::willGrow()"; - newRow("_ZNK5QHashI5QChar15QHashDummyValueE14const_iteratorneERKS3_") - << "QHash::const_iterator::operator!=" - "(QHash::const_iterator const &) const"; - newRow("_ZNK13NameDemangler11errorStringEv") - << "NameDemangler::errorString() const"; - newRow("_ZN7QString7replaceERK7QRegExpRKS_") - << "QString::replace(QRegExp const &, QString const &)"; - newRow("_ZN7QString4freeEPNS_4DataE") - << "QString::free(QString::Data *)"; - newRow("_ZTSN20NameDemanglerPrivate19ArrayAccessOperatorE") - << "typeid(NameDemanglerPrivate::ArrayAccessOperator).name()"; - newRow("_ZN3ns11fERKPFPKiS1_RKhE") - << "ns1::f(int const * (* const &)(int const *, unsigned char const &))"; - newRow("_Z9test_funcMN3ns11cImEEKFPKvPiRlmE") - << "test_func(void const * (ns1::c::*)(int *, long &, unsigned long) const)"; - newRow("_ZN3ns11fEPKPFPKiS1_RKhE") - << "ns1::f(int const * (* const *)(int const *, unsigned char const &))"; - newRow("_ZNK1CcviEv") - << "C::operator int() const"; - newRow("_ZN1CppEv") - << "C::operator++()"; - newRow("_ZN1CmmEv") - << "C::operator--()"; - newRow("_ZN1CppEi") - << "C::operator++(int)"; - newRow("_ZN1CmmEi") - << "C::operator--(int)"; - newRow("_ZNK1CcvT_IPKcEEv") - << "C::operator char const *() const"; - newRow("_Z9weirdfuncIiEvT_KPFS0_S0_E") - << "void weirdfunc(int, int (* const)(int))"; - newRow("_Z9weirdfuncIiEvT_PFS0_DtfL1p_EE") - << "void weirdfunc(int, int (*)(decltype({param#1})))"; - newRow("_Z9weirdfuncIiEvT_S0_") - << "void weirdfunc(int, int)"; - newRow("_Z9weirdfuncIiEvT_DtfL0p_E") - << "void weirdfunc(int, decltype({param#1}))"; - newRow("_Z9weirdfuncIiEvT_S0_S0_") - << "void weirdfunc(int, int, int)"; - newRow("_Z9weirdfuncIiEvT_S0_DtfL0p0_E") - << "void weirdfunc(int, int, decltype({param#2}))"; - newRow("_Z8toStringIiESsT_") - << "std::basic_string, std::allocator > toString(int)"; - - newRow("_Z4funcIRA5_iEvOT_") - << "void func(int (&)[5])"; - newRow("_ZSt9make_pairIiRA5_KcESt4pairINSt17__decay_and_stripIT_E6__typeENS4_IT0_E6__typeEEOS5_OS8_") - << "std::pair::__type, " - "std::__decay_and_strip::__type> " - "std::make_pair(int &&, char const (&)[5])"; - - // All examples from the ABI spec. - newRow("_ZN1S1xE") - << "S::x"; - newRow("_Z1fM1AKFvvE") - << "f(void (A::*)() const)"; - newRow("_Z1fIiEvT_") - << "void f(int)"; - newRow("_Z3fooc") - << "foo(char)"; - newRow("_Z2CBIL_Z3foocEE") - << "CB"; - newRow("_Z2CBIL_Z7IsEmptyEE") - << "CB"; - newRow("_ZZ1giEN1S1fE_2i") - << "g(int)::S::f(int)"; - newRow("_ZZ1gvEN1SC1Ev") - << "g()::S::S()"; - newRow("_ZZZ1gvEN1SC1EvEs") - << "g()::S::S()::{string literal}"; - newRow("_ZZ1gvE5str4a") - << "g()::str4a"; - newRow("_ZZ1gvEs_1") - << "g()::{string literal}"; - newRow("_ZZ1gvE5str4b") - << "g()::str4b"; - newRow("_Z1fPFvvEM1SFvvE") - << "f(void (*)(), void (S::*)())"; - newRow("_ZN1N1TIiiE2mfES0_IddE") - << "N::T::mf(N::T)"; - newRow("_ZSt5state") - << "std::state"; - newRow("_ZNSt3_In4wardE") - << "std::_In::ward"; - newRow("_Z1fN1SUt_E") - << "f(S::{unnamed type#1})"; - newRow("_ZZZ1giEN1S1fE_2iEUt1_") - << "g(int)::S::f(int)::{unnamed type#3}"; - newRow("_ZZZ1giEN1S1fE_2iENUt1_2fxEv") - << "g(int)::S::f(int)::{unnamed type#3}::fx()"; - newRow("_Z1AIcfE") - << "A"; - newRow("_Z1fIiEvT_PDtfL0pK_E") - << "void f(int, decltype({param#1 const}) *)"; - newRow("_Z1AILln42EE") - << "A<-42L>"; - newRow("_Z2f1I1QEDTpldtfp_1xdtL_Z1qE1xET_") - << "decltype({param#1}.x + q.x) f1(Q)"; - newRow("_Z2f2I1QEDTpldtfp_1xsrS0_1xET_") - << "decltype({param#1}.x + Q::x) f2(Q)"; - newRow("_Z2f3IiEDTplfp_dtL_Z1dEsr1B1XIT_EE1xES1_") - << "decltype({param#1} + d.B::X::x) f3(int)"; - newRow("_Z3fooILi2EEvRAplT_Li1E_i") - << "void foo<2>(int (&)[2 + 1])"; - newRow("_ZZ1giENKUlvE_clEv") - << "g(int)::{lambda()#1}::operator()() const"; - newRow("_ZZ1giENKUlvE0_clEv") - << "g(int)::{lambda()#2}::operator()() const"; - newRow("_ZNK1SIiE1xMUlvE_clEv") - << "S::x::{lambda()#1}::operator()() const"; - newRow("_ZN1S4funcEii") - << "S::func(int, int)"; - - // Note: c++filt from binutils 2.22 demangles these wrong (counts default arguments from first instead of from last) - newRow("_ZZN1S1fEiiEd0_NKUlvE_clEv") - << "S::f(int, int)::{default arg#1}::{lambda()#1}::operator()() const"; - newRow("_ZZN1S1fEiiEd0_NKUlvE0_clEv") - << "S::f(int, int)::{default arg#1}::{lambda()#2}::operator()() const"; - newRow("_ZZN1S1fEiiEd_NKUlvE_clEv") - << "S::f(int, int)::{default arg#2}::{lambda()#1}::operator()() const"; - - // Note: gcc 4.6.3 encodes this as "_Z2f4I7OpClassEDTadsrT_miES1_". - newRow("_Z2f4I7OpClassEDTadsrT_onmiES0_") - << "decltype(&OpClass::operator-) f4(OpClass)"; -#else - qDebug("Most tests disabled outside Linux"); -#endif -} - -void NameDemanglerAutoTest::testIncorrectlyMangledNames() -{ -} - -void NameDemanglerAutoTest::testDisjunctFirstSets() -{ - for (char c = 0x20; c < 0x7e; ++c) { - - // - QVERIFY(!NameNode::mangledRepresentationStartsWith(c) - || !SpecialNameNode::mangledRepresentationStartsWith(c)); - - // - QVERIFY(!NestedNameNode::mangledRepresentationStartsWith(c) - || !UnscopedNameNode::mangledRepresentationStartsWith(c)); - QVERIFY(!NestedNameNode::mangledRepresentationStartsWith(c) - || !SubstitutionNode::mangledRepresentationStartsWith(c)); - QVERIFY(!NestedNameNode::mangledRepresentationStartsWith(c) - || !LocalNameNode::mangledRepresentationStartsWith(c)); - QVERIFY(!UnscopedNameNode::mangledRepresentationStartsWith(c) - || !SubstitutionNode::mangledRepresentationStartsWith(c) || c == 'S'); - QVERIFY(!UnscopedNameNode::mangledRepresentationStartsWith(c) - || !LocalNameNode::mangledRepresentationStartsWith(c)); - QVERIFY(!SubstitutionNode::mangledRepresentationStartsWith(c) - || !LocalNameNode::mangledRepresentationStartsWith(c)); - - // - QVERIFY(!CvQualifiersNode::mangledRepresentationStartsWith(c) - || !PrefixNode::mangledRepresentationStartsWith(c) || c == 'r'); - - // - QVERIFY(!TemplateParamNode::mangledRepresentationStartsWith(c) - || !SubstitutionNode::mangledRepresentationStartsWith(c)); - QVERIFY(!TemplateArgsNode::mangledRepresentationStartsWith(c) - || !UnqualifiedNameNode::mangledRepresentationStartsWith(c)); - QVERIFY(!TemplateParamNode::mangledRepresentationStartsWith(c) - || !UnqualifiedNameNode::mangledRepresentationStartsWith(c)); - QVERIFY(!SubstitutionNode::mangledRepresentationStartsWith(c) - || !UnqualifiedNameNode::mangledRepresentationStartsWith(c)); - - // - QVERIFY(!TypeNode::mangledRepresentationStartsWith(c) - || !ExprPrimaryNode::mangledRepresentationStartsWith(c)); - - // - QVERIFY(!OperatorNameNode::mangledRepresentationStartsWith(c) - || !TemplateParamNode::mangledRepresentationStartsWith(c)); - QVERIFY(!OperatorNameNode::mangledRepresentationStartsWith(c) - || !FunctionParamNode::mangledRepresentationStartsWith(c)); - QVERIFY2(!OperatorNameNode::mangledRepresentationStartsWith(c) - || !UnresolvedNameNode::mangledRepresentationStartsWith(c) - || c == 'd' || c == 'g' || c == 'o' || c == 's', toString(c)); - QVERIFY(!OperatorNameNode::mangledRepresentationStartsWith(c) - || !ExprPrimaryNode::mangledRepresentationStartsWith(c)); - QVERIFY(!TemplateParamNode::mangledRepresentationStartsWith(c) - || !FunctionParamNode::mangledRepresentationStartsWith(c)); - QVERIFY(!TemplateParamNode::mangledRepresentationStartsWith(c) - || !ExprPrimaryNode::mangledRepresentationStartsWith(c)); - QVERIFY(!TemplateParamNode::mangledRepresentationStartsWith(c) - || !FunctionParamNode::mangledRepresentationStartsWith(c)); - QVERIFY(!TemplateParamNode::mangledRepresentationStartsWith(c) - || !UnresolvedNameNode::mangledRepresentationStartsWith(c)); - QVERIFY(!FunctionParamNode::mangledRepresentationStartsWith(c) - || !UnresolvedNameNode::mangledRepresentationStartsWith(c)); - QVERIFY(!FunctionParamNode::mangledRepresentationStartsWith(c) - || !ExprPrimaryNode::mangledRepresentationStartsWith(c)); - - // - QVERIFY(!TypeNode::mangledRepresentationStartsWith(c) - || !MangledNameRule::mangledRepresentationStartsWith(c)); - - // - QVERIFY(!BuiltinTypeNode::mangledRepresentationStartsWith(c) - || !FunctionTypeNode::mangledRepresentationStartsWith(c)); - QVERIFY2(!BuiltinTypeNode::mangledRepresentationStartsWith(c) - || !ClassEnumTypeRule::mangledRepresentationStartsWith(c) || c == 'D', toString(c)); - QVERIFY(!BuiltinTypeNode::mangledRepresentationStartsWith(c) - || !ArrayTypeNode::mangledRepresentationStartsWith(c)); - QVERIFY(!BuiltinTypeNode::mangledRepresentationStartsWith(c) - || !PointerToMemberTypeNode::mangledRepresentationStartsWith(c)); - QVERIFY(!BuiltinTypeNode::mangledRepresentationStartsWith(c) - || !TemplateParamNode::mangledRepresentationStartsWith(c)); - QVERIFY(!BuiltinTypeNode::mangledRepresentationStartsWith(c) - || !SubstitutionNode::mangledRepresentationStartsWith(c)); - QVERIFY(!BuiltinTypeNode::mangledRepresentationStartsWith(c) - || !CvQualifiersNode::mangledRepresentationStartsWith(c)); - QVERIFY(!BuiltinTypeNode::mangledRepresentationStartsWith(c) - || !DeclTypeNode::mangledRepresentationStartsWith(c) || c == 'D'); - QVERIFY(!FunctionTypeNode::mangledRepresentationStartsWith(c) - || !ClassEnumTypeRule::mangledRepresentationStartsWith(c)); - QVERIFY(!FunctionTypeNode::mangledRepresentationStartsWith(c) - || !ArrayTypeNode::mangledRepresentationStartsWith(c)); - QVERIFY(!FunctionTypeNode::mangledRepresentationStartsWith(c) - || !PointerToMemberTypeNode::mangledRepresentationStartsWith(c)); - QVERIFY(!FunctionTypeNode::mangledRepresentationStartsWith(c) - || !TemplateParamNode::mangledRepresentationStartsWith(c)); - QVERIFY(!FunctionTypeNode::mangledRepresentationStartsWith(c) - || !SubstitutionNode::mangledRepresentationStartsWith(c)); - QVERIFY(!FunctionTypeNode::mangledRepresentationStartsWith(c) - || !CvQualifiersNode::mangledRepresentationStartsWith(c)); - QVERIFY(!FunctionTypeNode::mangledRepresentationStartsWith(c) - || !DeclTypeNode::mangledRepresentationStartsWith(c)); - QVERIFY(!ClassEnumTypeRule::mangledRepresentationStartsWith(c) - || !ArrayTypeNode::mangledRepresentationStartsWith(c)); - QVERIFY(!ClassEnumTypeRule::mangledRepresentationStartsWith(c) - || !PointerToMemberTypeNode::mangledRepresentationStartsWith(c)); - QVERIFY(!ClassEnumTypeRule::mangledRepresentationStartsWith(c) - || !TemplateParamNode::mangledRepresentationStartsWith(c)); - QVERIFY(!ClassEnumTypeRule::mangledRepresentationStartsWith(c) - || !SubstitutionNode::mangledRepresentationStartsWith(c)); - QVERIFY(!ClassEnumTypeRule::mangledRepresentationStartsWith(c) - || !CvQualifiersNode::mangledRepresentationStartsWith(c)); - QVERIFY(!ClassEnumTypeRule::mangledRepresentationStartsWith(c) - || !DeclTypeNode::mangledRepresentationStartsWith(c) || c == 'D'); - QVERIFY(!ArrayTypeNode::mangledRepresentationStartsWith(c) - || !PointerToMemberTypeNode::mangledRepresentationStartsWith(c)); - QVERIFY(!ArrayTypeNode::mangledRepresentationStartsWith(c) - || !TemplateParamNode::mangledRepresentationStartsWith(c)); - QVERIFY(!ArrayTypeNode::mangledRepresentationStartsWith(c) - || !SubstitutionNode::mangledRepresentationStartsWith(c)); - QVERIFY(!ArrayTypeNode::mangledRepresentationStartsWith(c) - || !CvQualifiersNode::mangledRepresentationStartsWith(c)); - QVERIFY(!ArrayTypeNode::mangledRepresentationStartsWith(c) - || !DeclTypeNode::mangledRepresentationStartsWith(c)); - QVERIFY(!PointerToMemberTypeNode::mangledRepresentationStartsWith(c) - || !TemplateParamNode::mangledRepresentationStartsWith(c)); - QVERIFY(!PointerToMemberTypeNode::mangledRepresentationStartsWith(c) - || !SubstitutionNode::mangledRepresentationStartsWith(c)); - QVERIFY(!PointerToMemberTypeNode::mangledRepresentationStartsWith(c) - || !CvQualifiersNode::mangledRepresentationStartsWith(c)); - QVERIFY(!PointerToMemberTypeNode::mangledRepresentationStartsWith(c) - || !DeclTypeNode::mangledRepresentationStartsWith(c)); - QVERIFY(!TemplateParamNode::mangledRepresentationStartsWith(c) - || !SubstitutionNode::mangledRepresentationStartsWith(c)); - QVERIFY(!TemplateParamNode::mangledRepresentationStartsWith(c) - || !CvQualifiersNode::mangledRepresentationStartsWith(c)); - QVERIFY(!TemplateParamNode::mangledRepresentationStartsWith(c) - || !DeclTypeNode::mangledRepresentationStartsWith(c)); - QVERIFY(!SubstitutionNode::mangledRepresentationStartsWith(c) - || !CvQualifiersNode::mangledRepresentationStartsWith(c)); - QVERIFY(!SubstitutionNode::mangledRepresentationStartsWith(c) - || !DeclTypeNode::mangledRepresentationStartsWith(c)); - QVERIFY(!CvQualifiersNode::mangledRepresentationStartsWith(c) - || !DeclTypeNode::mangledRepresentationStartsWith(c)); - - // - QVERIFY(!OperatorNameNode::mangledRepresentationStartsWith(c) - || !CtorDtorNameNode::mangledRepresentationStartsWith(c)); - QVERIFY(!OperatorNameNode::mangledRepresentationStartsWith(c) - || !SourceNameNode::mangledRepresentationStartsWith(c)); - QVERIFY(!OperatorNameNode::mangledRepresentationStartsWith(c) - || !UnnamedTypeNameNode::mangledRepresentationStartsWith(c)); - QVERIFY(!CtorDtorNameNode::mangledRepresentationStartsWith(c) - || !SourceNameNode::mangledRepresentationStartsWith(c)); - QVERIFY(!CtorDtorNameNode::mangledRepresentationStartsWith(c) - || !UnnamedTypeNameNode::mangledRepresentationStartsWith(c)); - QVERIFY(!SourceNameNode::mangledRepresentationStartsWith(c) - || !UnnamedTypeNameNode::mangledRepresentationStartsWith(c)); - - // - QVERIFY(!NonNegativeNumberNode<10>::mangledRepresentationStartsWith(c) - || !ExpressionNode::mangledRepresentationStartsWith(c) || std::isdigit(c)); - - // - QVERIFY(!TemplateParamNode::mangledRepresentationStartsWith(c) - || !DeclTypeNode::mangledRepresentationStartsWith(c)); - QVERIFY(!TemplateParamNode::mangledRepresentationStartsWith(c) - || !SubstitutionNode::mangledRepresentationStartsWith(c)); - QVERIFY(!DeclTypeNode::mangledRepresentationStartsWith(c) - || !SubstitutionNode::mangledRepresentationStartsWith(c)); - - // - QVERIFY(!UnresolvedTypeRule::mangledRepresentationStartsWith(c) - || !SimpleIdNode::mangledRepresentationStartsWith(c)); - } - - // , - QVERIFY(!TemplateArgNode::mangledRepresentationStartsWith('E')); - - // - QVERIFY(!TypeNode::mangledRepresentationStartsWith('X') - && !TypeNode::mangledRepresentationStartsWith('J') - /* && !TypeNode::mangledRepresentationStartsWith('s') */); - QVERIFY(!ExprPrimaryNode::mangledRepresentationStartsWith('X') - && !ExprPrimaryNode::mangledRepresentationStartsWith('J') - && !ExprPrimaryNode::mangledRepresentationStartsWith('s')); - - // - QVERIFY(!TemplateParamNode::mangledRepresentationStartsWith('c') - && !TemplateParamNode::mangledRepresentationStartsWith('s') - && !TemplateParamNode::mangledRepresentationStartsWith('a')); - QVERIFY(!FunctionParamNode::mangledRepresentationStartsWith('c') - && !FunctionParamNode::mangledRepresentationStartsWith('c') - && !FunctionParamNode::mangledRepresentationStartsWith('c')); - QVERIFY(!ExprPrimaryNode::mangledRepresentationStartsWith('c') - && !ExprPrimaryNode::mangledRepresentationStartsWith('s') - && !ExprPrimaryNode::mangledRepresentationStartsWith('a')); - QVERIFY(!ExpressionNode::mangledRepresentationStartsWith('E')); - QVERIFY(!ExpressionNode::mangledRepresentationStartsWith('_')); - QVERIFY(!InitializerNode::mangledRepresentationStartsWith('E')); - - // - QVERIFY(!BuiltinTypeNode::mangledRepresentationStartsWith('P') - && !BuiltinTypeNode::mangledRepresentationStartsWith('R') - && !BuiltinTypeNode::mangledRepresentationStartsWith('O') - && !BuiltinTypeNode::mangledRepresentationStartsWith('C') - && !BuiltinTypeNode::mangledRepresentationStartsWith('G') - && !BuiltinTypeNode::mangledRepresentationStartsWith('U')); - QVERIFY(!FunctionTypeNode::mangledRepresentationStartsWith('P') - && !FunctionTypeNode::mangledRepresentationStartsWith('R') - && !FunctionTypeNode::mangledRepresentationStartsWith('O') - && !FunctionTypeNode::mangledRepresentationStartsWith('C') - && !FunctionTypeNode::mangledRepresentationStartsWith('G') - && !FunctionTypeNode::mangledRepresentationStartsWith('U') - && !FunctionTypeNode::mangledRepresentationStartsWith('D')); - QVERIFY(!ClassEnumTypeRule::mangledRepresentationStartsWith('P') - && !ClassEnumTypeRule::mangledRepresentationStartsWith('R') - && !ClassEnumTypeRule::mangledRepresentationStartsWith('O') - && !ClassEnumTypeRule::mangledRepresentationStartsWith('C') - && !ClassEnumTypeRule::mangledRepresentationStartsWith('G') - && !ClassEnumTypeRule::mangledRepresentationStartsWith('U') - /* && !firstSetClassEnumType.contains('D') */); - QVERIFY(!ArrayTypeNode::mangledRepresentationStartsWith('P') - && !ArrayTypeNode::mangledRepresentationStartsWith('R') - && !ArrayTypeNode::mangledRepresentationStartsWith('O') - && !ArrayTypeNode::mangledRepresentationStartsWith('C') - && !ArrayTypeNode::mangledRepresentationStartsWith('G') - && !ArrayTypeNode::mangledRepresentationStartsWith('U') - && !ArrayTypeNode::mangledRepresentationStartsWith('D')); - QVERIFY(!PointerToMemberTypeNode::mangledRepresentationStartsWith('P') - && !PointerToMemberTypeNode::mangledRepresentationStartsWith('R') - && !PointerToMemberTypeNode::mangledRepresentationStartsWith('O') - && !PointerToMemberTypeNode::mangledRepresentationStartsWith('C') - && !PointerToMemberTypeNode::mangledRepresentationStartsWith('G') - && !PointerToMemberTypeNode::mangledRepresentationStartsWith('U') - && !PointerToMemberTypeNode::mangledRepresentationStartsWith('D')); - QVERIFY(!TemplateParamNode::mangledRepresentationStartsWith('P') - && !TemplateParamNode::mangledRepresentationStartsWith('R') - && !TemplateParamNode::mangledRepresentationStartsWith('O') - && !TemplateParamNode::mangledRepresentationStartsWith('C') - && !TemplateParamNode::mangledRepresentationStartsWith('G') - && !TemplateParamNode::mangledRepresentationStartsWith('U') - && !TemplateParamNode::mangledRepresentationStartsWith('D')); - QVERIFY(!SubstitutionNode::mangledRepresentationStartsWith('P') - && !SubstitutionNode::mangledRepresentationStartsWith('R') - && !SubstitutionNode::mangledRepresentationStartsWith('O') - && !SubstitutionNode::mangledRepresentationStartsWith('C') - && !SubstitutionNode::mangledRepresentationStartsWith('G') - && !SubstitutionNode::mangledRepresentationStartsWith('U') - && !SubstitutionNode::mangledRepresentationStartsWith('D')); - QVERIFY(!CvQualifiersNode::mangledRepresentationStartsWith('P') - && !CvQualifiersNode::mangledRepresentationStartsWith('R') - && !CvQualifiersNode::mangledRepresentationStartsWith('O') - && !CvQualifiersNode::mangledRepresentationStartsWith('C') - && !CvQualifiersNode::mangledRepresentationStartsWith('G') - && !CvQualifiersNode::mangledRepresentationStartsWith('U') - && !CvQualifiersNode::mangledRepresentationStartsWith('D')); - QVERIFY(!DeclTypeNode::mangledRepresentationStartsWith('P') - && !DeclTypeNode::mangledRepresentationStartsWith('R') - && !DeclTypeNode::mangledRepresentationStartsWith('O') - && !DeclTypeNode::mangledRepresentationStartsWith('C') - && !DeclTypeNode::mangledRepresentationStartsWith('G') - && !DeclTypeNode::mangledRepresentationStartsWith('U')); - - // - QVERIFY(!NonNegativeNumberNode<10>::mangledRepresentationStartsWith('_')); - QVERIFY(!ExpressionNode::mangledRepresentationStartsWith('_')); - - // - QVERIFY(!NonNegativeNumberNode<36>::mangledRepresentationStartsWith('_') - && !NonNegativeNumberNode<36>::mangledRepresentationStartsWith('t') - && !NonNegativeNumberNode<36>::mangledRepresentationStartsWith('a') - && !NonNegativeNumberNode<36>::mangledRepresentationStartsWith('b') - && !NonNegativeNumberNode<36>::mangledRepresentationStartsWith('s') - && !NonNegativeNumberNode<36>::mangledRepresentationStartsWith('i') - && !NonNegativeNumberNode<36>::mangledRepresentationStartsWith('o') - && !NonNegativeNumberNode<36>::mangledRepresentationStartsWith('d')); - - // - QVERIFY(!CallOffsetRule::mangledRepresentationStartsWith('V') - && !CallOffsetRule::mangledRepresentationStartsWith('T') - && !CallOffsetRule::mangledRepresentationStartsWith('I') - && !CallOffsetRule::mangledRepresentationStartsWith('S') - && !CallOffsetRule::mangledRepresentationStartsWith('c')); - - // - QVERIFY(!UnqualifiedNameNode::mangledRepresentationStartsWith('S')); - - // - QVERIFY(!TemplateArgsNode::mangledRepresentationStartsWith('M')); - QVERIFY(!UnqualifiedNameNode::mangledRepresentationStartsWith('M')); - - // - QVERIFY(!SimpleIdNode::mangledRepresentationStartsWith('o')); - QVERIFY(!SimpleIdNode::mangledRepresentationStartsWith('d')); - - // - QVERIFY(!ExpressionNode::mangledRepresentationStartsWith('E')); - - // - QVERIFY(!BaseUnresolvedNameNode::mangledRepresentationStartsWith('g')); - QVERIFY(!BaseUnresolvedNameNode::mangledRepresentationStartsWith('s')); - QVERIFY(!UnresolvedTypeRule::mangledRepresentationStartsWith('N')); - QVERIFY(!UnresolvedQualifierLevelRule::mangledRepresentationStartsWith('N')); - QVERIFY(!UnresolvedQualifierLevelRule::mangledRepresentationStartsWith('E')); -} - -void NameDemanglerAutoTest::testIncorrectlyMangledName( - const QString &mangledName) -{ - QVERIFY(!demangler.demangle(mangledName)); -} - -QTEST_MAIN(NameDemanglerAutoTest) - -#include "tst_namedemangler.moc" From a3a2c2f691ae194bb49572ef6ffd9e4b91daa214 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 16 Jul 2020 15:54:41 +0200 Subject: [PATCH 041/108] Help: Fix warning The operator is not static otherwise it would be just an unused function. Change-Id: I01b8764adfdf8908d07362357211d64b55ea941e Reviewed-by: hjk --- src/plugins/help/docsettingspage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/help/docsettingspage.cpp b/src/plugins/help/docsettingspage.cpp index 66fba5f211e..d389d236862 100644 --- a/src/plugins/help/docsettingspage.cpp +++ b/src/plugins/help/docsettingspage.cpp @@ -55,7 +55,7 @@ public: QString nameSpace; }; -static bool operator<(const DocEntry &d1, const DocEntry &d2) +bool operator<(const DocEntry &d1, const DocEntry &d2) { return d1.name < d2.name; } class DocModel : public QAbstractListModel From 1de8fe834924e88fc9d5a4106261ca77cac14147 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Mon, 20 Jul 2020 14:40:46 +0300 Subject: [PATCH 042/108] Debugger: Do not reset sysroot if override is not set Change-Id: Id489d6e8e0102bb8594470cc5a454c2e2c2afadb Reviewed-by: Christian Stenger --- src/plugins/debugger/debuggerdialogs.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/debugger/debuggerdialogs.cpp b/src/plugins/debugger/debuggerdialogs.cpp index 7080e3d2ca6..bb793c512b3 100644 --- a/src/plugins/debugger/debuggerdialogs.cpp +++ b/src/plugins/debugger/debuggerdialogs.cpp @@ -462,7 +462,8 @@ void StartApplicationDialog::run(bool attachRemote) debugger->setCommandsAfterConnect(newParameters.serverInitCommands); debugger->setCommandsForReset(newParameters.serverResetCommands); debugger->setUseTerminal(newParameters.runInTerminal); - debugger->setSysRoot(newParameters.sysRoot); + if (!newParameters.sysRoot.isEmpty()) + debugger->setSysRoot(newParameters.sysRoot); bool isLocal = !dev || (dev->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE); if (isLocal) { From 6d5849e31e066e3ed30148e112aea0ef8c0c6d5a Mon Sep 17 00:00:00 2001 From: Assam Boudjelthia Date: Wed, 8 Jul 2020 14:42:54 +0300 Subject: [PATCH 043/108] Android: explain what the downloaded openssl libraries are used for Task-number: QTCREATORBUG-24074 Change-Id: I467d59e8c30d629ed532ad9311f65a1b30fd45a5 Reviewed-by: hjk Reviewed-by: Alessandro Portale --- src/plugins/android/androidsettingswidget.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/android/androidsettingswidget.ui b/src/plugins/android/androidsettingswidget.ui index b4542e8d4c4..945c241110c 100644 --- a/src/plugins/android/androidsettingswidget.ui +++ b/src/plugins/android/androidsettingswidget.ui @@ -293,7 +293,7 @@ - Automatically download OpenSSL prebuilt libraries. If the automatic download fails, Qt Creator proposes to open the download URL in the system's browser for manual download. + Automatically download OpenSSL prebuilt libraries. These libraries can be shipped with your application from "Projects > Build > Build Steps > Build Android APK > Additional Libraries" if any SSL operations are performed. If the automatic download fails, Qt Creator proposes to open the download URL in the system's browser for manual download. Download OpenSSL From 1baa81dc488229fdba5eac21b28f4857197371bb Mon Sep 17 00:00:00 2001 From: Assam Boudjelthia Date: Wed, 8 Jul 2020 15:16:23 +0300 Subject: [PATCH 044/108] Android: re-organize "create templates" button Change-Id: Ibad5498f9a50d7c8adbc81cd5be435e02cca668d Reviewed-by: Alessandro Portale Reviewed-by: Assam Boudjelthia --- src/plugins/android/androidbuildapkwidget.cpp | 39 +++++++------------ src/plugins/android/androidbuildapkwidget.h | 1 - 2 files changed, 15 insertions(+), 25 deletions(-) diff --git a/src/plugins/android/androidbuildapkwidget.cpp b/src/plugins/android/androidbuildapkwidget.cpp index 6439279c48b..5396a3de3e5 100644 --- a/src/plugins/android/androidbuildapkwidget.cpp +++ b/src/plugins/android/androidbuildapkwidget.cpp @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include @@ -74,7 +75,6 @@ AndroidBuildApkWidget::AndroidBuildApkWidget(AndroidBuildApkStep *step) vbox->addWidget(createSignPackageGroup()); vbox->addWidget(createApplicationGroup()); vbox->addWidget(createAdvancedGroup()); - vbox->addWidget(createCreateTemplatesGroup()); vbox->addWidget(createAdditionalLibrariesGroup()); connect(m_step->buildConfiguration(), &BuildConfiguration::buildTypeChanged, @@ -96,7 +96,7 @@ QWidget *AndroidBuildApkWidget::createApplicationGroup() auto group = new QGroupBox(tr("Application"), this); - auto targetSDKComboBox = new QComboBox(group); + auto targetSDKComboBox = new QComboBox(); targetSDKComboBox->addItems(targets); targetSDKComboBox->setCurrentIndex(targets.indexOf(m_step->buildTargetSdk())); @@ -107,9 +107,18 @@ QWidget *AndroidBuildApkWidget::createApplicationGroup() AndroidManager::updateGradleProperties(step()->target(), QString()); // FIXME: Use real key. }); - auto hbox = new QHBoxLayout(group); - hbox->addWidget(new QLabel(tr("Android build SDK:"), group)); - hbox->addWidget(targetSDKComboBox); + auto formLayout = new QFormLayout(group); + formLayout->addRow(tr("Android build SDK:"), targetSDKComboBox); + + auto createAndroidTemplatesButton = new QPushButton(tr("Create Templates")); + createAndroidTemplatesButton->setToolTip( + tr("Create an Android package for Custom Java code, assets, and Gradle configurations.")); + connect(createAndroidTemplatesButton, &QAbstractButton::clicked, this, [this] { + CreateAndroidManifestWizard wizard(m_step->buildSystem()); + wizard.exec(); + }); + + formLayout->addRow(tr("Android customization:"), createAndroidTemplatesButton); return group; } @@ -120,7 +129,7 @@ QWidget *AndroidBuildApkWidget::createSignPackageGroup() sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); - auto group = new QGroupBox(tr("Sign package"), this); + auto group = new QGroupBox(tr("Application Signature"), this); auto keystoreLocationLabel = new QLabel(tr("Keystore:"), group); keystoreLocationLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); @@ -242,24 +251,6 @@ QWidget *AndroidBuildApkWidget::createAdvancedGroup() return group; } -QWidget *AndroidBuildApkWidget::createCreateTemplatesGroup() -{ - auto createTemplatesGroupBox = new QGroupBox(tr("Android")); - createTemplatesGroupBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - - auto createAndroidTemplatesButton = new QPushButton(tr("Create Templates")); - connect(createAndroidTemplatesButton, &QAbstractButton::clicked, this, [this] { - CreateAndroidManifestWizard wizard(m_step->buildSystem()); - wizard.exec(); - }); - - auto horizontalLayout = new QHBoxLayout(createTemplatesGroupBox); - horizontalLayout->addWidget(createAndroidTemplatesButton); - horizontalLayout->addStretch(1); - - return createTemplatesGroupBox; -} - QWidget *AndroidBuildApkWidget::createAdditionalLibrariesGroup() { auto group = new QGroupBox(tr("Additional Libraries")); diff --git a/src/plugins/android/androidbuildapkwidget.h b/src/plugins/android/androidbuildapkwidget.h index 5f6875abe25..e97ce01aae8 100644 --- a/src/plugins/android/androidbuildapkwidget.h +++ b/src/plugins/android/androidbuildapkwidget.h @@ -63,7 +63,6 @@ private: QWidget *createApplicationGroup(); QWidget *createSignPackageGroup(); QWidget *createAdvancedGroup(); - QWidget *createCreateTemplatesGroup(); QWidget *createAdditionalLibrariesGroup(); private: From 05cdce2fc9b0d39e56ff585d7c7bf928e8e4291c Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Tue, 30 Jun 2020 21:40:57 +0200 Subject: [PATCH 045/108] Squish: Update expected completion proposal Change-Id: I89f44690bdda5a12776f39efb7b1872ff5e9cc93 Reviewed-by: Robert Loehning Reviewed-by: Christian Stenger --- tests/system/suite_CSUP/tst_CSUP01/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/system/suite_CSUP/tst_CSUP01/test.py b/tests/system/suite_CSUP/tst_CSUP01/test.py index 7c77bf69663..2580ed06556 100644 --- a/tests/system/suite_CSUP/tst_CSUP01/test.py +++ b/tests/system/suite_CSUP/tst_CSUP01/test.py @@ -111,7 +111,7 @@ def main(): proposal = "return" if useClang: # clang adds a whitespace because the function needs to return a value - proposal += " " + proposal += " ;" waitForObjectItem(":popupFrame_Proposal_QListView", proposal) except: test.fail("Could not find proposal popup.") From 26f31572620ea38888fbaafd23cafa403c1cf01a Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Mon, 20 Jul 2020 15:07:48 +0200 Subject: [PATCH 046/108] Android: Fix that Android Studio's jdk does not get detected (Windows) If all jdk detection methods on Windows remain unsuccessful, let's try to find an installation of Android Studio via the registry and use the "jre" folder (which is actually a jdk) from there. Change-Id: Ie4d7a4c5cc56f0b4675c86e436c3f1007994633c Reviewed-by: Assam Boudjelthia --- src/plugins/android/androidconfigurations.cpp | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/plugins/android/androidconfigurations.cpp b/src/plugins/android/androidconfigurations.cpp index cd120b54360..f92fc851db2 100644 --- a/src/plugins/android/androidconfigurations.cpp +++ b/src/plugins/android/androidconfigurations.cpp @@ -1522,6 +1522,21 @@ AndroidConfigurations::AndroidConfigurations() AndroidConfigurations::~AndroidConfigurations() = default; +static Utils::FilePath androidStudioPath() +{ + if (Utils::HostOsInfo::isWindowsHost()) { + const QLatin1String registryKey("HKEY_LOCAL_MACHINE\\SOFTWARE\\Android Studio"); + const QLatin1String valueName("Path"); + #if defined(Q_OS_WIN) + const QSettings settings64(registryKey, QSettings::Registry64Format); + const QSettings settings32(registryKey, QSettings::Registry32Format); + return Utils::FilePath::fromUserInput( + settings64.value(valueName, settings32.value(valueName).toString()).toString()); + #endif + } + return {}; // TODO non-Windows +} + FilePath AndroidConfig::getJdkPath() { FilePath jdkHome; @@ -1561,6 +1576,16 @@ FilePath AndroidConfig::getJdkPath() break; } } + + // Nothing found yet? Let's try finding Android Studio's jdk + if (jdkHome.isEmpty()) { + const Utils::FilePath androidStudioSdkPath = androidStudioPath(); + if (!androidStudioSdkPath.isEmpty()) { + const Utils::FilePath androidStudioSdkJrePath = androidStudioSdkPath / "jre"; + if (androidStudioSdkJrePath.exists()) + jdkHome = androidStudioSdkJrePath; + } + } } else { QStringList args; if (HostOsInfo::isMacHost()) From aa9367f5d4cee9ba8f9c5fb73075f343c9daa94e Mon Sep 17 00:00:00 2001 From: Assam Boudjelthia Date: Tue, 21 Jul 2020 21:14:50 +0300 Subject: [PATCH 047/108] Android: re-organize manifest editor widget The current manifest editor has too many things at once with a long scroll bar, that can be overwhelming, this changes that by re-organizing elements and grouping others. Change-Id: Ie997af475939effbc575fa9e2a1d20184e943ff1 Reviewed-by: Alessandro Portale --- .../android/androidmanifesteditorwidget.cpp | 673 +++++++++--------- .../android/androidmanifesteditorwidget.h | 9 + 2 files changed, 352 insertions(+), 330 deletions(-) diff --git a/src/plugins/android/androidmanifesteditorwidget.cpp b/src/plugins/android/androidmanifesteditorwidget.cpp index 6efa02e98e6..a235e431cb6 100644 --- a/src/plugins/android/androidmanifesteditorwidget.cpp +++ b/src/plugins/android/androidmanifesteditorwidget.cpp @@ -64,7 +64,6 @@ #include #include #include -#include #include #include #include @@ -134,338 +133,351 @@ AndroidManifestEditorWidget::AndroidManifestEditorWidget() this, &AndroidManifestEditorWidget::updateAfterFileLoad); } +QGroupBox *AndroidManifestEditorWidget::createPermissionsGroupBox(QWidget *parent) +{ + auto permissionsGroupBox = new QGroupBox(parent); + permissionsGroupBox->setTitle(tr("Permissions")); + auto layout = new QGridLayout(permissionsGroupBox); + + m_defaultPermissonsCheckBox = new QCheckBox(this); + m_defaultPermissonsCheckBox->setText(tr("Include default permissions for Qt modules.")); + layout->addWidget(m_defaultPermissonsCheckBox, 0, 0); + + m_defaultFeaturesCheckBox = new QCheckBox(this); + m_defaultFeaturesCheckBox->setText(tr("Include default features for Qt modules.")); + layout->addWidget(m_defaultFeaturesCheckBox, 1, 0); + + m_permissionsComboBox = new QComboBox(permissionsGroupBox); + m_permissionsComboBox->insertItems(0, QStringList() + << QLatin1String("android.permission.ACCESS_CHECKIN_PROPERTIES") + << QLatin1String("android.permission.ACCESS_COARSE_LOCATION") + << QLatin1String("android.permission.ACCESS_FINE_LOCATION") + << QLatin1String("android.permission.ACCESS_LOCATION_EXTRA_COMMANDS") + << QLatin1String("android.permission.ACCESS_MOCK_LOCATION") + << QLatin1String("android.permission.ACCESS_NETWORK_STATE") + << QLatin1String("android.permission.ACCESS_SURFACE_FLINGER") + << QLatin1String("android.permission.ACCESS_WIFI_STATE") + << QLatin1String("android.permission.ACCOUNT_MANAGER") + << QLatin1String("com.android.voicemail.permission.ADD_VOICEMAIL") + << QLatin1String("android.permission.AUTHENTICATE_ACCOUNTS") + << QLatin1String("android.permission.BATTERY_STATS") + << QLatin1String("android.permission.BIND_ACCESSIBILITY_SERVICE") + << QLatin1String("android.permission.BIND_APPWIDGET") + << QLatin1String("android.permission.BIND_DEVICE_ADMIN") + << QLatin1String("android.permission.BIND_INPUT_METHOD") + << QLatin1String("android.permission.BIND_REMOTEVIEWS") + << QLatin1String("android.permission.BIND_TEXT_SERVICE") + << QLatin1String("android.permission.BIND_VPN_SERVICE") + << QLatin1String("android.permission.BIND_WALLPAPER") + << QLatin1String("android.permission.BLUETOOTH") + << QLatin1String("android.permission.BLUETOOTH_ADMIN") + << QLatin1String("android.permission.BRICK") + << QLatin1String("android.permission.BROADCAST_PACKAGE_REMOVED") + << QLatin1String("android.permission.BROADCAST_SMS") + << QLatin1String("android.permission.BROADCAST_STICKY") + << QLatin1String("android.permission.BROADCAST_WAP_PUSH") + << QLatin1String("android.permission.CALL_PHONE") + << QLatin1String("android.permission.CALL_PRIVILEGED") + << QLatin1String("android.permission.CAMERA") + << QLatin1String("android.permission.CHANGE_COMPONENT_ENABLED_STATE") + << QLatin1String("android.permission.CHANGE_CONFIGURATION") + << QLatin1String("android.permission.CHANGE_NETWORK_STATE") + << QLatin1String("android.permission.CHANGE_WIFI_MULTICAST_STATE") + << QLatin1String("android.permission.CHANGE_WIFI_STATE") + << QLatin1String("android.permission.CLEAR_APP_CACHE") + << QLatin1String("android.permission.CLEAR_APP_USER_DATA") + << QLatin1String("android.permission.CONTROL_LOCATION_UPDATES") + << QLatin1String("android.permission.DELETE_CACHE_FILES") + << QLatin1String("android.permission.DELETE_PACKAGES") + << QLatin1String("android.permission.DEVICE_POWER") + << QLatin1String("android.permission.DIAGNOSTIC") + << QLatin1String("android.permission.DISABLE_KEYGUARD") + << QLatin1String("android.permission.DUMP") + << QLatin1String("android.permission.EXPAND_STATUS_BAR") + << QLatin1String("android.permission.FACTORY_TEST") + << QLatin1String("android.permission.FLASHLIGHT") + << QLatin1String("android.permission.FORCE_BACK") + << QLatin1String("android.permission.GET_ACCOUNTS") + << QLatin1String("android.permission.GET_PACKAGE_SIZE") + << QLatin1String("android.permission.GET_TASKS") + << QLatin1String("android.permission.GLOBAL_SEARCH") + << QLatin1String("android.permission.HARDWARE_TEST") + << QLatin1String("android.permission.INJECT_EVENTS") + << QLatin1String("android.permission.INSTALL_LOCATION_PROVIDER") + << QLatin1String("android.permission.INSTALL_PACKAGES") + << QLatin1String("android.permission.INTERNAL_SYSTEM_WINDOW") + << QLatin1String("android.permission.INTERNET") + << QLatin1String("android.permission.KILL_BACKGROUND_PROCESSES") + << QLatin1String("android.permission.MANAGE_ACCOUNTS") + << QLatin1String("android.permission.MANAGE_APP_TOKENS") + << QLatin1String("android.permission.MASTER_CLEAR") + << QLatin1String("android.permission.MODIFY_AUDIO_SETTINGS") + << QLatin1String("android.permission.MODIFY_PHONE_STATE") + << QLatin1String("android.permission.MOUNT_FORMAT_FILESYSTEMS") + << QLatin1String("android.permission.MOUNT_UNMOUNT_FILESYSTEMS") + << QLatin1String("android.permission.NFC") + << QLatin1String("android.permission.PERSISTENT_ACTIVITY") + << QLatin1String("android.permission.PROCESS_OUTGOING_CALLS") + << QLatin1String("android.permission.READ_CALENDAR") + << QLatin1String("android.permission.READ_CALL_LOG") + << QLatin1String("android.permission.READ_CONTACTS") + << QLatin1String("android.permission.READ_EXTERNAL_STORAGE") + << QLatin1String("android.permission.READ_FRAME_BUFFER") + << QLatin1String("com.android.browser.permission.READ_HISTORY_BOOKMARKS") + << QLatin1String("android.permission.READ_INPUT_STATE") + << QLatin1String("android.permission.READ_LOGS") + << QLatin1String("android.permission.READ_PHONE_STATE") + << QLatin1String("android.permission.READ_PROFILE") + << QLatin1String("android.permission.READ_SMS") + << QLatin1String("android.permission.READ_SOCIAL_STREAM") + << QLatin1String("android.permission.READ_SYNC_SETTINGS") + << QLatin1String("android.permission.READ_SYNC_STATS") + << QLatin1String("android.permission.READ_USER_DICTIONARY") + << QLatin1String("android.permission.REBOOT") + << QLatin1String("android.permission.RECEIVE_BOOT_COMPLETED") + << QLatin1String("android.permission.RECEIVE_MMS") + << QLatin1String("android.permission.RECEIVE_SMS") + << QLatin1String("android.permission.RECEIVE_WAP_PUSH") + << QLatin1String("android.permission.RECORD_AUDIO") + << QLatin1String("android.permission.REORDER_TASKS") + << QLatin1String("android.permission.RESTART_PACKAGES") + << QLatin1String("android.permission.SEND_SMS") + << QLatin1String("android.permission.SET_ACTIVITY_WATCHER") + << QLatin1String("com.android.alarm.permission.SET_ALARM") + << QLatin1String("android.permission.SET_ALWAYS_FINISH") + << QLatin1String("android.permission.SET_ANIMATION_SCALE") + << QLatin1String("android.permission.SET_DEBUG_APP") + << QLatin1String("android.permission.SET_ORIENTATION") + << QLatin1String("android.permission.SET_POINTER_SPEED") + << QLatin1String("android.permission.SET_PREFERRED_APPLICATIONS") + << QLatin1String("android.permission.SET_PROCESS_LIMIT") + << QLatin1String("android.permission.SET_TIME") + << QLatin1String("android.permission.SET_TIME_ZONE") + << QLatin1String("android.permission.SET_WALLPAPER") + << QLatin1String("android.permission.SET_WALLPAPER_HINTS") + << QLatin1String("android.permission.SIGNAL_PERSISTENT_PROCESSES") + << QLatin1String("android.permission.STATUS_BAR") + << QLatin1String("android.permission.SUBSCRIBED_FEEDS_READ") + << QLatin1String("android.permission.SUBSCRIBED_FEEDS_WRITE") + << QLatin1String("android.permission.SYSTEM_ALERT_WINDOW") + << QLatin1String("android.permission.UPDATE_DEVICE_STATS") + << QLatin1String("android.permission.USE_CREDENTIALS") + << QLatin1String("android.permission.USE_SIP") + << QLatin1String("android.permission.VIBRATE") + << QLatin1String("android.permission.WAKE_LOCK") + << QLatin1String("android.permission.WRITE_APN_SETTINGS") + << QLatin1String("android.permission.WRITE_CALENDAR") + << QLatin1String("android.permission.WRITE_CALL_LOG") + << QLatin1String("android.permission.WRITE_CONTACTS") + << QLatin1String("android.permission.WRITE_EXTERNAL_STORAGE") + << QLatin1String("android.permission.WRITE_GSERVICES") + << QLatin1String("com.android.browser.permission.WRITE_HISTORY_BOOKMARKS") + << QLatin1String("android.permission.WRITE_PROFILE") + << QLatin1String("android.permission.WRITE_SECURE_SETTINGS") + << QLatin1String("android.permission.WRITE_SETTINGS") + << QLatin1String("android.permission.WRITE_SMS") + << QLatin1String("android.permission.WRITE_SOCIAL_STREAM") + << QLatin1String("android.permission.WRITE_SYNC_SETTINGS") + << QLatin1String("android.permission.WRITE_USER_DICTIONARY") + ); + m_permissionsComboBox->setEditable(true); + layout->addWidget(m_permissionsComboBox, 2, 0); + + m_addPermissionButton = new QPushButton(permissionsGroupBox); + m_addPermissionButton->setText(tr("Add")); + layout->addWidget(m_addPermissionButton, 2, 1); + + m_permissionsModel = new PermissionsModel(this); + + m_permissionsListView = new QListView(permissionsGroupBox); + m_permissionsListView->setModel(m_permissionsModel); + layout->addWidget(m_permissionsListView, 3, 0, 3, 1); + + m_removePermissionButton = new QPushButton(permissionsGroupBox); + m_removePermissionButton->setText(tr("Remove")); + layout->addWidget(m_removePermissionButton, 3, 1); + + permissionsGroupBox->setLayout(layout); + + connect(m_defaultPermissonsCheckBox, &QCheckBox::stateChanged, + this, &AndroidManifestEditorWidget::defaultPermissionOrFeatureCheckBoxClicked); + connect(m_defaultFeaturesCheckBox, &QCheckBox::stateChanged, + this, &AndroidManifestEditorWidget::defaultPermissionOrFeatureCheckBoxClicked); + + connect(m_addPermissionButton, &QAbstractButton::clicked, + this, &AndroidManifestEditorWidget::addPermission); + connect(m_removePermissionButton, &QAbstractButton::clicked, + this, &AndroidManifestEditorWidget::removePermission); + connect(m_permissionsComboBox, &QComboBox::currentTextChanged, + this, &AndroidManifestEditorWidget::updateAddRemovePermissionButtons); + + return permissionsGroupBox; +} + +QGroupBox *AndroidManifestEditorWidget::createPackageFormLayout(QWidget *parent) +{ + auto packageGroupBox = new QGroupBox(parent); + packageGroupBox->setTitle(tr("Package")); + auto formLayout = new QFormLayout(); + + m_packageNameLineEdit = new QLineEdit(packageGroupBox); + m_packageNameLineEdit->setToolTip(tr( + "

Please choose a valid package name for your application (for " + "example, \"org.example.myapplication\").

Packages are usually " + "defined using a hierarchical naming pattern, with levels in the hierarchy separated " + "by periods (.) (pronounced \"dot\").

In general, a package " + "name begins with the top level domain name of the organization and then the " + "organization's domain and then any subdomains listed in reverse order. The " + "organization can then choose a specific name for their package. Package names should " + "be all lowercase characters whenever possible.

Complete " + "conventions for disambiguating package names and rules for naming packages when the " + "Internet domain name cannot be directly used as a package name are described in " + "section 7.7 of the Java Language Specification.

")); + formLayout->addRow(tr("Package name:"), m_packageNameLineEdit); + + m_packageNameWarning = new QLabel; + m_packageNameWarning->setText(tr("The package name is not valid.")); + m_packageNameWarning->setVisible(false); + + m_packageNameWarningIcon = new QLabel; + m_packageNameWarningIcon->setPixmap(Utils::Icons::WARNING.pixmap()); + m_packageNameWarningIcon->setVisible(false); + m_packageNameWarningIcon->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + + auto warningRow = new QHBoxLayout; + warningRow->setContentsMargins(0, 0, 0, 0); + warningRow->addWidget(m_packageNameWarningIcon); + warningRow->addWidget(m_packageNameWarning); + + formLayout->addRow(QString(), warningRow); + + m_versionCodeLineEdit = new QLineEdit(packageGroupBox); + formLayout->addRow(tr("Version code:"), m_versionCodeLineEdit); + + m_versionNameLinedit = new QLineEdit(packageGroupBox); + formLayout->addRow(tr("Version name:"), m_versionNameLinedit); + + m_androidMinSdkVersion = new QComboBox(packageGroupBox); + m_androidMinSdkVersion->setToolTip( + tr("Sets the minimum required version on which this application can be run.")); + m_androidMinSdkVersion->addItem(tr("Not set"), 0); + + formLayout->addRow(tr("Minimum required SDK:"), m_androidMinSdkVersion); + + m_androidTargetSdkVersion = new QComboBox(packageGroupBox); + m_androidTargetSdkVersion->setToolTip( + tr("Sets the target SDK. Set this to the highest tested version. " + "This disables compatibility behavior of the system for your application.")); + m_androidTargetSdkVersion->addItem(tr("Not set"), 0); + + formLayout->addRow(tr("Target SDK:"), m_androidTargetSdkVersion); + + packageGroupBox->setLayout(formLayout); + + updateSdkVersions(); + + connect(m_packageNameLineEdit, &QLineEdit::textEdited, + this, &AndroidManifestEditorWidget::setPackageName); + connect(m_versionCodeLineEdit, &QLineEdit::textEdited, + this, [this]() { setDirty(); }); + connect(m_versionNameLinedit, &QLineEdit::textEdited, + this, [this]() { setDirty(); }); + connect(m_androidMinSdkVersion, + QOverload::of(&QComboBox::currentIndexChanged), + this, [this]() { setDirty(); }); + connect(m_androidTargetSdkVersion, + QOverload::of(&QComboBox::currentIndexChanged), + this, [this]() { setDirty(); }); + + return packageGroupBox; +} + +QGroupBox *Android::Internal::AndroidManifestEditorWidget::createApplicationGroupBox(QWidget *parent) +{ + auto applicationGroupBox = new QGroupBox(parent); + applicationGroupBox->setTitle(tr("Application")); + auto formLayout = new QFormLayout(); + + m_appNameLineEdit = new QLineEdit(applicationGroupBox); + formLayout->addRow(tr("Application name:"), m_appNameLineEdit); + + m_activityNameLineEdit = new QLineEdit(applicationGroupBox); + formLayout->addRow(tr("Activity name:"), m_activityNameLineEdit); + + m_targetLineEdit = new QComboBox(applicationGroupBox); + m_targetLineEdit->setEditable(true); + m_targetLineEdit->setDuplicatesEnabled(true); + m_targetLineEdit->installEventFilter(this); + formLayout->addRow(tr("Run:"), m_targetLineEdit); + + m_styleExtractMethod = new QComboBox(applicationGroupBox); + formLayout->addRow(tr("Style extraction:"), m_styleExtractMethod); + const QList styleMethodsMap = { + {"default", + "In most cases this will be the same as \"full\", but it can also be something else " + "if needed, e.g. for compatibility reasons."}, + {"full", "Useful for Qt Widgets & Qt Quick Controls 1 apps."}, + {"minimal", "Useful for Qt Quick Controls 2 apps, it is much faster than \"full\"."}, + {"none", "Useful for apps that don't use Qt Widgets, Qt Quick Controls 1 or Qt Quick Controls 2."}}; + for (int i = 0; i addItem(styleMethodsMap.at(i).first()); + m_styleExtractMethod->setItemData(i, styleMethodsMap.at(i).at(1), Qt::ToolTipRole); + } + applicationGroupBox->setLayout(formLayout); + + connect(m_appNameLineEdit, &QLineEdit::textEdited, + this, [this]() { setDirty(); }); + connect(m_activityNameLineEdit, &QLineEdit::textEdited, + this, [this]() { setDirty(); }); + connect(m_targetLineEdit, &QComboBox::currentTextChanged, + this, [this]() { setDirty(); }); + connect(m_styleExtractMethod, + QOverload::of(&QComboBox::currentIndexChanged), + this, [this]() { setDirty(); }); + + return applicationGroupBox; +} + +QGroupBox *AndroidManifestEditorWidget::createAdvancedGroupBox(QWidget *parent) +{ + auto otherGroupBox = new QGroupBox(parent); + otherGroupBox->setTitle(tr("Advanced")); + m_advanvedTabWidget = new QTabWidget(otherGroupBox); + auto formLayout = new QFormLayout(); + + m_iconButtons = new AndroidManifestEditorIconContainerWidget(otherGroupBox, m_textEditorWidget); + m_advanvedTabWidget->addTab(m_iconButtons, tr("Application icon")); + + m_services = new AndroidServiceWidget(otherGroupBox); + m_advanvedTabWidget->addTab(m_services, tr("Android services")); + + m_splashButtons = new SplashIconContainerWidget(otherGroupBox, m_textEditorWidget); + m_advanvedTabWidget->addTab(m_splashButtons, tr("Splash screen")); + + connect(m_services, &AndroidServiceWidget::servicesModified, this, [this]() { setDirty(); }); + connect(m_services, &AndroidServiceWidget::servicesModified, + this, &AndroidManifestEditorWidget::clearInvalidServiceInfo); + connect(m_services, &AndroidServiceWidget::servicesInvalid, + this, &AndroidManifestEditorWidget::setInvalidServiceInfo); + connect(m_splashButtons, &SplashIconContainerWidget::splashScreensModified, + this, [this]() { setDirty(); }); + + formLayout->addRow(m_advanvedTabWidget); + otherGroupBox->setLayout(formLayout); + + return otherGroupBox; +} + void AndroidManifestEditorWidget::initializePage() { - QWidget *mainWidget = new QWidget; // different name + QWidget *mainWidget = new QWidget(); // different name + auto topLayout = new QGridLayout(mainWidget); - auto topLayout = new QVBoxLayout(mainWidget); - - auto packageGroupBox = new QGroupBox(mainWidget); - topLayout->addWidget(packageGroupBox); - - auto setDirtyFunc = [this] { setDirty(); }; - packageGroupBox->setTitle(tr("Package")); - { - auto formLayout = new QFormLayout(); - - m_packageNameLineEdit = new QLineEdit(packageGroupBox); - m_packageNameLineEdit->setToolTip(tr( - "

Please choose a valid package name " - "for your application (for example, \"org.example.myapplication\").

" - "

Packages are usually defined using a hierarchical naming pattern, " - "with levels in the hierarchy separated by periods (.) (pronounced \"dot\").

" - "

In general, a package name begins with the top level domain name" - " of the organization and then the organization's domain and then any subdomains listed" - " in reverse order. The organization can then choose a specific name for their package." - " Package names should be all lowercase characters whenever possible.

" - "

Complete conventions for disambiguating package names and rules for" - " naming packages when the Internet domain name cannot be directly used as a package name" - " are described in section 7.7 of the Java Language Specification.

")); - formLayout->addRow(tr("Package name:"), m_packageNameLineEdit); - - m_packageNameWarning = new QLabel; - m_packageNameWarning->setText(tr("The package name is not valid.")); - m_packageNameWarning->setVisible(false); - - m_packageNameWarningIcon = new QLabel; - m_packageNameWarningIcon->setPixmap(Utils::Icons::WARNING.pixmap()); - m_packageNameWarningIcon->setVisible(false); - m_packageNameWarningIcon->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); - - auto warningRow = new QHBoxLayout; - warningRow->setContentsMargins(0, 0, 0, 0); - warningRow->addWidget(m_packageNameWarningIcon); - warningRow->addWidget(m_packageNameWarning); - - formLayout->addRow(QString(), warningRow); - - m_versionCodeLineEdit = new QLineEdit(packageGroupBox); - formLayout->addRow(tr("Version code:"), m_versionCodeLineEdit); - - m_versionNameLinedit = new QLineEdit(packageGroupBox); - formLayout->addRow(tr("Version name:"), m_versionNameLinedit); - - m_androidMinSdkVersion = new QComboBox(packageGroupBox); - m_androidMinSdkVersion->setToolTip( - tr("Sets the minimum required version on which this application can be run.")); - m_androidMinSdkVersion->addItem(tr("Not set"), 0); - - formLayout->addRow(tr("Minimum required SDK:"), m_androidMinSdkVersion); - - m_androidTargetSdkVersion = new QComboBox(packageGroupBox); - m_androidTargetSdkVersion->setToolTip( - tr("Sets the target SDK. Set this to the highest tested version. " - "This disables compatibility behavior of the system for your application.")); - m_androidTargetSdkVersion->addItem(tr("Not set"), 0); - - formLayout->addRow(tr("Target SDK:"), m_androidTargetSdkVersion); - - packageGroupBox->setLayout(formLayout); - - updateSdkVersions(); - - connect(m_packageNameLineEdit, &QLineEdit::textEdited, - this, &AndroidManifestEditorWidget::setPackageName); - connect(m_versionCodeLineEdit, &QLineEdit::textEdited, - this, setDirtyFunc); - connect(m_versionNameLinedit, &QLineEdit::textEdited, - this, setDirtyFunc); - connect(m_androidMinSdkVersion, - QOverload::of(&QComboBox::currentIndexChanged), - this, setDirtyFunc); - connect(m_androidTargetSdkVersion, - QOverload::of(&QComboBox::currentIndexChanged), - this, setDirtyFunc); - - } - - // Application - auto applicationGroupBox = new QGroupBox(mainWidget); - topLayout->addWidget(applicationGroupBox); - - applicationGroupBox->setTitle(tr("Application")); - { - auto formLayout = new QFormLayout(); - - m_appNameLineEdit = new QLineEdit(applicationGroupBox); - formLayout->addRow(tr("Application name:"), m_appNameLineEdit); - - m_activityNameLineEdit = new QLineEdit(applicationGroupBox); - formLayout->addRow(tr("Activity name:"), m_activityNameLineEdit); - - m_targetLineEdit = new QComboBox(applicationGroupBox); - m_targetLineEdit->setEditable(true); - m_targetLineEdit->setDuplicatesEnabled(true); - m_targetLineEdit->installEventFilter(this); - formLayout->addRow(tr("Run:"), m_targetLineEdit); - - m_styleExtractMethod = new QComboBox(applicationGroupBox); - formLayout->addRow(tr("Style extraction:"), m_styleExtractMethod); - const QList styleMethodsMap = { - {"default", "In most cases this will be the same as \"full\", but it can also be something else if needed, e.g. for compatibility reasons."}, - {"full", "Useful for Qt Widgets & Qt Quick Controls 1 apps."}, - {"minimal", "Useful for Qt Quick Controls 2 apps, it is much faster than \"full\"."}, - {"none", "Useful for apps that don't use Qt Widgets, Qt Quick Controls 1 or Qt Quick Controls 2."}}; - for (int i = 0; i addItem(styleMethodsMap.at(i).first()); - m_styleExtractMethod->setItemData(i, styleMethodsMap.at(i).at(1), Qt::ToolTipRole); - } - - m_iconButtons = new AndroidManifestEditorIconContainerWidget(applicationGroupBox, m_textEditorWidget); - formLayout->addRow(tr("Application icon:"), new QLabel()); - formLayout->addRow(QString(), m_iconButtons); - - m_splashButtons = new SplashIconContainerWidget(applicationGroupBox, m_textEditorWidget); - formLayout->addRow(tr("Splash screen:"), new QLabel()); - formLayout->addRow(QString(), m_splashButtons); - - m_services = new AndroidServiceWidget(this); - formLayout->addRow(tr("Android services:"), m_services); - - applicationGroupBox->setLayout(formLayout); - - connect(m_appNameLineEdit, &QLineEdit::textEdited, - this, setDirtyFunc); - connect(m_activityNameLineEdit, &QLineEdit::textEdited, - this, setDirtyFunc); - connect(m_targetLineEdit, &QComboBox::currentTextChanged, - this, setDirtyFunc); - connect(m_styleExtractMethod, - QOverload::of(&QComboBox::currentIndexChanged), - this, setDirtyFunc); - connect(m_services, &AndroidServiceWidget::servicesModified, - this, setDirtyFunc); - connect(m_splashButtons, &SplashIconContainerWidget::splashScreensModified, - this, setDirtyFunc); - connect(m_services, &AndroidServiceWidget::servicesModified, - this, &AndroidManifestEditorWidget::clearInvalidServiceInfo); - connect(m_services, &AndroidServiceWidget::servicesInvalid, - this, &AndroidManifestEditorWidget::setInvalidServiceInfo); - } - - - // Permissions - auto permissionsGroupBox = new QGroupBox(mainWidget); - topLayout->addWidget(permissionsGroupBox); - - permissionsGroupBox->setTitle(tr("Permissions")); - { - auto layout = new QGridLayout(permissionsGroupBox); - - m_defaultPermissonsCheckBox = new QCheckBox(this); - m_defaultPermissonsCheckBox->setText(tr("Include default permissions for Qt modules.")); - layout->addWidget(m_defaultPermissonsCheckBox, 0, 0); - - m_defaultFeaturesCheckBox = new QCheckBox(this); - m_defaultFeaturesCheckBox->setText(tr("Include default features for Qt modules.")); - layout->addWidget(m_defaultFeaturesCheckBox, 1, 0); - - m_permissionsComboBox = new QComboBox(permissionsGroupBox); - m_permissionsComboBox->insertItems(0, QStringList() - << QLatin1String("android.permission.ACCESS_CHECKIN_PROPERTIES") - << QLatin1String("android.permission.ACCESS_COARSE_LOCATION") - << QLatin1String("android.permission.ACCESS_FINE_LOCATION") - << QLatin1String("android.permission.ACCESS_LOCATION_EXTRA_COMMANDS") - << QLatin1String("android.permission.ACCESS_MOCK_LOCATION") - << QLatin1String("android.permission.ACCESS_NETWORK_STATE") - << QLatin1String("android.permission.ACCESS_SURFACE_FLINGER") - << QLatin1String("android.permission.ACCESS_WIFI_STATE") - << QLatin1String("android.permission.ACCOUNT_MANAGER") - << QLatin1String("com.android.voicemail.permission.ADD_VOICEMAIL") - << QLatin1String("android.permission.AUTHENTICATE_ACCOUNTS") - << QLatin1String("android.permission.BATTERY_STATS") - << QLatin1String("android.permission.BIND_ACCESSIBILITY_SERVICE") - << QLatin1String("android.permission.BIND_APPWIDGET") - << QLatin1String("android.permission.BIND_DEVICE_ADMIN") - << QLatin1String("android.permission.BIND_INPUT_METHOD") - << QLatin1String("android.permission.BIND_REMOTEVIEWS") - << QLatin1String("android.permission.BIND_TEXT_SERVICE") - << QLatin1String("android.permission.BIND_VPN_SERVICE") - << QLatin1String("android.permission.BIND_WALLPAPER") - << QLatin1String("android.permission.BLUETOOTH") - << QLatin1String("android.permission.BLUETOOTH_ADMIN") - << QLatin1String("android.permission.BRICK") - << QLatin1String("android.permission.BROADCAST_PACKAGE_REMOVED") - << QLatin1String("android.permission.BROADCAST_SMS") - << QLatin1String("android.permission.BROADCAST_STICKY") - << QLatin1String("android.permission.BROADCAST_WAP_PUSH") - << QLatin1String("android.permission.CALL_PHONE") - << QLatin1String("android.permission.CALL_PRIVILEGED") - << QLatin1String("android.permission.CAMERA") - << QLatin1String("android.permission.CHANGE_COMPONENT_ENABLED_STATE") - << QLatin1String("android.permission.CHANGE_CONFIGURATION") - << QLatin1String("android.permission.CHANGE_NETWORK_STATE") - << QLatin1String("android.permission.CHANGE_WIFI_MULTICAST_STATE") - << QLatin1String("android.permission.CHANGE_WIFI_STATE") - << QLatin1String("android.permission.CLEAR_APP_CACHE") - << QLatin1String("android.permission.CLEAR_APP_USER_DATA") - << QLatin1String("android.permission.CONTROL_LOCATION_UPDATES") - << QLatin1String("android.permission.DELETE_CACHE_FILES") - << QLatin1String("android.permission.DELETE_PACKAGES") - << QLatin1String("android.permission.DEVICE_POWER") - << QLatin1String("android.permission.DIAGNOSTIC") - << QLatin1String("android.permission.DISABLE_KEYGUARD") - << QLatin1String("android.permission.DUMP") - << QLatin1String("android.permission.EXPAND_STATUS_BAR") - << QLatin1String("android.permission.FACTORY_TEST") - << QLatin1String("android.permission.FLASHLIGHT") - << QLatin1String("android.permission.FORCE_BACK") - << QLatin1String("android.permission.GET_ACCOUNTS") - << QLatin1String("android.permission.GET_PACKAGE_SIZE") - << QLatin1String("android.permission.GET_TASKS") - << QLatin1String("android.permission.GLOBAL_SEARCH") - << QLatin1String("android.permission.HARDWARE_TEST") - << QLatin1String("android.permission.INJECT_EVENTS") - << QLatin1String("android.permission.INSTALL_LOCATION_PROVIDER") - << QLatin1String("android.permission.INSTALL_PACKAGES") - << QLatin1String("android.permission.INTERNAL_SYSTEM_WINDOW") - << QLatin1String("android.permission.INTERNET") - << QLatin1String("android.permission.KILL_BACKGROUND_PROCESSES") - << QLatin1String("android.permission.MANAGE_ACCOUNTS") - << QLatin1String("android.permission.MANAGE_APP_TOKENS") - << QLatin1String("android.permission.MASTER_CLEAR") - << QLatin1String("android.permission.MODIFY_AUDIO_SETTINGS") - << QLatin1String("android.permission.MODIFY_PHONE_STATE") - << QLatin1String("android.permission.MOUNT_FORMAT_FILESYSTEMS") - << QLatin1String("android.permission.MOUNT_UNMOUNT_FILESYSTEMS") - << QLatin1String("android.permission.NFC") - << QLatin1String("android.permission.PERSISTENT_ACTIVITY") - << QLatin1String("android.permission.PROCESS_OUTGOING_CALLS") - << QLatin1String("android.permission.READ_CALENDAR") - << QLatin1String("android.permission.READ_CALL_LOG") - << QLatin1String("android.permission.READ_CONTACTS") - << QLatin1String("android.permission.READ_EXTERNAL_STORAGE") - << QLatin1String("android.permission.READ_FRAME_BUFFER") - << QLatin1String("com.android.browser.permission.READ_HISTORY_BOOKMARKS") - << QLatin1String("android.permission.READ_INPUT_STATE") - << QLatin1String("android.permission.READ_LOGS") - << QLatin1String("android.permission.READ_PHONE_STATE") - << QLatin1String("android.permission.READ_PROFILE") - << QLatin1String("android.permission.READ_SMS") - << QLatin1String("android.permission.READ_SOCIAL_STREAM") - << QLatin1String("android.permission.READ_SYNC_SETTINGS") - << QLatin1String("android.permission.READ_SYNC_STATS") - << QLatin1String("android.permission.READ_USER_DICTIONARY") - << QLatin1String("android.permission.REBOOT") - << QLatin1String("android.permission.RECEIVE_BOOT_COMPLETED") - << QLatin1String("android.permission.RECEIVE_MMS") - << QLatin1String("android.permission.RECEIVE_SMS") - << QLatin1String("android.permission.RECEIVE_WAP_PUSH") - << QLatin1String("android.permission.RECORD_AUDIO") - << QLatin1String("android.permission.REORDER_TASKS") - << QLatin1String("android.permission.RESTART_PACKAGES") - << QLatin1String("android.permission.SEND_SMS") - << QLatin1String("android.permission.SET_ACTIVITY_WATCHER") - << QLatin1String("com.android.alarm.permission.SET_ALARM") - << QLatin1String("android.permission.SET_ALWAYS_FINISH") - << QLatin1String("android.permission.SET_ANIMATION_SCALE") - << QLatin1String("android.permission.SET_DEBUG_APP") - << QLatin1String("android.permission.SET_ORIENTATION") - << QLatin1String("android.permission.SET_POINTER_SPEED") - << QLatin1String("android.permission.SET_PREFERRED_APPLICATIONS") - << QLatin1String("android.permission.SET_PROCESS_LIMIT") - << QLatin1String("android.permission.SET_TIME") - << QLatin1String("android.permission.SET_TIME_ZONE") - << QLatin1String("android.permission.SET_WALLPAPER") - << QLatin1String("android.permission.SET_WALLPAPER_HINTS") - << QLatin1String("android.permission.SIGNAL_PERSISTENT_PROCESSES") - << QLatin1String("android.permission.STATUS_BAR") - << QLatin1String("android.permission.SUBSCRIBED_FEEDS_READ") - << QLatin1String("android.permission.SUBSCRIBED_FEEDS_WRITE") - << QLatin1String("android.permission.SYSTEM_ALERT_WINDOW") - << QLatin1String("android.permission.UPDATE_DEVICE_STATS") - << QLatin1String("android.permission.USE_CREDENTIALS") - << QLatin1String("android.permission.USE_SIP") - << QLatin1String("android.permission.VIBRATE") - << QLatin1String("android.permission.WAKE_LOCK") - << QLatin1String("android.permission.WRITE_APN_SETTINGS") - << QLatin1String("android.permission.WRITE_CALENDAR") - << QLatin1String("android.permission.WRITE_CALL_LOG") - << QLatin1String("android.permission.WRITE_CONTACTS") - << QLatin1String("android.permission.WRITE_EXTERNAL_STORAGE") - << QLatin1String("android.permission.WRITE_GSERVICES") - << QLatin1String("com.android.browser.permission.WRITE_HISTORY_BOOKMARKS") - << QLatin1String("android.permission.WRITE_PROFILE") - << QLatin1String("android.permission.WRITE_SECURE_SETTINGS") - << QLatin1String("android.permission.WRITE_SETTINGS") - << QLatin1String("android.permission.WRITE_SMS") - << QLatin1String("android.permission.WRITE_SOCIAL_STREAM") - << QLatin1String("android.permission.WRITE_SYNC_SETTINGS") - << QLatin1String("android.permission.WRITE_USER_DICTIONARY") - ); - m_permissionsComboBox->setEditable(true); - layout->addWidget(m_permissionsComboBox, 2, 0); - - m_addPermissionButton = new QPushButton(permissionsGroupBox); - m_addPermissionButton->setText(tr("Add")); - layout->addWidget(m_addPermissionButton, 2, 1); - - m_permissionsModel = new PermissionsModel(this); - - m_permissionsListView = new QListView(permissionsGroupBox); - m_permissionsListView->setModel(m_permissionsModel); - layout->addWidget(m_permissionsListView, 3, 0, 3, 1); - - m_removePermissionButton = new QPushButton(permissionsGroupBox); - m_removePermissionButton->setText(tr("Remove")); - layout->addWidget(m_removePermissionButton, 3, 1); - - permissionsGroupBox->setLayout(layout); - - connect(m_defaultPermissonsCheckBox, &QCheckBox::stateChanged, - this, &AndroidManifestEditorWidget::defaultPermissionOrFeatureCheckBoxClicked); - connect(m_defaultFeaturesCheckBox, &QCheckBox::stateChanged, - this, &AndroidManifestEditorWidget::defaultPermissionOrFeatureCheckBoxClicked); - - connect(m_addPermissionButton, &QAbstractButton::clicked, - this, &AndroidManifestEditorWidget::addPermission); - connect(m_removePermissionButton, &QAbstractButton::clicked, - this, &AndroidManifestEditorWidget::removePermission); - connect(m_permissionsComboBox, &QComboBox::currentTextChanged, - this, &AndroidManifestEditorWidget::updateAddRemovePermissionButtons); - } - - topLayout->addSpacerItem(new QSpacerItem(0, 0, QSizePolicy::Fixed, QSizePolicy::MinimumExpanding)); + topLayout->addWidget(createPackageFormLayout(mainWidget), 0, 0); + topLayout->addWidget(createApplicationGroupBox(mainWidget), 0, 1); + topLayout->addWidget(createPermissionsGroupBox(mainWidget), 1, 0, 1, 2); + topLayout->addWidget(createAdvancedGroupBox(mainWidget), 2, 0, 1, 2); + topLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Fixed, QSizePolicy::MinimumExpanding), 3, 0); auto mainWidgetScrollArea = new QScrollArea; mainWidgetScrollArea->setWidgetResizable(true); @@ -575,6 +587,7 @@ bool AndroidManifestEditorWidget::setActivePage(EditorPage page) if (!servicesValid(m_services->services())) { QMessageBox::critical(nullptr, tr("Service Definition Invalid"), tr("Cannot switch to source when there are invalid services.")); + m_advanvedTabWidget->setCurrentIndex(1); return false; } syncToEditor(); diff --git a/src/plugins/android/androidmanifesteditorwidget.h b/src/plugins/android/androidmanifesteditorwidget.h index 7a69ac49adc..95da8c33127 100644 --- a/src/plugins/android/androidmanifesteditorwidget.h +++ b/src/plugins/android/androidmanifesteditorwidget.h @@ -28,6 +28,9 @@ #include #include +#include +#include +#include #include #include @@ -156,6 +159,11 @@ private: QString parseComment(QXmlStreamReader &reader, QXmlStreamWriter &writer); void parseUnknownElement(QXmlStreamReader &reader, QXmlStreamWriter &writer, bool ignore=false); + QGroupBox *createPermissionsGroupBox(QWidget *parent); + QGroupBox *createPackageFormLayout(QWidget *parent); + QGroupBox *createApplicationGroupBox(QWidget *parent); + QGroupBox *createAdvancedGroupBox(QWidget *parent); + bool m_dirty; // indicates that we need to call syncToEditor() bool m_stayClean; int m_errorLine; @@ -192,6 +200,7 @@ private: TextEditor::TextEditorWidget *m_textEditorWidget; AndroidManifestEditor *m_editor; QString m_androidNdkPlatform; + QTabWidget *m_advanvedTabWidget = nullptr; }; } // namespace Internal } // namespace Android From 168adf6cc6253a5584b943aa01e89c04392526ee Mon Sep 17 00:00:00 2001 From: Assam Boudjelthia Date: Tue, 21 Jul 2020 13:02:02 +0300 Subject: [PATCH 048/108] Android: set copy gradle templates checkbox to false by default The Gradle files are usually not modified by the user, so it makes sense to make the default behavior not to copy them, unless explicitly set by the user. Change-Id: I67a5a8ea402def55a65a4e98588c57a598c5f7d0 Reviewed-by: Alessandro Portale --- src/plugins/android/createandroidmanifestwizard.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/android/createandroidmanifestwizard.cpp b/src/plugins/android/createandroidmanifestwizard.cpp index ed5e5382005..953f96a9e20 100644 --- a/src/plugins/android/createandroidmanifestwizard.cpp +++ b/src/plugins/android/createandroidmanifestwizard.cpp @@ -182,7 +182,7 @@ ChooseDirectoryPage::ChooseDirectoryPage(CreateAndroidManifestWizard *wizard) if (wizard->copyGradle()) { auto checkBox = new QCheckBox(this); - checkBox->setChecked(true); + checkBox->setChecked(false); connect(checkBox, &QCheckBox::toggled, wizard, &CreateAndroidManifestWizard::setCopyGradle); checkBox->setText(tr("Copy the Gradle files to Android directory")); checkBox->setToolTip(tr("It is highly recommended if you are planning to extend the Java part of your Qt application.")); From 4d94f959f80836fbad475a18be6dc0083bc1dbb8 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Mon, 20 Jul 2020 19:07:28 +0200 Subject: [PATCH 049/108] Android: Fix initial validating with clean settings and default paths Relying on the PathChooser::rawPathChanged handlers to initially validate default paths with clean settings does not work (I think) because of a mix of interdependent (via m_androidConfig) synchronous and asynchronous validations. Let's assign the initial values for jdk, sdk and openssl also to m_androidConfig, so that everything works on the first run. Task-number: QTCREATORBUG-24372 Change-Id: Id6945d7bf81949a1f90cd20f9b3bd4e14a5bbe07 Reviewed-by: Assam Boudjelthia --- src/plugins/android/androidsettingswidget.cpp | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/plugins/android/androidsettingswidget.cpp b/src/plugins/android/androidsettingswidget.cpp index 7587b4ea465..c446a0ed132 100644 --- a/src/plugins/android/androidsettingswidget.cpp +++ b/src/plugins/android/androidsettingswidget.cpp @@ -404,24 +404,20 @@ AndroidSettingsWidget::AndroidSettingsWidget() connect(m_ui.OpenJDKLocationPathChooser, &PathChooser::rawPathChanged, this, &AndroidSettingsWidget::validateJdk); - FilePath currentJdkPath = m_androidConfig.openJDKLocation(); - if (currentJdkPath.isEmpty()) - currentJdkPath = AndroidConfig::getJdkPath(); - m_ui.OpenJDKLocationPathChooser->setFilePath(currentJdkPath); + if (m_androidConfig.openJDKLocation().isEmpty()) + m_androidConfig.setOpenJDKLocation(AndroidConfig::getJdkPath()); + m_ui.OpenJDKLocationPathChooser->setFilePath(m_androidConfig.openJDKLocation()); m_ui.OpenJDKLocationPathChooser->setPromptDialogTitle(tr("Select JDK Path")); - FilePath currentSDKPath = m_androidConfig.sdkLocation(); - if (currentSDKPath.isEmpty()) - currentSDKPath = AndroidConfig::defaultSdkPath(); - - m_ui.SDKLocationPathChooser->setFilePath(currentSDKPath); + if (m_androidConfig.sdkLocation().isEmpty()) + m_androidConfig.setSdkLocation(AndroidConfig::defaultSdkPath()); + m_ui.SDKLocationPathChooser->setFilePath(m_androidConfig.sdkLocation()); m_ui.SDKLocationPathChooser->setPromptDialogTitle(tr("Select Android SDK Folder")); m_ui.openSslPathChooser->setPromptDialogTitle(tr("Select OpenSSL Include Project File")); - FilePath currentOpenSslPath = m_androidConfig.openSslLocation(); - if (currentOpenSslPath.isEmpty()) - currentOpenSslPath = currentSDKPath.pathAppended("android_openssl"); - m_ui.openSslPathChooser->setFilePath(currentOpenSslPath); + if (m_androidConfig.openSslLocation().isEmpty()) + m_androidConfig.setOpenSslLocation(m_androidConfig.sdkLocation() / ("android_openssl")); + m_ui.openSslPathChooser->setFilePath(m_androidConfig.openSslLocation()); m_ui.DataPartitionSizeSpinBox->setValue(m_androidConfig.partitionSize()); m_ui.CreateKitCheckBox->setChecked(m_androidConfig.automaticKitCreation()); From aee2094c332f099a44a8f22041551d0aefb459b9 Mon Sep 17 00:00:00 2001 From: Assam Boudjelthia Date: Wed, 22 Jul 2020 10:55:17 +0300 Subject: [PATCH 050/108] Android: fix jdk path retreival on linux Change-Id: I4303b5f5636dce0096ae73ef6229a579b7fee202 Reviewed-by: Alessandro Portale --- src/plugins/android/androidconfigurations.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/android/androidconfigurations.cpp b/src/plugins/android/androidconfigurations.cpp index f92fc851db2..dea734faf7c 100644 --- a/src/plugins/android/androidconfigurations.cpp +++ b/src/plugins/android/androidconfigurations.cpp @@ -1604,7 +1604,8 @@ FilePath AndroidConfig::getJdkPath() jdkHome = FilePath::fromUtf8(jdkPath); } else { jdkPath.replace("bin/java", ""); // For OpenJDK 11 - jdkPath.replace("jre/bin/java", ""); + jdkPath.replace("jre", ""); + jdkPath.replace("//", "/"); jdkHome = FilePath::fromUtf8(jdkPath); } } From e17ebc7a6e8daec172c6c508379b2ae3d5e2c557 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Wed, 22 Jul 2020 09:56:25 +0200 Subject: [PATCH 051/108] Squish: Stabilize menuVisibleAtEditor() even more If the machine fails to correctly initialize the desktop environment we end up with a rather small resolution which in turn makes the condition useless. Change-Id: Idcea7f4e2a5dd265442b5c9d98bf42ed7f01c8af Reviewed-by: Robert Loehning --- tests/system/shared/editor_utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/system/shared/editor_utils.py b/tests/system/shared/editor_utils.py index 52430e70214..db593538834 100644 --- a/tests/system/shared/editor_utils.py +++ b/tests/system/shared/editor_utils.py @@ -73,8 +73,10 @@ def menuVisibleAtEditor(editor, menuInList): menu = waitForObject("{type='QMenu' unnamed='1' visible='1'}", 500) topLeft = menu.mapToGlobal(QPoint(0, 0)) bottomLeft = menu.mapToGlobal(QPoint(0, menu.height)) + center = menu.mapToGlobal(QPoint(menu.width / 2, menu.height / 2)) success = menu.visible and (widgetContainsPoint(editor, topLeft) - or widgetContainsPoint(editor, bottomLeft)) + or widgetContainsPoint(editor, bottomLeft) + or widgetContainsPoint(editor, center)) if success: menuInList[0] = menu return success From ed23aa779b5b8d65e810fc4005859b3a424a6c46 Mon Sep 17 00:00:00 2001 From: Assam Boudjelthia Date: Wed, 22 Jul 2020 13:04:07 +0300 Subject: [PATCH 052/108] Android: reset margins in settings widget page Change-Id: Ib295c25867242f729d6cd2e1516411f6f7df83d7 Reviewed-by: Alessandro Portale --- src/plugins/android/androidsettingswidget.ui | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/plugins/android/androidsettingswidget.ui b/src/plugins/android/androidsettingswidget.ui index 945c241110c..e4ea3c0a07a 100644 --- a/src/plugins/android/androidsettingswidget.ui +++ b/src/plugins/android/androidsettingswidget.ui @@ -14,18 +14,6 @@ Android Configuration
- - 4 - - - 4 - - - 4 - - - 4 - @@ -49,9 +37,6 @@ 818 - - false - 0 From 35ead659c747276631f9ba20134b9d863041c3bf Mon Sep 17 00:00:00 2001 From: Assam Boudjelthia Date: Wed, 22 Jul 2020 13:03:21 +0300 Subject: [PATCH 053/108] Android: fix settings widget palelette in dark mode Change-Id: I2ef4f0d510bbbe732c790134b39a9ea5cb0af2fc Reviewed-by: Alessandro Portale --- src/plugins/android/androidsettingswidget.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/plugins/android/androidsettingswidget.cpp b/src/plugins/android/androidsettingswidget.cpp index c446a0ed132..5bc2431c735 100644 --- a/src/plugins/android/androidsettingswidget.cpp +++ b/src/plugins/android/androidsettingswidget.cpp @@ -844,13 +844,7 @@ AndroidSettingsPage::AndroidSettingsPage() setId(Constants::ANDROID_SETTINGS_ID); setDisplayName(AndroidSettingsWidget::tr("Android")); setCategory(ProjectExplorer::Constants::DEVICE_SETTINGS_CATEGORY); - setWidgetCreator([] { - auto widget = new AndroidSettingsWidget; - QPalette pal = widget->palette(); - pal.setColor(QPalette::Window, Utils::creatorTheme()->color(Theme::BackgroundColorNormal)); - widget->setPalette(pal); - return widget; - }); + setWidgetCreator([] { return new AndroidSettingsWidget; }); } } // namespace Internal From def7615c814ab96f7573a1478117d0f0c7909305 Mon Sep 17 00:00:00 2001 From: Assam Boudjelthia Date: Wed, 22 Jul 2020 10:39:55 +0300 Subject: [PATCH 054/108] Android: fix a title capitalization Change-Id: I5b22d95b85543f110f7c292d06112c1b72c337bf Reviewed-by: Alessandro Portale --- doc/qtcreator/src/android/deploying-android.qdoc | 2 +- src/plugins/android/androiddeployqtstep.cpp | 2 +- src/plugins/android/androidplugin.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/qtcreator/src/android/deploying-android.qdoc b/doc/qtcreator/src/android/deploying-android.qdoc index 2437b7aaa2a..a730932d626 100644 --- a/doc/qtcreator/src/android/deploying-android.qdoc +++ b/doc/qtcreator/src/android/deploying-android.qdoc @@ -102,7 +102,7 @@ The packages are deployed on the connected Android devices. To switch the device used as a default device for the selected kit, select - \uicontrol Projects > \uicontrol Run > \uicontrol {Deploy to Android device} + \uicontrol Projects > \uicontrol Run > \uicontrol {Deploy to Android Device} > \uicontrol {Reset Default Devices}. The setting applies until you restart \QC. For more information, see \l{Selecting Android Devices}. diff --git a/src/plugins/android/androiddeployqtstep.cpp b/src/plugins/android/androiddeployqtstep.cpp index d82d050511a..390d0e1b0dc 100644 --- a/src/plugins/android/androiddeployqtstep.cpp +++ b/src/plugins/android/androiddeployqtstep.cpp @@ -145,7 +145,7 @@ AndroidDeployQtStep::AndroidDeployQtStep(BuildStepList *parent, Utils::Id id) m_uninstallPreviousPackage = qt && qt->qtVersion() < QtSupport::QtVersionNumber(5, 4, 0); //: AndroidDeployQtStep default display name - setDefaultDisplayName(tr("Deploy to Android device")); + setDefaultDisplayName(tr("Deploy to Android Device")); connect(this, &AndroidDeployQtStep::askForUninstall, this, &AndroidDeployQtStep::slotAskForUninstall, diff --git a/src/plugins/android/androidplugin.cpp b/src/plugins/android/androidplugin.cpp index 187146a6367..b1616ce56b2 100644 --- a/src/plugins/android/androidplugin.cpp +++ b/src/plugins/android/androidplugin.cpp @@ -77,7 +77,7 @@ public: setConfigBaseId("Qt4ProjectManager.AndroidDeployConfiguration2"); addSupportedTargetDeviceType(Constants::ANDROID_DEVICE_TYPE); setDefaultDisplayName(QCoreApplication::translate("Android::Internal", - "Deploy to Android device")); + "Deploy to Android Device")); addInitialStep(AndroidDeployQtStep::stepId()); } }; From f1c0393d52634d6073b0d3caf20028c834de8617 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Wed, 22 Jul 2020 17:28:02 +0200 Subject: [PATCH 055/108] CPaster: Fix fetching from DPaste Currently the fetch location has moved. Change-Id: Ie4cd3bf4b1050ca2c0cc17bde553f546232882e7 Reviewed-by: Christian Kandeler --- src/plugins/cpaster/dpastedotcomprotocol.cpp | 39 ++++++++++++++------ src/plugins/cpaster/dpastedotcomprotocol.h | 1 + 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/src/plugins/cpaster/dpastedotcomprotocol.cpp b/src/plugins/cpaster/dpastedotcomprotocol.cpp index 1a0d9c61946..aac23984982 100644 --- a/src/plugins/cpaster/dpastedotcomprotocol.cpp +++ b/src/plugins/cpaster/dpastedotcomprotocol.cpp @@ -46,20 +46,37 @@ void DPasteDotComProtocol::fetch(const QString &id) { QNetworkReply * const reply = httpGet(baseUrl() + '/' + id + ".txt"); connect(reply, &QNetworkReply::finished, this, [this, id, reply] { - QString title; - QString content; - const bool error = reply->error(); - if (error) { - content = reply->errorString(); - } else { - title = name() + ": " + id; - content = QString::fromUtf8(reply->readAll()); - } - reply->deleteLater(); - emit fetchDone(title, content, error); + fetchFinished(id, reply, false); }); } +void DPasteDotComProtocol::fetchFinished(const QString &id, QNetworkReply * const reply, + bool alreadyRedirected) +{ + const int status = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(); + if (status >= 300 && status <= 308 && status != 306) { + if (!alreadyRedirected) { + QNetworkReply * const newRep = httpGet(QString::fromUtf8(reply->rawHeader("Location"))); + connect(newRep, &QNetworkReply::finished, this, [this, id, newRep] { + fetchFinished(id, newRep, true); + }); + reply->deleteLater(); + return; + } + } + QString title; + QString content; + const bool error = reply->error(); + if (error) { + content = reply->errorString(); + } else { + title = name() + ": " + id; + content = QString::fromUtf8(reply->readAll()); + } + reply->deleteLater(); + emit fetchDone(title, content, error); +} + static QByteArray typeToString(Protocol::ContentType type) { switch (type) { diff --git a/src/plugins/cpaster/dpastedotcomprotocol.h b/src/plugins/cpaster/dpastedotcomprotocol.h index 6f016495785..9b39052d8cb 100644 --- a/src/plugins/cpaster/dpastedotcomprotocol.h +++ b/src/plugins/cpaster/dpastedotcomprotocol.h @@ -40,6 +40,7 @@ private: bool hasSettings() const override { return false; } unsigned capabilities() const override; void fetch(const QString &id) override; + void fetchFinished(const QString &id, QNetworkReply * const reply, bool alreadyRedirected); void paste(const QString &text, ContentType ct = Text, int expiryDays = 1, From ee1b8c2f16d66c85633839baee81333117098eba Mon Sep 17 00:00:00 2001 From: Assam Boudjelthia Date: Wed, 22 Jul 2020 13:14:55 +0300 Subject: [PATCH 056/108] Android: move tooltip from ui to widget class and shorten long phrases Change-Id: I15bd9f54e7d4dbc3fae62b331172d6bc8e74e7ad Reviewed-by: Alessandro Portale --- src/plugins/android/androidsettingswidget.cpp | 23 +++++++++++++------ src/plugins/android/androidsettingswidget.ui | 3 --- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/plugins/android/androidsettingswidget.cpp b/src/plugins/android/androidsettingswidget.cpp index 5bc2431c735..0dff745c9c1 100644 --- a/src/plugins/android/androidsettingswidget.cpp +++ b/src/plugins/android/androidsettingswidget.cpp @@ -429,13 +429,22 @@ AndroidSettingsWidget::AndroidSettingsWidget() m_ui.downloadSDKToolButton->setIcon(downloadIcon); m_ui.downloadNDKToolButton->setIcon(downloadIcon); m_ui.downloadOpenJDKToolButton->setIcon(downloadIcon); - m_ui.sdkToolsAutoDownloadButton->setToolTip(tr( - "Automatically download Android SDK Tools to selected location.\n\n" - "If the selected path contains no valid SDK Tools, the SDK Tools package " - "is downloaded from %1, and extracted to the selected path.\n" - "After the SDK Tools are properly set up, you are prompted to install " - "any essential packages required for Qt to build for Android.") - .arg(m_androidConfig.sdkToolsUrl().toString())); + m_ui.sdkToolsAutoDownloadButton->setToolTip( + tr("Automatically download Android SDK Tools to selected location.\n\n" + "If the selected path contains no valid SDK Tools, the SDK Tools package is downloaded\n" + "from %1,\n" + "and extracted to the selected path.\n" + "After the SDK Tools are properly set up, you are prompted to install any essential\n" + "packages required for Qt to build for Android.") + .arg(m_androidConfig.sdkToolsUrl().toString())); + + m_ui.downloadOpenSSLPrebuiltLibs->setToolTip( + tr("Automatically download OpenSSL prebuilt libraries.\n\n" + "These libraries can be shipped with your application if any SSL operations\n" + "are performed. Find the checkbox under \"Projects > Build > Build Steps >\n" + "Build Android APK > Additional Libraries\".\n" + "If the automatic download fails, Qt Creator proposes to open the download URL\n" + "in the system's browser for manual download.")); connect(m_ui.SDKLocationPathChooser, &PathChooser::rawPathChanged, this, &AndroidSettingsWidget::onSdkPathChanged); diff --git a/src/plugins/android/androidsettingswidget.ui b/src/plugins/android/androidsettingswidget.ui index e4ea3c0a07a..521ad81a091 100644 --- a/src/plugins/android/androidsettingswidget.ui +++ b/src/plugins/android/androidsettingswidget.ui @@ -277,9 +277,6 @@ 0 - - Automatically download OpenSSL prebuilt libraries. These libraries can be shipped with your application from "Projects > Build > Build Steps > Build Android APK > Additional Libraries" if any SSL operations are performed. If the automatic download fails, Qt Creator proposes to open the download URL in the system's browser for manual download. - Download OpenSSL From 8a8453e55d3bef1dae9212f7e957852b93ade00a Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Thu, 23 Jul 2020 09:52:03 +0200 Subject: [PATCH 057/108] Android: Set more columns in AVD table to ResizeToContents Give the columns with potentailly more content some space. Change-Id: I4c213f97df077801e3b11ef09519973a61c58c4f Reviewed-by: Assam Boudjelthia --- src/plugins/android/androidsettingswidget.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/android/androidsettingswidget.cpp b/src/plugins/android/androidsettingswidget.cpp index 0dff745c9c1..f2f6b0208ff 100644 --- a/src/plugins/android/androidsettingswidget.cpp +++ b/src/plugins/android/androidsettingswidget.cpp @@ -423,7 +423,9 @@ AndroidSettingsWidget::AndroidSettingsWidget() m_ui.CreateKitCheckBox->setChecked(m_androidConfig.automaticKitCreation()); m_ui.AVDTableView->setModel(&m_AVDModel); m_ui.AVDTableView->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch); - m_ui.AVDTableView->horizontalHeader()->setSectionResizeMode(1, QHeaderView::ResizeToContents); + for (int column : {1, 2, 5}) + m_ui.AVDTableView->horizontalHeader()->setSectionResizeMode( + column, QHeaderView::ResizeToContents); const QIcon downloadIcon = Icons::ONLINE.icon(); m_ui.downloadSDKToolButton->setIcon(downloadIcon); From e0915b7eff32bc80d26dc9531b91e30c4384f102 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Wed, 22 Jul 2020 17:46:58 +0200 Subject: [PATCH 058/108] Android: Fix rendering of settings background in dark mode This amends faad83d5a37448b472af2efa76b7193c83f2c1f1 by undoing the insertion of a QScrollArea + QWidget under the whole form. The reason for adding this was to be able to scroll down to the license agreements. Since Core::SettingsDialog already puts the settings widget into a QScrollArea, we have two of those and one is superfluous. When using a dark theme (e.g. flat-dark), this extra QScrollArea introduces wrong background color. Also, it complicates the already quite blown androidsettingswidget.ui This change removes the QSrollArea + QWidget while keeping the feature of scrolling to the license text. This is achieved by searching through the parent chain for a QScrollArea and using the first found one for scrolling. Task-number: QTCREATORBUG-24379 Change-Id: I2bdae9367eb06b68fa47badf2556eb1ec7ebcafb Reviewed-by: Assam Boudjelthia --- src/plugins/android/androidsettingswidget.cpp | 10 +- src/plugins/android/androidsettingswidget.ui | 822 +++++++++--------- 2 files changed, 396 insertions(+), 436 deletions(-) diff --git a/src/plugins/android/androidsettingswidget.cpp b/src/plugins/android/androidsettingswidget.cpp index f2f6b0208ff..7c7bed2d926 100644 --- a/src/plugins/android/androidsettingswidget.cpp +++ b/src/plugins/android/androidsettingswidget.cpp @@ -56,6 +56,7 @@ #include #include #include +#include #include #include #include @@ -367,7 +368,14 @@ AndroidSettingsWidget::AndroidSettingsWidget() m_ui.managerTabWidget->tabBar()->setEnabled(true); }); connect(m_sdkManagerWidget, &AndroidSdkManagerWidget::licenseWorkflowStarted, [this] { - m_ui.scrollArea->ensureWidgetVisible(m_ui.managerTabWidget); + QObject *parentWidget = parent(); + while (parentWidget) { + if (auto scrollArea = qobject_cast(parentWidget)) { + scrollArea->ensureWidgetVisible(m_ui.managerTabWidget); + break; + } + parentWidget = parentWidget->parent(); + }; }); QMap javaValidationPoints; diff --git a/src/plugins/android/androidsettingswidget.ui b/src/plugins/android/androidsettingswidget.ui index 521ad81a091..d29a6073cf7 100644 --- a/src/plugins/android/androidsettingswidget.ui +++ b/src/plugins/android/androidsettingswidget.ui @@ -2,42 +2,278 @@ AndroidSettingsWidget - - - 0 - 0 - 1131 - 826 - - Android Configuration - - - QFrame::NoFrame + + + + 0 + 0 + - - QFrame::Plain + + Java Settings - - 0 + + + + + + 0 + 0 + + + + + + + + Open JDK download URL in the system's browser. + + + + + + + + 0 + 0 + + + + JDK location: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + + + + + + + Android Settings - + + + + + QAbstractScrollArea::AdjustToContents + + + + 16 + 16 + + + + QListView::Adjust + + + 0 + + + false + + + + + + + + + true + + + + 0 + 0 + + + + Add the selected custom NDK. The toolchains and debuggers will be created automatically. + + + Add... + + + + + + + false + + + + 0 + 0 + + + + Remove the selected NDK if it has been added manually. + + + Remove + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + Android NDK list: + + + + + + + Open Android SDK download URL in the system's browser. + + + + + + + + 0 + 0 + + + + Android SDK location: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Open Android NDK download URL in the system's browser. + + + + + + + + + + + + + Set Up SDK + + + + + + + + + + Android OpenSSL settings (Optional) + + + + + + + 0 + 0 + + + + OpenSSL binaries location: + + + + + + + + + + + 0 + 0 + + + + Download OpenSSL + + + + + + + Select the path of the prebuilt OpenSSL binaries. + + + + + + + + + + + 0 + 0 + + + + Automatically create kits for Android tool chains + + true - - - - 0 - 0 - 1123 - 818 - - - + + + + + + 0 + + + + AVD Manager + + 0 @@ -51,432 +287,148 @@ 0 - - - - 0 - 0 - - - - Java Settings - - - - - - - 0 - 0 - - - - - - - - Open JDK download URL in the system's browser. - - - - - - - - 0 - 0 - - - - JDK location: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - - - - - - - Android Settings - - - - - - QAbstractScrollArea::AdjustToContents - - - - 16 - 16 - - - - QListView::Adjust - - - 0 - - - false - - - - - - - - - true - - - - 0 - 0 - - - - Add the selected custom NDK. The toolchains and debuggers will be created automatically. - - - Add... - - - - - - - false - - - - 0 - 0 - - - - Remove the selected NDK if it has been added manually. - - - Remove - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - Android NDK list: - - - - - - - Open Android SDK download URL in the system's browser. - - - - - - - - 0 - 0 - - - - Android SDK location: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Open Android NDK download URL in the system's browser. - - - - - - - - - - - - - Set Up SDK - - - - - - - - - - Android OpenSSL settings (Optional) - - - - - - - 0 - 0 - - - - OpenSSL binaries location: - - - - - - - - - - - 0 - 0 - - - - Download OpenSSL - - - - - - - Select the path of the prebuilt OpenSSL binaries. - - - - - - - - + - + 0 0 - - Automatically create kits for Android tool chains + + QAbstractItemView::SingleSelection - - true + + QAbstractItemView::SelectRows + + Qt::ElideMiddle + + + false + + + false + - - - 0 - - - - AVD Manager - - - - 0 + + + + + System/data partition size: - - 0 + + + + + + + 0 + 0 + - - 0 + + Mb - - 0 + + 99999 - - - - - 0 - 0 - - - - QAbstractItemView::SingleSelection - - - QAbstractItemView::SelectRows - - - Qt::ElideMiddle - - - false - - - false - - - - - - - - - System/data partition size: - - - - - - - - 0 - 0 - - - - Mb - - - 99999 - - - 1024 - - - - - - - false - - - - 0 - 0 - - - - Start... - - - - - - - Refresh List - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 0 - 8 - - - - - - - - - 0 - 0 - - - - Add... - - - - - - - false - - - - 0 - 0 - - - - Remove - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - SDK Manager - - - + + 1024 + + + + + + + false + + + + 0 + 0 + + + + Start... + + + + + + + Refresh List + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 0 + 8 + + + + + + + + + 0 + 0 + + + + Add... + + + + + + + false + + + + 0 + 0 + + + + Remove + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + SDK Manager + + From 27514fa94d40905809cc2ab80935d77d61185165 Mon Sep 17 00:00:00 2001 From: Assam Boudjelthia Date: Tue, 14 Jul 2020 15:23:26 +0300 Subject: [PATCH 059/108] Android: Warn if the selected device main ABI is not selected Task-number: QTCREATORBUG-23291 Change-Id: I2ae13edaee30c6548a37e077c18f508a42b42d25 Reviewed-by: Alessandro Portale --- src/plugins/android/androidconstants.h | 1 + src/plugins/android/androiddeployqtstep.cpp | 13 +++++++++++++ src/plugins/qmakeprojectmanager/qmakenodes.cpp | 4 ++++ .../qmakeprojectmanager/qmakeparsernodes.cpp | 1 + src/plugins/qmakeprojectmanager/qmakeparsernodes.h | 1 + src/plugins/qmakeprojectmanager/qmakestep.cpp | 8 +++++++- 6 files changed, 27 insertions(+), 1 deletion(-) diff --git a/src/plugins/android/androidconstants.h b/src/plugins/android/androidconstants.h index 8c8f6385556..726a9537c8a 100644 --- a/src/plugins/android/androidconstants.h +++ b/src/plugins/android/androidconstants.h @@ -64,6 +64,7 @@ const char JAVA_MIMETYPE[] = "text/x-java"; const char ANDROID_ARCHITECTURE[] = "Android.Architecture"; const char ANDROID_PACKAGE_SOURCE_DIR[] = "AndroidPackageSourceDir"; const char ANDROID_EXTRA_LIBS[] = "AndroidExtraLibs"; +const char ANDROID_ABIS[] = "ANDROID_ABIS"; const char ANDROID_PACKAGENAME[] = "Android.PackageName"; const char ANDROID_PACKAGE_INSTALLATION_STEP_ID[] diff --git a/src/plugins/android/androiddeployqtstep.cpp b/src/plugins/android/androiddeployqtstep.cpp index 390d0e1b0dc..5f551164118 100644 --- a/src/plugins/android/androiddeployqtstep.cpp +++ b/src/plugins/android/androiddeployqtstep.cpp @@ -38,6 +38,7 @@ #include #include +#include #include #include #include @@ -207,6 +208,18 @@ bool AndroidDeployQtStep::init() if (!info.isValid()) // aborted return false; + const QString buildKey = target()->activeBuildKey(); + auto selectedAbis = buildSystem()->extraData(buildKey, Constants::ANDROID_ABIS).toStringList(); + + if (!selectedAbis.contains(info.cpuAbi.first())) { + Core::MessageManager::write( + tr("Android: The selected device main ABI (%1) is not selected! The app execution or " + "debugging might not work properly. Add it from Projects > Build > Build Steps > " + "qmake > ABIs.") + .arg(info.cpuAbi.first()), + Core::MessageManager::WithFocus); + } + m_avdName = info.avdname; m_serialNumber = info.serialNumber; qCDebug(deployStepLog) << "Selected device info:" << info; diff --git a/src/plugins/qmakeprojectmanager/qmakenodes.cpp b/src/plugins/qmakeprojectmanager/qmakenodes.cpp index 06f9cb45021..74b8758c41b 100644 --- a/src/plugins/qmakeprojectmanager/qmakenodes.cpp +++ b/src/plugins/qmakeprojectmanager/qmakenodes.cpp @@ -360,6 +360,8 @@ QStringList QmakeProFileNode::targetApplications() const QVariant QmakeProFileNode::data(Utils::Id role) const { + if (role == Android::Constants::ANDROID_ABIS) + return variableValue(Variable::AndroidAbis); if (role == Android::Constants::AndroidPackageSourceDir) return singleVariableValue(Variable::AndroidPackageSourceDir); if (role == Android::Constants::AndroidDeploySettingsFile) @@ -432,6 +434,8 @@ bool QmakeProFileNode::setData(Utils::Id role, const QVariant &value) const return pro->setProVariable("ANDROID_EXTRA_LIBS", value.toStringList(), scope, flags); if (role == Android::Constants::AndroidPackageSourceDir) return pro->setProVariable("ANDROID_PACKAGE_SOURCE_DIR", {value.toString()}, scope, flags); + if (role == Android::Constants::ANDROID_ABIS) + return pro->setProVariable("ANDROID_ABIS", {value.toString()}, scope, flags); return false; } diff --git a/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp b/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp index e3979bbafb6..b694d2255c6 100644 --- a/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp @@ -1589,6 +1589,7 @@ QmakeEvalResult *QmakeProFile::evaluate(const QmakeEvalInput &input) result->newVarValues[Variable::AndroidArch] = exactReader->values(QLatin1String("ANDROID_TARGET_ARCH")); result->newVarValues[Variable::AndroidDeploySettingsFile] = exactReader->values(QLatin1String("ANDROID_DEPLOYMENT_SETTINGS_FILE")); result->newVarValues[Variable::AndroidPackageSourceDir] = exactReader->values(QLatin1String("ANDROID_PACKAGE_SOURCE_DIR")); + result->newVarValues[Variable::AndroidAbis] = exactReader->values(QLatin1String("ANDROID_ABIS")); result->newVarValues[Variable::AndroidExtraLibs] = exactReader->values(QLatin1String("ANDROID_EXTRA_LIBS")); result->newVarValues[Variable::AppmanPackageDir] = exactReader->values(QLatin1String("AM_PACKAGE_DIR")); result->newVarValues[Variable::AppmanManifest] = exactReader->values(QLatin1String("AM_MANIFEST")); diff --git a/src/plugins/qmakeprojectmanager/qmakeparsernodes.h b/src/plugins/qmakeprojectmanager/qmakeparsernodes.h index 54331a82d73..28a92dce377 100644 --- a/src/plugins/qmakeprojectmanager/qmakeparsernodes.h +++ b/src/plugins/qmakeprojectmanager/qmakeparsernodes.h @@ -98,6 +98,7 @@ enum class Variable { ShLibExtension, AndroidArch, AndroidDeploySettingsFile, + AndroidAbis, AndroidPackageSourceDir, AndroidExtraLibs, AppmanPackageDir, diff --git a/src/plugins/qmakeprojectmanager/qmakestep.cpp b/src/plugins/qmakeprojectmanager/qmakestep.cpp index 376d5d81f85..82b236dd480 100644 --- a/src/plugins/qmakeprojectmanager/qmakestep.cpp +++ b/src/plugins/qmakeprojectmanager/qmakestep.cpp @@ -34,6 +34,8 @@ #include "qmakeprojectmanagerconstants.h" #include "qmakesettings.h" +#include + #include #include #include @@ -664,8 +666,12 @@ void QMakeStepConfigWidget::abisChanged() break; } } - args << prefix + '"' + abis.join(' ') + '"'; + if (!abis.isEmpty()) + args << prefix + '"' + abis.join(' ') + '"'; m_step->setExtraArguments(args); + + const QString buildKey = m_step->target()->activeBuildKey(); + m_step->buildSystem()->setExtraData(buildKey, Android::Constants::ANDROID_ABIS, m_step->selectedAbis()); } updateSummaryLabel(); From 86eadb4d1bc2ac29b98ee6e7d07ce469f985ac10 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 23 Jul 2020 12:48:56 +0200 Subject: [PATCH 060/108] CPaster: Inform about a permanent redirect Helps to keep track of the current workaround and replace it again with using the updated URL on a permanent move. Change-Id: I913dbd7be18d77c9a8d52f1dd931cc5b30320fa2 Reviewed-by: Christian Kandeler --- src/plugins/cpaster/dpastedotcomprotocol.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/plugins/cpaster/dpastedotcomprotocol.cpp b/src/plugins/cpaster/dpastedotcomprotocol.cpp index aac23984982..c5927c58f33 100644 --- a/src/plugins/cpaster/dpastedotcomprotocol.cpp +++ b/src/plugins/cpaster/dpastedotcomprotocol.cpp @@ -56,7 +56,12 @@ void DPasteDotComProtocol::fetchFinished(const QString &id, QNetworkReply * cons const int status = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(); if (status >= 300 && status <= 308 && status != 306) { if (!alreadyRedirected) { - QNetworkReply * const newRep = httpGet(QString::fromUtf8(reply->rawHeader("Location"))); + const QString location = QString::fromUtf8(reply->rawHeader("Location")); + if (status == 301 || status == 308) { + const QString m = QString("HTTP redirect (%1) to \"%2\"").arg(status).arg(location); + Core::MessageManager::write(m, Core::MessageManager::ModeSwitch); + } + QNetworkReply * const newRep = httpGet(location); connect(newRep, &QNetworkReply::finished, this, [this, id, newRep] { fetchFinished(id, newRep, true); }); From 7775334998095814580c1932a230ab4c048e2d54 Mon Sep 17 00:00:00 2001 From: Assam Boudjelthia Date: Thu, 23 Jul 2020 17:42:53 +0300 Subject: [PATCH 061/108] Android: regression fix for warning missing ANDROID_ABIS Ammends 27514fa94d40905809cc2ab80935d77d61185165. Task-number: QTCREATORBUG-23291 Change-Id: Iadf33f9c60a738c9ee4c810bb065667cab29aa92 Reviewed-by: Alessandro Portale --- src/plugins/qmakeprojectmanager/qmakenodes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/qmakeprojectmanager/qmakenodes.cpp b/src/plugins/qmakeprojectmanager/qmakenodes.cpp index 74b8758c41b..ffc1942cc44 100644 --- a/src/plugins/qmakeprojectmanager/qmakenodes.cpp +++ b/src/plugins/qmakeprojectmanager/qmakenodes.cpp @@ -435,7 +435,7 @@ bool QmakeProFileNode::setData(Utils::Id role, const QVariant &value) const if (role == Android::Constants::AndroidPackageSourceDir) return pro->setProVariable("ANDROID_PACKAGE_SOURCE_DIR", {value.toString()}, scope, flags); if (role == Android::Constants::ANDROID_ABIS) - return pro->setProVariable("ANDROID_ABIS", {value.toString()}, scope, flags); + return pro->setProVariable("ANDROID_ABIS", {value.toStringList()}, scope, flags); return false; } From 1203be0bc317b0cf61c42bc2ff4fded18f33702e Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Wed, 22 Jul 2020 21:35:49 +0200 Subject: [PATCH 062/108] ProjectExplorer: Don't prompt user whether 0 files should be deleted Change-Id: I893c8af5e2c0f0172dd397732275bdec9918bc44 Reviewed-by: Christian Kandeler --- .../projectexplorer/projectexplorer.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index 8a7d3238ef2..87faf898077 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -3629,14 +3629,16 @@ void ProjectExplorerPluginPrivate::removeFile() const bool deleteFile = removeFileDialog.isDeleteFileChecked(); - const QMessageBox::StandardButton reply = QMessageBox::question( - Core::ICore::dialogParent(), tr("Remove More Files?"), - tr("Remove these files as well?\n %1") - .arg(Utils::transform(siblings, [](const NodeAndPath &np) { - return np.second.toFileInfo().fileName(); - }).join("\n "))); - if (reply == QMessageBox::Yes) - filesToRemove << siblings; + if (!siblings.isEmpty()) { + const QMessageBox::StandardButton reply = QMessageBox::question( + Core::ICore::dialogParent(), tr("Remove More Files?"), + tr("Remove these files as well?\n %1") + .arg(Utils::transform(siblings, [](const NodeAndPath &np) { + return np.second.toFileInfo().fileName(); + }).join("\n "))); + if (reply == QMessageBox::Yes) + filesToRemove << siblings; + } for (const NodeAndPath &file : filesToRemove) { // Nodes can become invalid if the project was re-parsed while the dialog was open From 5c0b3196efaf532c874a41458bd07a0fb21ede70 Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Wed, 22 Jul 2020 22:18:04 +0200 Subject: [PATCH 063/108] ProjectExplorer: Fix iterating through files to remove Change-Id: I680f8e40248dbbf4f4ee76765fad7a99944b0a5f Reviewed-by: Christian Kandeler --- src/plugins/projectexplorer/projectexplorer.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index 87faf898077..44222db60de 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -3654,21 +3654,22 @@ void ProjectExplorerPluginPrivate::removeFile() FolderNode *folderNode = file.first->asFileNode()->parentFolderNode(); QTC_ASSERT(folderNode, return); + const Utils::FilePath ¤tFilePath = file.second; const RemovedFilesFromProject status - = folderNode->removeFiles(QStringList(file.second.toString())); + = folderNode->removeFiles(QStringList(currentFilePath.toString())); const bool success = status == RemovedFilesFromProject::Ok || (status == RemovedFilesFromProject::Wildcard && removeFileDialog.isDeleteFileChecked()); if (!success) { TaskHub::addTask(BuildSystemTask(Task::Error, tr("Could not remove file \"%1\" from project \"%2\".") - .arg(filePath.toUserOutput(), folderNode->managingProject()->displayName()), + .arg(currentFilePath.toUserOutput(), folderNode->managingProject()->displayName()), folderNode->managingProject()->filePath())); if (!deleteFile) continue; } - FileChangeBlocker changeGuard(filePath.toString()); - Core::FileUtils::removeFile(filePath.toString(), deleteFile); + FileChangeBlocker changeGuard(currentFilePath.toString()); + Core::FileUtils::removeFile(currentFilePath.toString(), deleteFile); } } From 7ce989a3069f65646da9ce2bc98d6791d960f468 Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Wed, 22 Jul 2020 22:01:05 +0200 Subject: [PATCH 064/108] VcsManager: Tell user which file is going to be deleted Change-Id: I72a853cf65d0bd697379c1738657f098243b814d Reviewed-by: Orgad Shaneh Reviewed-by: Christian Kandeler --- src/plugins/coreplugin/vcsmanager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/coreplugin/vcsmanager.cpp b/src/plugins/coreplugin/vcsmanager.cpp index db06547cba9..23c1bc792bf 100644 --- a/src/plugins/coreplugin/vcsmanager.cpp +++ b/src/plugins/coreplugin/vcsmanager.cpp @@ -348,8 +348,8 @@ bool VcsManager::promptToDelete(IVersionControl *vc, const QString &fileName) if (!vc->supportsOperation(IVersionControl::DeleteOperation)) return true; const QString title = tr("Version Control"); - const QString msg = tr("Would you like to remove this file from the version control system (%1)?\n" - "Note: This might remove the local file.").arg(vc->displayName()); + const QString msg = tr("Would you like to remove\n\t%1\nfrom the version control system (%2)?\n" + "Note: This might remove the local file.").arg(fileName, vc->displayName()); const QMessageBox::StandardButton button = QMessageBox::question(ICore::dialogParent(), title, msg, QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes); if (button != QMessageBox::Yes) From 3b8f51391bb40e51c3896b6c0451721611aec17f Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Thu, 23 Jul 2020 17:10:54 +0200 Subject: [PATCH 065/108] UnitTests: Re-enable CMake unittests Ammeds 327bec26bfa25a06f511eb361e65567086df29a7 Change-Id: I34b62532da424b3b4fb0290049150f6ba444283b Reviewed-by: Alessandro Portale --- tests/CMakeLists.txt | 2 +- tests/unit/unittest/CMakeLists.txt | 3 ++- tests/unit/unittest/refactoringclient-test.cpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index b8038a92820..71bf9613a5d 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,4 +1,4 @@ add_subdirectory(auto) add_subdirectory(manual) # add_subdirectory(tools) -# add_subdirectory(unit) +add_subdirectory(unit) diff --git a/tests/unit/unittest/CMakeLists.txt b/tests/unit/unittest/CMakeLists.txt index 9ae0b9c9a9d..b9206c5cbb6 100644 --- a/tests/unit/unittest/CMakeLists.txt +++ b/tests/unit/unittest/CMakeLists.txt @@ -15,12 +15,13 @@ endif() add_qtc_test(unittest GTEST INCLUDES BEFORE "../mockup" + BEFORE "../mockup/qmldesigner/designercore/include" DEPENDS Qt5::Core Qt5::Network Qt5::Widgets Qt5::Xml Qt5::Concurrent Qt5::Qml Qt5::Gui Googletest clangrefactoringbackend_lib clangbackend_lib clangpchmanagerbackend_lib - CPlusPlus Utils + CPlusPlus Utils QmlDesigner DEFINES QT_NO_CAST_TO_ASCII QT_RESTRICTED_CAST_FROM_ASCII diff --git a/tests/unit/unittest/refactoringclient-test.cpp b/tests/unit/unittest/refactoringclient-test.cpp index 81036feba09..a07f7cea147 100644 --- a/tests/unit/unittest/refactoringclient-test.cpp +++ b/tests/unit/unittest/refactoringclient-test.cpp @@ -199,7 +199,7 @@ TEST_F(RefactoringClient, ResultCounterIsZeroAfterSettingExpectedResultCount) TEST_F(RefactoringClient, XXX) { - const Core::Search::TextRange textRange{{1,0,1},{1,0,1}}; + const Core::Search::TextRange textRange{{1,0},{1,0}}; const ClangBackEnd::SourceRangeWithTextContainer sourceRange{1, 1, 1, 1, 1, 1, 1, "function"}; EXPECT_CALL(mockSearchHandle, addResult(QString("/path/to/file"), QString("function"), textRange)) From e903f9e3507354e2bd455f76a3eeb3fcc494a16d Mon Sep 17 00:00:00 2001 From: Andre Hartmann Date: Fri, 24 Jul 2020 15:50:01 +0200 Subject: [PATCH 066/108] Git: Fix quoting of repository name ... in the "Uncommited Changes Found" dialog. Change-Id: I7f987786f4aada47983b849419e2443311dec75f Reviewed-by: Orgad Shaneh --- src/plugins/git/gitclient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index 79b0ea657b0..77a988f1886 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -3591,7 +3591,7 @@ void GitClient::StashInfo::stashPrompt(const QString &command, const QString &st QString *errorMessage) { QMessageBox msgBox(QMessageBox::Question, tr("Uncommitted Changes Found"), - tr("What would you like to do with local changes in:") + "\n\n" + tr("What would you like to do with local changes in:") + "\n\n\"" + QDir::toNativeSeparators(m_workingDir) + '\"', QMessageBox::NoButton, ICore::dialogParent()); From a149ccd2d2a9d2c9bca7c9922df034b33a5da1c0 Mon Sep 17 00:00:00 2001 From: Richard Weickelt Date: Fri, 24 Jul 2020 14:04:13 +0200 Subject: [PATCH 067/108] Update qbs submodule To HEAD of 1.17 branch. Change-Id: Ic9015ebc7bb77b2ae6d9a10fd93d1e4a5279ff1d Reviewed-by: Christian Kandeler --- src/shared/qbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/qbs b/src/shared/qbs index 09401f5eab3..0ac5a146743 160000 --- a/src/shared/qbs +++ b/src/shared/qbs @@ -1 +1 @@ -Subproject commit 09401f5eab3f5c8955e85baf3c98f79fbc03d8b1 +Subproject commit 0ac5a1467433cafe98e01598de25f155f24fcb2f From 7b6d44a90a58c0382a3efefc2fe0b5ded9f9f451 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Thu, 23 Jul 2020 15:48:56 +0200 Subject: [PATCH 068/108] Android: Introduce constants for Android ABIs Avoiding string duplication prevents typo-related runtime errors and allows an IDE to use find symbol rather than plain text search. Change-Id: I7fba7c7c5cf90c0b371efce3b575537b2708dd0f Reviewed-by: Christian Stenger Reviewed-by: Assam Boudjelthia --- src/plugins/android/androidavdmanager.cpp | 5 ++-- src/plugins/android/androidconfigurations.cpp | 8 ++++++- src/plugins/android/androiddeployqtstep.cpp | 3 ++- src/plugins/android/androidmanager.cpp | 15 ++++++------ src/plugins/android/androidqtversion.cpp | 9 ++++---- src/plugins/android/androidrunnerworker.cpp | 23 ++++++++++--------- src/plugins/android/avddialog.cpp | 9 ++++++-- .../cmakebuildconfiguration.cpp | 9 ++++---- .../projectexplorerconstants.h | 7 ++++++ src/plugins/qmakeprojectmanager/qmakestep.cpp | 4 ++-- 10 files changed, 58 insertions(+), 34 deletions(-) diff --git a/src/plugins/android/androidavdmanager.cpp b/src/plugins/android/androidavdmanager.cpp index 55ae7a5cdc6..f27247300e1 100644 --- a/src/plugins/android/androidavdmanager.cpp +++ b/src/plugins/android/androidavdmanager.cpp @@ -25,6 +25,7 @@ #include "androidavdmanager.h" #include +#include #include #include #include @@ -424,8 +425,8 @@ AndroidDeviceInfoList AvdManagerOutputParser::parseAvdList(const QString &output } } else if (parseAvd(avdInfo, &avd)) { // armeabi-v7a devices can also run armeabi code - if (avd.cpuAbi.contains("armeabi-v7a")) - avd.cpuAbi << "armeabi"; + if (avd.cpuAbi.contains(ProjectExplorer::Constants::ANDROID_ABI_ARMEABI_V7A)) + avd.cpuAbi << ProjectExplorer::Constants::ANDROID_ABI_ARMEABI; avd.state = AndroidDeviceInfo::OkState; avd.type = AndroidDeviceInfo::Emulator; avdList << avd; diff --git a/src/plugins/android/androidconfigurations.cpp b/src/plugins/android/androidconfigurations.cpp index dea734faf7c..5ea934a211e 100644 --- a/src/plugins/android/androidconfigurations.cpp +++ b/src/plugins/android/androidconfigurations.cpp @@ -39,6 +39,7 @@ #include #include #include +#include #include #include @@ -1282,7 +1283,12 @@ void AndroidConfigurations::removeUnusedDebuggers() static bool containsAllAbis(const QStringList &abis) { - QStringList supportedAbis{"armeabi-v7a", "arm64-v8a", "x86", "x86_64"}; + QStringList supportedAbis{ + ProjectExplorer::Constants::ANDROID_ABI_ARMEABI_V7A, + ProjectExplorer::Constants::ANDROID_ABI_ARM64_V8A, + ProjectExplorer::Constants::ANDROID_ABI_X86, + ProjectExplorer::Constants::ANDROID_ABI_X86_64, + }; for (const QString &abi : abis) if (supportedAbis.contains(abi)) supportedAbis.removeOne(abi); diff --git a/src/plugins/android/androiddeployqtstep.cpp b/src/plugins/android/androiddeployqtstep.cpp index 5f551164118..74bd30e2eae 100644 --- a/src/plugins/android/androiddeployqtstep.cpp +++ b/src/plugins/android/androiddeployqtstep.cpp @@ -497,7 +497,8 @@ void AndroidDeployQtStep::gatherFilesToPull() QString linkerName("linker"); QString libDirName("lib"); auto preferreABI = AndroidManager::apkDevicePreferredAbi(target()); - if (preferreABI == "arm64-v8a" || preferreABI == "x86_64") { + if (preferreABI == ProjectExplorer::Constants::ANDROID_ABI_ARM64_V8A + || preferreABI == ProjectExplorer::Constants::ANDROID_ABI_X86_64) { m_filesToPull["/system/bin/app_process64"] = buildDir + "app_process"; libDirName = "lib64"; linkerName = "linker64"; diff --git a/src/plugins/android/androidmanager.cpp b/src/plugins/android/androidmanager.cpp index 07163b54c12..3ac0f7a922e 100644 --- a/src/plugins/android/androidmanager.cpp +++ b/src/plugins/android/androidmanager.cpp @@ -44,6 +44,7 @@ #include #include #include +#include #include #include @@ -262,11 +263,11 @@ QStringList AndroidManager::applicationAbis(const Target *target) QString AndroidManager::archTriplet(const QString &abi) { - if (abi == "x86") { + if (abi == ProjectExplorer::Constants::ANDROID_ABI_X86) { return {"i686-linux-android"}; - } else if (abi == "x86_64") { + } else if (abi == ProjectExplorer::Constants::ANDROID_ABI_X86_64) { return {"x86_64-linux-android"}; - } else if (abi == "arm64-v8a") { + } else if (abi == ProjectExplorer::Constants::ANDROID_ABI_ARM64_V8A) { return {"aarch64-linux-android"}; } return {"arm-linux-androideabi"}; @@ -361,25 +362,25 @@ QString AndroidManager::devicePreferredAbi(const QStringList &deviceAbis, const Abi AndroidManager::androidAbi2Abi(const QString &androidAbi) { - if (androidAbi == "arm64-v8a") { + if (androidAbi == ProjectExplorer::Constants::ANDROID_ABI_ARM64_V8A) { return Abi{Abi::Architecture::ArmArchitecture, Abi::OS::LinuxOS, Abi::OSFlavor::AndroidLinuxFlavor, Abi::BinaryFormat::ElfFormat, 64, androidAbi}; - } else if (androidAbi == "armeabi-v7a") { + } else if (androidAbi == ProjectExplorer::Constants::ANDROID_ABI_ARMEABI_V7A) { return Abi{Abi::Architecture::ArmArchitecture, Abi::OS::LinuxOS, Abi::OSFlavor::AndroidLinuxFlavor, Abi::BinaryFormat::ElfFormat, 32, androidAbi}; - } else if (androidAbi == "x86_64") { + } else if (androidAbi == ProjectExplorer::Constants::ANDROID_ABI_X86_64) { return Abi{Abi::Architecture::X86Architecture, Abi::OS::LinuxOS, Abi::OSFlavor::AndroidLinuxFlavor, Abi::BinaryFormat::ElfFormat, 64, androidAbi}; - } else if (androidAbi == "x86") { + } else if (androidAbi == ProjectExplorer::Constants::ANDROID_ABI_X86) { return Abi{Abi::Architecture::X86Architecture, Abi::OS::LinuxOS, Abi::OSFlavor::AndroidLinuxFlavor, diff --git a/src/plugins/android/androidqtversion.cpp b/src/plugins/android/androidqtversion.cpp index 0a3f80e75f8..568df99429d 100644 --- a/src/plugins/android/androidqtversion.cpp +++ b/src/plugins/android/androidqtversion.cpp @@ -35,6 +35,7 @@ #include #include +#include #include #include #include @@ -86,25 +87,25 @@ QString AndroidQtVersion::invalidReason() const Abis AndroidQtVersion::detectQtAbis() const { auto androidAbi2Abi = [](const QString &androidAbi) { - if (androidAbi == "arm64-v8a") { + if (androidAbi == ProjectExplorer::Constants::ANDROID_ABI_ARM64_V8A) { return Abi{Abi::Architecture::ArmArchitecture, Abi::OS::LinuxOS, Abi::OSFlavor::AndroidLinuxFlavor, Abi::BinaryFormat::ElfFormat, 64, androidAbi}; - } else if (androidAbi == "armeabi-v7a") { + } else if (androidAbi == ProjectExplorer::Constants::ANDROID_ABI_ARMEABI_V7A) { return Abi{Abi::Architecture::ArmArchitecture, Abi::OS::LinuxOS, Abi::OSFlavor::AndroidLinuxFlavor, Abi::BinaryFormat::ElfFormat, 32, androidAbi}; - } else if (androidAbi == "x86_64") { + } else if (androidAbi == ProjectExplorer::Constants::ANDROID_ABI_X86_64) { return Abi{Abi::Architecture::X86Architecture, Abi::OS::LinuxOS, Abi::OSFlavor::AndroidLinuxFlavor, Abi::BinaryFormat::ElfFormat, 64, androidAbi}; - } else if (androidAbi == "x86") { + } else if (androidAbi == ProjectExplorer::Constants::ANDROID_ABI_X86) { return Abi{Abi::Architecture::X86Architecture, Abi::OS::LinuxOS, Abi::OSFlavor::AndroidLinuxFlavor, diff --git a/src/plugins/android/androidrunnerworker.cpp b/src/plugins/android/androidrunnerworker.cpp index 5496dbc6a82..147c0eca316 100644 --- a/src/plugins/android/androidrunnerworker.cpp +++ b/src/plugins/android/androidrunnerworker.cpp @@ -33,6 +33,7 @@ #include #include +#include #include #include #include @@ -164,32 +165,32 @@ static void deleter(QProcess *p) static QString gdbServerArch(const QString &androidAbi) { - if (androidAbi == "arm64-v8a") + if (androidAbi == ProjectExplorer::Constants::ANDROID_ABI_ARM64_V8A) return QString("arm64"); - if (androidAbi == "armeabi-v7a") + if (androidAbi == ProjectExplorer::Constants::ANDROID_ABI_ARMEABI_V7A) return QString("arm"); - // That's correct for "x86_64" and "x86", and best guess at anything that will evolve: + // That's correct for x86_64 and x86, and best guess at anything that will evolve: return androidAbi; } static QString lldbServerArch(const QString &androidAbi) { - if (androidAbi == "armeabi-v7a") - return QString("armeabi"); - // Correct for arm64-v8a "x86_64" and "x86", and best guess at anything that will evolve: + if (androidAbi == ProjectExplorer::Constants::ANDROID_ABI_ARMEABI_V7A) + return {ProjectExplorer::Constants::ANDROID_ABI_ARMEABI}; + // Correct for arm64-v8a, x86 and x86_64, and best guess at anything that will evolve: return androidAbi; // arm64-v8a, x86, x86_64 } static QString lldbServerArch2(const QString &androidAbi) { - if (androidAbi == "armeabi-v7a") + if (androidAbi == ProjectExplorer::Constants::ANDROID_ABI_ARMEABI_V7A) return {"arm"}; - if (androidAbi == "x86") + if (androidAbi == ProjectExplorer::Constants::ANDROID_ABI_X86) return {"i386"}; - if (androidAbi == "arm64-v8a") + if (androidAbi == ProjectExplorer::Constants::ANDROID_ABI_ARM64_V8A) return {"aarch64"}; - // Correct for "x86_64" a and best guess at anything that will evolve: - return androidAbi; // arm64-v8a + // Correct for x86_64 and best guess at anything that will evolve: + return androidAbi; // x86_64 } static FilePath debugServer(bool useLldb, const Target *target) diff --git a/src/plugins/android/avddialog.cpp b/src/plugins/android/avddialog.cpp index 878ccad2768..ded445e2cb1 100644 --- a/src/plugins/android/avddialog.cpp +++ b/src/plugins/android/avddialog.cpp @@ -27,6 +27,7 @@ #include "androidsdkmanager.h" #include "androidavdmanager.h" +#include #include #include #include @@ -58,8 +59,12 @@ AvdDialog::AvdDialog(int minApiLevel, AndroidSdkManager *sdkManager, const QStri m_hideTipTimer.setSingleShot(true); if (abis.isEmpty()) { - m_avdDialog.abiComboBox->addItems(QStringList({"x86", "x86_64", "armeabi-v7a", - "armeabi", "arm64-v8a"})); + m_avdDialog.abiComboBox->addItems(QStringList({ + ProjectExplorer::Constants::ANDROID_ABI_X86, + ProjectExplorer::Constants::ANDROID_ABI_X86_64, + ProjectExplorer::Constants::ANDROID_ABI_ARMEABI_V7A, + ProjectExplorer::Constants::ANDROID_ABI_ARMEABI, + ProjectExplorer::Constants::ANDROID_ABI_ARM64_V8A})); } else { m_avdDialog.abiComboBox->addItems(abis); } diff --git a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp index b5731195380..4b2a1d379e8 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp @@ -154,10 +154,11 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(Target *target, Utils::Id id) auto androidAbis = bs->data(Android::Constants::AndroidABIs).toStringList(); QString preferredAbi; - if (androidAbis.contains("armeabi-v7a")) { - preferredAbi = "armeabi-v7a"; - } else if (androidAbis.isEmpty() || androidAbis.contains("arm64-v8a")) { - preferredAbi = "arm64-v8a"; + if (androidAbis.contains(ProjectExplorer::Constants::ANDROID_ABI_ARMEABI_V7A)) { + preferredAbi = ProjectExplorer::Constants::ANDROID_ABI_ARMEABI_V7A; + } else if (androidAbis.isEmpty() + || androidAbis.contains(ProjectExplorer::Constants::ANDROID_ABI_ARM64_V8A)) { + preferredAbi = ProjectExplorer::Constants::ANDROID_ABI_ARM64_V8A; } else { preferredAbi = androidAbis.first(); } diff --git a/src/plugins/projectexplorer/projectexplorerconstants.h b/src/plugins/projectexplorer/projectexplorerconstants.h index 08e82106109..3351bc039f7 100644 --- a/src/plugins/projectexplorer/projectexplorerconstants.h +++ b/src/plugins/projectexplorer/projectexplorerconstants.h @@ -179,6 +179,13 @@ const char DESKTOP_DEVICE_TYPE[] = "Desktop"; const int DESKTOP_PORT_START = 30000; const int DESKTOP_PORT_END = 31000; +// Android ABIs +const char ANDROID_ABI_ARMEABI[] = "armeabi"; +const char ANDROID_ABI_ARMEABI_V7A[] = "armeabi-v7a"; +const char ANDROID_ABI_ARM64_V8A[] = "arm64-v8a"; +const char ANDROID_ABI_X86[] = "x86"; +const char ANDROID_ABI_X86_64[] = "x86_64"; + // Variable Names: const char VAR_CURRENTPROJECT_PREFIX[] = "CurrentProject"; const char VAR_CURRENTPROJECT_NAME[] = "CurrentProject:Name"; diff --git a/src/plugins/qmakeprojectmanager/qmakestep.cpp b/src/plugins/qmakeprojectmanager/qmakestep.cpp index 82b236dd480..66d193a3d14 100644 --- a/src/plugins/qmakeprojectmanager/qmakestep.cpp +++ b/src/plugins/qmakeprojectmanager/qmakestep.cpp @@ -749,12 +749,12 @@ void QMakeStepConfigWidget::updateSummaryLabel() if (selectedAbis.isEmpty() && isAndroidKit()) { // Prefer ARM for Android, prefer 32bit. for (const Abi &abi : abis) { - if (abi.param() == "armeabi-v7a") + if (abi.param() == ProjectExplorer::Constants::ANDROID_ABI_ARMEABI_V7A) selectedAbis.append(abi.param()); } if (selectedAbis.isEmpty()) { for (const Abi &abi : abis) { - if (abi.param() == "arm64-v8a") + if (abi.param() == ProjectExplorer::Constants::ANDROID_ABI_ARM64_V8A) selectedAbis.append(abi.param()); } } From dcbf15cf2ed1a7ba4bceae6b17e5eba488e89224 Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Fri, 24 Jul 2020 18:18:48 +0200 Subject: [PATCH 069/108] Core::OutputWindow: Use proper numerus form Change-Id: I0c8da8a49a436ff9f8bcdcb02756be1734406df2 Reviewed-by: hjk --- src/plugins/coreplugin/outputwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/coreplugin/outputwindow.cpp b/src/plugins/coreplugin/outputwindow.cpp index fb5df625111..9d58bae06a9 100644 --- a/src/plugins/coreplugin/outputwindow.cpp +++ b/src/plugins/coreplugin/outputwindow.cpp @@ -412,7 +412,7 @@ void OutputWindow::handleOutputChunk(const QString &output, OutputFormat format) const int elided = out.size() - d->maxCharCount; out = out.left(d->maxCharCount / 2) + "[[[... " - + tr("Elided %1 characters due to Application Output settings").arg(elided) + + tr("Elided %n characters due to Application Output settings", nullptr, elided) + " ...]]]" + out.right(d->maxCharCount / 2); setMaximumBlockCount(out.count('\n') + 1); From 9dd28206cd3e71ab5f580748d579f2e093c1ef47 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 15 Jul 2020 11:17:48 +0200 Subject: [PATCH 070/108] Bump version to 4.13.0-rc1 Change-Id: Icc4b98903a16d05d978ad27c2aeffac8dbf22227 Reviewed-by: David Schulz --- cmake/QtCreatorIDEBranding.cmake | 6 +++--- qbs/modules/qtc/qtc.qbs | 6 +++--- qtcreator_ide_branding.pri | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cmake/QtCreatorIDEBranding.cmake b/cmake/QtCreatorIDEBranding.cmake index d88c798f76a..99cf28bfd21 100644 --- a/cmake/QtCreatorIDEBranding.cmake +++ b/cmake/QtCreatorIDEBranding.cmake @@ -1,8 +1,8 @@ #PROJECT_USER_FILE_EXTENSION = .user -set(IDE_VERSION "4.12.83") # The IDE version. -set(IDE_VERSION_COMPAT "4.12.83") # The IDE Compatibility version. -set(IDE_VERSION_DISPLAY "4.13.0-beta2") # The IDE display version. +set(IDE_VERSION "4.12.84") # The IDE version. +set(IDE_VERSION_COMPAT "4.12.84") # The IDE Compatibility version. +set(IDE_VERSION_DISPLAY "4.13.0-rc1") # The IDE display version. set(IDE_COPYRIGHT_YEAR "2020") # The IDE current copyright year. set(IDE_SETTINGSVARIANT "QtProject") # The IDE settings variation. diff --git a/qbs/modules/qtc/qtc.qbs b/qbs/modules/qtc/qtc.qbs index 065a9fdd2cd..cb7fce1f62a 100644 --- a/qbs/modules/qtc/qtc.qbs +++ b/qbs/modules/qtc/qtc.qbs @@ -4,16 +4,16 @@ import qbs.FileInfo import "qtc.js" as HelperFunctions Module { - property string qtcreator_display_version: '4.13.0-beta2' + property string qtcreator_display_version: '4.13.0-rc1' property string ide_version_major: '4' property string ide_version_minor: '12' - property string ide_version_release: '83' + property string ide_version_release: '84' property string qtcreator_version: ide_version_major + '.' + ide_version_minor + '.' + ide_version_release property string ide_compat_version_major: '4' property string ide_compat_version_minor: '12' - property string ide_compat_version_release: '83' + property string ide_compat_version_release: '84' property string qtcreator_compat_version: ide_compat_version_major + '.' + ide_compat_version_minor + '.' + ide_compat_version_release diff --git a/qtcreator_ide_branding.pri b/qtcreator_ide_branding.pri index 28a6df17009..593264ab89a 100644 --- a/qtcreator_ide_branding.pri +++ b/qtcreator_ide_branding.pri @@ -1,6 +1,6 @@ -QTCREATOR_VERSION = 4.12.83 -QTCREATOR_COMPAT_VERSION = 4.12.83 -QTCREATOR_DISPLAY_VERSION = 4.13.0-beta2 +QTCREATOR_VERSION = 4.12.84 +QTCREATOR_COMPAT_VERSION = 4.12.84 +QTCREATOR_DISPLAY_VERSION = 4.13.0-rc1 QTCREATOR_COPYRIGHT_YEAR = 2020 IDE_DISPLAY_NAME = Qt Creator From 88be337b0d1dd6fc4abc71ff8ee10b9f230691a6 Mon Sep 17 00:00:00 2001 From: Assam Boudjelthia Date: Tue, 28 Jul 2020 11:37:56 +0300 Subject: [PATCH 071/108] Android: change openssl error dialog Ok to Cancel Change-Id: Ib2be438e330c969a2ddb46db35c8f11e5cf94e9e Reviewed-by: Robert Loehning Reviewed-by: Alessandro Portale --- src/plugins/android/androidsettingswidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/android/androidsettingswidget.cpp b/src/plugins/android/androidsettingswidget.cpp index 7c7bed2d926..560b167d9ee 100644 --- a/src/plugins/android/androidsettingswidget.cpp +++ b/src/plugins/android/androidsettingswidget.cpp @@ -714,7 +714,7 @@ void AndroidSettingsWidget::downloadOpenSslRepo(const bool silent) QMessageBox msgBox; msgBox.setText(tr("OpenSSL prebuilt libraries cloning failed. ") + msgSuffix + tr("Opening OpenSSL URL for manual download.")); - msgBox.addButton(tr("OK"), QMessageBox::YesRole); + msgBox.addButton(tr("Cancel"), QMessageBox::RejectRole); QAbstractButton *openButton = msgBox.addButton(tr("Open Download URL"), QMessageBox::ActionRole); msgBox.exec(); From cf183a898d4d7ddeec3b70fccbd0e254a69be3b2 Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Tue, 28 Jul 2020 11:40:16 +0200 Subject: [PATCH 072/108] Android: Clarify error message Change-Id: Id85c6a96ec2ffcb3bfd027ffdcc99ff97e1dd8ac Reviewed-by: Assam Boudjelthia --- src/plugins/android/androiddeployqtstep.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/android/androiddeployqtstep.cpp b/src/plugins/android/androiddeployqtstep.cpp index 74bd30e2eae..96be06a6962 100644 --- a/src/plugins/android/androiddeployqtstep.cpp +++ b/src/plugins/android/androiddeployqtstep.cpp @@ -213,9 +213,9 @@ bool AndroidDeployQtStep::init() if (!selectedAbis.contains(info.cpuAbi.first())) { Core::MessageManager::write( - tr("Android: The selected device main ABI (%1) is not selected! The app execution or " - "debugging might not work properly. Add it from Projects > Build > Build Steps > " - "qmake > ABIs.") + tr("Android: The main ABI of the deployment device (%1) is not selected! The app " + "execution or debugging might not work properly. Add it from Projects > Build > " + "Build Steps > qmake > ABIs.") .arg(info.cpuAbi.first()), Core::MessageManager::WithFocus); } From 91e78936fe0c915d5af68a521f4021f19a30b426 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Tue, 28 Jul 2020 12:57:00 +0200 Subject: [PATCH 073/108] LSP: prevent nullptr access Found by coverity scan Change-Id: Ibc243abbb40cde8c670084c9486fdd2f47b137de Reviewed-by: Christian Stenger --- src/plugins/languageclient/client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/languageclient/client.cpp b/src/plugins/languageclient/client.cpp index acfd0d3a693..7930b12143c 100644 --- a/src/plugins/languageclient/client.cpp +++ b/src/plugins/languageclient/client.cpp @@ -1152,7 +1152,7 @@ void Client::sendPostponedDocumentUpdates() sendContent(DidChangeTextDocumentNotification(params)); emit documentUpdated(document); - if (currentWidget->textDocument() == document) + if (currentWidget && currentWidget->textDocument() == document) cursorPositionChanged(currentWidget); } } From 002b3907f6f4cf125a63934be9461745c6379c1c Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Tue, 28 Jul 2020 13:03:53 +0200 Subject: [PATCH 074/108] QmlJSTools: Fix plugin unit test Amends 58ea14aea7c676. Change-Id: I27d68572cffd9d2e37b3dbf8c47c75633db5d806 Reviewed-by: Christian Kandeler --- src/plugins/qmljstools/qmljstools_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/qmljstools/qmljstools_test.cpp b/src/plugins/qmljstools/qmljstools_test.cpp index ab8a09abae9..a2c35efa003 100644 --- a/src/plugins/qmljstools/qmljstools_test.cpp +++ b/src/plugins/qmljstools/qmljstools_test.cpp @@ -55,7 +55,7 @@ void QmlJSToolsPlugin::test_basic() QVERIFY(context); const CppComponentValue *rectangleValue = context->valueOwner()->cppQmlTypes().objectByQualifiedName( - QLatin1String("QtQuick"), QLatin1String("QDeclarativeRectangle"), LanguageUtils::ComponentVersion(2, 1)); + QLatin1String("QtQuick"), QLatin1String("QDeclarativeRectangle"), LanguageUtils::ComponentVersion(2, 15)); QVERIFY(rectangleValue); QVERIFY(!rectangleValue->isWritable(QLatin1String("border"))); QVERIFY(rectangleValue->hasProperty(QLatin1String("border"))); From 6c45c3fb1c5140902028e99f25b43a2c56b7d5c1 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Tue, 28 Jul 2020 20:15:05 +0200 Subject: [PATCH 075/108] CppTools: Bump TIDY_DOCUMENTATION_URL_TEMPLATE from 8.0.1 to 10.0.0 Change-Id: I198f805768984eb060b2a72f705e618e6a7a53ff Reviewed-by: Cristian Adam --- src/plugins/cpptools/cpptoolsconstants.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/cpptools/cpptoolsconstants.h b/src/plugins/cpptools/cpptoolsconstants.h index 667780bae1f..4cee205b946 100644 --- a/src/plugins/cpptools/cpptoolsconstants.h +++ b/src/plugins/cpptools/cpptoolsconstants.h @@ -99,7 +99,7 @@ const char SYMBOLS_FIND_FILTER_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("CppTools", "C // CLANG_VERSION here because it might denote a version that was not yet // released (e.g. 6.0.1, but only 6.0.0 was released). constexpr const char TIDY_DOCUMENTATION_URL_TEMPLATE[] - = "https://releases.llvm.org/8.0.1/tools/clang/tools/extra/docs/clang-tidy/checks/%1.html"; + = "https://releases.llvm.org/10.0.0/tools/clang/tools/extra/docs/clang-tidy/checks/%1.html"; constexpr const char CLANG_STATIC_ANALYZER_DOCUMENTATION_URL[] = "https://clang-analyzer.llvm.org/available_checks.html"; From a826267cd4aac2b9aff10a97ca1ca9818b707faa Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 30 Jul 2020 12:26:42 +0200 Subject: [PATCH 076/108] Tests: Fix nullptr access Change-Id: I4e2bf36dfa6e16dfd9924c865bd9a997750243a2 Reviewed-by: Christian Kandeler --- tests/auto/extensionsystem/pluginmanager/tst_pluginmanager.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/auto/extensionsystem/pluginmanager/tst_pluginmanager.cpp b/tests/auto/extensionsystem/pluginmanager/tst_pluginmanager.cpp index c3c144a16c6..7d47a6496a4 100644 --- a/tests/auto/extensionsystem/pluginmanager/tst_pluginmanager.cpp +++ b/tests/auto/extensionsystem/pluginmanager/tst_pluginmanager.cpp @@ -77,6 +77,7 @@ static QString pluginFolder(const QLatin1String &folder) void tst_PluginManager::init() { m_pm = new PluginManager; + m_pm->setSettings(new QSettings); m_pm->setPluginIID(QLatin1String("plugin")); m_objectAdded = new QSignalSpy(m_pm, SIGNAL(objectAdded(QObject*))); m_aboutToRemoveObject = new QSignalSpy(m_pm, SIGNAL(aboutToRemoveObject(QObject*))); From 2944b33530db508d067669f218af407487950a27 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Wed, 29 Jul 2020 16:53:47 +0200 Subject: [PATCH 077/108] Tests: Fix codemodel check test Change-Id: I9ca0fec928ac90fd5951fc54963ba5e96d5a53a6 Reviewed-by: Fawzi Mohamed --- .../qml/codemodel/check/case-fallthrough.qml | 4 +- .../qml/codemodel/check/equality-checks.qml | 54 +++++++++---------- tests/auto/qml/codemodel/check/tst_check.cpp | 14 ++++- 3 files changed, 41 insertions(+), 31 deletions(-) diff --git a/tests/auto/qml/codemodel/check/case-fallthrough.qml b/tests/auto/qml/codemodel/check/case-fallthrough.qml index a1851da5648..186d58df4b8 100644 --- a/tests/auto/qml/codemodel/check/case-fallthrough.qml +++ b/tests/auto/qml/codemodel/check/case-fallthrough.qml @@ -2,7 +2,7 @@ import QtQuick 2.0 Item { x: { - switch (a) { + switch (a) { // 108 17 17 case 1: case 2: x = 1 @@ -21,7 +21,7 @@ Item { break case 9: } - switch (a) { + switch (a) { // 108 17 17 case 1: case 2: // 20 9 12 x = 1 diff --git a/tests/auto/qml/codemodel/check/equality-checks.qml b/tests/auto/qml/codemodel/check/equality-checks.qml index e92b1c4cc19..1e815e7148d 100644 --- a/tests/auto/qml/codemodel/check/equality-checks.qml +++ b/tests/auto/qml/codemodel/check/equality-checks.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { function foo(k) { @@ -10,54 +10,54 @@ Rectangle { var b = true var o = {} - if (s == s) {} + if (s == s) {} // -1 15 16 # false positive if (s == n) {} // 126 15 16 - if (s == N) {} // ### should warn: always false - if (s == u) {} // ### should warn: always false + if (s == N) {} // -2 15 16 # wrong warning (always false) + if (s == u) {} // -2 15 16 # wrong warning (always false) if (s == b) {} // 126 15 16 if (s == o) {} // 126 15 16 if (s == k) {} // 126 15 16 if (n == s) {} // 126 15 16 - if (n == n) {} - if (n == N) {} // ### should warn: always false - if (n == u) {} // ### should warn: always false + if (n == n) {} // -1 15 16 # false positive + if (n == N) {} // -2 15 16 # wrong warning (always false) + if (n == u) {} // -2 15 16 # wrong warning (always false) if (n == b) {} // 126 15 16 if (n == o) {} // 126 15 16 if (n == k) {} // 126 15 16 - if (N == s) {} // ### should warn: always false - if (N == n) {} // ### should warn: always false - if (N == N) {} - if (N == u) {} // ### should warn: always true - // ### should warn: always false - if (N == b) {} // 126 15 16 - if (N == o) {} // ### should warn: always false + if (N == s) {} // -2 15 16 # wrong warning (always false) + if (N == n) {} // -2 15 16 # wrong warning (always false) + if (N == N) {} // -1 15 16 # false positive + if (N == u) {} // -2 15 16 # wrong warning (always true) + + if (N == b) {} // -2 15 16 # wrong warning (always false) + if (N == o) {} // -2 15 16 # wrong warning (always false) if (N == k) {} // 126 15 16 - if (u == s) {} // ### should warn: always false - if (u == n) {} // ### should warn: always false - if (u == N) {} // ### should warn: always true - if (u == u) {} // ### should warn: always true - if (u == b) {} // ### should warn: always false - if (u == o) {} // ### should warn: always false + if (u == s) {} // -2 15 16 # wrong warning (always false) + if (u == n) {} // -2 15 16 # wrong warning (always false) + if (u == N) {} // -2 15 16 # wrong warning (always true) + if (u == u) {} // -2 15 16 # wrong warning (always true) + if (u == b) {} // -2 15 16 # wrong warning (always false) + if (u == o) {} // -2 15 16 # wrong warning (always false) if (u == k) {} // 126 15 16 if (b == s) {} // 126 15 16 if (b == n) {} // 126 15 16 - // ### should warn: always false - if (b == N) {} // 126 15 16 - if (b == u) {} // ### should warn: always false - if (b == b) {} + + if (b == N) {} // -2 15 16 # wrong warning (always false) + if (b == u) {} // -2 15 16 # wrong warning (always false) + if (b == b) {} // -1 15 16 # false positive if (b == o) {} // 126 15 16 if (b == k) {} // 126 15 16 if (o == s) {} // 126 15 16 if (o == n) {} // 126 15 16 - if (o == N) {} // ### should warn: always false - if (o == u) {} // ### should warn: always false + if (o == N) {} // -2 15 16 # wrong warning (always false) + if (o == u) {} // -2 15 16 # wrong warning (always false) if (o == b) {} // 126 15 16 - if (o == o) {} + if (o == o) {} // -1 15 16 # false positive if (o == k) {} // 126 15 16 if (k == s) {} // 126 15 16 diff --git a/tests/auto/qml/codemodel/check/tst_check.cpp b/tests/auto/qml/codemodel/check/tst_check.cpp index 8a52fd0ced4..d89bda46582 100644 --- a/tests/auto/qml/codemodel/check/tst_check.cpp +++ b/tests/auto/qml/codemodel/check/tst_check.cpp @@ -131,9 +131,10 @@ void tst_Check::test() QList messages = checker(); std::sort(messages.begin(), messages.end(), &offsetComparator); - const QRegExp messagePattern(" (\\d+) (\\d+) (\\d+)"); + const QRegExp messagePattern(" (-?\\d+) (\\d+) (\\d+)\\s*(# false positive|# wrong warning.*)?"); QList expectedMessages; + QHash xfails; foreach (const SourceLocation &comment, doc->engine()->comments()) { const QString text = doc->source().mid(comment.begin(), comment.end() - comment.begin()); @@ -151,6 +152,9 @@ void tst_Check::test() columnStart), message.type = static_cast(type); expectedMessages += message; + + if (messagePattern.captureCount() == 4 && !messagePattern.cap(4).isEmpty()) + xfails.insert(expectedMessages.size() - 1, messagePattern.cap(4)); } for (int i = 0; i < messages.size(); ++i) { @@ -160,6 +164,9 @@ void tst_Check::test() Message expected = expectedMessages.at(i); bool fail = false; fail |= !QCOMPARE_NOEXIT(actual.location.startLine, expected.location.startLine); + auto xFail = xfails.find(i); + if (xFail != xfails.end()) + QEXPECT_FAIL(path.toUtf8(), xFail.value().toUtf8(), Continue); fail |= !QCOMPARE_NOEXIT((int)actual.type, (int)expected.type); if (fail) return; @@ -176,7 +183,10 @@ void tst_Check::test() Message missingMessage = expectedMessages.at(i); qDebug() << "expected message of type" << missingMessage.type << "on line" << missingMessage.location.startLine; } - QFAIL("more messages expected"); + if (path.endsWith("avoid-var.qml")) + QEXPECT_FAIL(path.toUtf8(), "currently broken", Continue); + + QVERIFY2(false, "more messages expected"); } if (expectedMessages.size() < messages.size()) { for (int i = expectedMessages.size(); i < messages.size(); ++i) { From 21fbf36a5d71ecc36cdd0c89b1ab358e34171760 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 30 Jul 2020 13:16:43 +0200 Subject: [PATCH 078/108] Cmake: Fix compile output glitch Using a dedicated OutputLineParser ensures that we only ever see complete lines and thus prevents "partially red" lines in the compile output pane. Fixes: QTCREATORBUG-24209 Change-Id: I12b3de70b81789afe727b66e366facdcc81f8ab8 Reviewed-by: Alessandro Portale Reviewed-by: Cristian Adam --- src/libs/utils/outputformatter.cpp | 16 ++- .../cmakeprojectmanager/cmakebuildstep.cpp | 110 ++++++++++-------- .../cmakeprojectmanager/cmakebuildstep.h | 7 -- 3 files changed, 74 insertions(+), 59 deletions(-) diff --git a/src/libs/utils/outputformatter.cpp b/src/libs/utils/outputformatter.cpp index 355fcb24abd..5650e1fa887 100644 --- a/src/libs/utils/outputformatter.cpp +++ b/src/libs/utils/outputformatter.cpp @@ -282,12 +282,24 @@ void OutputFormatter::overridePostPrintAction(const PostPrintAction &postPrintAc void OutputFormatter::doAppendMessage(const QString &text, OutputFormat format) { - const QTextCharFormat charFmt = charFormat(format); - const QList formattedText = parseAnsi(text, charFmt); + QTextCharFormat charFmt = charFormat(format); + QList formattedText = parseAnsi(text, charFmt); const QString cleanLine = std::accumulate(formattedText.begin(), formattedText.end(), QString(), [](const FormattedText &t1, const FormattedText &t2) { return t1.text + t2.text; }); QList involvedParsers; const OutputLineParser::Result res = handleMessage(cleanLine, format, involvedParsers); + + // If the line was recognized by a parser and a redirection was detected for that parser, + // then our formatting should reflect that redirection as well, i.e. print in red + // even if the nominal format is stdout. + if (!involvedParsers.isEmpty()) { + const OutputFormat formatForParser = outputTypeForParser(involvedParsers.last(), format); + if (formatForParser != format && cleanLine == text && formattedText.length() == 1) { + charFmt = charFormat(formatForParser); + formattedText.first().format = charFmt; + } + } + if (res.newContent) { append(res.newContent.value(), charFmt); return; diff --git a/src/plugins/cmakeprojectmanager/cmakebuildstep.cpp b/src/plugins/cmakeprojectmanager/cmakebuildstep.cpp index 0f99ad4fced..5f0aed90112 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildstep.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildstep.cpp @@ -47,6 +47,7 @@ #include #include #include +#include using namespace ProjectExplorer; @@ -59,6 +60,53 @@ const char TOOL_ARGUMENTS_KEY[] = "CMakeProjectManager.MakeStep.AdditionalArgume const char ADD_RUNCONFIGURATION_ARGUMENT_KEY[] = "CMakeProjectManager.MakeStep.AddRunConfigurationArgument"; const char ADD_RUNCONFIGURATION_TEXT[] = "Current executable"; +class CmakeProgressParser : public Utils::OutputLineParser +{ + Q_OBJECT + +signals: + void progress(int percentage); + +private: + Result handleLine(const QString &line, Utils::OutputFormat format) override + { + if (format != Utils::StdOutFormat) + return Status::NotHandled; + + static const QRegularExpression percentProgress("^\\[\\s*(\\d*)%\\]"); + static const QRegularExpression ninjaProgress("^\\[\\s*(\\d*)/\\s*(\\d*)"); + + QRegularExpressionMatch match = percentProgress.match(line); + if (match.hasMatch()) { + bool ok = false; + const int percent = match.captured(1).toInt(&ok); + if (ok) + emit progress(percent); + return Status::Done; + } + match = ninjaProgress.match(line); + if (match.hasMatch()) { + m_useNinja = true; + bool ok = false; + const int done = match.captured(1).toInt(&ok); + if (ok) { + const int all = match.captured(2).toInt(&ok); + if (ok && all != 0) { + const int percent = static_cast(100.0 * done / all); + emit progress(percent); + } + } + return Status::Done; + } + return Status::NotHandled; + } + bool hasDetectedRedirection() const override { return m_useNinja; } + + // TODO: Shouldn't we know the backend in advance? Then we could merge this class + // with CmakeParser. + bool m_useNinja = false; +}; + class CMakeBuildStepConfigWidget : public BuildStepConfigWidget { Q_DECLARE_TR_FUNCTIONS(CMakeProjectManager::Internal::CMakeBuildStepConfigWidget) @@ -88,8 +136,6 @@ static bool isCurrentExecutableTarget(const QString &target) CMakeBuildStep::CMakeBuildStep(BuildStepList *bsl, Utils::Id id) : AbstractProcessStep(bsl, id) { - m_percentProgress = QRegExp("^\\[\\s*(\\d*)%\\]"); - m_ninjaProgress = QRegExp("^\\[\\s*(\\d*)/\\s*(\\d*)"); m_ninjaProgressString = "[%f/%t "; // ninja: [33/100 //: Default display name for the cmake make step. setDefaultDisplayName(tr("CMake Build")); @@ -211,9 +257,18 @@ bool CMakeBuildStep::init() void CMakeBuildStep::setupOutputFormatter(Utils::OutputFormatter *formatter) { CMakeParser *cmakeParser = new CMakeParser; + CmakeProgressParser * const progressParser = new CmakeProgressParser; + connect(progressParser, &CmakeProgressParser::progress, this, [this](int percent) { + emit progress(percent, {}); + }); + formatter->addLineParser(progressParser); cmakeParser->setSourceDirectory(project()->projectDirectory().toString()); formatter->addLineParsers({cmakeParser, new GnuMakeParser}); - formatter->addLineParsers(target()->kit()->createOutputParsers()); + const QList additionalParsers + = target()->kit()->createOutputParsers(); + for (Utils::OutputLineParser * const p : additionalParsers) + p->setRedirectionDetector(progressParser); + formatter->addLineParsers(additionalParsers); formatter->addSearchDir(processParameters()->effectiveWorkingDirectory()); AbstractProcessStep::setupOutputFormatter(formatter); } @@ -276,47 +331,6 @@ QString CMakeBuildStep::defaultBuildTarget() const return allTarget(); } -void CMakeBuildStep::stdOutput(const QString &output) -{ - int offset = 0; - while (offset != -1) { - const int newlinePos = output.indexOf('\n', offset); - QString line; - if (newlinePos == -1) { - line = output.mid(offset); - offset = -1; - } else { - line = output.mid(offset, newlinePos - offset + 1); - offset = newlinePos + 1; - } - if (m_percentProgress.indexIn(line) != -1) { - AbstractProcessStep::stdOutput(line); - bool ok = false; - int percent = m_percentProgress.cap(1).toInt(&ok); - if (ok) - emit progress(percent, QString()); - continue; - } else if (m_ninjaProgress.indexIn(line) != -1) { - AbstractProcessStep::stdOutput(line); - m_useNinja = true; - bool ok = false; - int done = m_ninjaProgress.cap(1).toInt(&ok); - if (ok) { - int all = m_ninjaProgress.cap(2).toInt(&ok); - if (ok && all != 0) { - const int percent = static_cast(100.0 * done/all); - emit progress(percent, QString()); - } - } - continue; - } - if (m_useNinja) - AbstractProcessStep::stdError(line); - else - AbstractProcessStep::stdOutput(line); - } -} - QStringList CMakeBuildStep::buildTargets() const { return m_buildTargets; @@ -573,12 +587,6 @@ CMakeBuildStepFactory::CMakeBuildStepFactory() setSupportedProjectType(Constants::CMAKE_PROJECT_ID); } -void CMakeBuildStep::processStarted() -{ - m_useNinja = false; - AbstractProcessStep::processStarted(); -} - void CMakeBuildStep::processFinished(int exitCode, QProcess::ExitStatus status) { AbstractProcessStep::processFinished(exitCode, status); @@ -587,3 +595,5 @@ void CMakeBuildStep::processFinished(int exitCode, QProcess::ExitStatus status) } // Internal } // CMakeProjectManager + +#include diff --git a/src/plugins/cmakeprojectmanager/cmakebuildstep.h b/src/plugins/cmakeprojectmanager/cmakebuildstep.h index ffab03c1809..e3e3e0ec19d 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildstep.h +++ b/src/plugins/cmakeprojectmanager/cmakebuildstep.h @@ -73,14 +73,10 @@ signals: void buildTargetsChanged(); protected: - void processStarted() override; void processFinished(int exitCode, QProcess::ExitStatus status) override; bool fromMap(const QVariantMap &map) override; - // For parsing [ 76%] - void stdOutput(const QString &output) override; - private: void ctor(ProjectExplorer::BuildStepList *bsl); @@ -98,13 +94,10 @@ private: QMetaObject::Connection m_runTrigger; - QRegExp m_percentProgress; - QRegExp m_ninjaProgress; QString m_ninjaProgressString; QStringList m_buildTargets; QString m_cmakeArguments; QString m_toolArguments; - bool m_useNinja = false; bool m_waiting = false; }; From c24320123b2abd74657d33ce58c099f46f21c50e Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 30 Jul 2020 17:57:38 +0200 Subject: [PATCH 079/108] qbs build: Fix spurious re-resolving The pluginjson module records the VCS state by default, which means qbs re-resolved the project after every git action. Prevent that. Change-Id: I24cf1d658ba847b327be018749806856a6e7da1b Reviewed-by: Christian Stenger --- tests/unit/unittest/unittest.qbs | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/unit/unittest/unittest.qbs b/tests/unit/unittest/unittest.qbs index de84177ba15..43cfc86eedb 100644 --- a/tests/unit/unittest/unittest.qbs +++ b/tests/unit/unittest/unittest.qbs @@ -27,6 +27,7 @@ CppApplication { Depends { name: "gtest"; required: false } Depends { name: "gmock"; required: false } + pluginjson.useVcsData: false sqlite_sources.buildSharedLib: false cpp.defines: { From 530e8568b170a9be5ae7bcdc443b741a8c2e44e0 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 31 Jul 2020 13:00:11 +0200 Subject: [PATCH 080/108] OutputFormatter: Fix linkification of relative file paths If we encounter a relative file path that can map to more than one absolute file path, we do not linkify it, as that would be misleading. However, we forgot to check whether the "different" candidates are really different. For example, consider the following situation: - We have a header file /usr/include/header.h. - This file shows up in the compile output as "../header.h". - At that time, we have two search dirs /usr/include/libA and /usr/include/libB. - This resulted in two candidate file paths /usr/include/libA/../header.h and /usr/include/libB/../header.h - The relative path was rejected as ambiguous. Fix this by checking for duplicates when gathering candidates. Change-Id: I139b848d938113f1b5a959d8043411f7f3e809be Reviewed-by: hjk --- src/libs/utils/outputformatter.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/libs/utils/outputformatter.cpp b/src/libs/utils/outputformatter.cpp index 5650e1fa887..34c76d3ce69 100644 --- a/src/libs/utils/outputformatter.cpp +++ b/src/libs/utils/outputformatter.cpp @@ -140,12 +140,15 @@ FilePath OutputLineParser::absoluteFilePath(const FilePath &filePath) return filePath; FilePaths candidates; for (const FilePath &dir : searchDirectories()) { - const FilePath candidate = dir.pathAppended(filePath.toString()); - if (candidate.exists() || d->skipFileExistsCheck) - candidates << candidate; + FilePath candidate = dir.pathAppended(filePath.toString()); + if (candidate.exists() || d->skipFileExistsCheck) { + candidate = FilePath::fromString(QDir::cleanPath(candidate.toString())); + if (!candidates.contains(candidate)) + candidates << candidate; + } } if (candidates.count() == 1) - return FilePath::fromString(QDir::cleanPath(candidates.first().toString())); + return candidates.first(); QString fp = filePath.toString(); while (fp.startsWith("../")) From 57c6a32b1089384f01b70b80e82af188b6c0e7d8 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Fri, 31 Jul 2020 14:09:29 +0200 Subject: [PATCH 081/108] Dumper: Fix dumping of enum values for cdb Fixes the Bitfields test. Change-Id: I2aab020f1dc8be40ab994586d0989452c80bb8e3 Reviewed-by: hjk --- share/qtcreator/debugger/dumper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/qtcreator/debugger/dumper.py b/share/qtcreator/debugger/dumper.py index e66900c1ef6..42dd8e9ba8a 100644 --- a/share/qtcreator/debugger/dumper.py +++ b/share/qtcreator/debugger/dumper.py @@ -2903,11 +2903,11 @@ class DumperBase(): return dd(intval, self.laddress, form) def display(self): + if self.ldisplay is not None: + return self.ldisplay simple = self.value() if simple is not None: return str(simple) - if self.ldisplay is not None: - return self.ldisplay #if self.ldata is not None: # if sys.version_info[0] == 2 and isinstance(self.ldata, buffer): # return bytes(self.ldata).encode('hex') From 6d67dc851518d7ce30f793f0e102684175d4bc0e Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Fri, 3 Jul 2020 11:31:23 +0200 Subject: [PATCH 082/108] Doc: Describe changing encoding if errors occur during diff Change-Id: I54decf9aca700348134b96c6fd07172091a93dde Reviewed-by: David Schulz --- doc/qtcreator/src/editors/creator-diff-editor.qdoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/qtcreator/src/editors/creator-diff-editor.qdoc b/doc/qtcreator/src/editors/creator-diff-editor.qdoc index ca73e3b0f06..6614729293e 100644 --- a/doc/qtcreator/src/editors/creator-diff-editor.qdoc +++ b/doc/qtcreator/src/editors/creator-diff-editor.qdoc @@ -75,6 +75,10 @@ \endlist + If \QC cannot detect the encoding of the files to compare, an info bar + appears that displays the option to reload the document using some other + encoding. For more information, see \l {File Encoding}. + \section1 Viewing the Changes \image creator-diff-editor.png "Diff editor output in the Edit mode" From d59f22d00019d81b3192d64298a26244f54fbd84 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Fri, 3 Jul 2020 15:26:21 +0200 Subject: [PATCH 083/108] Doc: Describe sorting the files in a QRC file in Qt Creator Change-Id: Iba19105e3655e1c677188a9d9cecf786032d9f15 Reviewed-by: Federico Guerinoni Reviewed-by: Eike Ziller --- .../src/projects/creator-only/creator-projects-creating.qdoc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-creating.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-creating.qdoc index 4622b2cc458..13080a27efd 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-creating.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-creating.qdoc @@ -406,6 +406,9 @@ Select \uicontrol {Add Files} to locate and add individual files. + To list the folders and files in ascending alphabetic order in the source + tree, select \uicontrol {Sort Alphabetically} in the context menu. + By default, resources are accessible in the application under the same file name as they have in the source tree, with a \c{:/} prefix, or by a URL with a \c qrc scheme. To specify a path prefix for all files in the \c .qrc file, From 1ea9d6ce87f62c885e534aa26e34c0cd4fcf45d4 Mon Sep 17 00:00:00 2001 From: Fawzi Mohamed Date: Wed, 29 Jul 2020 02:27:00 +0200 Subject: [PATCH 084/108] qmljs: fix unreachable test for catch clause Change-Id: Ica1ff034b88f06849026957c8beed2cda77badcc Reviewed-by: Christian Stenger Reviewed-by: Fabian Kosmale --- src/libs/qmljs/qmljscheck.cpp | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/libs/qmljs/qmljscheck.cpp b/src/libs/qmljs/qmljscheck.cpp index f58b4144871..175ea0341df 100644 --- a/src/libs/qmljs/qmljscheck.cpp +++ b/src/libs/qmljs/qmljscheck.cpp @@ -502,13 +502,13 @@ protected: return false; } - bool visit(Block *) override + bool openBlock() { ++_block; return true; } - void endVisit(Block *) override + void closeBlock() { auto it = _declaredBlockVariables.begin(); auto end = _declaredBlockVariables.end(); @@ -521,6 +521,26 @@ protected: --_block; } + bool visit(Block *) override + { + return openBlock(); + } + + void endVisit(Block *) override + { + closeBlock(); + } + + bool visit(Catch *) override + { + return openBlock(); + } + + void endVisit(Catch *) override + { + closeBlock(); + } + void throwRecursionDepthError() override { addMessage(ErrHitMaximumRecursion, SourceLocation()); From 2ad89747c4ba6a46deccb27461e80dd3fbcfb39e Mon Sep 17 00:00:00 2001 From: Fawzi Mohamed Date: Wed, 29 Jul 2020 02:21:46 +0200 Subject: [PATCH 085/108] qmljs: qtdeclarative change 9ab1a6759018b78b0f160c5286f8b0235a34ec50 Support required list properties The corresponding rules were missing so far. Fixes: QTBUG-85716 Change-Id: Iaf0cbfbb8736929a213bd6bf329bb2ebdde652c4 Reviewed-by: Fabian Kosmale --- src/libs/qmljs/parser/qmljs.g | 34 + src/libs/qmljs/parser/qmljsgrammar.cpp | 3697 +++++++++-------- src/libs/qmljs/parser/qmljsgrammar_p.h | 12 +- src/libs/qmljs/parser/qmljsparser.cpp | 1628 ++++---- src/libs/qmljs/parser/qmljsparser_p.h | 25 +- .../check/RequiredListProperties.qml | 6 + .../check/RequiredListPropertiesUser.qml | 7 + 7 files changed, 2751 insertions(+), 2658 deletions(-) create mode 100644 tests/auto/qml/codemodel/check/RequiredListProperties.qml create mode 100644 tests/auto/qml/codemodel/check/RequiredListPropertiesUser.qml diff --git a/src/libs/qmljs/parser/qmljs.g b/src/libs/qmljs/parser/qmljs.g index 46505af1eae..4aba778e93b 100644 --- a/src/libs/qmljs/parser/qmljs.g +++ b/src/libs/qmljs/parser/qmljs.g @@ -1320,6 +1320,40 @@ UiObjectMember: T_DEFAULT UiObjectMemberPropertyNoInitialiser; } break; ./ +UiObjectMember: T_REQUIRED UiObjectMemberListPropertyNoInitialiser; +/. + case $rule_number: { + AST::UiPublicMember *node = sym(2).UiPublicMember; + node->isRequired = true; + node->requiredToken = loc(1); + sym(1).Node = node; + } break; +./ + +UiObjectMember: T_DEFAULT T_REQUIRED UiObjectMemberListPropertyNoInitialiser; +/. + case $rule_number: { + AST::UiPublicMember *node = sym(3).UiPublicMember; + node->isRequired = true; + node->requiredToken = loc(2); + node->isDefaultMember = true; + node->defaultToken = loc(1); + sym(1).Node = node; + } break; +./ + +UiObjectMember: T_REQUIRED T_DEFAULT UiObjectMemberListPropertyNoInitialiser; +/. + case $rule_number: { + AST::UiPublicMember *node = sym(3).UiPublicMember; + node->isRequired = true; + node->requiredToken = loc(1); + node->isDefaultMember = true; + node->defaultToken = loc(2); + sym(1).Node = node; + } break; +./ + UiObjectMember: T_DEFAULT UiObjectMemberListPropertyNoInitialiser; /. case $rule_number: { diff --git a/src/libs/qmljs/parser/qmljsgrammar.cpp b/src/libs/qmljs/parser/qmljsgrammar.cpp index d468b9d6dc7..23162f83236 100644 --- a/src/libs/qmljs/parser/qmljsgrammar.cpp +++ b/src/libs/qmljs/parser/qmljsgrammar.cpp @@ -79,60 +79,60 @@ const short QmlJSGrammar::lhs [] = { 169, 169, 169, 169, 169, 169, 169, 169, 169, 165, 177, 177, 177, 177, 178, 178, 179, 179, 179, 179, 165, 165, 180, 165, 165, 181, 165, 165, 165, 165, - 165, 182, 182, 183, 165, 165, 184, 165, 165, 165, - 185, 165, 165, 186, 165, 165, 165, 165, 165, 164, - 165, 165, 190, 190, 190, 190, 154, 154, 154, 154, - 154, 154, 154, 154, 154, 154, 154, 148, 148, 148, + 165, 165, 165, 165, 182, 182, 183, 165, 165, 184, + 165, 165, 165, 185, 165, 165, 186, 165, 165, 165, + 165, 165, 164, 165, 165, 190, 190, 190, 190, 154, + 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, - 191, 192, 193, 193, 194, 194, 194, 195, 196, 196, - 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - 197, 206, 206, 206, 206, 198, 198, 198, 198, 198, - 198, 204, 204, 199, 199, 199, 211, 211, 211, 211, - 211, 213, 213, 210, 210, 214, 200, 200, 200, 168, - 216, 168, 216, 218, 218, 219, 217, 218, 218, 222, - 222, 224, 221, 224, 221, 224, 226, 226, 227, 227, + 148, 148, 148, 191, 192, 193, 193, 194, 194, 194, + 195, 196, 196, 197, 197, 197, 197, 197, 197, 197, + 197, 197, 197, 197, 206, 206, 206, 206, 198, 198, + 198, 198, 198, 198, 204, 204, 199, 199, 199, 211, + 211, 211, 211, 211, 213, 213, 210, 210, 214, 200, + 200, 200, 168, 216, 168, 216, 218, 218, 219, 217, + 218, 218, 222, 222, 224, 221, 224, 221, 224, 226, + 226, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, - 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, - 227, 227, 227, 227, 227, 227, 225, 228, 220, 229, - 230, 229, 230, 205, 231, 231, 205, 151, 232, 151, - 151, 233, 151, 151, 151, 151, 234, 236, 236, 237, - 151, 237, 237, 237, 237, 237, 235, 235, 235, 238, - 238, 238, 238, 239, 239, 240, 240, 240, 240, 240, - 241, 241, 241, 241, 241, 241, 241, 241, 242, 242, - 243, 243, 244, 244, 244, 245, 245, 245, 246, 246, - 246, 246, 247, 248, 247, 248, 249, 249, 249, 249, - 249, 247, 250, 251, 247, 248, 252, 253, 252, 253, - 254, 254, 254, 254, 255, 256, 255, 256, 257, 258, - 257, 258, 259, 260, 259, 260, 261, 262, 261, 262, - 263, 264, 263, 264, 265, 266, 265, 266, 267, 268, - 267, 268, 215, 212, 215, 212, 215, 212, 215, 212, - 215, 212, 273, 273, 273, 273, 273, 273, 273, 273, - 273, 273, 273, 273, 137, 207, 137, 207, 274, 275, - 274, 275, 136, 136, 136, 136, 136, 136, 136, 136, - 136, 136, 136, 136, 136, 136, 284, 284, 284, 285, - 285, 289, 289, 277, 277, 276, 171, 294, 294, 295, - 295, 293, 293, 296, 296, 297, 298, 287, 301, 303, - 189, 299, 300, 302, 304, 299, 300, 302, 304, 308, - 305, 306, 307, 308, 305, 306, 307, 309, 309, 310, - 310, 310, 311, 311, 311, 312, 312, 313, 313, 315, - 314, 314, 314, 316, 316, 208, 208, 209, 209, 172, - 166, 170, 173, 173, 292, 292, 292, 292, 292, 292, - 317, 317, 292, 292, 318, 318, 318, 318, 278, 278, - 279, 279, 280, 174, 175, 319, 319, 322, 322, 320, - 320, 323, 321, 281, 324, 324, 282, 176, 176, 176, - 325, 326, 327, 327, 283, 328, 288, 188, 290, 290, - 201, 201, 333, 329, 329, 329, 329, 329, 334, 334, - 335, 330, 332, 331, 271, 272, 271, 272, 336, 336, - 337, 223, 223, 223, 223, 341, 338, 340, 342, 187, - 291, 291, 203, 203, 339, 269, 270, 269, 270, 269, - 270, 286, 202, 347, 202, 347, 344, 346, 348, 343, - 343, 345, 345, 349, 349, 350, 350, 350, 139, 139, - 351, 140, 353, 352, 352, 354, 354, 355, 355, 355, - 356, 356, 358, 358, 358, 358, 358, 361, 362, 363, - 363, 363, 359, 365, 365, 366, 366, 360, 364, 367, - 357, 357, 357, 357, 357, 357, 357, 357, 368, 368, - 368, 369, 369, 370, 370, 371 + 227, 227, 227, 227, 227, 227, 227, 227, 227, 225, + 228, 220, 229, 230, 229, 230, 205, 231, 231, 205, + 151, 232, 151, 151, 233, 151, 151, 151, 151, 234, + 236, 236, 237, 151, 237, 237, 237, 237, 237, 235, + 235, 235, 238, 238, 238, 238, 239, 239, 240, 240, + 240, 240, 240, 241, 241, 241, 241, 241, 241, 241, + 241, 242, 242, 243, 243, 244, 244, 244, 245, 245, + 245, 246, 246, 246, 246, 247, 248, 247, 248, 249, + 249, 249, 249, 249, 247, 250, 251, 247, 248, 252, + 253, 252, 253, 254, 254, 254, 254, 255, 256, 255, + 256, 257, 258, 257, 258, 259, 260, 259, 260, 261, + 262, 261, 262, 263, 264, 263, 264, 265, 266, 265, + 266, 267, 268, 267, 268, 215, 212, 215, 212, 215, + 212, 215, 212, 215, 212, 273, 273, 273, 273, 273, + 273, 273, 273, 273, 273, 273, 273, 137, 207, 137, + 207, 274, 275, 274, 275, 136, 136, 136, 136, 136, + 136, 136, 136, 136, 136, 136, 136, 136, 136, 284, + 284, 284, 285, 285, 289, 289, 277, 277, 276, 171, + 294, 294, 295, 295, 293, 293, 296, 296, 297, 298, + 287, 301, 303, 189, 299, 300, 302, 304, 299, 300, + 302, 304, 308, 305, 306, 307, 308, 305, 306, 307, + 309, 309, 310, 310, 310, 311, 311, 311, 312, 312, + 313, 313, 315, 314, 314, 314, 316, 316, 208, 208, + 209, 209, 172, 166, 170, 173, 173, 292, 292, 292, + 292, 292, 292, 317, 317, 292, 292, 318, 318, 318, + 318, 278, 278, 279, 279, 280, 174, 175, 319, 319, + 322, 322, 320, 320, 323, 321, 281, 324, 324, 282, + 176, 176, 176, 325, 326, 327, 327, 283, 328, 288, + 188, 290, 290, 201, 201, 333, 329, 329, 329, 329, + 329, 334, 334, 335, 330, 332, 331, 271, 272, 271, + 272, 336, 336, 337, 223, 223, 223, 223, 341, 338, + 340, 342, 187, 291, 291, 203, 203, 339, 269, 270, + 269, 270, 269, 270, 286, 202, 347, 202, 347, 344, + 346, 348, 343, 343, 345, 345, 349, 349, 350, 350, + 350, 139, 139, 351, 140, 353, 352, 352, 354, 354, + 355, 355, 355, 356, 356, 358, 358, 358, 358, 358, + 361, 362, 363, 363, 363, 359, 365, 365, 366, 366, + 360, 364, 367, 357, 357, 357, 357, 357, 357, 357, + 357, 368, 368, 368, 369, 369, 370, 370, 371 }; const short QmlJSGrammar::rhs [] = { @@ -144,60 +144,60 @@ const short QmlJSGrammar::rhs [] = { 3, 3, 3, 2, 2, 2, 2, 2, 2, 3, 1, 1, 1, 3, 0, 1, 3, 2, 5, 4, 6, 3, 7, 1, 2, 4, 1, 2, 2, 3, - 3, 0, 1, 3, 1, 2, 6, 1, 2, 2, - 11, 1, 2, 8, 1, 2, 1, 1, 1, 1, - 5, 4, 1, 3, 3, 5, 1, 1, 1, 1, + 3, 2, 3, 3, 0, 1, 3, 1, 2, 6, + 1, 2, 2, 11, 1, 2, 8, 1, 2, 1, + 1, 1, 1, 5, 4, 1, 3, 3, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 3, 4, 1, 1, 2, 1, 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 3, 2, 3, 5, 1, 1, 1, 1, 1, - 1, 1, 1, 3, 3, 5, 1, 2, 2, 4, - 4, 1, 2, 0, 1, 2, 2, 3, 4, 1, - 1, 3, 3, 1, 1, 2, 3, 3, 1, 1, + 1, 1, 1, 1, 1, 1, 3, 4, 1, 1, + 2, 1, 0, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 3, 2, 3, 5, 1, 1, + 1, 1, 1, 1, 1, 1, 3, 3, 5, 1, + 2, 2, 4, 4, 1, 2, 0, 1, 2, 2, + 3, 4, 1, 1, 3, 3, 1, 1, 2, 3, + 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 3, 2, 2, 0, - 0, 1, 1, 1, 1, 3, 3, 1, 1, 4, - 4, 3, 3, 3, 1, 5, 1, 1, 2, 2, - 2, 4, 4, 4, 4, 3, 0, 1, 2, 1, - 2, 3, 4, 1, 1, 1, 2, 2, 2, 2, - 1, 2, 2, 2, 2, 2, 2, 2, 1, 3, - 1, 3, 1, 1, 1, 1, 3, 3, 1, 3, - 3, 3, 1, 1, 3, 3, 1, 1, 1, 1, - 1, 3, 3, 3, 1, 1, 1, 1, 3, 3, - 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, - 3, 3, 1, 1, 3, 3, 1, 1, 3, 3, - 1, 1, 3, 3, 1, 1, 3, 3, 1, 1, - 5, 5, 1, 1, 1, 1, 1, 1, 3, 3, - 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 3, 3, 0, 0, - 1, 1, 3, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 3, 1, 2, 1, - 4, 1, 1, 1, 1, 1, 2, 2, 2, 2, - 2, 1, 1, 1, 1, 3, 3, 3, 3, 3, - 3, 3, 3, 2, 2, 2, 2, 3, 3, 0, - 1, 2, 2, 1, 4, 1, 3, 1, 3, 2, - 2, 4, 4, 3, 2, 2, 2, 0, 1, 1, - 0, 2, 7, 5, 7, 7, 5, 9, 9, 9, - 1, 1, 7, 7, 3, 3, 2, 2, 2, 3, - 2, 3, 3, 5, 5, 3, 5, 1, 2, 0, - 1, 4, 3, 3, 1, 3, 3, 3, 3, 4, - 5, 2, 1, 1, 2, 1, 9, 9, 1, 8, - 9, 8, 1, 0, 1, 1, 2, 3, 1, 3, - 1, 1, 1, 1, 4, 4, 7, 7, 1, 1, - 0, 8, 9, 8, 9, 1, 1, 1, 1, 8, - 1, 7, 8, 7, 1, 1, 1, 3, 3, 2, - 2, 6, 6, 5, 5, 1, 1, 1, 1, 0, - 2, 0, 1, 1, 2, 1, 2, 1, 0, 1, - 1, 1, 1, 0, 1, 1, 2, 2, 2, 1, - 3, 2, 1, 1, 1, 3, 3, 1, 3, 2, - 3, 4, 2, 1, 3, 1, 3, 1, 1, 0, - 3, 3, 2, 2, 2, 5, 5, 4, 2, 3, - 4, 1, 3, 1, 3, 2 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, + 2, 2, 0, 0, 1, 1, 1, 1, 3, 3, + 1, 1, 4, 4, 3, 3, 3, 1, 5, 1, + 1, 2, 2, 2, 4, 4, 4, 4, 3, 0, + 1, 2, 1, 2, 3, 4, 1, 1, 1, 2, + 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, + 2, 1, 3, 1, 3, 1, 1, 1, 1, 3, + 3, 1, 3, 3, 3, 1, 1, 3, 3, 1, + 1, 1, 1, 1, 3, 3, 3, 1, 1, 1, + 1, 3, 3, 1, 1, 1, 1, 1, 1, 3, + 3, 1, 1, 3, 3, 1, 1, 3, 3, 1, + 1, 3, 3, 1, 1, 3, 3, 1, 1, 3, + 3, 1, 1, 5, 5, 1, 1, 1, 1, 1, + 1, 3, 3, 3, 3, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, + 3, 0, 0, 1, 1, 3, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, + 1, 2, 1, 4, 1, 1, 1, 1, 1, 2, + 2, 2, 2, 2, 1, 1, 1, 1, 3, 3, + 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, + 3, 3, 0, 1, 2, 2, 1, 4, 1, 3, + 1, 3, 2, 2, 4, 4, 3, 2, 2, 2, + 0, 1, 1, 0, 2, 7, 5, 7, 7, 5, + 9, 9, 9, 1, 1, 7, 7, 3, 3, 2, + 2, 2, 3, 2, 3, 3, 5, 5, 3, 5, + 1, 2, 0, 1, 4, 3, 3, 1, 3, 3, + 3, 3, 4, 5, 2, 1, 1, 2, 1, 9, + 9, 1, 8, 9, 8, 1, 0, 1, 1, 2, + 3, 1, 3, 1, 1, 1, 1, 4, 4, 7, + 7, 1, 1, 0, 8, 9, 8, 9, 1, 1, + 1, 1, 8, 1, 7, 8, 7, 1, 1, 1, + 3, 3, 2, 2, 6, 6, 5, 5, 1, 1, + 1, 1, 0, 2, 0, 1, 1, 2, 1, 2, + 1, 0, 1, 1, 1, 1, 0, 1, 1, 2, + 2, 2, 1, 3, 2, 1, 1, 1, 3, 3, + 1, 3, 2, 3, 4, 2, 1, 3, 1, 3, + 1, 1, 0, 3, 3, 2, 2, 2, 5, 5, + 4, 2, 3, 4, 1, 3, 1, 3, 2 }; @@ -210,61 +210,61 @@ const int QmlJSGrammar::rule_info [] = { 158, 34, 162, 57, 161, 164, 158, 138, 160, 165, 138, 165, 165, 161, 165, 164, 7, 166, 35, 163, 58, 165, 164, 7, 166, 164, 158, 165, 164, 130, 164, 158, 167, 34, 166, 168, 57, 149, 167, 34, 166, 168, 8, 57, 149, 169, 166, 127, 170, 169, 166, 128, 171, 169, 166, 128, 167, 169, 166, 172, 169, 166, 170, 169, 166, 173, 169, 166, 174, 169, 166, 175, 169, 166, 176, 165, 164, 7, 169, 177, 79, 177, 92, 177, 30, 177, 177, 15, 30, 178, 178, 179, 179, 154, 7, 177, 179, 177, 154, 179, 179, 8, 154, 7, 177, 179, 179, 8, 177, 154, - 165, 71, 30, 37, 178, 62, 149, 165, 71, 30, 149, 180, 70, 30, 38, 177, 25, 154, 149, 165, 180, 165, 72, 180, 181, 70, 177, 154, 149, 165, 181, 165, 10, 181, 165, 10, 180, 165, 10, 107, 181, - 165, 107, 10, 181, 182, 182, 149, 183, 107, 154, 149, 165, 183, 165, 107, 181, 184, 70, 177, 154, 7, 169, 182, 165, 184, 165, 72, 184, 165, 10, 184, - 185, 70, 30, 38, 177, 25, 154, 7, 35, 163, 58, 149, 165, 185, 165, 72, 185, 186, 70, 177, 154, 7, 166, 164, 158, 149, 165, 186, 165, 72, 186, 165, 187, 165, 188, 165, 189, 164, 151, - 165, 98, 30, 34, 190, 57, 165, 108, 30, 7, 161, 190, 30, 190, 30, 17, 48, 190, 190, 8, 30, 190, 190, 8, 30, 17, 48, 154, 30, 154, 70, 154, 71, 154, 72, - 154, 130, 154, 118, 154, 119, 154, 106, 154, 117, 154, 107, 154, 108, 148, 30, 148, 70, 148, 71, - 148, 72, 148, 130, 148, 118, 148, 119, 148, 106, 148, 104, 148, 117, 148, 116, 148, 107, 148, 108, - 191, 148, 192, 191, 193, 194, 193, 193, 8, 194, 194, 164, 38, 193, 25, 194, 92, 194, 164, 195, 7, 194, 196, 195, 196, - 197, 74, 197, 191, 197, 198, 197, 199, 197, 200, 197, 201, 197, 202, 197, 203, 197, 204, 197, 205, - 197, 206, 206, 37, 207, 62, 206, 37, 62, 206, 37, 208, 62, 206, 37, 207, 8, 209, 62, 198, 85, 198, 86, 198, 87, 198, 48, 198, 93, - 198, 69, 204, 12, 204, 13, 199, 35, 210, 58, 199, 35, 211, 58, 199, 35, 211, 8, 210, 58, 211, 212, 211, 213, 212, 211, 210, 214, 211, 211, 8, 210, 212, - 211, 211, 8, 210, 214, 213, 8, 213, 213, 8, 210, 210, 213, 214, 99, 215, 200, 34, 57, 200, 34, 216, 57, 200, 34, 216, 8, 57, 168, 217, - 216, 218, 168, 168, 8, 217, 216, 216, 8, 218, 218, 191, 218, 219, 219, 191, 220, 217, 221, 7, 212, 218, 222, 7, 212, 218, 223, 222, 224, - 222, 225, 224, 226, 221, 69, 224, 69, 221, 48, 224, 48, 226, 191, 226, 227, 227, 4, 227, 5, - 227, 6, 227, 9, 227, 10, 227, 11, 227, 14, 227, 16, 227, 98, 227, 87, 227, 20, 227, 21, - 227, 23, 227, 31, 227, 32, 227, 33, 227, 44, 227, 85, 227, 61, 227, 73, 227, 74, 227, 75, - 227, 86, 227, 77, 227, 78, 227, 79, 227, 80, 227, 81, 227, 88, 227, 89, 227, 91, 227, 92, - 227, 101, 227, 82, 227, 102, 227, 103, 227, 105, 227, 114, 225, 35, 212, 58, 228, 17, 215, 220, 17, 212, 229, - 230, 229, 228, 230, 220, 205, 109, 231, 112, 231, 111, 137, 231, 205, 110, 137, 231, 151, 197, 232, 101, 151, 232, 35, 207, 58, - 151, 151, 35, 207, 58, 233, 44, 15, 30, 151, 232, 15, 226, 151, 151, 15, 226, 151, 234, 151, 44, 151, 37, 235, 62, 234, 233, 236, 151, 236, 44, 236, 237, 237, 205, - 151, 151, 205, 237, 151, 37, 235, 62, 237, 232, 37, 235, 62, 237, 237, 37, 235, 62, 237, 237, 35, 207, 58, 237, 237, 15, 226, 235, 235, 238, 235, 238, 8, 238, 212, - 238, 99, 212, 238, 238, 8, 212, 238, 238, 8, 99, 212, 239, 236, 239, 237, 240, 239, 240, 239, 55, 240, 239, 43, 240, 55, 241, 240, 43, 241, - 241, 240, 241, 11, 241, 241, 80, 241, 241, 78, 241, 241, 53, 241, 241, 41, 241, 241, 76, 241, 241, 45, 241, 242, 241, 242, 240, 66, 242, - 243, 242, 243, 243, 244, 242, 244, 65, 244, 12, 244, 59, 245, 243, 245, 245, 53, 243, 245, 245, 41, 243, 246, 245, 246, 246, 39, 245, - 246, 246, 26, 245, 246, 246, 28, 245, 247, 246, 248, 246, 247, 247, 249, 246, 248, 248, 249, 246, 249, 38, 249, 25, 249, 36, 249, 24, - 249, 33, 247, 247, 32, 246, 250, 247, 116, 194, 251, 248, 116, 194, 247, 250, 248, 251, 252, 247, 253, 248, 252, 252, 254, 247, 253, 253, 254, 248, - 254, 18, 254, 46, 254, 19, 254, 47, 255, 253, 256, 252, 255, 255, 1, 253, 256, 256, 1, 252, 257, 255, 258, 256, - 257, 257, 83, 255, 258, 258, 83, 256, 259, 257, 260, 258, 259, 259, 49, 257, 260, 260, 49, 258, 261, 259, 262, 260, 261, 261, 2, 259, 262, 262, 2, 260, - 263, 261, 264, 262, 263, 263, 52, 261, 264, 264, 52, 262, 265, 263, 266, 264, 265, 265, 97, 263, 266, 266, 97, 264, 267, 265, 268, 266, - 267, 265, 56, 212, 7, 215, 268, 266, 56, 212, 7, 212, 215, 267, 212, 268, 215, 269, 212, 270, 215, 271, 212, 272, 215, 239, 17, 215, 212, 239, 17, 212, - 215, 239, 273, 215, 212, 239, 273, 212, 273, 68, 273, 67, 273, 13, 273, 60, 273, 54, 273, 42, 273, 40, 273, 27, - 273, 29, 273, 3, 273, 84, 273, 51, 137, 215, 207, 212, 137, 137, 8, 215, 207, 207, 8, 212, 274, 275, - 274, 137, 275, 207, 136, 166, 128, 276, 136, 166, 189, 136, 166, 172, 136, 166, 170, 136, 166, 173, 136, 166, 277, 136, 166, 278, 136, 166, 279, - 136, 166, 280, 136, 166, 174, 136, 166, 281, 136, 166, 282, 136, 166, 176, 136, 166, 283, 284, 285, 284, 286, 284, 287, 285, 288, - 285, 187, 289, 290, 289, 291, 277, 292, 277, 175, 276, 171, 171, 34, 293, 57, 294, 295, 294, 294, 295, 295, 136, - 295, 166, 127, 284, 149, 293, 166, 293, 294, 296, 89, 296, 88, 297, 79, 298, 296, 299, 287, 296, 300, 301, 297, 302, 303, 297, 304, - 189, 303, 149, 299, 305, 300, 305, 302, 306, 304, 307, 299, 299, 8, 308, 300, 300, 8, 305, 302, 302, 8, 306, 304, 304, 8, 307, 308, 192, 196, 229, - 305, 192, 196, 230, 306, 192, 196, 229, 307, 192, 196, 230, 308, 309, 228, 305, 309, 220, 306, 309, 228, 307, 309, 220, 309, 34, 310, 57, 309, 35, 311, 58, 310, - 310, 312, 310, 312, 8, 311, 210, 209, 311, 313, 311, 313, 8, 210, 209, 312, 314, 312, 312, 8, 314, 313, 315, 313, 313, 8, 315, 315, 210, 316, - 314, 192, 230, 314, 222, 7, 192, 230, 314, 222, 7, 309, 230, 316, 192, 196, 230, 316, 309, 230, 208, 99, 192, 208, 99, 309, 209, 209, 208, 172, 63, - 166, 170, 207, 149, 173, 31, 37, 207, 62, 136, 16, 136, 173, 31, 37, 207, 62, 136, 292, 14, 136, 81, 37, 207, 62, 95, 292, 14, 136, 81, 37, 207, 62, 149, 292, 81, 37, 207, 62, 136, 292, 21, 37, 274, 63, 275, 63, 275, 62, 136, 292, 21, 37, 301, 63, 275, 63, 275, 62, 136, 292, 21, 37, 298, 63, 275, 63, 275, 62, 136, - 317, 32, 317, 117, 292, 21, 37, 239, 317, 207, 62, 136, 292, 21, 37, 318, 317, 207, 62, 136, 318, 296, 192, 196, 318, 297, 192, 196, 318, 296, 309, 318, 297, 309, 278, 9, 149, 278, 9, 191, 149, - 279, 4, 149, 279, 4, 191, 149, 280, 61, 275, 149, 174, 82, 37, 207, 62, 136, 175, 73, 37, 207, 62, 319, 319, 34, 320, 57, 319, 34, 320, 321, 320, 57, 322, 323, 322, 322, 323, 320, - 320, 322, 323, 5, 207, 7, 293, 321, 10, 7, 293, 281, 191, 7, 324, 324, 136, 324, 166, 127, 288, 282, 75, 207, 149, 176, 77, 171, 325, 176, 77, 171, 326, 176, 77, 171, 325, 326, - 325, 6, 37, 327, 62, 171, 326, 20, 171, 327, 192, 327, 309, 283, 91, 149, 328, 23, 288, 328, 192, 37, 329, 62, 196, 330, 331, 332, 188, 328, 192, 37, 329, 62, 196, 330, 331, 332, 290, 288, 290, 328, 37, 329, 62, 196, 330, 331, 332, - 201, 23, 192, 37, 329, 62, 196, 330, 331, 332, 201, 23, 37, 329, 62, 196, 330, 331, 332, 333, 329, 329, 329, 208, 329, 334, 329, 334, 8, 329, 334, 8, 208, 334, 316, 334, 334, 8, 316, - 335, 316, 330, 34, 332, 57, 331, 293, 271, 336, 96, 337, 215, 272, 336, 96, 337, 212, 271, 336, 96, 337, 128, 330, 331, 332, 272, 336, 96, 337, 128, 330, 331, 332, 336, 192, 336, 206, - 337, 223, 222, 37, 333, 62, 196, 330, 331, 332, 223, 65, 222, 338, 333, 62, 196, 330, 339, 340, 223, 118, 222, 37, 62, 196, 330, 331, 332, 223, 119, 222, 37, 341, 62, 196, 330, 331, 332, 341, 335, 338, 37, 340, 57, 342, 22, 187, 342, 192, 338, 329, 62, 330, 339, 340, - 291, 187, 291, 342, 338, 329, 62, 330, 339, 340, 203, 22, 192, 338, 329, 62, 330, 339, 340, 203, 22, 338, 329, 62, 330, 339, 340, 339, 331, 269, 100, 270, 100, 269, 100, 65, 215, 270, 100, 65, 212, 269, 100, 215, - 270, 100, 212, 286, 102, 192, 343, 344, 345, 346, 202, 102, 192, 343, 344, 345, 346, 347, 102, 343, 344, 345, 346, 202, 102, 343, 344, 345, 346, 347, 286, 344, 34, 346, 57, 348, 104, 343, - 343, 103, 239, 345, 345, 349, 349, 350, 349, 349, 350, 350, 223, 350, 348, 223, 350, 63, 139, 139, 351, - 351, 294, 140, 352, 353, 354, 352, 352, 353, 354, 355, 354, 354, 355, 355, 356, 149, 355, 357, 149, 355, 295, - 356, 114, 358, 359, 356, 114, 360, 358, 361, 358, 362, 358, 363, 358, 361, 8, 362, 358, 361, 8, 363, 361, 364, 362, 65, 116, 364, 363, 34, 57, - 363, 34, 365, 57, 363, 34, 365, 8, 57, 359, 106, 360, 365, 366, 365, 365, 8, 366, 366, 364, 366, 226, 116, 364, 360, 69, 364, 192, 367, - 357, 105, 65, 359, 357, 105, 368, 359, 357, 105, 368, 357, 105, 189, 357, 105, 284, 357, 105, 10, 367, 127, 289, 357, 105, 10, 367, 127, 347, 357, 105, 10, 367, 212, 368, 34, 57, 368, 34, 369, 57, - 368, 34, 369, 8, 57, 369, 370, 369, 369, 8, 370, 370, 226, 370, 226, 116, 226, 371, 134, 0 + 165, 71, 30, 37, 178, 62, 149, 165, 71, 30, 149, 180, 70, 30, 38, 177, 25, 154, 149, 165, 180, 165, 72, 180, 181, 70, 177, 154, 149, 165, 181, 165, 10, 181, 165, 107, 180, 165, 10, 107, 180, + 165, 107, 10, 180, 165, 10, 180, 165, 10, 107, 181, 165, 107, 10, 181, 182, 182, 149, 183, 107, 154, 149, 165, 183, 165, 107, 181, 184, 70, 177, 154, 7, 169, 182, + 165, 184, 165, 72, 184, 165, 10, 184, 185, 70, 30, 38, 177, 25, 154, 7, 35, 163, 58, 149, 165, 185, 165, 72, 185, 186, 70, 177, 154, 7, 166, 164, 158, 149, 165, 186, 165, 72, 186, 165, 187, + 165, 188, 165, 189, 164, 151, 165, 98, 30, 34, 190, 57, 165, 108, 30, 7, 161, 190, 30, 190, 30, 17, 48, 190, 190, 8, 30, 190, 190, 8, 30, 17, 48, 154, 30, + 154, 70, 154, 71, 154, 72, 154, 130, 154, 118, 154, 119, 154, 106, 154, 117, 154, 107, 154, 108, + 148, 30, 148, 70, 148, 71, 148, 72, 148, 130, 148, 118, 148, 119, 148, 106, 148, 104, 148, 117, + 148, 116, 148, 107, 148, 108, 191, 148, 192, 191, 193, 194, 193, 193, 8, 194, 194, 164, 38, 193, 25, 194, 92, 194, 164, + 195, 7, 194, 196, 195, 196, 197, 74, 197, 191, 197, 198, 197, 199, 197, 200, 197, 201, 197, 202, + 197, 203, 197, 204, 197, 205, 197, 206, 206, 37, 207, 62, 206, 37, 62, 206, 37, 208, 62, 206, 37, 207, 8, 209, 62, 198, 85, 198, 86, + 198, 87, 198, 48, 198, 93, 198, 69, 204, 12, 204, 13, 199, 35, 210, 58, 199, 35, 211, 58, 199, 35, 211, 8, 210, 58, 211, 212, + 211, 213, 212, 211, 210, 214, 211, 211, 8, 210, 212, 211, 211, 8, 210, 214, 213, 8, 213, 213, 8, 210, 210, 213, 214, 99, 215, 200, 34, 57, + 200, 34, 216, 57, 200, 34, 216, 8, 57, 168, 217, 216, 218, 168, 168, 8, 217, 216, 216, 8, 218, 218, 191, 218, 219, 219, 191, 220, 217, 221, 7, 212, + 218, 222, 7, 212, 218, 223, 222, 224, 222, 225, 224, 226, 221, 69, 224, 69, 221, 48, 224, 48, 226, 191, + 226, 227, 227, 4, 227, 5, 227, 6, 227, 9, 227, 10, 227, 11, 227, 14, 227, 16, 227, 98, + 227, 87, 227, 20, 227, 21, 227, 23, 227, 31, 227, 32, 227, 33, 227, 44, 227, 85, 227, 61, + 227, 73, 227, 74, 227, 75, 227, 86, 227, 77, 227, 78, 227, 79, 227, 80, 227, 81, 227, 88, + 227, 89, 227, 91, 227, 92, 227, 101, 227, 82, 227, 102, 227, 103, 227, 105, 227, 114, 225, 35, 212, 58, + 228, 17, 215, 220, 17, 212, 229, 230, 229, 228, 230, 220, 205, 109, 231, 112, 231, 111, 137, 231, 205, 110, 137, 231, + 151, 197, 232, 101, 151, 232, 35, 207, 58, 151, 151, 35, 207, 58, 233, 44, 15, 30, 151, 232, 15, 226, 151, 151, 15, 226, 151, 234, 151, 44, 151, 37, 235, 62, 234, 233, + 236, 151, 236, 44, 236, 237, 237, 205, 151, 151, 205, 237, 151, 37, 235, 62, 237, 232, 37, 235, 62, 237, 237, 37, 235, 62, 237, 237, 35, 207, 58, 237, 237, 15, 226, 235, + 235, 238, 235, 238, 8, 238, 212, 238, 99, 212, 238, 238, 8, 212, 238, 238, 8, 99, 212, 239, 236, 239, 237, 240, 239, 240, 239, 55, + 240, 239, 43, 240, 55, 241, 240, 43, 241, 241, 240, 241, 11, 241, 241, 80, 241, 241, 78, 241, 241, 53, 241, 241, 41, 241, 241, 76, 241, + 241, 45, 241, 242, 241, 242, 240, 66, 242, 243, 242, 243, 243, 244, 242, 244, 65, 244, 12, 244, 59, 245, 243, 245, 245, 53, 243, + 245, 245, 41, 243, 246, 245, 246, 246, 39, 245, 246, 246, 26, 245, 246, 246, 28, 245, 247, 246, 248, 246, 247, 247, 249, 246, 248, 248, 249, 246, 249, 38, + 249, 25, 249, 36, 249, 24, 249, 33, 247, 247, 32, 246, 250, 247, 116, 194, 251, 248, 116, 194, 247, 250, 248, 251, 252, 247, + 253, 248, 252, 252, 254, 247, 253, 253, 254, 248, 254, 18, 254, 46, 254, 19, 254, 47, 255, 253, 256, 252, 255, 255, 1, 253, + 256, 256, 1, 252, 257, 255, 258, 256, 257, 257, 83, 255, 258, 258, 83, 256, 259, 257, 260, 258, 259, 259, 49, 257, 260, 260, 49, 258, 261, 259, + 262, 260, 261, 261, 2, 259, 262, 262, 2, 260, 263, 261, 264, 262, 263, 263, 52, 261, 264, 264, 52, 262, 265, 263, 266, 264, 265, 265, 97, 263, + 266, 266, 97, 264, 267, 265, 268, 266, 267, 265, 56, 212, 7, 215, 268, 266, 56, 212, 7, 212, 215, 267, 212, 268, 215, 269, 212, 270, 215, 271, + 212, 272, 215, 239, 17, 215, 212, 239, 17, 212, 215, 239, 273, 215, 212, 239, 273, 212, 273, 68, 273, 67, 273, 13, 273, 60, 273, 54, + 273, 42, 273, 40, 273, 27, 273, 29, 273, 3, 273, 84, 273, 51, 137, 215, 207, 212, 137, 137, 8, 215, + 207, 207, 8, 212, 274, 275, 274, 137, 275, 207, 136, 166, 128, 276, 136, 166, 189, 136, 166, 172, 136, 166, 170, 136, 166, 173, + 136, 166, 277, 136, 166, 278, 136, 166, 279, 136, 166, 280, 136, 166, 174, 136, 166, 281, 136, 166, 282, 136, 166, 176, 136, 166, 283, 284, 285, + 284, 286, 284, 287, 285, 288, 285, 187, 289, 290, 289, 291, 277, 292, 277, 175, 276, 171, 171, 34, 293, 57, + 294, 295, 294, 294, 295, 295, 136, 295, 166, 127, 284, 149, 293, 166, 293, 294, 296, 89, 296, 88, 297, 79, 298, 296, 299, + 287, 296, 300, 301, 297, 302, 303, 297, 304, 189, 303, 149, 299, 305, 300, 305, 302, 306, 304, 307, 299, 299, 8, 308, 300, 300, 8, 305, + 302, 302, 8, 306, 304, 304, 8, 307, 308, 192, 196, 229, 305, 192, 196, 230, 306, 192, 196, 229, 307, 192, 196, 230, 308, 309, 228, 305, 309, 220, 306, 309, 228, 307, 309, 220, + 309, 34, 310, 57, 309, 35, 311, 58, 310, 310, 312, 310, 312, 8, 311, 210, 209, 311, 313, 311, 313, 8, 210, 209, 312, 314, 312, 312, 8, 314, + 313, 315, 313, 313, 8, 315, 315, 210, 316, 314, 192, 230, 314, 222, 7, 192, 230, 314, 222, 7, 309, 230, 316, 192, 196, 230, 316, 309, 230, 208, 99, 192, 208, 99, 309, + 209, 209, 208, 172, 63, 166, 170, 207, 149, 173, 31, 37, 207, 62, 136, 16, 136, 173, 31, 37, 207, 62, 136, 292, 14, 136, 81, 37, 207, 62, 95, 292, 14, 136, 81, 37, 207, 62, 149, 292, 81, 37, 207, 62, 136, + 292, 21, 37, 274, 63, 275, 63, 275, 62, 136, 292, 21, 37, 301, 63, 275, 63, 275, 62, 136, 292, 21, 37, 298, 63, 275, 63, 275, 62, 136, 317, 32, 317, 117, 292, 21, 37, 239, 317, 207, 62, 136, 292, 21, 37, 318, 317, 207, 62, 136, 318, 296, 192, 196, 318, 297, 192, 196, 318, 296, 309, + 318, 297, 309, 278, 9, 149, 278, 9, 191, 149, 279, 4, 149, 279, 4, 191, 149, 280, 61, 275, 149, 174, 82, 37, 207, 62, 136, 175, 73, 37, 207, 62, 319, 319, 34, 320, 57, 319, 34, 320, 321, 320, 57, + 322, 323, 322, 322, 323, 320, 320, 322, 323, 5, 207, 7, 293, 321, 10, 7, 293, 281, 191, 7, 324, 324, 136, 324, 166, 127, 288, 282, 75, 207, 149, + 176, 77, 171, 325, 176, 77, 171, 326, 176, 77, 171, 325, 326, 325, 6, 37, 327, 62, 171, 326, 20, 171, 327, 192, 327, 309, 283, 91, 149, 328, 23, 288, 328, 192, 37, 329, 62, 196, 330, 331, 332, + 188, 328, 192, 37, 329, 62, 196, 330, 331, 332, 290, 288, 290, 328, 37, 329, 62, 196, 330, 331, 332, 201, 23, 192, 37, 329, 62, 196, 330, 331, 332, 201, 23, 37, 329, 62, 196, 330, 331, 332, 333, 329, 329, 329, 208, 329, 334, 329, 334, 8, + 329, 334, 8, 208, 334, 316, 334, 334, 8, 316, 335, 316, 330, 34, 332, 57, 331, 293, 271, 336, 96, 337, 215, 272, 336, 96, 337, 212, 271, 336, 96, 337, 128, 330, 331, 332, + 272, 336, 96, 337, 128, 330, 331, 332, 336, 192, 336, 206, 337, 223, 222, 37, 333, 62, 196, 330, 331, 332, 223, 65, 222, 338, 333, 62, 196, 330, 339, 340, 223, 118, 222, 37, 62, 196, 330, 331, 332, 223, 119, 222, 37, 341, 62, 196, 330, 331, 332, 341, 335, 338, 37, + 340, 57, 342, 22, 187, 342, 192, 338, 329, 62, 330, 339, 340, 291, 187, 291, 342, 338, 329, 62, 330, 339, 340, 203, 22, 192, 338, 329, 62, 330, 339, 340, 203, 22, 338, 329, 62, 330, 339, 340, 339, 331, 269, 100, 270, 100, + 269, 100, 65, 215, 270, 100, 65, 212, 269, 100, 215, 270, 100, 212, 286, 102, 192, 343, 344, 345, 346, 202, 102, 192, 343, 344, 345, 346, 347, 102, 343, 344, 345, 346, 202, 102, 343, 344, 345, 346, 347, 286, 344, 34, + 346, 57, 348, 104, 343, 343, 103, 239, 345, 345, 349, 349, 350, 349, 349, 350, 350, 223, 350, 348, 223, + 350, 63, 139, 139, 351, 351, 294, 140, 352, 353, 354, 352, 352, 353, 354, 355, 354, 354, 355, + 355, 356, 149, 355, 357, 149, 355, 295, 356, 114, 358, 359, 356, 114, 360, 358, 361, 358, 362, 358, 363, 358, 361, 8, 362, 358, 361, 8, 363, + 361, 364, 362, 65, 116, 364, 363, 34, 57, 363, 34, 365, 57, 363, 34, 365, 8, 57, 359, 106, 360, 365, 366, 365, 365, 8, 366, 366, 364, 366, 226, 116, 364, + 360, 69, 364, 192, 367, 357, 105, 65, 359, 357, 105, 368, 359, 357, 105, 368, 357, 105, 189, 357, 105, 284, 357, 105, 10, 367, 127, 289, 357, 105, 10, 367, 127, 347, + 357, 105, 10, 367, 212, 368, 34, 57, 368, 34, 369, 57, 368, 34, 369, 8, 57, 369, 370, 369, 369, 8, 370, 370, 226, 370, 226, 116, 226, 371, 134, 0 }; const int QmlJSGrammar::rule_index [] = { @@ -276,183 +276,184 @@ const int QmlJSGrammar::rule_index [] = { 158, 162, 166, 170, 173, 176, 179, 182, 185, 188, 192, 194, 196, 198, 202, 203, 205, 209, 212, 218, 223, 230, 234, 242, 244, 247, 252, 254, 257, 260, - 264, 268, 269, 271, 275, 277, 280, 287, 289, 292, - 295, 307, 309, 312, 321, 323, 326, 328, 330, 332, - 334, 340, 345, 347, 351, 355, 361, 363, 365, 367, - 369, 371, 373, 375, 377, 379, 381, 383, 385, 387, - 389, 391, 393, 395, 397, 399, 401, 403, 405, 407, - 409, 411, 413, 415, 419, 424, 426, 428, 431, 433, - 434, 436, 438, 440, 442, 444, 446, 448, 450, 452, - 454, 456, 460, 463, 467, 473, 475, 477, 479, 481, - 483, 485, 487, 489, 493, 497, 503, 505, 508, 511, - 516, 521, 523, 526, 527, 529, 532, 535, 539, 544, - 546, 548, 552, 556, 558, 560, 563, 567, 571, 573, - 575, 577, 579, 581, 583, 585, 587, 589, 591, 593, - 595, 597, 599, 601, 603, 605, 607, 609, 611, 613, - 615, 617, 619, 621, 623, 625, 627, 629, 631, 633, - 635, 637, 639, 641, 643, 645, 647, 649, 651, 653, - 655, 657, 659, 661, 663, 665, 667, 671, 674, 677, - 678, 679, 681, 683, 685, 687, 691, 695, 697, 699, - 704, 709, 713, 717, 721, 723, 729, 731, 733, 736, - 739, 742, 747, 752, 757, 762, 766, 767, 769, 772, - 774, 777, 781, 786, 788, 790, 792, 795, 798, 801, - 804, 806, 809, 812, 815, 818, 821, 824, 827, 829, - 833, 835, 839, 841, 843, 845, 847, 851, 855, 857, - 861, 865, 869, 871, 873, 877, 881, 883, 885, 887, - 889, 891, 895, 899, 903, 905, 907, 909, 911, 915, - 919, 921, 923, 925, 927, 929, 931, 935, 939, 941, - 943, 947, 951, 953, 955, 959, 963, 965, 967, 971, - 975, 977, 979, 983, 987, 989, 991, 995, 999, 1001, - 1003, 1009, 1015, 1017, 1019, 1021, 1023, 1025, 1027, 1031, - 1035, 1039, 1043, 1045, 1047, 1049, 1051, 1053, 1055, 1057, - 1059, 1061, 1063, 1065, 1067, 1069, 1071, 1075, 1079, 1080, - 1081, 1083, 1085, 1089, 1092, 1095, 1098, 1101, 1104, 1107, - 1110, 1113, 1116, 1119, 1122, 1125, 1128, 1130, 1132, 1134, - 1136, 1138, 1140, 1142, 1144, 1146, 1148, 1152, 1154, 1157, - 1159, 1164, 1166, 1168, 1170, 1172, 1174, 1177, 1180, 1183, - 1186, 1189, 1191, 1193, 1195, 1197, 1201, 1205, 1209, 1213, - 1217, 1221, 1225, 1229, 1232, 1235, 1238, 1241, 1245, 1249, - 1250, 1252, 1255, 1258, 1260, 1265, 1267, 1271, 1273, 1277, - 1280, 1283, 1288, 1293, 1297, 1300, 1303, 1306, 1307, 1309, - 1311, 1312, 1315, 1323, 1329, 1337, 1345, 1351, 1361, 1371, - 1381, 1383, 1385, 1393, 1401, 1405, 1409, 1412, 1415, 1418, - 1422, 1425, 1429, 1433, 1439, 1445, 1449, 1455, 1457, 1460, - 1461, 1463, 1468, 1472, 1476, 1478, 1482, 1486, 1490, 1494, - 1499, 1505, 1508, 1510, 1512, 1515, 1517, 1527, 1537, 1539, - 1548, 1558, 1567, 1569, 1570, 1572, 1574, 1577, 1581, 1583, - 1587, 1589, 1591, 1593, 1595, 1600, 1605, 1613, 1621, 1623, - 1625, 1626, 1635, 1645, 1654, 1664, 1666, 1668, 1670, 1672, - 1681, 1683, 1691, 1700, 1708, 1710, 1712, 1714, 1718, 1722, - 1725, 1728, 1735, 1742, 1748, 1754, 1756, 1758, 1760, 1762, - 1763, 1766, 1767, 1769, 1771, 1774, 1776, 1779, 1781, 1782, - 1784, 1786, 1788, 1790, 1791, 1793, 1795, 1798, 1801, 1804, - 1806, 1810, 1813, 1815, 1817, 1819, 1823, 1827, 1829, 1833, - 1836, 1840, 1845, 1848, 1850, 1854, 1856, 1860, 1862, 1864, - 1865, 1869, 1873, 1876, 1879, 1882, 1888, 1894, 1899, 1902, - 1906, 1911, 1913, 1917, 1919, 1923 + 264, 268, 271, 275, 279, 280, 282, 286, 288, 291, + 298, 300, 303, 306, 318, 320, 323, 332, 334, 337, + 339, 341, 343, 345, 351, 356, 358, 362, 366, 372, + 374, 376, 378, 380, 382, 384, 386, 388, 390, 392, + 394, 396, 398, 400, 402, 404, 406, 408, 410, 412, + 414, 416, 418, 420, 422, 424, 426, 430, 435, 437, + 439, 442, 444, 445, 447, 449, 451, 453, 455, 457, + 459, 461, 463, 465, 467, 471, 474, 478, 484, 486, + 488, 490, 492, 494, 496, 498, 500, 504, 508, 514, + 516, 519, 522, 527, 532, 534, 537, 538, 540, 543, + 546, 550, 555, 557, 559, 563, 567, 569, 571, 574, + 578, 582, 584, 586, 588, 590, 592, 594, 596, 598, + 600, 602, 604, 606, 608, 610, 612, 614, 616, 618, + 620, 622, 624, 626, 628, 630, 632, 634, 636, 638, + 640, 642, 644, 646, 648, 650, 652, 654, 656, 658, + 660, 662, 664, 666, 668, 670, 672, 674, 676, 678, + 682, 685, 688, 689, 690, 692, 694, 696, 698, 702, + 706, 708, 710, 715, 720, 724, 728, 732, 734, 740, + 742, 744, 747, 750, 753, 758, 763, 768, 773, 777, + 778, 780, 783, 785, 788, 792, 797, 799, 801, 803, + 806, 809, 812, 815, 817, 820, 823, 826, 829, 832, + 835, 838, 840, 844, 846, 850, 852, 854, 856, 858, + 862, 866, 868, 872, 876, 880, 882, 884, 888, 892, + 894, 896, 898, 900, 902, 906, 910, 914, 916, 918, + 920, 922, 926, 930, 932, 934, 936, 938, 940, 942, + 946, 950, 952, 954, 958, 962, 964, 966, 970, 974, + 976, 978, 982, 986, 988, 990, 994, 998, 1000, 1002, + 1006, 1010, 1012, 1014, 1020, 1026, 1028, 1030, 1032, 1034, + 1036, 1038, 1042, 1046, 1050, 1054, 1056, 1058, 1060, 1062, + 1064, 1066, 1068, 1070, 1072, 1074, 1076, 1078, 1080, 1082, + 1086, 1090, 1091, 1092, 1094, 1096, 1100, 1103, 1106, 1109, + 1112, 1115, 1118, 1121, 1124, 1127, 1130, 1133, 1136, 1139, + 1141, 1143, 1145, 1147, 1149, 1151, 1153, 1155, 1157, 1159, + 1163, 1165, 1168, 1170, 1175, 1177, 1179, 1181, 1183, 1185, + 1188, 1191, 1194, 1197, 1200, 1202, 1204, 1206, 1208, 1212, + 1216, 1220, 1224, 1228, 1232, 1236, 1240, 1243, 1246, 1249, + 1252, 1256, 1260, 1261, 1263, 1266, 1269, 1271, 1276, 1278, + 1282, 1284, 1288, 1291, 1294, 1299, 1304, 1308, 1311, 1314, + 1317, 1318, 1320, 1322, 1323, 1326, 1334, 1340, 1348, 1356, + 1362, 1372, 1382, 1392, 1394, 1396, 1404, 1412, 1416, 1420, + 1423, 1426, 1429, 1433, 1436, 1440, 1444, 1450, 1456, 1460, + 1466, 1468, 1471, 1472, 1474, 1479, 1483, 1487, 1489, 1493, + 1497, 1501, 1505, 1510, 1516, 1519, 1521, 1523, 1526, 1528, + 1538, 1548, 1550, 1559, 1569, 1578, 1580, 1581, 1583, 1585, + 1588, 1592, 1594, 1598, 1600, 1602, 1604, 1606, 1611, 1616, + 1624, 1632, 1634, 1636, 1637, 1646, 1656, 1665, 1675, 1677, + 1679, 1681, 1683, 1692, 1694, 1702, 1711, 1719, 1721, 1723, + 1725, 1729, 1733, 1736, 1739, 1746, 1753, 1759, 1765, 1767, + 1769, 1771, 1773, 1774, 1777, 1778, 1780, 1782, 1785, 1787, + 1790, 1792, 1793, 1795, 1797, 1799, 1801, 1802, 1804, 1806, + 1809, 1812, 1815, 1817, 1821, 1824, 1826, 1828, 1830, 1834, + 1838, 1840, 1844, 1847, 1851, 1856, 1859, 1861, 1865, 1867, + 1871, 1873, 1875, 1876, 1880, 1884, 1887, 1890, 1893, 1899, + 1905, 1910, 1913, 1917, 1922, 1924, 1928, 1930, 1934 }; #endif // QLALR_NO_QMLJSGRAMMAR_DEBUG_INFO const short QmlJSGrammar::action_default [] = { - 0, 0, 461, 461, 461, 0, 26, 0, 299, 144, - 357, 0, 375, 529, 329, 337, 333, 275, 147, 349, - 353, 151, 325, 291, 3, 146, 148, 142, 131, 276, - 143, 341, 345, 258, 255, 296, 274, 257, 145, 248, - 149, 318, 304, 0, 128, 560, 130, 0, 162, 163, - 158, 125, 0, 0, 123, 118, 0, 174, 0, 0, - 0, 160, 0, 0, 244, 156, 159, 127, 122, 0, - 0, 119, 121, 129, 124, 120, 126, 161, 249, 0, - 141, 0, 157, 0, 0, 546, 150, 316, 289, 281, - 355, 0, 0, 151, 142, 276, 298, 278, 277, 0, - 294, 295, 293, 292, 297, 531, 0, 525, 0, 461, - 522, 412, 0, 410, 461, 408, 524, 358, 0, 376, - 330, 338, 334, 390, 388, 350, 354, 389, 396, 385, - 326, 386, 0, 142, 387, 404, 393, 276, 342, 346, - 317, 391, 303, 405, 0, 0, 0, 461, 0, 0, - 0, 0, 380, 460, 0, 0, 0, 416, 0, 0, - 547, 394, 395, 315, 0, 0, 384, 392, 356, 531, - 0, 526, 0, 461, 0, 528, 523, 0, 328, 0, - 321, 323, 322, 324, 319, 0, 0, 310, 308, 0, - 311, 309, 307, 305, 0, 0, 0, 301, 302, 300, - 100, 0, 0, 136, 313, 137, 0, 0, 261, 254, - 197, 198, 199, 200, 201, 233, 227, 202, 229, 203, - 204, 205, 206, 207, 235, 234, 208, 209, 210, 211, - 212, 236, 213, 214, 228, 215, 216, 230, 217, 231, - 218, 219, 220, 221, 222, 223, 224, 225, 226, 232, - 0, 0, 251, 378, 0, 0, 253, 0, 250, 0, - 0, 267, 268, 0, 270, 0, 269, 272, 0, 273, - 256, 271, 252, 0, 133, 0, 0, 135, 134, 312, - 0, 336, 0, 332, 0, 0, 0, 0, 352, 348, - 0, 344, 0, 340, 462, 15, 16, 461, 0, 494, - 495, 0, 0, 496, 506, 0, 132, 514, 519, 140, - 241, 515, 516, 0, 0, 440, 174, 0, 139, 241, - 138, 454, 243, 0, 239, 455, 517, 520, 518, 140, - 0, 461, 0, 507, 456, 457, 241, 446, 441, 191, - 192, 132, 190, 0, 0, 0, 196, 194, 451, 442, - 447, 438, 0, 241, 241, 452, 453, 0, 237, 0, - 444, 448, 175, 458, 172, 439, 174, 449, 458, 450, - 459, 445, 173, 443, 0, 372, 365, 0, 370, 371, - 369, 368, 374, 367, 366, 363, 364, 373, 362, 360, - 0, 481, 482, 0, 479, 480, 505, 0, 0, 0, - 0, 0, 0, 466, 465, 379, 381, 0, 0, 276, - 0, 0, 415, 414, 0, 0, 0, 377, 380, 0, - 382, 380, 0, 461, 468, 0, 471, 472, 0, 461, - 474, 0, 0, 0, 361, 0, 461, 473, 359, 140, - 417, 477, 422, 475, 431, 0, 140, 0, 426, 240, - 242, 430, 0, 238, 434, 435, 380, 0, 380, 0, - 461, 470, 140, 478, 424, 419, 476, 432, 436, 0, - 140, 0, 428, 240, 380, 0, 380, 0, 461, 469, - 406, 383, 461, 0, 407, 398, 0, 400, 0, 401, - 397, 0, 399, 0, 539, 411, 0, 514, 537, 0, - 0, 461, 545, 0, 540, 538, 140, 418, 0, 423, - 241, 0, 427, 560, 0, 0, 562, 557, 0, 564, - 563, 0, 566, 0, 123, 568, 124, 0, 559, 552, - 558, 565, 567, 514, 513, 0, 140, 0, 461, 0, - 532, 0, 0, 140, 0, 461, 0, 534, 0, 0, - 521, 536, 0, 140, 0, 461, 0, 535, 0, 514, - 0, 140, 0, 461, 0, 533, 561, 0, 0, 461, - 464, 461, 463, 0, 483, 0, 0, 0, 485, 490, - 488, 491, 0, 0, 489, 490, 0, 486, 0, 487, - 461, 493, 0, 461, 492, 0, 497, 0, 498, 499, - 0, 0, 500, 0, 503, 504, 0, 0, 501, 502, - 0, 0, 461, 467, 0, 0, 461, 484, 551, 0, - 549, 140, 0, 420, 425, 241, 433, 437, 0, 429, - 421, 527, 0, 409, 0, 327, 0, 320, 0, 0, - 306, 314, 0, 335, 0, 331, 0, 0, 267, 260, - 266, 0, 265, 0, 264, 0, 0, 0, 0, 351, - 347, 0, 343, 0, 339, 267, 0, 262, 267, 0, - 263, 560, 0, 0, 562, 0, 553, 562, 0, 555, - 282, 281, 0, 514, 514, 0, 140, 0, 461, 0, - 511, 0, 140, 0, 461, 0, 512, 0, 514, 514, - 0, 0, 461, 0, 543, 0, 0, 461, 0, 544, - 185, 184, 189, 181, 0, 0, 177, 186, 0, 178, - 183, 179, 0, 188, 167, 0, 175, 0, 174, 165, - 0, 170, 171, 0, 166, 176, 168, 169, 164, 0, - 0, 153, 154, 458, 152, 0, 155, 286, 280, 258, - 259, 288, 285, 279, 0, 0, 245, 247, 0, 246, - 287, 284, 283, 550, 0, 548, 0, 290, 0, 0, - 6, 575, 572, 576, 461, 580, 0, 0, 579, 578, - 577, 605, 603, 600, 0, 0, 604, 602, 0, 593, - 598, 0, 608, 0, 556, 607, 0, 509, 402, 0, - 541, 403, 606, 560, 514, 0, 140, 0, 461, 0, - 510, 514, 0, 0, 461, 0, 542, 0, 562, 0, - 554, 612, 0, 614, 609, 0, 610, 613, 611, 0, - 615, 601, 599, 0, 588, 583, 582, 584, 585, 0, - 0, 581, 0, 586, 587, 0, 594, 596, 0, 590, - 0, 597, 0, 591, 595, 592, 0, 589, 5, 570, - 461, 2, 0, 98, 97, 0, 130, 0, 0, 506, - 539, 119, 121, 129, 120, 4, 32, 0, 45, 44, - 95, 74, 77, 92, 88, 0, 85, 99, 0, 514, - 0, 140, 0, 461, 0, 508, 28, 31, 0, 0, + 0, 0, 464, 464, 464, 0, 26, 0, 302, 147, + 360, 0, 378, 532, 332, 340, 336, 278, 150, 352, + 356, 154, 328, 294, 3, 149, 151, 145, 134, 279, + 146, 344, 348, 261, 258, 299, 277, 260, 148, 251, + 152, 321, 307, 0, 131, 563, 133, 0, 165, 166, + 161, 128, 0, 0, 126, 121, 0, 177, 0, 0, + 0, 163, 0, 0, 247, 159, 162, 130, 125, 0, + 0, 122, 124, 132, 127, 123, 129, 164, 252, 0, + 144, 0, 160, 0, 0, 549, 153, 319, 292, 284, + 358, 0, 0, 154, 145, 279, 301, 281, 280, 0, + 297, 298, 296, 295, 300, 534, 0, 528, 0, 464, + 525, 415, 0, 413, 464, 411, 527, 361, 0, 379, + 333, 341, 337, 393, 391, 353, 357, 392, 399, 388, + 329, 389, 0, 145, 390, 407, 396, 279, 345, 349, + 320, 394, 306, 408, 0, 0, 0, 464, 0, 0, + 0, 0, 383, 463, 0, 0, 0, 419, 0, 0, + 550, 397, 398, 318, 0, 0, 387, 395, 359, 534, + 0, 529, 0, 464, 0, 531, 526, 0, 331, 0, + 324, 326, 325, 327, 322, 0, 0, 313, 311, 0, + 314, 312, 310, 308, 0, 0, 0, 304, 305, 303, + 103, 0, 0, 139, 316, 140, 0, 0, 264, 257, + 200, 201, 202, 203, 204, 236, 230, 205, 232, 206, + 207, 208, 209, 210, 238, 237, 211, 212, 213, 214, + 215, 239, 216, 217, 231, 218, 219, 233, 220, 234, + 221, 222, 223, 224, 225, 226, 227, 228, 229, 235, + 0, 0, 254, 381, 0, 0, 256, 0, 253, 0, + 0, 270, 271, 0, 273, 0, 272, 275, 0, 276, + 259, 274, 255, 0, 136, 0, 0, 138, 137, 315, + 0, 339, 0, 335, 0, 0, 0, 0, 355, 351, + 0, 347, 0, 343, 465, 15, 16, 464, 0, 497, + 498, 0, 0, 499, 509, 0, 135, 517, 522, 143, + 244, 518, 519, 0, 0, 443, 177, 0, 142, 244, + 141, 457, 246, 0, 242, 458, 520, 523, 521, 143, + 0, 464, 0, 510, 459, 460, 244, 449, 444, 194, + 195, 135, 193, 0, 0, 0, 199, 197, 454, 445, + 450, 441, 0, 244, 244, 455, 456, 0, 240, 0, + 447, 451, 178, 461, 175, 442, 177, 452, 461, 453, + 462, 448, 176, 446, 0, 375, 368, 0, 373, 374, + 372, 371, 377, 370, 369, 366, 367, 376, 365, 363, + 0, 484, 485, 0, 482, 483, 508, 0, 0, 0, + 0, 0, 0, 469, 468, 382, 384, 0, 0, 279, + 0, 0, 418, 417, 0, 0, 0, 380, 383, 0, + 385, 383, 0, 464, 471, 0, 474, 475, 0, 464, + 477, 0, 0, 0, 364, 0, 464, 476, 362, 143, + 420, 480, 425, 478, 434, 0, 143, 0, 429, 243, + 245, 433, 0, 241, 437, 438, 383, 0, 383, 0, + 464, 473, 143, 481, 427, 422, 479, 435, 439, 0, + 143, 0, 431, 243, 383, 0, 383, 0, 464, 472, + 409, 386, 464, 0, 410, 401, 0, 403, 0, 404, + 400, 0, 402, 0, 542, 414, 0, 517, 540, 0, + 0, 464, 548, 0, 543, 541, 143, 421, 0, 426, + 244, 0, 430, 563, 0, 0, 565, 560, 0, 567, + 566, 0, 569, 0, 126, 571, 127, 0, 562, 555, + 561, 568, 570, 517, 516, 0, 143, 0, 464, 0, + 535, 0, 0, 143, 0, 464, 0, 537, 0, 0, + 524, 539, 0, 143, 0, 464, 0, 538, 0, 517, + 0, 143, 0, 464, 0, 536, 564, 0, 0, 464, + 467, 464, 466, 0, 486, 0, 0, 0, 488, 493, + 491, 494, 0, 0, 492, 493, 0, 489, 0, 490, + 464, 496, 0, 464, 495, 0, 500, 0, 501, 502, + 0, 0, 503, 0, 506, 507, 0, 0, 504, 505, + 0, 0, 464, 470, 0, 0, 464, 487, 554, 0, + 552, 143, 0, 423, 428, 244, 436, 440, 0, 432, + 424, 530, 0, 412, 0, 330, 0, 323, 0, 0, + 309, 317, 0, 338, 0, 334, 0, 0, 270, 263, + 269, 0, 268, 0, 267, 0, 0, 0, 0, 354, + 350, 0, 346, 0, 342, 270, 0, 265, 270, 0, + 266, 563, 0, 0, 565, 0, 556, 565, 0, 558, + 285, 284, 0, 517, 517, 0, 143, 0, 464, 0, + 514, 0, 143, 0, 464, 0, 515, 0, 517, 517, + 0, 0, 464, 0, 546, 0, 0, 464, 0, 547, + 188, 187, 192, 184, 0, 0, 180, 189, 0, 181, + 186, 182, 0, 191, 170, 0, 178, 0, 177, 168, + 0, 173, 174, 0, 169, 179, 171, 172, 167, 0, + 0, 156, 157, 461, 155, 0, 158, 289, 283, 261, + 262, 291, 288, 282, 0, 0, 248, 250, 0, 249, + 290, 287, 286, 553, 0, 551, 0, 293, 0, 0, + 6, 578, 575, 579, 464, 583, 0, 0, 582, 581, + 580, 608, 606, 603, 0, 0, 607, 605, 0, 596, + 601, 0, 611, 0, 559, 610, 0, 512, 405, 0, + 544, 406, 609, 563, 517, 0, 143, 0, 464, 0, + 513, 517, 0, 0, 464, 0, 545, 0, 565, 0, + 557, 615, 0, 617, 612, 0, 613, 616, 614, 0, + 618, 604, 602, 0, 591, 586, 585, 587, 588, 0, + 0, 584, 0, 589, 590, 0, 597, 599, 0, 593, + 0, 600, 0, 594, 598, 595, 0, 592, 5, 573, + 464, 2, 0, 101, 100, 0, 133, 0, 0, 509, + 542, 122, 124, 132, 123, 4, 32, 0, 45, 44, + 98, 74, 77, 95, 91, 0, 88, 102, 0, 517, + 0, 143, 0, 464, 0, 511, 28, 31, 0, 0, 0, 30, 29, 40, 36, 0, 41, 37, 0, 0, - 102, 0, 42, 0, 0, 79, 78, 90, 63, 62, - 61, 0, 0, 63, 0, 0, 0, 64, 0, 117, - 114, 112, 107, 115, 111, 108, 110, 116, 113, 109, - 73, 0, 76, 461, 0, 82, 54, 55, 56, 58, - 0, 0, 59, 57, 52, 461, 53, 412, 159, 161, - 180, 0, 0, 0, 0, 195, 0, 193, 182, 50, - 49, 0, 187, 51, 87, 83, 0, 80, 0, 0, - 0, 0, 0, 103, 0, 101, 105, 0, 106, 0, - 104, 63, 0, 0, 0, 0, 0, 0, 0, 0, - 38, 0, 0, 39, 91, 0, 461, 0, 258, 0, - 0, 94, 0, 96, 75, 93, 89, 63, 0, 0, - 0, 0, 0, 0, 461, 0, 258, 0, 0, 108, - 86, 84, 81, 0, 72, 65, 0, 63, 66, 0, - 0, 0, 67, 0, 0, 0, 0, 69, 70, 0, - 71, 68, 33, 43, 461, 0, 0, 60, 174, 0, - 0, 46, 47, 0, 48, 8, 0, 0, 9, 0, - 11, 0, 10, 1, 25, 18, 14, 0, 17, 13, - 12, 27, 0, 35, 7, 34, 19, 0, 21, 0, - 0, 24, 0, 20, 22, 0, 0, 23, 616 + 105, 0, 42, 0, 0, 82, 78, 93, 63, 62, + 61, 0, 0, 63, 0, 0, 0, 64, 0, 120, + 117, 115, 110, 118, 114, 111, 113, 119, 116, 112, + 73, 0, 76, 464, 0, 85, 54, 55, 56, 58, + 0, 0, 59, 57, 52, 464, 53, 415, 162, 164, + 183, 0, 0, 0, 0, 198, 0, 196, 185, 50, + 49, 0, 190, 51, 90, 86, 0, 80, 83, 0, + 0, 0, 0, 0, 106, 0, 104, 108, 0, 109, + 0, 107, 63, 0, 0, 0, 0, 0, 0, 0, + 0, 38, 0, 0, 39, 94, 0, 464, 0, 261, + 0, 0, 97, 0, 99, 75, 96, 92, 63, 0, + 0, 0, 0, 0, 0, 464, 0, 261, 0, 0, + 111, 79, 89, 87, 81, 84, 63, 0, 72, 65, + 0, 63, 66, 0, 0, 0, 67, 0, 0, 0, + 0, 69, 70, 0, 71, 68, 33, 43, 464, 0, + 0, 60, 177, 0, 0, 46, 47, 0, 48, 8, + 0, 0, 9, 0, 11, 0, 10, 1, 25, 18, + 14, 0, 17, 13, 12, 27, 0, 35, 7, 34, + 19, 0, 21, 0, 0, 24, 0, 20, 22, 0, + 0, 23, 619 }; const short QmlJSGrammar::goto_default [] = { - 7, 1073, 113, 24, 875, 858, 770, 1069, 1084, 1065, - 1068, 1072, 1070, 1077, 28, 942, 1074, 33, 1071, 1089, - 1027, 1081, 898, 897, 912, 876, 877, 878, 905, 999, + 7, 1077, 113, 24, 875, 858, 770, 1073, 1088, 1069, + 1072, 1076, 1074, 1081, 28, 942, 1078, 33, 1075, 1093, + 1028, 1085, 898, 897, 912, 876, 877, 878, 905, 1000, 911, 879, 111, 956, 961, 945, 131, 480, 129, 134, - 167, 143, 162, 978, 1039, 1038, 881, 882, 974, 886, - 884, 883, 880, 864, 863, 166, 982, 27, 13, 275, + 167, 143, 162, 979, 1043, 1042, 881, 882, 974, 886, + 884, 883, 880, 864, 863, 166, 983, 27, 13, 275, 204, 318, 319, 39, 30, 9, 38, 25, 18, 26, 40, 86, 21, 132, 311, 373, 727, 725, 119, 362, 737, 12, 714, 960, 713, 710, 322, 962, 523, 522, @@ -474,580 +475,512 @@ const short QmlJSGrammar::goto_default [] = { }; const short QmlJSGrammar::action_index [] = { - 430, 3137, 359, 14, -134, 2520, 182, 21, 252, -134, - -134, -74, -134, -134, 22, -23, -56, 498, -134, 265, - -134, -68, 609, -134, 23, -134, -134, -67, -134, 1527, - -134, 30, -15, 504, -134, 358, -134, -134, -134, -134, - -134, 545, 369, 493, -134, 1248, -134, 2891, -134, -134, - -134, -134, 1045, 1144, -134, -134, 6158, 3878, 4619, 2891, - 2891, -134, 2152, 2891, -134, -134, -134, -134, -134, 2891, - 2891, -134, -134, -134, -134, -134, -134, -134, -134, 3137, - -134, 2891, -134, 2891, 2891, 3383, -134, -134, -134, 0, - -134, 2891, 2891, -134, -134, 227, 426, -134, -134, 2891, - -134, -134, -134, -134, 419, -134, 3506, -134, 59, -134, - -134, 6808, 45, -134, 391, -134, -134, -134, -10, -134, - 87, 46, 6, -134, -134, 268, -134, -134, -134, -134, - 491, -134, 342, 326, -134, -134, -134, 1330, 94, 49, - 573, -134, 321, -134, 1560, 1402, 267, -134, 66, 70, - 434, 68, 3014, -134, 69, 3014, 73, -134, 71, 74, - 4250, -134, -134, -134, 1194, 222, -134, -134, -134, -134, - 4373, -134, 81, -134, 86, -134, -134, 2891, 478, 2891, - -134, -134, -134, -134, 593, 2891, 2274, -134, -134, 2891, - -134, -134, -134, 408, 2891, 2891, 2891, 190, 214, 221, - 435, 209, 2396, -134, -134, 122, 5118, 3014, -134, -134, + 413, 2929, 356, 2, -134, 2435, 195, 17, 211, -134, + -134, -77, -134, -134, 21, -26, -59, 479, -134, 198, + -134, -71, 446, -134, 18, -134, -134, -68, -134, 1114, + -134, 30, -18, 601, -134, 392, -134, -134, -134, -134, + -134, 538, 482, 409, -134, 1032, -134, 2806, -134, -134, + -134, -134, 903, 874, -134, -134, 6073, 3796, 4534, 2806, + 2806, -134, 2189, 2806, -134, -134, -134, -134, -134, 2806, + 2806, -134, -134, -134, -134, -134, -134, -134, -134, 2929, + -134, 2806, -134, 2806, 2806, 3919, -134, -134, -134, 0, + -134, 2806, 2806, -134, -134, 303, 338, -134, -134, 2806, + -134, -134, -134, -134, 348, -134, 3298, -134, 51, -134, + -134, 6463, 42, -134, 360, -134, -134, -134, -12, -134, + 85, 46, 13, -134, -134, 232, -134, -134, -134, -134, + 457, -134, 364, 243, -134, -134, -134, 1371, 91, 54, + 545, -134, 482, -134, 1259, 1186, 192, -134, 60, 66, + 444, 65, 3052, -134, 67, 3052, 73, -134, 72, 74, + 3670, -134, -134, -134, 1136, 217, -134, -134, -134, -134, + 4288, -134, 81, -134, 78, -134, -134, 2806, 440, 2806, + -134, -134, -134, -134, 560, 2806, 1945, -134, -134, 2806, + -134, -134, -134, 482, 2806, 2806, 2806, 193, 188, 299, + 456, 207, 2311, -134, -134, 129, 1554, 3052, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, - 220, 3014, -134, -134, 5118, 3014, -134, 293, -134, 492, - 137, 3260, 129, 131, -134, 3014, 4001, -134, 3014, -134, - -134, -134, -134, 2274, -134, 318, 2274, -134, -134, 345, - 2891, 139, 2891, 144, 3014, 2891, 146, 3014, -134, 142, - 2891, 152, 2891, 147, -134, -134, -134, -134, 6548, -134, - -134, 149, 936, -134, -134, 158, -134, 1664, -134, 167, - 168, -134, 169, 170, 1352, 5768, 171, 2274, -134, 173, - -134, -134, -134, 3014, -134, -134, 1664, -134, -134, 180, - 178, -134, 179, -134, -134, -134, 189, -134, 199, -134, - -134, 206, -134, 181, 202, 3014, -134, -134, -134, 5768, - -134, -134, 1456, 187, 185, -134, -134, 177, -134, 176, - 192, -134, 191, 1664, -134, -134, 174, -134, 1664, -134, - -134, -134, -134, -134, 3014, -134, -134, 3014, -134, -134, + 215, 3052, -134, -134, 5033, 3052, -134, 225, -134, 492, + 138, 3421, 134, 131, -134, 3052, 3175, -134, 3052, -134, + -134, -134, -134, 1945, -134, 305, 1945, -134, -134, 345, + 2806, 136, 2806, 142, 3052, 2806, 146, 3052, -134, 144, + 2806, 148, 2806, 151, -134, -134, -134, -134, 6723, -134, + -134, 150, 749, -134, -134, 153, -134, 1579, -134, 165, + 167, -134, 172, 174, 1136, 5683, 177, 1945, -134, 175, + -134, -134, -134, 3052, -134, -134, 1579, -134, -134, 179, + 183, -134, 247, -134, -134, -134, 184, -134, 194, -134, + -134, 202, -134, 191, 201, 3052, -134, -134, -134, 5683, + -134, -134, 1240, 190, 189, -134, -134, 185, -134, 182, + 187, -134, 181, 1579, -134, -134, 180, -134, 1579, -134, + -134, -134, -134, -134, 3052, -134, -134, 3052, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, - 226, -134, -134, 228, -134, -134, -134, 6418, 164, 161, - 3014, 276, 323, -134, -134, 4742, 162, 151, 201, 1642, - 1169, 145, -134, -134, 1163, 140, 3137, -134, 3014, 138, - 136, 3014, 130, -134, -134, 3014, -134, -134, 238, -134, - -134, 3137, 3014, 3137, -134, 215, -134, -134, -134, 121, - 246, 113, -134, 344, -134, 1456, 111, 100, -134, 97, - -134, -134, 3137, -134, -134, -134, 3014, 78, 3014, 61, - -134, -134, 120, 82, -134, 83, 361, -134, -134, 1352, - 120, 65, -134, 63, 3014, 18, 3014, 7, -134, -134, - -134, -134, -134, 11, -134, -134, 200, -134, 907, -134, - -134, 1456, -134, 733, -134, -134, 26, 1664, -134, -5, - 24, -134, -134, -3, -134, -134, 120, 39, 35, -134, - 32, 1352, -134, -61, 10, 1908, 6028, -134, -22, -134, - 6028, 5898, -134, -12, 5768, -134, 5768, 5768, -19, -134, - -134, -134, -134, 1664, -134, -49, 120, -26, -134, -50, - -134, -32, -60, -7, -33, -134, -54, -134, -31, 1352, - -134, -134, -53, 120, -24, -134, -46, -134, -25, 1664, - -47, 120, -18, -134, -40, -134, -134, 3014, 272, -134, - 8, -134, -134, 248, -134, 3014, 320, -4, -134, 28, - -134, 29, 319, 3014, -134, 33, 34, -134, -14, -134, - -134, -134, 232, -134, -134, 441, -134, 374, 36, -134, - 13, 19, -134, 1219, -134, -134, -2, 27, -134, -134, - 3014, 328, -134, -134, 3014, 217, -134, -134, -134, 3014, - -134, 120, 50, 62, -134, 55, -134, -134, 1345, -134, - -134, -134, 6808, -134, 2891, 609, 2891, 549, 2891, 2274, - 365, -134, 2891, 15, 2891, 89, 5118, 3014, 3260, -134, - -134, 317, -134, 58, -134, 3014, 2891, 90, 3137, -134, - 64, 2891, 98, 2891, 72, 3260, 76, -134, 3260, 84, - -134, 9, 88, 91, 6028, 92, -134, 6028, 93, -134, - -134, -134, 96, 1664, 1664, 102, 112, 105, -134, 104, - -134, 107, 119, 108, -134, 109, -134, 110, 1664, 1664, - 116, 123, -134, 118, -134, 124, 125, -134, 126, -134, - -134, 418, -134, -134, 298, 302, -134, -134, 6288, -134, - -134, -134, 3014, -134, -134, 327, 4127, 184, 160, -134, - 4496, -134, -134, 3137, -134, -134, -134, -134, -134, 154, - 294, -134, -134, 3752, -134, 159, -134, -134, -134, 483, - -134, -134, -134, -134, 403, 3137, -134, -134, 355, -134, - -134, -134, -134, -134, 3137, -134, 2891, -134, 197, 195, - -134, -134, -134, -134, 348, -134, 557, 1531, -134, -134, - -134, -134, 175, -134, 5638, 175, -134, -134, 172, -134, - -134, 3629, -134, 429, -134, -134, 1101, -134, -134, 979, - -134, -134, -134, 961, 1664, 165, 166, 157, -134, 163, - -134, 1664, 156, 155, -134, 153, -134, 150, 6028, 148, - -134, -134, 307, -112, -134, 5378, -134, -134, -134, 5118, - -134, -134, -134, 141, -134, 143, -134, -134, -134, 5508, - 20, -134, 303, -134, -134, 16, -134, -134, 315, -134, - 857, -134, 5248, -134, -134, -134, 803, -134, -134, -134, - 134, -134, 936, -134, -134, 135, 133, 203, 132, 216, - 211, 407, 127, 580, 128, -134, -134, 2520, -134, -134, - -134, -134, -134, -134, -134, 347, -134, -134, 115, 1664, - 114, 117, 106, -134, 99, -134, -134, -134, 196, 101, - 2768, -134, -134, -134, -134, 2644, -134, -134, 103, 1786, - -134, 95, -134, 414, 85, -134, -134, -134, 75, -134, - -134, 651, 390, -134, 251, 79, 713, -134, 235, -134, + 227, -134, -134, 233, -134, -134, -134, 6333, 168, 166, + 3052, 249, 346, -134, -134, 4657, 163, 155, 273, 1483, + 1136, 149, -134, -134, 1136, 147, 2929, -134, 3052, 141, + 140, 3052, 137, -134, -134, 3052, -134, -134, 257, -134, + -134, 2929, 3052, 2929, -134, 216, -134, -134, -134, 130, + 125, 123, -134, 439, -134, 1357, 116, 108, -134, 105, + -134, -134, 2929, -134, -134, -134, 3052, 92, 3052, 70, + -134, -134, 103, 88, -134, 93, 435, -134, -134, 1240, + 87, 71, -134, 64, 3052, 19, 3052, 11, -134, -134, + -134, -134, -134, 7, -134, -134, 281, -134, 928, -134, + -134, 1136, -134, 818, -134, -134, 38, 1373, -134, -3, + 43, -134, -134, 1, -134, -134, 47, 45, 35, -134, + 34, 1136, -134, -55, 9, 1823, 5943, -134, -19, -134, + 5943, 5813, -134, -6, 5683, -134, 5683, 5683, -16, -134, + -134, -134, -134, 1579, -134, -46, 8, 43, -134, -48, + -134, -30, -58, -4, 43, -134, -57, -134, -36, 1240, + -134, -134, -56, -2, 43, -134, -49, -134, -27, 1579, + -50, 6, 43, -134, -43, -134, -134, 3052, 212, -134, + 4, -134, -134, 208, -134, 3052, 220, -7, -134, 24, + -134, 25, 228, 3052, -134, 31, 28, -134, -20, -134, + -134, -134, 224, -134, -134, 370, -134, 287, 29, -134, + 10, 16, -134, 1007, -134, -134, -5, 22, -134, -134, + 3052, 300, -134, -134, 3052, 320, -134, -134, -134, 3052, + -134, 56, 48, 59, -134, 52, -134, -134, 1129, -134, + -134, -134, 6463, -134, 2806, 459, 2806, 523, 2806, 1945, + 482, -134, 2806, 15, 2806, 89, 5033, 3052, 3421, -134, + -134, 236, -134, 57, -134, 3052, 2806, 96, 2929, -134, + 61, 2806, 106, 2806, 63, 3421, 68, -134, 3421, 69, + -134, 75, 83, 90, 5943, 77, -134, 5943, 94, -134, + -134, -134, 99, 1579, 1579, 98, 113, 104, -134, 101, + -134, 102, 114, 107, -134, 109, -134, 115, 1412, 1579, + 117, 120, -134, 118, -134, 121, 127, -134, 124, -134, + -134, 425, -134, -134, 245, 374, -134, -134, 6203, -134, + -134, -134, 3052, -134, -134, 335, 3547, 284, 161, -134, + 4411, -134, -134, 2929, -134, -134, -134, -134, -134, 154, + 295, -134, -134, 4042, -134, 159, -134, -134, -134, 485, + -134, -134, -134, -134, 384, 2929, -134, -134, 406, -134, + -134, -134, -134, -134, 2929, -134, 2806, -134, 206, 203, + -134, -134, -134, -134, 375, -134, 577, 1475, -134, -134, + -134, -134, 186, -134, 5423, 178, -134, -134, 176, -134, + -134, 4165, -134, 377, -134, -134, 978, -134, -134, 957, + -134, -134, -134, 1032, 1579, 173, 169, 171, -134, 247, + -134, 1579, 164, 160, -134, 158, -134, 157, 5943, 156, + -134, -134, 304, 152, -134, 5163, -134, -134, -134, 5033, + -134, -134, -134, 145, -134, 162, -134, -134, -134, 5553, + 143, -134, 314, -134, -134, 12, -134, -134, 312, -134, + 928, -134, 5293, -134, -134, -134, 928, -134, -134, -134, + 139, -134, 698, -134, -134, 135, 133, 209, 132, 238, + 221, 389, 128, 599, 126, -134, -134, 2435, -134, -134, + -134, -134, -134, -134, -134, 411, -134, -134, 122, 1579, + 112, 119, 110, -134, 100, -134, -134, -134, 196, 97, + 2559, -134, -134, -134, -134, 2683, -134, -134, 111, 1701, + -134, 95, -134, 390, 79, -134, -134, -134, 76, -134, + -134, 824, 405, -134, 222, 86, 705, -134, 223, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, - -134, 339, -134, -134, 4988, 277, -134, -134, -134, -134, - 60, 3014, -134, -134, -134, -134, -134, 6678, 80, 77, - -134, 300, 67, 364, 240, -134, 231, -134, -134, -134, - -134, 3014, -134, -134, -134, -134, 409, -134, 705, 205, - 51, 53, 218, 56, 47, -134, 54, 44, -134, 17, - -134, 41, 632, 349, 204, 607, 351, 43, 1786, 207, - -134, 1786, 193, -134, -134, 346, -134, 4988, 525, 42, - 188, -134, 353, -134, -134, -134, -134, 37, 832, 400, - 292, 713, 335, 57, -134, 4988, 531, 256, -8, 337, - -134, -134, -134, 363, -134, 875, 52, 48, 40, -11, - 832, 389, 31, 806, 38, 832, 410, 25, -134, 224, - -134, -134, -134, -134, -134, 1786, 4865, -134, 3878, 5, - 308, -134, -134, 2, -134, -134, 1786, 1040, 230, 2030, - -134, 396, -134, -134, -134, 439, -134, 250, -134, -134, - -134, -134, 2030, -134, -134, -134, -134, 713, 4, 379, - 208, -134, -30, -134, -134, 600, 186, -134, -134, + -134, 391, -134, -134, 4780, 237, -134, -134, -134, -134, + 58, 3052, -134, -134, -134, -134, -134, 6593, 84, 82, + -134, 298, 80, 332, 260, -134, 262, -134, -134, -134, + -134, 3052, -134, -134, -134, -134, 329, -134, -134, 625, + 270, 49, 50, 339, 62, 44, -134, 55, 20, -134, + 14, -134, 40, 642, 323, 326, 705, 359, 41, 1701, + 330, -134, 1701, 272, -134, -134, 342, -134, 4780, 515, + 37, 268, -134, 333, -134, -134, -134, -134, 32, 824, + 337, 302, 705, 367, 53, -134, 4780, 508, 258, -15, + 347, -134, -134, -134, -134, -134, 23, 331, -134, 755, + 170, 39, 36, -17, 824, 357, 27, 799, 33, 824, + 361, 26, -134, 235, -134, -134, -134, -134, -134, 1701, + 4903, -134, 3796, 5, 231, -134, -134, -1, -134, -134, + 1701, 928, 200, 2067, -134, 410, -134, -134, -134, 448, + -134, 213, -134, -134, -134, -134, 2067, -134, -134, -134, + -134, 574, 3, 322, 199, -134, -39, -134, -134, 556, + 197, -134, -134, - -238, 221, 177, 179, 208, 796, -238, -238, -238, -238, - -238, -238, -238, -238, -238, -238, -238, -53, -238, -238, - -238, -238, -96, -238, -238, -238, -238, -238, -238, -238, - -238, -238, -238, -44, -238, -238, -238, -238, -238, -238, - -238, -89, -238, -238, -238, 160, -238, 691, -238, -238, - -238, -238, 166, 168, -238, -238, 292, 150, 159, 644, - 635, -238, 632, 576, -238, -238, -238, -238, -238, 565, - 554, -238, -238, -238, -238, -238, -238, -238, -238, 520, - -238, 533, -238, 593, 675, 492, -238, -238, -238, -238, - -238, 512, 498, -238, -238, -238, -238, -238, -238, 472, - -238, -238, -238, -238, -238, -238, 462, -238, -238, -152, - -238, -11, -238, -238, 215, -238, -238, -238, -238, -238, + -238, 224, 247, 241, 286, 805, -238, -238, -238, -238, + -238, -238, -238, -238, -238, -238, -238, -46, -238, -238, + -238, -238, -82, -238, -238, -238, -238, -238, -238, -238, + -238, -238, -238, -30, -238, -238, -238, -238, -238, -238, + -238, -70, -238, -238, -238, 250, -238, 699, -238, -238, + -238, -238, 248, 240, -238, -238, 267, 222, 220, 660, + 641, -238, 659, 601, -238, -238, -238, -238, -238, 598, + 584, -238, -238, -238, -238, -238, -238, -238, -238, 509, + -238, 556, -238, 538, 574, 500, -238, -238, -238, -238, + -238, 520, 688, -238, -238, -238, -238, -238, -238, 499, + -238, -238, -238, -238, -238, -238, 470, -238, -238, -113, + -238, 48, -238, -238, 221, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, - -238, -238, 34, -238, -238, -238, -238, -88, -238, -238, - -238, -238, -238, -238, 234, 240, 40, 255, -238, -238, - 211, -238, -16, -238, -238, -7, 41, -238, -238, -238, - 6, -238, -238, -238, 351, 72, -238, -238, -238, -114, - 19, -238, -95, -72, -69, -238, -238, 415, -238, 529, - -238, -238, -238, -238, -238, 524, 735, -238, -238, 460, - -238, -238, -238, -238, 404, 391, 375, -238, -238, -238, - 63, -238, 481, -238, -238, -238, 258, 62, -238, -238, + -238, -238, 115, -238, -238, -238, -238, -1, -238, -238, + -238, -238, -238, -238, 219, 213, 133, 217, -238, -238, + 167, -238, 93, -238, -238, 96, 139, -238, -238, -238, + 102, -238, -238, -238, 335, 175, -238, -238, -238, -4, + 82, -238, -32, -39, -45, -238, -238, 416, -238, 452, + -238, -238, -238, -238, -238, 468, 909, -238, -238, 486, + -238, -238, -238, -238, 498, 515, 497, -238, -238, -238, + -23, -238, 392, -238, -238, -238, 238, -42, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, - -238, 64, -238, -238, 250, 66, -238, -238, -238, 69, - -238, 67, -238, -238, -238, 68, 70, -238, 71, -238, - -238, -238, -238, 788, -238, -238, 799, -238, -238, -238, - 373, -238, 541, -238, 76, 354, -238, 77, -238, -238, - 361, -238, 362, -238, -238, -238, -238, 261, 101, -238, - -238, 106, 201, -238, -238, -238, -238, 313, -238, -238, - 74, -238, -238, -238, 307, 304, 84, 806, -238, 83, - -238, -238, -238, 90, -238, -238, 461, -238, -238, 119, - -9, -8, -14, -238, -238, -238, 92, -238, -238, -238, - -238, -238, -238, -238, -238, 108, -238, -238, -238, 505, - -238, -238, 300, 95, 96, -238, -238, -238, -238, -238, - -238, -238, -238, 448, -238, -238, 136, -238, 653, -238, - -238, -238, -238, -238, 118, -238, -238, 123, -238, -238, + -238, 56, -238, -238, 255, -63, -238, -238, -238, -60, + -238, -55, -238, -238, -238, -54, -51, -238, -49, -238, + -238, -238, -238, 812, -238, -238, 759, -238, -238, -238, + 350, -238, 356, -238, -31, 362, -238, -27, -238, -238, + 363, -238, 463, -238, -238, -238, -238, 270, 8, -238, + -238, 120, 210, -238, -238, -238, -238, 300, -238, -238, + 4, -238, -238, -238, 314, 316, 41, 723, -238, 25, + -238, -238, -238, 54, -238, -238, 442, -238, -238, 71, + -57, -56, -53, -238, -238, -238, 46, -238, -238, -238, + -238, -238, -238, -238, -238, 76, -238, -238, -238, 413, + -238, -238, 331, 65, 66, -238, -238, -238, -238, -238, + -238, -238, -238, 385, -238, -238, 145, -238, 591, -238, + -238, -238, -238, -238, 85, -238, -238, 90, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, - 183, -238, -238, 184, -238, -238, -238, 143, -238, -238, - 131, -238, 187, -238, -238, 652, -238, -238, -238, 20, - 337, -238, -238, -238, 283, -238, 348, -238, 140, -238, - -238, 141, -238, 214, -238, 122, -238, -238, -238, 205, - -238, 494, 117, 504, -238, -238, 219, -238, -238, 120, - -238, 91, -238, -238, -238, 302, 116, 89, -238, 85, - -238, -238, 456, -238, -238, -238, 171, -238, 172, -238, - 239, -238, 103, 82, -238, -238, -238, -238, -238, 367, - 100, 82, -238, -238, 175, -238, 188, -238, 260, -238, - -238, -238, 7, -238, -238, -238, 135, -238, 226, -238, - -238, 359, -238, 248, -238, -238, -57, 296, -238, -238, - -52, -238, -238, -238, -238, -238, 75, -238, 50, -238, - -238, 407, -238, -66, -238, 262, 81, -238, -238, -238, - 257, 246, -238, -238, 244, -238, 242, 233, -238, -238, - -238, -238, -238, 237, -238, -238, 59, -68, -70, -74, - -238, -238, -238, 58, -73, -75, -79, -238, -238, 267, - -238, -238, -238, 55, -80, -82, -85, -238, -93, 329, - -238, 47, -91, -97, -99, -238, -238, 31, -238, 206, - -238, 272, -238, 79, -238, 18, -238, -238, -238, -238, - -238, -103, -238, 17, -238, -101, -238, -238, -238, -238, - -76, -238, -238, -77, -238, 65, -238, -238, -115, -238, - -238, 42, -238, 339, -238, -238, -238, 38, -238, -238, - -1, -238, 270, -238, -5, -238, 266, -238, -238, -13, - -238, 5, -22, -238, -238, -33, -238, -238, 381, -238, - -238, -238, 1, -238, 612, -64, 621, -62, 459, 983, - -238, -238, 648, -238, 682, -238, 186, -30, 164, -238, - -238, -238, -238, -238, -238, -37, 664, -238, 323, -238, - -238, 563, -238, 590, -238, 153, -238, -238, 152, -238, - -238, -174, -176, -178, 162, -184, -238, 158, -187, -238, - -238, -238, -238, 290, 288, -238, -40, -175, -177, -179, - -238, -238, -45, -180, -183, -186, -238, -194, 286, 279, - -238, -190, -200, -202, -238, -238, -193, -203, -205, -238, - -238, -86, -238, -238, -238, -238, -238, -238, 353, -238, - -238, -238, -71, -238, -238, -238, -67, -238, -63, -238, - 142, -238, -238, 389, -238, -238, -238, -238, -238, -238, - -238, -238, -238, 253, -238, -238, -238, -238, -238, -38, - -238, -238, -238, -238, -238, 454, -238, -238, -55, -238, - -238, -238, -238, -238, 398, -238, 399, -238, 37, 39, - -238, -238, -238, -238, 331, -238, 319, 327, -238, -238, - -238, -238, -238, -238, 216, -155, -238, -238, -153, -238, - -238, -4, -238, 458, -238, -238, 222, -238, -238, 356, - -238, -238, -238, 349, 345, -238, 26, -104, -102, -105, - -238, 341, -238, -98, -106, -100, -238, -110, 220, -109, - -238, -238, -238, -238, -238, 309, -238, -238, -238, 228, - -238, -238, -238, -107, -238, -238, -238, -238, -238, 320, - -238, -238, 60, -238, -238, -238, -238, -238, -238, -238, - 265, -238, 363, -238, -238, -238, 294, -238, -238, -238, - 254, -238, 252, -238, -238, -238, -238, 343, -238, 212, - 209, 114, 400, 109, -238, -238, -238, 857, -238, -238, - -238, -238, -238, -238, -238, -238, -238, -238, -238, 298, - -238, 107, -24, -23, -25, -238, -238, -238, 151, -238, - 853, -238, -238, -238, -238, 820, -238, -238, -238, 686, - -238, -238, -238, 154, 147, -238, -238, -238, -238, -238, - -238, 185, 163, -238, -238, -238, 173, -238, 170, -238, + 159, -238, -238, 160, -238, -238, -238, 126, -238, -238, + 114, -238, 179, -238, -238, 718, -238, -238, -238, 13, + 340, -238, -238, -238, 342, -238, 324, -238, 130, -238, + -238, 134, -238, 195, -238, 122, -238, -238, -238, 204, + -238, 325, -73, 336, -238, -238, 206, -238, -238, 124, + -238, 98, -238, -238, -238, 338, 119, 88, -238, 84, + -238, -238, 346, -238, -238, -238, 141, -238, 142, -238, + 211, -238, 109, 73, -238, -238, -238, -238, -238, 374, + 95, 73, -238, -238, 143, -238, 144, -238, 216, -238, + -238, -238, 0, -238, -238, -238, 140, -238, 166, -238, + -238, 366, -238, 168, -238, -238, -48, 328, -238, -238, + -50, -238, -238, -238, -238, -238, 78, -238, 57, -238, + -238, 425, -238, -65, -238, 297, 79, -238, -238, -238, + 187, 197, -238, -238, 256, -238, 193, 199, -238, -238, + -238, -238, -238, 194, -238, -238, 63, -68, -66, -69, + -238, -238, -238, 61, -72, -75, -79, -238, -238, 302, + -238, -238, -238, 52, -81, -84, -86, -238, -94, 263, + -238, 49, -87, -98, -100, -238, -238, 30, -238, 257, + -238, 259, -238, 86, -238, 26, -238, -238, -238, -238, + -238, -93, -238, 21, -238, -95, -238, -238, -238, -238, + -71, -238, -238, -76, -238, 67, -238, -238, -111, -238, + -238, 43, -238, 291, -238, -238, -238, 39, -238, -238, + 2, -238, 260, -238, -2, -238, 264, -238, -238, -11, + -238, 6, -22, -238, -238, -33, -238, -238, 526, -238, + -238, -238, 5, -238, 581, -59, 638, -61, 473, 784, + -238, -238, 667, -238, 679, -238, 223, -29, 231, -238, + -238, -238, -238, -238, -238, -36, 669, -238, 364, -238, + -238, 665, -238, 657, -238, 232, -238, -238, 233, -238, + -238, -172, -174, -175, 242, -184, -238, 246, -186, -238, + -238, -238, -238, 284, 282, -238, -40, -177, -176, -178, + -238, -238, -44, -179, -181, -183, -238, -190, 280, 265, + -238, -188, -198, -200, -238, -238, -191, -202, -204, -238, + -238, -85, -238, -238, -238, -238, -238, -238, 475, -238, + -238, -238, -74, -238, -238, -238, 87, -238, -67, -238, + 239, -238, -238, 334, -238, -238, -238, -238, -238, -238, + -238, -238, -238, 253, -238, -238, -238, -238, -238, -41, + -238, -238, -238, -238, -238, 360, -238, -238, -58, -238, + -238, -238, -238, -238, 417, -238, 439, -238, 34, 35, + -238, -238, -238, -238, 507, -238, 521, 288, -238, -238, + -238, -238, -238, -238, 212, -159, -238, -238, -157, -238, + -238, -6, -238, 480, -238, -238, 207, -238, -238, 293, + -238, -238, -238, 295, 308, -238, 24, -107, -112, -108, + -238, 310, -238, -103, -110, -109, -238, -106, 200, -114, + -238, -238, -238, -238, -238, 278, -238, -238, -238, 198, + -238, -238, -238, -105, -238, -238, -238, -238, -238, 318, + -238, -238, 11, -238, -238, -238, -238, -238, -238, -238, + 320, -238, 450, -238, -238, -238, 322, -238, -238, -238, + 201, -238, 189, -238, -238, -238, -238, 337, -238, 184, + 174, 108, 435, 183, -238, -238, -238, 862, -238, -238, + -238, -238, -238, -238, -238, -238, -238, -238, -238, 333, + -238, 110, -26, -24, -21, -238, -238, -238, 154, -238, + 833, -238, -238, -238, -238, 834, -238, -238, -238, 620, + -238, -238, -238, 150, 163, -238, -238, -238, -238, -238, + -238, 182, 161, -238, -238, -238, 178, -238, 177, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, - -238, -238, -238, 139, 770, 149, -238, -238, -238, -238, - 130, 127, -238, -238, -238, 224, -238, 102, -238, -238, - -238, -238, -238, 78, 138, -238, 360, -238, -238, -238, - -238, 73, -238, -238, -238, -238, -238, -238, 121, -238, + -238, -238, -238, 117, 771, 132, -238, -238, -238, -238, + 100, 99, -238, -238, -238, 205, -238, 59, -238, -238, + -238, -238, -238, -5, 62, -238, 55, -238, -238, -238, + -238, -20, -238, -238, -238, -238, -238, -238, -238, 12, -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, - -238, -238, 113, 88, -238, 112, 115, -238, 729, -238, - -238, 640, 111, -238, -238, -238, 80, 922, 43, 86, - 87, -238, 53, -238, -238, -238, -238, -238, 61, 33, - -238, 51, 54, -238, 30, 896, -10, 45, 12, -238, - -238, -238, -238, 35, -238, 232, -238, -238, -238, -238, - 28, 4, -238, 207, -238, 24, -3, -238, -238, 23, - -238, -238, -238, -238, 204, 657, 881, -238, 762, 15, - -238, -238, -238, 13, -238, -238, 530, 22, 223, 804, - -238, 16, -238, -238, -238, -41, -238, 14, -238, -238, - -238, -238, 745, -238, -238, -238, -238, 3, -238, 0, - -6, -238, -238, -238, -238, -12, 137, -238, -238 + -238, -238, -238, 23, 3, -238, 32, 40, -238, 637, + -238, -238, 670, 58, -238, -238, -238, 70, 912, 37, + 301, 112, -238, 107, -238, -238, -238, -238, -238, 180, + 162, -238, 181, 176, -238, 156, 905, 118, 170, 165, + -238, -238, -238, -238, -238, -238, -238, 137, -238, 202, + -238, -238, -238, -238, 106, 75, -238, 215, -238, 72, + 44, -238, -238, 64, -238, -238, -238, -238, 228, 666, + 1130, -238, 606, 50, -238, -238, -238, 36, -238, -238, + 544, 45, 266, 798, -238, 42, -238, -238, -238, -15, + -238, 38, -238, -238, -238, -238, 761, -238, -238, -238, + -238, 20, -238, 19, 18, -238, -238, -238, -238, -7, + -3, -238, -238 }; const short QmlJSGrammar::action_info [] = { - 317, 110, 543, 176, 829, 542, 549, 176, 110, 553, - 110, 176, 498, 536, -569, 561, 110, 505, -126, 1092, - 1093, 1098, 105, 634, 571, 533, 642, 644, -530, -132, - 579, 416, 663, 583, 583, 530, 900, 661, 583, 900, - 925, 590, 515, 589, 517, 1046, 925, 511, 1043, 323, - 603, 1049, 323, 482, 505, -107, 601, 500, 110, 1041, - 607, 482, 976, 498, 1024, 990, 766, 323, 484, 478, - 628, 987, 323, 989, 971, 1019, 900, 986, 998, 993, - 452, 476, 452, 983, -193, 981, 169, -195, 177, 282, - 634, 469, 988, 110, 955, 280, 292, 658, 644, 452, - 663, 290, 176, 405, 482, 567, 575, 482, 610, 927, - 909, 614, 515, 922, 452, 110, 661, 452, 317, 317, - 654, 642, 517, 460, 317, 517, 317, 317, 317, 900, - 323, 902, 850, 684, -571, 0, 856, 266, 667, 110, - 110, 458, 110, 176, 251, 177, 670, 498, 0, 530, - 530, 842, 889, 287, 292, 976, 176, 110, 1033, 110, - 273, 176, 980, 908, 686, 896, 176, 272, 364, 692, - 416, 0, 304, 317, 317, 505, 891, 326, 701, 364, - 0, 0, 364, 505, 517, 323, 706, 317, 0, 110, - 323, 110, 423, 270, 290, 307, 280, 1012, 400, 372, - 366, 421, 323, 474, 323, 530, 323, 349, 456, 352, - 505, 899, 110, -197, 418, 1001, 742, 0, 813, 925, - 176, 746, 282, 251, 254, 251, 984, 806, 251, 995, - 900, 91, 329, 426, 365, 358, 176, 0, 351, 593, - 251, 790, 738, 92, 255, 399, 251, 788, 498, 296, - 295, 296, 295, 683, 445, 91, 296, 295, 296, 295, - 296, 295, 91, 296, 295, 1002, 925, 92, 296, 295, - 97, 296, 295, 913, 92, 985, 926, 436, 252, 616, - 251, 788, 98, 733, 251, 296, 295, 296, 295, 296, - 295, 296, 295, 91, 296, 295, 1066, 1067, 296, 295, - 429, 251, 743, 296, 295, 92, 718, 925, 963, 722, - 914, 296, 295, 296, 295, 825, 1001, 1021, 427, 296, - 295, 655, -197, 852, 284, 251, 276, 44, 251, 586, - 296, 295, 44, 297, 569, 728, 251, 839, 402, 533, - 296, 295, 997, 277, 1066, 1067, 943, 194, -573, 195, - 251, 258, -241, 1006, 1054, 719, 744, 964, 997, -574, - 196, 323, 656, 416, 826, 285, 1061, 923, 840, -240, - 100, 194, 853, 195, 0, 652, 587, 0, 452, 923, - 600, 900, 577, 1017, 196, 729, 296, 295, 0, 0, - 612, 194, 0, 195, 601, 194, -413, 195, 296, 295, - 1035, -413, 296, 295, 196, 296, 295, -241, 196, 296, - 295, 416, 965, 0, 296, 295, 920, 101, 404, 923, - 923, 966, -132, 102, -240, -197, 296, 295, 920, 919, - 923, 100, 920, 967, 194, 323, 195, 991, 100, 923, - 923, 919, 296, 295, 918, 919, 1088, 196, -413, 251, - 206, 494, 304, 776, 206, -197, 494, 304, 0, 296, - 295, 0, 777, 0, 776, 0, 755, 756, 920, 920, - 207, 0, 0, 777, 207, 0, 0, 1055, 101, 920, - 0, 919, 919, 0, 102, 101, 920, 0, 920, 920, - 0, 102, 919, 920, 0, 1095, 180, 181, 206, 919, - 0, 919, 919, 0, 296, 295, 919, 206, 254, 180, - 181, 0, 1087, 646, 755, 756, 0, 0, 207, 206, - 261, 0, 412, 413, 182, 183, 0, 207, 255, 261, - 668, 803, 0, 647, 0, 648, 493, 182, 183, 207, - 206, 665, 0, 0, 64, 79, 206, 0, 64, 79, - 0, 6, 5, 4, 1, 3, 2, 0, 0, -100, - 207, 0, 665, 0, 0, -100, 207, 783, 665, 187, - 188, 0, 0, 187, 188, 0, 0, 0, 190, 494, - 304, 191, 190, 192, 0, 191, 0, 192, 0, 0, - 1028, 784, 64, 79, 0, 0, 0, 187, 188, 0, - 0, 64, 79, 0, 0, 189, 190, 64, 79, 191, - 932, 192, 0, 64, 79, 0, 0, 187, 188, 0, - 0, 0, 785, 0, 0, 189, 190, 180, 181, 191, - 932, 192, 0, 0, 64, 79, 157, 932, 0, 0, - 64, 79, 0, 0, 0, 412, 413, 925, 0, 0, - 1029, 939, 936, 0, 0, 182, 183, 0, 0, 493, - 0, 639, 932, 0, 0, 639, 925, 0, 0, 0, - 935, 939, 936, 0, 0, 0, 0, 935, 939, 936, - 0, 932, 0, 0, 0, 0, 930, 937, 929, 186, - 0, 0, 0, 0, 0, 0, 0, 933, 931, 938, - 0, 0, 935, 939, 936, 0, 930, 937, 929, 186, - 0, 0, 0, 930, 937, 929, 0, 933, 931, 938, - 925, 935, 939, 936, 933, 931, 938, 0, 0, 0, - 934, 0, 0, 0, 0, 932, 0, 934, 930, 937, - 929, 0, 0, 932, 0, 0, 0, 0, 0, 933, - 931, 938, 0, 0, 0, 0, 0, 930, 937, 929, - 0, 0, 934, 55, 0, 0, 0, 0, 933, 931, - 938, 0, 0, 0, 0, 935, 939, 936, 0, 0, - 0, 934, 0, 935, 939, 936, 0, 0, 0, 0, + 176, 549, -572, 317, 543, 317, 553, 542, 176, 176, + 498, 1097, 561, 317, 505, 317, 536, 1102, 1096, 105, + 571, -129, 634, 642, 644, -533, 416, 579, -135, 583, + 583, 533, 663, 900, 661, 590, 583, 589, 530, 900, + 1050, 925, 925, 517, 1047, 1053, -110, 603, 515, 601, + 482, 323, 323, 511, 317, 976, 482, 607, 505, 500, + 1025, 922, 991, 317, 484, 323, 766, 628, 989, 323, + 1020, 900, 988, 478, 987, 498, 999, 110, 994, 990, + 984, 452, 476, 982, 169, 110, 177, 971, 452, -196, + 634, -198, 955, 292, 317, 280, 282, 405, 644, 176, + 482, 469, 567, 658, 575, 452, 290, 482, 663, 610, + 317, 614, 642, 661, 922, 110, 927, 517, 909, 654, + 317, 317, 452, 317, 517, 452, 317, 902, 850, 900, + 667, 670, 460, 445, 530, 176, 684, 317, 110, -574, + 323, 110, 266, 177, 110, 0, 0, 0, 251, 976, + 292, 530, 498, 287, 110, 458, 1037, 176, 176, 889, + 686, 110, 981, 908, 692, 896, 176, 273, 272, 364, + 842, 416, 317, 304, 891, 505, 317, 1045, 515, 701, + 326, 505, 0, 706, 323, 364, 317, 0, 364, 372, + 307, 517, 323, 270, 110, 366, 290, 0, 1013, 423, + 280, 323, 349, 400, 421, 110, 323, 323, 352, -200, + 474, 899, 456, 530, 0, 505, 742, 110, 418, 282, + 251, 746, 254, 251, 251, 0, 813, 0, 251, 91, + 900, 593, 251, 251, 91, 806, 329, 925, 586, 1002, + 365, 92, 255, 358, 251, 790, 92, 926, 351, 399, + 297, 788, 91, 718, 655, 296, 295, 251, 498, 856, + 296, 295, 296, 295, 92, 251, 296, 295, 829, 296, + 295, 296, 295, 252, 569, 683, 296, 295, 436, 913, + 296, 295, 577, 258, 788, 587, 296, 295, 284, 1065, + 296, 295, 788, 600, 652, 656, 296, 295, 296, 295, + 296, 295, 719, 743, 176, 426, 963, 601, 251, 1070, + 1071, 402, 825, 276, 1070, 1071, 914, 925, -200, 429, + 852, 296, 295, 296, 295, 296, 295, 1022, 251, 285, + 277, 296, 295, 296, 295, 296, 295, 44, 1002, -135, + 91, 925, 738, 728, 296, 295, 97, 985, 839, 1007, + 100, 996, 92, 923, 44, 964, -577, 744, 98, 918, + 100, 826, 612, 1018, 0, -416, 998, 923, 1039, 853, + -416, 194, 251, 195, 998, -576, 0, 1036, 251, 840, + 965, 722, 616, 733, 196, 296, 295, 923, 1003, 966, + 427, 923, 416, 729, 296, 295, 986, 101, 943, 494, + 304, 967, 920, 102, 100, 296, 295, 101, 920, 296, + 295, 533, 920, 102, 416, 919, 920, -416, 1058, 992, + 918, 919, 296, 295, 254, 919, 920, 296, 295, 919, + 296, 295, -200, 296, 295, 923, 920, 0, 1099, 919, + 920, 404, 323, -243, 255, 900, 668, -244, 0, 919, + 0, 101, 452, 919, 296, 295, 323, 102, 180, 181, + 1092, 776, -200, 206, 180, 181, 494, 304, 920, 920, + 777, 206, 0, 296, 295, 180, 181, 180, 181, 803, + 776, 919, 919, 207, 920, 0, 182, 183, 0, 777, + 0, 207, 182, 183, 646, 755, 756, 919, -243, 0, + 206, 0, -244, 182, 183, 182, 183, 206, 194, 0, + 195, 0, 0, 0, 647, 0, 648, 755, 756, 0, + 207, 196, 261, 206, 0, 0, 1091, 207, 0, 261, + 206, 0, 412, 413, 6, 5, 4, 1, 3, 2, + 0, 1059, -103, 207, 0, 665, 493, 187, 188, -103, + 207, 0, 665, 0, 0, 0, 190, 64, 79, 191, + 0, 192, 187, 188, 0, 64, 79, 0, 0, 187, + 188, 190, 0, 0, 191, 0, 192, 189, 190, 0, + 0, 191, 0, 192, 187, 188, 932, 783, 64, 79, + 0, 0, 189, 190, 64, 79, 191, 0, 192, 494, + 304, 64, 79, 0, 932, 0, 0, 0, 0, 1029, + 0, 784, 0, 0, 0, 0, 206, 64, 79, 0, + 0, 0, 0, 0, 64, 79, 935, 939, 936, 932, + 0, 0, 0, 0, 0, 0, 207, 0, 665, 639, + 925, 0, 785, 0, 935, 939, 936, 0, 0, 0, + 0, 0, 0, 0, 639, 932, 157, 925, 0, 0, + 0, 186, 930, 937, 929, 412, 413, 0, 0, 1030, + 939, 936, 932, 933, 931, 938, 186, 0, 0, 493, + 930, 937, 929, 0, 0, 0, 934, 0, 0, 0, + 0, 933, 931, 938, 0, 935, 939, 936, 0, 0, + 0, 0, 0, 0, 934, 930, 937, 929, 0, 0, + 64, 79, 935, 939, 936, 0, 933, 931, 938, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, + 0, 930, 937, 929, 0, 932, 0, 0, 0, 0, + 0, 0, 933, 931, 938, 0, 0, 0, 930, 937, + 929, 0, 0, 0, 0, 934, 0, 0, 0, 933, + 931, 938, 0, 0, 0, 0, 0, 0, 71, 75, + 72, 0, 934, 0, 0, 935, 939, 936, 0, 55, + 0, 0, 0, 0, 0, 1041, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 71, 75, 72, 0, 0, 0, 0, - 0, 930, 937, 929, 0, 0, 0, 0, 0, 930, - 937, 929, 933, 931, 938, 0, 0, 0, 0, 0, - 933, 931, 938, 55, 0, 934, 1037, 76, 0, 51, - 73, 46, 0, 934, 0, 0, 0, 925, 0, 44, - 67, 54, 74, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 932, 68, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 71, 75, 72, 935, 939, 936, 0, - 0, 0, 0, 0, 0, 920, 0, 55, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 919, 0, - 0, 0, 935, 939, 936, 1037, 0, 76, 0, 51, - 73, 46, 930, 937, 929, 0, 0, 0, 0, 44, - 67, 54, 74, 933, 931, 938, 0, 71, 75, 72, - 0, 0, 0, 68, 0, 0, 934, 55, 930, 937, - 929, 0, 0, 0, 0, 935, 939, 936, 0, 933, - 931, 938, 0, 0, 920, 0, 0, 0, 0, 0, - 0, 76, 934, 51, 73, 46, 55, 919, 0, 0, + 0, 0, 76, 0, 51, 73, 46, 0, 0, 0, + 0, 930, 937, 929, 44, 67, 54, 74, 0, 71, + 75, 72, 933, 931, 938, 935, 939, 936, 68, 1041, + 0, 0, 0, 0, 920, 934, 0, 0, 0, 925, + 0, 0, 0, 0, 0, 0, 0, 919, 55, 0, + 0, 0, 0, 76, 932, 51, 73, 46, 0, 0, + 0, 930, 937, 929, 0, 44, 67, 54, 74, 935, + 939, 936, 933, 931, 938, 0, 0, 0, 920, 68, + 0, 0, 0, 0, 0, 934, 0, 0, 71, 75, + 72, 919, 0, 0, 935, 939, 936, 0, 0, 0, + 0, 0, 0, 0, 55, 930, 937, 929, 0, 0, + 0, 498, 0, 0, 0, 0, 933, 931, 938, 0, + 0, 0, 76, 0, 51, 73, 46, 0, 0, 934, + 930, 937, 929, 55, 44, 67, 54, 74, 0, 0, + 683, 933, 931, 938, 71, 75, 72, 0, 68, 0, + 0, 0, 0, 0, 934, 0, 0, 0, 55, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 71, 75, 72, 0, 0, 76, 0, + 51, 73, 46, 0, 0, 0, 0, 55, 0, 0, + 44, 67, 54, 74, 498, 0, 0, 0, 71, 75, + 72, 0, 0, 0, 68, 0, 0, 76, 55, 51, + 73, 46, 0, 0, 0, 804, 0, 0, 0, 44, + 67, 54, 74, 0, 0, 0, 0, 71, 75, 72, + 0, 0, 76, 68, 51, 73, 46, 55, 0, 0, + 0, 315, 316, 0, 44, 67, 54, 74, 71, 75, + 72, 0, 0, 0, 0, 0, 0, 0, 68, 0, + 0, 76, 55, 51, 73, 46, 0, 0, 0, 0, 0, 0, 0, 44, 67, 54, 74, 71, 75, 72, - 0, 930, 937, 929, 0, 0, 0, 68, 0, 0, - 0, 55, 933, 931, 938, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 934, 71, 75, 72, 55, - 0, 76, 0, 51, 73, 46, 498, 0, 0, 0, - 0, 0, 0, 44, 67, 54, 74, 0, 0, 0, - 0, 71, 75, 72, 0, 0, 0, 68, 0, 0, - 76, 0, 51, 73, 46, 0, 0, 0, 0, 71, - 75, 72, 44, 67, 54, 74, 0, 0, 0, 0, - 0, 0, 0, 0, 515, 76, 68, 51, 73, 46, - 55, 0, 0, 0, 0, 55, 0, 44, 67, 54, - 74, 0, 683, 76, 0, 51, 73, 46, 0, 0, - 0, 68, 0, 0, 0, 44, 67, 54, 74, 0, + 0, 0, 76, 0, 51, 73, 46, 68, 0, 0, + 0, 0, 0, 0, 44, 67, 54, 74, 0, 0, + 0, 0, 71, 75, 72, 0, 0, 0, 68, 0, + 0, 76, 0, 51, 73, 46, 0, 375, 0, 0, + 0, 0, 0, 44, 67, 54, 74, 376, 0, 0, + 0, 433, 0, 0, 0, 515, 76, 68, 51, 73, + 46, 378, 0, 379, 0, 0, 0, 0, 44, 67, + 54, 74, 0, 0, 380, 0, 381, 97, 0, 55, + 0, 0, 68, 315, 316, 382, 55, 0, 383, 98, + 315, 316, 0, 0, 384, 0, 0, 0, 0, 0, + 0, 386, 385, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 387, 71, + 75, 72, 0, 0, 0, 0, 71, 75, 72, 0, + 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 76, 0, 51, 73, 46, 0, 0, + 76, 0, 51, 73, 46, 44, 67, 54, 74, 296, + 295, 0, 44, 67, 54, 74, 71, 75, 72, 68, + 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, + 55, 0, 0, 0, 315, 316, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, + 76, 0, 51, 73, 46, 0, 0, 0, 0, 0, + 0, 0, 44, 67, 54, 74, 0, 0, 0, 0, + 71, 75, 72, 0, 0, 0, 68, 0, 0, 0, + 0, 0, 296, 295, 0, 0, 0, 0, 0, 71, + 75, 72, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 76, 0, 51, 73, 46, 0, + 0, 0, 0, 0, 0, 0, 44, 67, 54, 74, + 0, 0, 0, 76, 0, 51, 73, 46, 0, 0, + 68, 0, 0, 0, 375, 44, 67, 54, 74, 0, + 0, 0, 0, 0, 376, 0, 0, 55, 377, 68, + 0, 315, 316, 0, 0, 0, 0, 0, 378, 0, + 379, 0, 0, 55, 0, 0, 0, 315, 316, 0, + 0, 380, 0, 381, 97, 0, 0, 0, 0, 0, + 0, 0, 382, 0, 0, 383, 98, 71, 75, 72, + 0, 384, 0, 0, 0, 0, 0, 0, 386, 385, + 0, 0, 55, 71, 75, 72, 315, 316, 0, 0, + 0, 0, 0, 0, 0, 387, 0, 0, 0, 0, + 0, 76, 0, 51, 73, 46, 0, 0, 0, 0, + 0, 0, 314, 44, 67, 54, 74, 76, 0, 51, + 73, 46, 71, 75, 72, 0, 375, 68, 0, 44, + 67, 54, 74, 0, 0, 0, 376, 0, 0, 0, + 433, 0, 0, 68, 0, 55, 0, 0, 0, 839, + 378, 314, 379, 0, 0, 426, 76, 0, 51, 73, + 46, 0, 0, 380, 0, 381, 97, 0, 44, 67, + 54, 74, 0, 0, 382, 0, 0, 383, 98, 0, + 840, 0, 68, 384, 790, 71, 75, 72, 0, 0, + 386, 385, 0, 0, 0, 0, 0, 0, 212, 213, + 214, 0, 0, 217, 219, 220, 0, 387, 221, 0, + 222, 0, 0, 0, 227, 228, 0, 229, 0, 76, + 0, 51, 73, 46, 55, 230, 232, 233, 0, 0, + 0, 44, 67, 54, 74, 0, 0, 0, 235, 0, + 427, 0, 0, 0, 0, 68, 0, 0, 0, 55, + 0, 0, 0, 315, 316, 238, 0, 0, 0, 0, + 0, 0, 0, 0, 71, 75, 72, 240, 241, 242, + 0, 244, 245, 246, 247, 248, 249, 0, 0, 236, + 243, 226, 216, 234, 0, 218, 237, 0, 0, 71, + 75, 72, 223, 0, 0, 239, 215, 225, 76, 224, + 51, 73, 46, 0, 0, 0, 0, 0, 231, 0, + 44, 67, 54, 74, 0, 0, 0, 0, 314, 0, + 0, 0, 0, 76, 68, 51, 73, 46, 0, 0, + 0, 0, 0, 0, 0, 44, 67, 54, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, - 71, 75, 72, 0, 0, 71, 75, 72, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 55, 0, 0, 0, 0, 0, 0, 804, 0, - 0, 0, 0, 0, 76, 0, 51, 73, 46, 76, - 0, 51, 73, 46, 0, 0, 44, 67, 54, 74, - 0, 44, 67, 54, 74, 0, 0, 0, 0, 0, - 68, 71, 75, 72, 55, 68, 0, 0, 0, 0, - 0, 498, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 55, 0, 0, 0, 315, 316, 55, - 0, 0, 0, 315, 316, 76, 0, 51, 73, 46, - 0, 0, 0, 0, 71, 75, 72, 44, 67, 54, - 74, 0, 0, 0, 55, 0, 0, 0, 315, 316, - 0, 68, 0, 71, 75, 72, 0, 0, 0, 71, - 75, 72, 0, 0, 0, 0, 0, 0, 76, 55, - 51, 73, 46, 315, 316, 0, 0, 0, 0, 0, - 44, 67, 54, 74, 71, 75, 72, 76, 0, 51, - 73, 46, 0, 76, 68, 51, 73, 46, 55, 44, - 67, 54, 74, 0, 0, 44, 67, 54, 74, 71, - 75, 72, 0, 68, 0, 0, 0, 0, 76, 68, - 51, 73, 46, 0, 0, 0, 0, 0, 0, 0, - 44, 67, 54, 74, 0, 0, 0, 0, 71, 75, - 72, 0, 0, 76, 68, 51, 73, 46, 0, 0, - 0, 0, 0, 375, 0, 44, 67, 54, 74, 0, - 0, 0, 0, 376, 0, 0, 0, 377, 0, 68, - 0, 515, 76, 0, 51, 73, 46, 378, 0, 379, - 0, 0, 0, 0, 44, 67, 54, 74, 0, 0, - 380, 0, 381, 97, 0, 55, 0, 0, 68, 315, - 316, 382, 55, 0, 383, 98, 315, 316, 0, 0, - 384, 0, 0, 0, 0, 0, 0, 386, 385, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 387, 71, 75, 72, 0, 0, - 0, 0, 71, 75, 72, 0, 0, 0, 0, 0, - 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, - 0, 51, 73, 46, 0, 0, 76, 0, 51, 73, - 46, 44, 67, 54, 74, 296, 295, 0, 44, 67, - 54, 74, 71, 75, 72, 68, 0, 0, 0, 0, - 0, 0, 68, 0, 0, 0, 55, 0, 0, 0, - 315, 316, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 76, 0, 51, 73, - 46, 0, 0, 0, 0, 0, 0, 0, 44, 67, - 54, 74, 0, 0, 0, 0, 71, 75, 72, 0, - 375, 0, 68, 0, 0, 0, 0, 0, 0, 0, - 376, 0, 0, 0, 433, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 378, 0, 379, 0, 0, 0, - 76, 55, 51, 73, 46, 839, 0, 380, 0, 381, - 97, 0, 44, 67, 54, 74, 0, 0, 382, 0, - 0, 383, 98, 0, 0, 0, 68, 384, 0, 0, - 55, 0, 0, 0, 386, 385, 840, 0, 0, 0, - 790, 71, 75, 72, 0, 0, 0, 0, 0, 0, - 0, 387, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 296, 295, 0, 0, 0, 0, 0, - 71, 75, 72, 0, 0, 76, 0, 51, 73, 46, - 0, 0, 0, 0, 0, 375, 0, 44, 67, 54, - 74, 0, 0, 0, 0, 376, 0, 0, 0, 433, - 0, 68, 0, 0, 76, 0, 51, 73, 46, 378, - 0, 379, 0, 0, 426, 0, 44, 67, 54, 74, - 0, 0, 380, 0, 381, 97, 0, 0, 0, 0, - 68, 0, 0, 382, 55, 0, 383, 98, 315, 316, - 0, 0, 384, 0, 0, 0, 0, 0, 0, 386, - 385, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 387, 0, 0, 0, - 0, 0, 0, 0, 71, 75, 72, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 427, - 0, 0, 0, 314, 0, 0, 0, 0, 76, 0, - 51, 73, 46, 0, 0, 0, 0, 0, 0, 0, - 44, 67, 54, 74, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 0, 0, 0, 48, 49, - 0, 0, 0, 0, 0, 0, 0, 0, 53, 52, - 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, - 56, 57, 0, 58, 0, 0, 0, 0, 0, 0, - 202, 0, 0, 0, 66, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 77, 71, 75, 72, 0, - 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 65, 82, 50, 0, 0, 0, 0, 0, 61, - 0, 0, 0, 0, 0, 0, 0, 78, 45, 0, - 76, 0, 51, 73, 46, 64, 79, 0, 0, 0, - 0, 0, 44, 67, 54, 74, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, - 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, - 53, 52, 0, 0, 0, 0, 0, 0, 55, 0, - 0, 0, 56, 57, 0, 58, 0, 0, 0, 0, - 0, 0, 62, 0, 0, 0, 66, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 77, 71, 75, - 72, 0, 80, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 65, 82, 50, 0, 0, 0, 0, - 0, 61, 0, 0, 0, 0, 0, 0, 0, 78, - 45, 0, 76, 0, 51, 73, 46, 64, 79, 0, - 0, 0, 0, 0, 44, 67, 54, 74, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, - 0, 0, 48, 49, 0, 0, 0, 0, 0, 0, - 0, 0, 53, 52, 0, 0, 0, 0, 0, 0, - 55, 0, 0, 0, 56, 57, 0, 58, 0, 0, - 0, 0, 0, 0, 202, 0, 0, 0, 66, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, - 71, 75, 72, 0, 80, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 65, 82, 50, 0, 0, - 865, 0, 0, 61, 0, 0, 0, 0, 0, 0, - 0, 78, 45, 0, 76, 0, 51, 73, 46, 64, - 79, 0, 0, 0, 0, 0, 44, 67, 54, 74, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 0, 0, 0, 48, 49, 0, 260, 0, 0, - 0, 0, 0, 0, 53, 52, 0, 0, 0, 0, - 0, 0, 55, 0, 0, 0, 56, 57, 0, 58, - 0, 0, 0, 0, 0, 0, 62, 0, 0, 0, - 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 77, 71, 75, 72, 0, 80, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 65, 82, 50, - 0, 0, 0, 0, 0, 61, 0, 0, 0, 0, - 0, 0, 0, 78, 45, 0, 76, 0, 51, 73, - 46, 64, 79, 0, 0, 0, 0, 0, 44, 67, - 54, 74, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 68, 0, 0, 0, 48, 49, 0, 0, - 0, 0, 0, 0, 0, 0, 53, 52, 0, 0, - 0, 0, 0, 0, 55, 0, 0, 0, 56, 57, - 0, 58, 0, 0, 0, 0, 0, 0, 202, 0, - 0, 0, 66, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 77, 71, 75, 72, 0, 80, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, - 82, 50, 0, 0, 0, 0, 203, 61, 0, 0, - 0, 0, 0, 0, 0, 78, 45, 0, 76, 0, - 51, 73, 46, 64, 79, 0, 0, 0, 0, 0, - 44, 67, 54, 74, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 0, 0, 0, 48, 49, - 0, 260, 0, 0, 0, 0, 0, 0, 53, 52, - 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, - 56, 57, 0, 58, 0, 0, 0, 0, 0, 0, - 202, 0, 0, 0, 66, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 77, 71, 75, 72, 0, - 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 65, 82, 50, 0, 0, 0, 0, 0, 61, - 0, 0, 0, 0, 0, 0, 0, 78, 45, 0, - 76, 0, 51, 73, 46, 64, 79, 0, 0, 0, - 0, 0, 44, 67, 54, 74, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, - 867, 0, 48, 49, 0, 0, 0, 0, 0, 0, - 0, 0, 870, 869, 0, 0, 0, 0, 0, 0, - 55, 0, 0, 0, 56, 57, 0, 58, 0, 0, - 0, 0, 0, 0, 202, 0, 0, 0, 66, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, - 871, 874, 872, 0, 80, 0, 0, 0, 0, 157, - 0, 0, 0, 0, 0, 65, 82, 50, 0, 0, - 865, 0, 0, 61, 0, 0, 0, 0, 868, 0, - 0, 78, 45, 0, 76, 0, 51, 873, 866, 64, - 79, 0, 0, 0, 0, 0, 44, 67, 54, 74, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 0, 0, 0, 867, 0, 48, 49, 0, 0, - 0, 0, 0, 0, 0, 0, 870, 869, 0, 0, - 0, 0, 0, 0, 55, 0, 0, 0, 56, 57, - 0, 58, 0, 0, 0, 0, 0, 0, 202, 0, - 0, 0, 66, 0, 0, 0, 0, 0, 0, 0, - 0, 906, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 77, 871, 874, 872, 0, 80, 0, - 0, 0, 0, 157, 0, 0, 0, 0, 0, 65, - 82, 50, 0, 0, 865, 0, 0, 61, 0, 0, - 0, 0, 868, 0, 0, 78, 45, 0, 76, 0, - 51, 873, 866, 64, 79, 0, 0, 0, 0, 0, - 44, 67, 54, 74, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 0, 0, 0, 867, 0, - 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, - 870, 869, 0, 0, 0, 0, 0, 0, 55, 0, - 0, 0, 56, 57, 0, 58, 0, 0, 0, 0, - 0, 0, 202, 0, 0, 0, 66, 0, 0, 0, - 0, 0, 0, 0, 0, 903, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 77, 871, 874, - 872, 0, 80, 0, 0, 0, 0, 157, 0, 0, - 0, 0, 0, 65, 82, 50, 0, 0, 865, 0, - 0, 61, 0, 0, 0, 0, 868, 0, 0, 78, - 45, 0, 76, 0, 51, 873, 866, 64, 79, 0, - 0, 0, 0, 0, 44, 67, 54, 74, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, - 0, 0, 47, 48, 49, 0, 0, 0, 0, 0, + 0, 0, 0, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 53, 52, 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, 56, 57, 0, 58, 0, - 0, 0, 59, 0, 60, 62, 63, 0, 0, 66, - 0, 0, 0, 0, 69, 0, 70, 0, 0, 0, + 0, 0, 0, 0, 0, 202, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 77, 71, 75, 72, 0, 80, 0, 81, 0, 83, - 0, 84, 0, 0, 0, 0, 65, 82, 50, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 77, 71, 75, 72, 0, 80, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 65, 82, 50, 0, 0, 0, 0, 0, 61, 0, 0, 0, 0, 0, 0, 0, 78, 45, 0, 76, 0, 51, 73, 46, 64, 79, 0, 0, 0, 0, 0, 44, 67, 54, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 68, 0, 0, 0, 47, 48, 49, 0, 0, - 0, 0, 0, 0, 0, 0, 53, 52, 0, 0, - 0, 0, 0, 0, 55, 0, 0, 0, 56, 57, - 0, 58, 0, 0, 0, 59, 0, 60, 62, 63, - 0, 0, 66, 0, 0, 0, 0, 69, 0, 70, + 0, 68, 0, 0, 0, 48, 49, 0, 0, 0, + 0, 0, 0, 0, 0, 53, 52, 0, 0, 0, + 0, 0, 0, 55, 0, 0, 0, 56, 57, 0, + 58, 0, 0, 0, 0, 0, 0, 62, 0, 0, + 0, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 77, 71, 75, 72, 0, 80, 0, - 81, 0, 83, 0, 84, 0, 0, 0, 0, 65, - 82, 50, 0, 0, 0, 0, 0, 61, 0, 0, - 0, 0, 0, 0, 160, 78, 45, 0, 76, 0, - 51, 73, 46, 64, 79, 0, 0, 0, 0, 0, - 44, 67, 54, 74, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 0, 0, 0, 47, 48, + 0, 0, 77, 71, 75, 72, 0, 80, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 65, 82, + 50, 0, 0, 0, 0, 0, 61, 0, 0, 0, + 0, 0, 0, 0, 78, 45, 0, 76, 0, 51, + 73, 46, 64, 79, 0, 0, 0, 0, 0, 44, + 67, 54, 74, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 68, 0, 0, 0, 48, 49, 0, + 0, 0, 0, 0, 0, 0, 0, 53, 52, 0, + 0, 0, 0, 0, 0, 55, 0, 0, 0, 56, + 57, 0, 58, 0, 0, 0, 0, 0, 0, 202, + 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 77, 71, 75, 72, 0, 80, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 65, 82, 50, 0, 0, 0, 0, 203, 61, 0, + 0, 0, 0, 0, 0, 0, 78, 45, 0, 76, + 0, 51, 73, 46, 64, 79, 0, 0, 0, 0, + 0, 44, 67, 54, 74, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 68, 0, 0, 0, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 53, 52, 0, 0, 0, 0, 0, 0, 55, 0, 0, - 0, 56, 57, 0, 58, 0, 0, 0, 59, 0, - 60, 62, 63, 0, 0, 66, 0, 0, 0, 0, - 69, 0, 70, 0, 0, 0, 0, 0, 0, 0, + 0, 56, 57, 0, 58, 0, 0, 0, 0, 0, + 0, 202, 0, 0, 0, 66, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 71, 75, 72, - 0, 80, 0, 81, 0, 83, 0, 84, 0, 0, - 0, 0, 65, 82, 50, 0, 0, 0, 0, 0, - 61, 0, 0, 0, 0, 0, 0, 85, 78, 45, + 0, 80, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 65, 82, 50, 0, 0, 865, 0, 0, + 61, 0, 0, 0, 0, 0, 0, 0, 78, 45, 0, 76, 0, 51, 73, 46, 64, 79, 0, 0, 0, 0, 0, 44, 67, 54, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, - 0, 47, 48, 49, 0, 0, 0, 0, 0, 0, - 0, 0, 53, 52, 0, 0, 0, 0, 0, 0, - 55, 0, 0, 0, 56, 57, 0, 58, 0, 0, - 0, 59, 0, 60, 62, 63, 0, 0, 66, 0, - 0, 0, 0, 69, 0, 70, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, - 71, 75, 72, 0, 80, 0, 81, 0, 83, 0, - 84, 0, 0, 0, 0, 65, 82, 50, 0, 0, - 0, 0, 0, 61, 0, 0, 0, 0, 0, 265, - 160, 78, 45, 0, 76, 0, 51, 73, 46, 64, - 79, 0, 0, 0, 0, 0, 44, 67, 54, 74, + 0, 48, 49, 0, 260, 0, 0, 0, 0, 0, + 0, 53, 52, 0, 0, 0, 0, 0, 0, 55, + 0, 0, 0, 56, 57, 0, 58, 0, 0, 0, + 0, 0, 0, 62, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 0, 0, 0, 47, 48, 49, 0, 0, 0, - 0, 0, 0, 0, 0, 53, 52, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 77, 71, + 75, 72, 0, 80, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 65, 82, 50, 0, 0, 0, + 0, 0, 61, 0, 0, 0, 0, 0, 0, 0, + 78, 45, 0, 76, 0, 51, 73, 46, 64, 79, + 0, 0, 0, 0, 0, 44, 67, 54, 74, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, + 0, 0, 0, 48, 49, 0, 260, 0, 0, 0, + 0, 0, 0, 53, 52, 0, 0, 0, 0, 0, + 0, 55, 0, 0, 0, 56, 57, 0, 58, 0, + 0, 0, 0, 0, 0, 202, 0, 0, 0, 66, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 77, 71, 75, 72, 0, 80, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 65, 82, 50, 0, + 0, 0, 0, 0, 61, 0, 0, 0, 0, 0, + 0, 0, 78, 45, 0, 76, 0, 51, 73, 46, + 64, 79, 0, 0, 0, 0, 0, 44, 67, 54, + 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 68, 0, 0, 0, 867, 0, 48, 49, 0, + 0, 0, 0, 0, 0, 0, 0, 870, 869, 0, + 0, 0, 0, 0, 0, 55, 0, 0, 0, 56, + 57, 0, 58, 0, 0, 0, 0, 0, 0, 202, + 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 77, 871, 874, 872, 0, 80, + 0, 0, 0, 0, 157, 0, 0, 0, 0, 0, + 65, 82, 50, 0, 0, 865, 0, 0, 61, 0, + 0, 0, 0, 868, 0, 0, 78, 45, 0, 76, + 0, 51, 873, 866, 64, 79, 0, 0, 0, 0, + 0, 44, 67, 54, 74, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 68, 0, 0, 0, 867, + 0, 48, 49, 0, 0, 0, 0, 0, 0, 0, + 0, 870, 869, 0, 0, 0, 0, 0, 0, 55, + 0, 0, 0, 56, 57, 0, 58, 0, 0, 0, + 0, 0, 0, 202, 0, 0, 0, 66, 0, 0, + 0, 0, 0, 0, 0, 0, 903, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 77, 871, + 874, 872, 0, 80, 0, 0, 0, 0, 157, 0, + 0, 0, 0, 0, 65, 82, 50, 0, 0, 865, + 0, 0, 61, 0, 0, 0, 0, 868, 0, 0, + 78, 45, 0, 76, 0, 51, 873, 866, 64, 79, + 0, 0, 0, 0, 0, 44, 67, 54, 74, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, + 0, 0, 0, 867, 0, 48, 49, 0, 0, 0, + 0, 0, 0, 0, 0, 870, 869, 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, 56, 57, 0, - 58, 0, 0, 0, 59, 0, 60, 62, 63, 0, - 0, 66, 0, 0, 0, 0, 69, 0, 70, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 764, 0, - 0, 0, 77, 71, 75, 72, 0, 80, 0, 81, - 0, 83, 0, 84, 0, 0, 0, 0, 65, 82, - 50, 0, 0, 0, 0, 0, 61, 0, 0, 0, - 0, 0, 0, 85, 78, 45, 0, 76, 0, 51, - 73, 46, 64, 79, 0, 0, 0, 0, 0, 44, + 58, 0, 0, 0, 0, 0, 0, 202, 0, 0, + 0, 66, 0, 0, 0, 0, 0, 0, 0, 0, + 906, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 77, 871, 874, 872, 0, 80, 0, 0, + 0, 0, 157, 0, 0, 0, 0, 0, 65, 82, + 50, 0, 0, 865, 0, 0, 61, 0, 0, 0, + 0, 868, 0, 0, 78, 45, 0, 76, 0, 51, + 873, 866, 64, 79, 0, 0, 0, 0, 0, 44, 67, 54, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 47, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 53, 52, @@ -1058,10 +991,10 @@ const short QmlJSGrammar::action_info [] = { 0, 0, 0, 0, 0, 77, 71, 75, 72, 0, 80, 0, 81, 0, 83, 0, 84, 0, 0, 0, 0, 65, 82, 50, 0, 0, 0, 0, 0, 61, - 0, 0, 0, 0, 0, 0, 85, 78, 45, 0, + 0, 0, 0, 0, 0, 0, 0, 78, 45, 0, 76, 0, 51, 73, 46, 64, 79, 0, 0, 0, 0, 0, 44, 67, 54, 74, 0, 0, 0, 0, - 0, 0, 0, 0, 108, 0, 68, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 47, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 53, 52, 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, 56, 57, 0, 58, 0, 0, 0, @@ -1070,10 +1003,10 @@ const short QmlJSGrammar::action_info [] = { 0, 0, 0, 0, 0, 0, 0, 0, 77, 71, 75, 72, 0, 80, 0, 81, 0, 83, 0, 84, 0, 0, 0, 0, 65, 82, 50, 0, 0, 0, - 0, 0, 61, 0, 0, 0, 0, 0, 0, 160, + 0, 0, 61, 0, 0, 0, 0, 0, 0, 85, 78, 45, 0, 76, 0, 51, 73, 46, 64, 79, 0, 0, 0, 0, 0, 44, 67, 54, 74, 0, - 0, 0, 0, 0, 0, 0, 793, 0, 0, 68, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 47, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 53, 52, 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, 56, 57, 0, 58, @@ -1083,10 +1016,22 @@ const short QmlJSGrammar::action_info [] = { 0, 77, 71, 75, 72, 0, 80, 0, 81, 0, 83, 0, 84, 0, 0, 0, 0, 65, 82, 50, 0, 0, 0, 0, 0, 61, 0, 0, 0, 0, - 0, 314, 160, 78, 45, 0, 76, 0, 51, 73, + 0, 0, 160, 78, 45, 0, 76, 0, 51, 73, 46, 64, 79, 0, 0, 0, 0, 0, 44, 67, 54, 74, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 68, 0, 0, 0, 364, 0, 0, 47, + 0, 0, 68, 0, 0, 0, 47, 48, 49, 0, + 0, 0, 0, 0, 0, 0, 0, 53, 52, 0, + 0, 0, 0, 0, 0, 55, 0, 0, 0, 56, + 57, 0, 58, 0, 0, 0, 59, 0, 60, 62, + 63, 0, 0, 66, 0, 0, 0, 0, 69, 0, + 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 77, 71, 75, 72, 0, 80, + 0, 81, 0, 83, 0, 84, 0, 0, 0, 0, + 65, 82, 50, 0, 0, 0, 0, 0, 61, 0, + 0, 0, 0, 0, 268, 160, 78, 45, 0, 76, + 0, 51, 73, 46, 64, 79, 0, 0, 0, 0, + 0, 44, 67, 54, 74, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 68, 0, 0, 0, 47, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 53, 52, 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, 56, 57, 0, 58, 0, 0, 0, 59, @@ -1095,10 +1040,10 @@ const short QmlJSGrammar::action_info [] = { 0, 0, 0, 0, 0, 0, 0, 77, 71, 75, 72, 0, 80, 0, 81, 0, 83, 0, 84, 0, 0, 0, 0, 65, 82, 50, 0, 0, 0, 0, - 0, 61, 0, 0, 0, 0, 0, 0, 160, 78, + 0, 61, 0, 0, 0, 0, 0, 0, 85, 78, 45, 0, 76, 0, 51, 73, 46, 64, 79, 0, 0, 0, 0, 0, 44, 67, 54, 74, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, + 0, 0, 0, 0, 0, 0, 108, 0, 68, 0, 0, 0, 47, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 53, 52, 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, 56, 57, 0, 58, 0, @@ -1108,7 +1053,7 @@ const short QmlJSGrammar::action_info [] = { 77, 71, 75, 72, 0, 80, 0, 81, 0, 83, 0, 84, 0, 0, 0, 0, 65, 82, 50, 0, 0, 0, 0, 0, 61, 0, 0, 0, 0, 0, - 268, 160, 78, 45, 0, 76, 0, 51, 73, 46, + 265, 160, 78, 45, 0, 76, 0, 51, 73, 46, 64, 79, 0, 0, 0, 0, 0, 44, 67, 54, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 372, 0, 0, 47, 48, @@ -1136,28 +1081,16 @@ const short QmlJSGrammar::action_info [] = { 160, 78, 45, 0, 76, 0, 51, 73, 46, 64, 79, 0, 0, 0, 0, 0, 44, 67, 54, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 0, 0, 0, 47, 48, 49, 0, 0, 0, - 0, 0, 0, 0, 0, 53, 52, 0, 0, 0, - 0, 0, 0, 55, 0, 0, 0, 56, 57, 0, - 58, 0, 0, 0, 59, 0, 60, 62, 63, 0, - 0, 66, 0, 0, 0, 0, 69, 0, 70, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 77, 71, 75, 72, 0, 80, 0, 81, - 0, 83, 0, 84, 0, 0, 0, 0, 65, 82, - 50, 0, 0, 0, 0, 0, 61, 0, 0, 0, - 0, 0, 0, 160, 78, 45, 0, 76, 0, 51, - 73, 46, 64, 79, 0, 0, 0, 0, 0, 44, - 67, 54, 74, 0, 0, 0, 0, 0, 0, 0, - 0, 172, 0, 68, 0, 0, 0, 47, 48, 49, + 68, 0, 0, 0, 364, 0, 0, 47, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 53, 52, 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, 56, 57, 0, 58, 0, 0, 0, 59, 0, 60, 62, 63, 0, 0, 66, 0, 0, 0, 0, 69, - 0, 70, 0, 0, 734, 0, 0, 0, 0, 0, + 0, 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 71, 75, 72, 0, 80, 0, 81, 0, 83, 0, 84, 0, 0, 0, 0, 65, 82, 50, 0, 0, 0, 0, 0, 61, - 0, 0, 0, 0, 0, 733, 160, 78, 45, 0, + 0, 0, 0, 0, 0, 0, 160, 78, 45, 0, 76, 0, 51, 73, 46, 64, 79, 0, 0, 0, 0, 0, 44, 67, 54, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, @@ -1166,10 +1099,10 @@ const short QmlJSGrammar::action_info [] = { 0, 0, 0, 56, 57, 0, 58, 0, 0, 0, 59, 0, 60, 62, 63, 0, 0, 66, 0, 0, 0, 0, 69, 0, 70, 0, 0, 0, 0, 0, - 0, 741, 0, 0, 0, 0, 0, 0, 77, 71, + 0, 0, 0, 0, 764, 0, 0, 0, 77, 71, 75, 72, 0, 80, 0, 81, 0, 83, 0, 84, 0, 0, 0, 0, 65, 82, 50, 0, 0, 0, - 0, 0, 61, 0, 0, 0, 0, 0, 314, 160, + 0, 0, 61, 0, 0, 0, 0, 0, 0, 85, 78, 45, 0, 76, 0, 51, 73, 46, 64, 79, 0, 0, 0, 0, 0, 44, 67, 54, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, @@ -1180,329 +1113,382 @@ const short QmlJSGrammar::action_info [] = { 66, 0, 0, 0, 0, 69, 0, 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 71, 75, 72, 0, 80, 0, 81, 0, - 83, 157, 84, 0, 0, 0, 0, 65, 82, 50, - 412, 413, 0, 0, 0, 61, 0, 0, 0, 0, - 0, 0, 85, 78, 45, 0, 76, 0, 51, 73, + 83, 0, 84, 0, 0, 0, 0, 65, 82, 50, + 0, 0, 0, 0, 0, 61, 0, 0, 0, 0, + 0, 314, 160, 78, 45, 0, 76, 0, 51, 73, 46, 64, 79, 0, 0, 0, 0, 0, 44, 67, 54, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 47, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 53, 52, 0, - 0, 0, 0, 0, 0, 55, 151, 0, 0, 56, - 1058, 0, 58, 0, 0, 0, 59, 0, 60, 62, + 0, 0, 0, 0, 0, 55, 0, 0, 0, 56, + 57, 0, 58, 0, 0, 0, 59, 0, 60, 62, 63, 0, 0, 66, 0, 0, 0, 0, 69, 0, - 70, 0, 0, 0, 0, 0, 0, 0, 153, 0, - 0, 0, 0, 0, 77, 71, 75, 72, 154, 80, - 0, 81, 156, 83, 0, 84, 0, 159, 0, 0, + 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 77, 71, 75, 72, 0, 80, + 0, 81, 0, 83, 0, 84, 0, 0, 0, 0, 65, 82, 50, 0, 0, 0, 0, 0, 61, 0, 0, 0, 0, 0, 0, 160, 78, 45, 0, 76, 0, 51, 73, 46, 64, 79, 0, 0, 0, 0, 0, 44, 67, 54, 74, 0, 0, 0, 0, 0, - 0, 0, 951, 950, 0, 68, 0, 0, 0, 47, + 0, 0, 793, 0, 0, 68, 0, 0, 0, 47, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, - 53, 52, 0, 0, 0, 0, 0, 0, 55, 151, + 53, 52, 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, 56, 57, 0, 58, 0, 0, 0, 59, 0, 60, 62, 63, 0, 0, 66, 0, 0, 0, 0, 69, 0, 70, 0, 0, 0, 0, 0, 0, - 0, 153, 0, 0, 0, 0, 0, 77, 71, 75, - 72, 154, 80, 0, 81, 156, 83, 0, 84, 0, - 159, 0, 0, 65, 82, 50, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 77, 71, 75, + 72, 0, 80, 0, 81, 0, 83, 0, 84, 0, + 0, 0, 0, 65, 82, 50, 0, 0, 0, 0, 0, 61, 0, 0, 0, 0, 0, 0, 160, 78, 45, 0, 76, 0, 51, 73, 46, 64, 79, 0, 0, 0, 0, 0, 44, 67, 54, 74, 0, 0, - 0, 0, 0, 0, 0, 951, 950, 0, 68, 0, - 0, 0, 212, 213, 214, 0, 0, 217, 219, 220, - 0, 0, 221, 0, 222, 0, 0, 0, 227, 228, - 0, 229, 0, 0, 0, 0, 0, 0, 55, 230, - 232, 233, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 235, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 238, - 0, 0, 0, 0, 0, 0, 0, 0, 71, 75, - 72, 240, 241, 242, 0, 244, 245, 246, 247, 248, - 249, 0, 0, 236, 243, 226, 216, 234, 0, 218, - 237, 0, 0, 0, 0, 0, 223, 0, 0, 239, - 215, 225, 76, 224, 51, 73, 46, 0, 0, 0, - 0, 0, 231, 0, 44, 67, 54, 74, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, - 0, 0, 212, 213, 214, 0, 0, 217, 219, 220, - 0, 0, 221, 0, 222, 0, 0, 0, 227, 228, - 0, 229, 0, 0, 0, 0, 0, 0, 55, 230, - 232, 233, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 235, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 855, 0, 0, 0, 238, - 0, 0, 0, 0, 0, 0, 0, 0, 71, 75, - 72, 240, 241, 242, 0, 244, 245, 246, 247, 248, - 249, 0, 0, 236, 243, 226, 216, 234, 0, 218, - 237, 0, 0, 0, 0, 0, 223, 0, 0, 239, - 215, 225, 76, 224, 51, 73, 46, 0, 0, 0, - 0, 0, 231, 0, 44, 67, 54, 74, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, - 0, 0, 212, 213, 214, 0, 0, 217, 219, 220, - 0, 0, 221, 0, 222, 0, 0, 0, 227, 228, - 0, 229, 0, 0, 0, 0, 0, 0, 55, 230, - 232, 233, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 235, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 828, 0, 0, 0, 238, - 0, 0, 0, 0, 0, 0, 0, 0, 71, 75, - 72, 240, 241, 242, 0, 244, 245, 246, 247, 248, - 249, 0, 0, 236, 243, 226, 216, 234, 0, 218, - 237, 0, 0, 0, 0, 0, 223, 0, 0, 239, - 215, 225, 76, 224, 51, 73, 46, 0, 0, 0, - 0, 0, 231, 0, 44, 67, 54, 74, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, - 0, 0, 212, 213, 214, 0, 0, 217, 219, 220, - 0, 0, 221, 0, 222, 0, 0, 0, 227, 228, - 0, 229, 0, 0, 0, 0, 0, 0, 55, 230, - 232, 233, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 235, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 849, 0, 0, 0, 238, - 0, 0, 0, 0, 0, 0, 0, 0, 71, 75, - 72, 240, 241, 242, 0, 244, 245, 246, 247, 248, - 249, 0, 0, 236, 243, 226, 216, 234, 0, 218, - 237, 0, 0, 0, 0, 0, 223, 0, 0, 239, - 215, 225, 76, 224, 51, 73, 46, 0, 0, 0, - 0, 0, 231, 0, 44, 67, 54, 74, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, - 0, 0, 212, 213, 214, 0, 0, 217, 219, 220, - 0, 0, 221, 0, 222, 0, 0, 0, 227, 228, - 0, 229, 0, 0, 0, 0, 0, 0, 55, 230, - 232, 233, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 235, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 824, 0, 0, 0, 238, - 0, 0, 0, 0, 0, 0, 0, 0, 71, 75, - 72, 240, 241, 242, 0, 244, 245, 246, 247, 248, - 249, 0, 0, 236, 243, 226, 216, 234, 0, 218, - 237, 0, 0, 0, 0, 0, 223, 0, 0, 239, - 215, 225, 76, 224, 51, 73, 46, 0, 0, 0, - 0, 0, 231, 0, 44, 67, 54, 74, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, - 0, 0, 212, 213, 214, 0, 0, 217, 219, 220, - 0, 0, 221, 0, 222, 0, 0, 0, 227, 228, - 0, 229, 0, 0, 0, 0, 0, 0, 55, 230, - 232, 233, 0, 345, 0, 0, 0, 0, 0, 0, - 0, 0, 235, 0, 0, 0, 346, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 238, - 0, 0, 0, 0, 0, 0, 0, 347, 71, 75, - 72, 240, 241, 242, 0, 244, 245, 246, 247, 248, - 249, 0, 0, 236, 243, 226, 216, 234, 0, 218, - 237, 0, 0, 0, 0, 0, 223, 0, 0, 239, - 215, 225, 76, 224, 51, 73, 46, 0, 0, 0, - 0, 0, 231, 0, 44, 67, 54, 74, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, - 0, 0, 212, 213, 214, 0, 0, 217, 219, 220, - 0, 0, 221, 0, 222, 0, 0, 0, 227, 228, - 0, 229, 0, 0, 0, 0, 0, 0, 55, 230, - 232, 233, 0, 345, 0, 0, 0, 0, 0, 0, - 0, 0, 235, 0, 0, 0, 346, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 238, - 0, 0, 0, 527, 0, 0, 0, 347, 71, 75, - 72, 240, 241, 242, 0, 244, 245, 246, 247, 248, - 249, 0, 0, 236, 243, 226, 216, 234, 0, 218, - 237, 0, 0, 0, 0, 0, 223, 0, 0, 239, - 215, 225, 76, 224, 51, 73, 46, 0, 0, 0, - 0, 0, 231, 0, 44, 67, 524, 526, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, - 0, 0, 212, 213, 214, 0, 0, 217, 219, 220, - 0, 0, 221, 0, 222, 0, 0, 0, 227, 228, - 0, 229, 0, 0, 0, 0, 0, 0, 55, 230, - 232, 233, 0, 345, 0, 0, 0, 0, 0, 0, - 0, 0, 235, 0, 0, 0, 346, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 238, - 0, 525, 0, 527, 0, 0, 0, 347, 71, 75, - 72, 240, 241, 242, 0, 244, 245, 246, 247, 248, - 249, 0, 0, 236, 243, 226, 216, 234, 0, 218, - 237, 0, 0, 0, 0, 0, 223, 0, 0, 239, - 215, 225, 528, 224, 51, 73, 46, 0, 0, 0, - 0, 0, 231, 0, 44, 67, 524, 526, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, - 0, 0, 212, 213, 214, 0, 0, 217, 219, 220, - 0, 0, 221, 0, 222, 0, 0, 0, 227, 228, - 0, 229, 0, 0, 0, 0, 0, 0, 55, 230, - 232, 233, 0, 345, 0, 0, 0, 0, 0, 0, - 0, 0, 235, 0, 0, 0, 346, 0, 0, 0, - 0, 0, 0, 0, 0, 716, 0, 0, 0, 238, - 0, 0, 0, 527, 0, 0, 0, 347, 71, 75, - 72, 240, 241, 242, 0, 244, 245, 246, 247, 248, - 249, 0, 0, 236, 243, 226, 216, 234, 0, 218, - 237, 0, 0, 0, 0, 0, 223, 0, 0, 239, - 215, 225, 76, 224, 51, 73, 46, 0, 0, 0, - 0, 0, 231, 0, 44, 67, 524, 526, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, - 0, 0, 212, 213, 214, 0, 0, 217, 219, 220, - 0, 0, 221, 0, 222, 0, 0, 0, 227, 228, - 0, 229, 0, 0, 0, 0, 0, 0, 55, 230, - 232, 233, 0, 345, 0, 0, 0, 0, 0, 0, - 0, 0, 235, 0, 0, 0, 346, 0, 0, 0, - 0, 0, 0, 0, 0, 721, 0, 0, 0, 238, - 0, 0, 0, 527, 0, 0, 0, 347, 71, 75, - 72, 240, 241, 242, 0, 244, 245, 246, 247, 248, - 249, 0, 0, 236, 243, 226, 216, 234, 0, 218, - 237, 0, 0, 0, 0, 0, 223, 0, 0, 239, - 215, 225, 76, 224, 51, 73, 46, 0, 0, 0, - 0, 0, 231, 0, 44, 67, 524, 526, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, - 0, 0, 144, 0, 0, 0, 0, 145, 0, 47, - 48, 49, 147, 0, 0, 0, 0, 0, 0, 148, - 53, 52, 0, 0, 0, 0, 0, 0, 55, 151, - 0, 0, 56, 57, 0, 58, 0, 0, 0, 59, - 0, 60, 62, 63, 0, 0, 66, 0, 0, 0, - 0, 69, 0, 70, 0, 0, 0, 0, 0, 152, - 0, 153, 0, 0, 0, 0, 0, 77, 71, 75, - 72, 154, 80, 155, 81, 156, 83, 157, 84, 158, - 159, 0, 0, 65, 82, 50, 0, 0, 0, 146, - 0, 61, 0, 0, 0, 0, 0, 0, 160, 78, - 45, 0, 76, 0, 51, 73, 46, 64, 79, 0, - 0, 0, 0, 0, 44, 67, 54, 74, 0, 0, - 0, 0, 0, 0, 0, 0, 149, 0, 68, 0, - 0, 0, 144, 0, 0, 0, 0, 145, 0, 47, - 48, 49, 147, 0, 0, 0, 0, 0, 0, 148, - 53, 52, 0, 0, 0, 0, 0, 0, 55, 151, - 0, 0, 56, 57, 0, 58, 0, 0, 0, 59, - 0, 60, 62, 63, 0, 0, 66, 0, 0, 0, - 0, 69, 0, 70, 0, 0, 0, 0, 0, 152, - 0, 153, 0, 0, 0, 0, 0, 77, 71, 75, - 72, 154, 80, 155, 81, 156, 83, 157, 84, 158, - 159, 0, 0, 65, 82, 50, 0, 0, 0, 146, - 0, 61, 0, 0, 0, 0, 0, 0, 160, 78, - 45, 0, 76, 0, 51, 73, 46, 64, 79, 0, - 0, 0, 0, 0, 44, 67, 54, 74, 0, 0, - 0, 0, 0, 0, 0, 301, 149, 0, 68, 0, - 0, 0, 144, 0, 0, 0, 0, 145, 0, 47, - 48, 49, 147, 0, 0, 0, 0, 0, 0, 148, - 53, 52, 0, 0, 0, 0, 0, 0, 55, 151, - 0, 0, 56, 57, 0, 58, 0, 0, 0, 59, - 0, 60, 62, 63, 0, 0, 958, 0, 0, 0, - 0, 69, 0, 70, 0, 0, 0, 0, 0, 152, - 0, 153, 0, 0, 0, 0, 0, 959, 71, 75, - 72, 154, 80, 155, 81, 156, 83, 157, 84, 158, - 159, 0, 0, 65, 82, 50, 0, 0, 0, 146, - 0, 61, 0, 0, 0, 0, 0, 0, 160, 78, - 45, 0, 76, 0, 51, 73, 46, 64, 79, 0, - 0, 0, 0, 0, 44, 67, 54, 74, 0, 0, - 0, 0, 0, 0, 0, 150, 149, 0, 68, 0, - 0, 0, 144, 0, 0, 0, 0, 145, 0, 47, - 48, 49, 147, 0, 0, 0, 0, 0, 0, 148, - 53, 52, 0, 0, 0, 0, 0, 0, 55, 151, - 0, 0, 56, 57, 0, 58, 0, 0, 0, 59, - 0, 60, 62, 63, 0, 0, 66, 0, 0, 0, - 0, 69, 0, 70, 0, 0, 0, 0, 0, 152, - 0, 153, 0, 0, 0, 0, 0, 77, 71, 75, - 72, 154, 80, 155, 81, 156, 83, 157, 84, 158, - 159, 0, 0, 65, 82, 50, 0, 0, 0, 146, - 0, 61, 0, 0, 0, 0, 0, 0, 160, 78, - 45, 0, 76, 0, 51, 73, 46, 64, 79, 0, - 0, 0, 0, 0, 44, 67, 54, 74, 0, 0, - 0, 0, 0, 0, 0, 150, 149, 0, 68, 0, - 0, 0, + 0, 0, 0, 0, 0, 0, 172, 0, 68, 0, + 0, 0, 47, 48, 49, 0, 0, 0, 0, 0, + 0, 0, 0, 53, 52, 0, 0, 0, 0, 0, + 0, 55, 0, 0, 0, 56, 57, 0, 58, 0, + 0, 0, 59, 0, 60, 62, 63, 0, 0, 66, + 0, 0, 0, 0, 69, 0, 70, 0, 0, 734, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 77, 71, 75, 72, 0, 80, 0, 81, 0, 83, + 0, 84, 0, 0, 0, 0, 65, 82, 50, 0, + 0, 0, 0, 0, 61, 0, 0, 0, 0, 0, + 733, 160, 78, 45, 0, 76, 0, 51, 73, 46, + 64, 79, 0, 0, 0, 0, 0, 44, 67, 54, + 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 68, 0, 0, 0, 47, 48, 49, 0, 0, + 0, 0, 0, 0, 0, 0, 53, 52, 0, 0, + 0, 0, 0, 0, 55, 0, 0, 0, 56, 57, + 0, 58, 0, 0, 0, 59, 0, 60, 62, 63, + 0, 0, 66, 0, 0, 0, 0, 69, 0, 70, + 0, 0, 0, 0, 0, 0, 741, 0, 0, 0, + 0, 0, 0, 77, 71, 75, 72, 0, 80, 0, + 81, 0, 83, 0, 84, 0, 0, 0, 0, 65, + 82, 50, 0, 0, 0, 0, 0, 61, 0, 0, + 0, 0, 0, 314, 160, 78, 45, 0, 76, 0, + 51, 73, 46, 64, 79, 0, 0, 0, 0, 0, + 44, 67, 54, 74, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 68, 0, 0, 0, 47, 48, + 49, 0, 0, 0, 0, 0, 0, 0, 0, 53, + 52, 0, 0, 0, 0, 0, 0, 55, 0, 0, + 0, 56, 57, 0, 58, 0, 0, 0, 59, 0, + 60, 62, 63, 0, 0, 66, 0, 0, 0, 0, + 69, 0, 70, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 77, 71, 75, 72, + 0, 80, 0, 81, 0, 83, 157, 84, 0, 0, + 0, 0, 65, 82, 50, 412, 413, 0, 0, 0, + 61, 0, 0, 0, 0, 0, 0, 85, 78, 45, + 0, 76, 0, 51, 73, 46, 64, 79, 0, 0, + 0, 0, 0, 44, 67, 54, 74, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, + 0, 47, 48, 49, 0, 0, 0, 0, 0, 0, + 0, 0, 53, 52, 0, 0, 0, 0, 0, 0, + 55, 151, 0, 0, 56, 57, 0, 58, 0, 0, + 0, 59, 0, 60, 62, 63, 0, 0, 66, 0, + 0, 0, 0, 69, 0, 70, 0, 0, 0, 0, + 0, 0, 0, 153, 0, 0, 0, 0, 0, 77, + 71, 75, 72, 154, 80, 0, 81, 156, 83, 0, + 84, 0, 159, 0, 0, 65, 82, 50, 0, 0, + 0, 0, 0, 61, 0, 0, 0, 0, 0, 0, + 160, 78, 45, 0, 76, 0, 51, 73, 46, 64, + 79, 0, 0, 0, 0, 0, 44, 67, 54, 74, + 0, 0, 0, 0, 0, 0, 0, 951, 950, 0, + 68, 0, 0, 0, 47, 48, 49, 0, 0, 0, + 0, 0, 0, 0, 0, 53, 52, 0, 0, 0, + 0, 0, 0, 55, 151, 0, 0, 56, 1062, 0, + 58, 0, 0, 0, 59, 0, 60, 62, 63, 0, + 0, 66, 0, 0, 0, 0, 69, 0, 70, 0, + 0, 0, 0, 0, 0, 0, 153, 0, 0, 0, + 0, 0, 77, 71, 75, 72, 154, 80, 0, 81, + 156, 83, 0, 84, 0, 159, 0, 0, 65, 82, + 50, 0, 0, 0, 0, 0, 61, 0, 0, 0, + 0, 0, 0, 160, 78, 45, 0, 76, 0, 51, + 73, 46, 64, 79, 0, 0, 0, 0, 0, 44, + 67, 54, 74, 0, 0, 0, 0, 0, 0, 0, + 951, 950, 0, 68, 0, 0, 0, 212, 213, 214, + 0, 0, 217, 219, 220, 0, 0, 221, 0, 222, + 0, 0, 0, 227, 228, 0, 229, 0, 0, 0, + 0, 0, 0, 55, 230, 232, 233, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 235, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 238, 0, 0, 0, 0, 0, + 0, 0, 0, 71, 75, 72, 240, 241, 242, 0, + 244, 245, 246, 247, 248, 249, 0, 0, 236, 243, + 226, 216, 234, 0, 218, 237, 0, 0, 0, 0, + 0, 223, 0, 0, 239, 215, 225, 76, 224, 51, + 73, 46, 0, 0, 0, 0, 0, 231, 0, 44, + 67, 54, 74, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 68, 0, 0, 0, 212, 213, 214, + 0, 0, 217, 219, 220, 0, 0, 221, 0, 222, + 0, 0, 0, 227, 228, 0, 229, 0, 0, 0, + 0, 0, 0, 55, 230, 232, 233, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 235, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 828, 0, 0, 0, 238, 0, 0, 0, 0, 0, + 0, 0, 0, 71, 75, 72, 240, 241, 242, 0, + 244, 245, 246, 247, 248, 249, 0, 0, 236, 243, + 226, 216, 234, 0, 218, 237, 0, 0, 0, 0, + 0, 223, 0, 0, 239, 215, 225, 76, 224, 51, + 73, 46, 0, 0, 0, 0, 0, 231, 0, 44, + 67, 54, 74, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 68, 0, 0, 0, 212, 213, 214, + 0, 0, 217, 219, 220, 0, 0, 221, 0, 222, + 0, 0, 0, 227, 228, 0, 229, 0, 0, 0, + 0, 0, 0, 55, 230, 232, 233, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 235, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 855, 0, 0, 0, 238, 0, 0, 0, 0, 0, + 0, 0, 0, 71, 75, 72, 240, 241, 242, 0, + 244, 245, 246, 247, 248, 249, 0, 0, 236, 243, + 226, 216, 234, 0, 218, 237, 0, 0, 0, 0, + 0, 223, 0, 0, 239, 215, 225, 76, 224, 51, + 73, 46, 0, 0, 0, 0, 0, 231, 0, 44, + 67, 54, 74, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 68, 0, 0, 0, 212, 213, 214, + 0, 0, 217, 219, 220, 0, 0, 221, 0, 222, + 0, 0, 0, 227, 228, 0, 229, 0, 0, 0, + 0, 0, 0, 55, 230, 232, 233, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 235, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 824, 0, 0, 0, 238, 0, 0, 0, 0, 0, + 0, 0, 0, 71, 75, 72, 240, 241, 242, 0, + 244, 245, 246, 247, 248, 249, 0, 0, 236, 243, + 226, 216, 234, 0, 218, 237, 0, 0, 0, 0, + 0, 223, 0, 0, 239, 215, 225, 76, 224, 51, + 73, 46, 0, 0, 0, 0, 0, 231, 0, 44, + 67, 54, 74, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 68, 0, 0, 0, 212, 213, 214, + 0, 0, 217, 219, 220, 0, 0, 221, 0, 222, + 0, 0, 0, 227, 228, 0, 229, 0, 0, 0, + 0, 0, 0, 55, 230, 232, 233, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 235, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 849, 0, 0, 0, 238, 0, 0, 0, 0, 0, + 0, 0, 0, 71, 75, 72, 240, 241, 242, 0, + 244, 245, 246, 247, 248, 249, 0, 0, 236, 243, + 226, 216, 234, 0, 218, 237, 0, 0, 0, 0, + 0, 223, 0, 0, 239, 215, 225, 76, 224, 51, + 73, 46, 0, 0, 0, 0, 0, 231, 0, 44, + 67, 54, 74, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 68, 0, 0, 0, 212, 213, 214, + 0, 0, 217, 219, 220, 0, 0, 221, 0, 222, + 0, 0, 0, 227, 228, 0, 229, 0, 0, 0, + 0, 0, 0, 55, 230, 232, 233, 0, 345, 0, + 0, 0, 0, 0, 0, 0, 0, 235, 0, 0, + 0, 346, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 238, 0, 0, 0, 0, 0, + 0, 0, 347, 71, 75, 72, 240, 241, 242, 0, + 244, 245, 246, 247, 248, 249, 0, 0, 236, 243, + 226, 216, 234, 0, 218, 237, 0, 0, 0, 0, + 0, 223, 0, 0, 239, 215, 225, 76, 224, 51, + 73, 46, 0, 0, 0, 0, 0, 231, 0, 44, + 67, 54, 74, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 68, 0, 0, 0, 212, 213, 214, + 0, 0, 217, 219, 220, 0, 0, 221, 0, 222, + 0, 0, 0, 227, 228, 0, 229, 0, 0, 0, + 0, 0, 0, 55, 230, 232, 233, 0, 345, 0, + 0, 0, 0, 0, 0, 0, 0, 235, 0, 0, + 0, 346, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 238, 0, 0, 0, 527, 0, + 0, 0, 347, 71, 75, 72, 240, 241, 242, 0, + 244, 245, 246, 247, 248, 249, 0, 0, 236, 243, + 226, 216, 234, 0, 218, 237, 0, 0, 0, 0, + 0, 223, 0, 0, 239, 215, 225, 76, 224, 51, + 73, 46, 0, 0, 0, 0, 0, 231, 0, 44, + 67, 524, 526, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 68, 0, 0, 0, 212, 213, 214, + 0, 0, 217, 219, 220, 0, 0, 221, 0, 222, + 0, 0, 0, 227, 228, 0, 229, 0, 0, 0, + 0, 0, 0, 55, 230, 232, 233, 0, 345, 0, + 0, 0, 0, 0, 0, 0, 0, 235, 0, 0, + 0, 346, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 238, 0, 525, 0, 527, 0, + 0, 0, 347, 71, 75, 72, 240, 241, 242, 0, + 244, 245, 246, 247, 248, 249, 0, 0, 236, 243, + 226, 216, 234, 0, 218, 237, 0, 0, 0, 0, + 0, 223, 0, 0, 239, 215, 225, 528, 224, 51, + 73, 46, 0, 0, 0, 0, 0, 231, 0, 44, + 67, 524, 526, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 68, 0, 0, 0, 212, 213, 214, + 0, 0, 217, 219, 220, 0, 0, 221, 0, 222, + 0, 0, 0, 227, 228, 0, 229, 0, 0, 0, + 0, 0, 0, 55, 230, 232, 233, 0, 345, 0, + 0, 0, 0, 0, 0, 0, 0, 235, 0, 0, + 0, 346, 0, 0, 0, 0, 0, 0, 0, 0, + 716, 0, 0, 0, 238, 0, 0, 0, 527, 0, + 0, 0, 347, 71, 75, 72, 240, 241, 242, 0, + 244, 245, 246, 247, 248, 249, 0, 0, 236, 243, + 226, 216, 234, 0, 218, 237, 0, 0, 0, 0, + 0, 223, 0, 0, 239, 215, 225, 76, 224, 51, + 73, 46, 0, 0, 0, 0, 0, 231, 0, 44, + 67, 524, 526, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 68, 0, 0, 0, 212, 213, 214, + 0, 0, 217, 219, 220, 0, 0, 221, 0, 222, + 0, 0, 0, 227, 228, 0, 229, 0, 0, 0, + 0, 0, 0, 55, 230, 232, 233, 0, 345, 0, + 0, 0, 0, 0, 0, 0, 0, 235, 0, 0, + 0, 346, 0, 0, 0, 0, 0, 0, 0, 0, + 721, 0, 0, 0, 238, 0, 0, 0, 527, 0, + 0, 0, 347, 71, 75, 72, 240, 241, 242, 0, + 244, 245, 246, 247, 248, 249, 0, 0, 236, 243, + 226, 216, 234, 0, 218, 237, 0, 0, 0, 0, + 0, 223, 0, 0, 239, 215, 225, 76, 224, 51, + 73, 46, 0, 0, 0, 0, 0, 231, 0, 44, + 67, 524, 526, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 68, 0, 0, 0, 144, 0, 0, + 0, 0, 145, 0, 47, 48, 49, 147, 0, 0, + 0, 0, 0, 0, 148, 53, 52, 0, 0, 0, + 0, 0, 0, 55, 151, 0, 0, 56, 57, 0, + 58, 0, 0, 0, 59, 0, 60, 62, 63, 0, + 0, 66, 0, 0, 0, 0, 69, 0, 70, 0, + 0, 0, 0, 0, 152, 0, 153, 0, 0, 0, + 0, 0, 77, 71, 75, 72, 154, 80, 155, 81, + 156, 83, 157, 84, 158, 159, 0, 0, 65, 82, + 50, 0, 0, 0, 146, 0, 61, 0, 0, 0, + 0, 0, 0, 160, 78, 45, 0, 76, 0, 51, + 73, 46, 64, 79, 0, 0, 0, 0, 0, 44, + 67, 54, 74, 0, 0, 0, 0, 0, 0, 0, + 0, 149, 0, 68, 0, 0, 0, 144, 0, 0, + 0, 0, 145, 0, 47, 48, 49, 147, 0, 0, + 0, 0, 0, 0, 148, 53, 52, 0, 0, 0, + 0, 0, 0, 55, 151, 0, 0, 56, 57, 0, + 58, 0, 0, 0, 59, 0, 60, 62, 63, 0, + 0, 66, 0, 0, 0, 0, 69, 0, 70, 0, + 0, 0, 0, 0, 152, 0, 153, 0, 0, 0, + 0, 0, 77, 71, 75, 72, 154, 80, 155, 81, + 156, 83, 157, 84, 158, 159, 0, 0, 65, 82, + 50, 0, 0, 0, 146, 0, 61, 0, 0, 0, + 0, 0, 0, 160, 78, 45, 0, 76, 0, 51, + 73, 46, 64, 79, 0, 0, 0, 0, 0, 44, + 67, 54, 74, 0, 0, 0, 0, 0, 0, 0, + 150, 149, 0, 68, 0, 0, 0, 144, 0, 0, + 0, 0, 145, 0, 47, 48, 49, 147, 0, 0, + 0, 0, 0, 0, 148, 53, 52, 0, 0, 0, + 0, 0, 0, 55, 151, 0, 0, 56, 57, 0, + 58, 0, 0, 0, 59, 0, 60, 62, 63, 0, + 0, 958, 0, 0, 0, 0, 69, 0, 70, 0, + 0, 0, 0, 0, 152, 0, 153, 0, 0, 0, + 0, 0, 959, 71, 75, 72, 154, 80, 155, 81, + 156, 83, 157, 84, 158, 159, 0, 0, 65, 82, + 50, 0, 0, 0, 146, 0, 61, 0, 0, 0, + 0, 0, 0, 160, 78, 45, 0, 76, 0, 51, + 73, 46, 64, 79, 0, 0, 0, 0, 0, 44, + 67, 54, 74, 0, 0, 0, 0, 0, 0, 0, + 150, 149, 0, 68, 0, 0, 0, 144, 0, 0, + 0, 0, 145, 0, 47, 48, 49, 147, 0, 0, + 0, 0, 0, 0, 148, 53, 52, 0, 0, 0, + 0, 0, 0, 55, 151, 0, 0, 56, 57, 0, + 58, 0, 0, 0, 59, 0, 60, 62, 63, 0, + 0, 66, 0, 0, 0, 0, 69, 0, 70, 0, + 0, 0, 0, 0, 152, 0, 153, 0, 0, 0, + 0, 0, 77, 71, 75, 72, 154, 80, 155, 81, + 156, 83, 157, 84, 158, 159, 0, 0, 65, 82, + 50, 0, 0, 0, 146, 0, 61, 0, 0, 0, + 0, 0, 0, 160, 78, 45, 0, 76, 0, 51, + 73, 46, 64, 79, 0, 0, 0, 0, 0, 44, + 67, 54, 74, 0, 0, 0, 0, 0, 0, 0, + 301, 149, 0, 68, 0, 0, 0, - 717, 709, 708, 707, 704, 703, 702, 723, 1096, 1091, - 699, 736, 696, 730, 695, 1094, 694, 693, 649, 690, - 689, 688, 687, 1090, 636, 679, 638, 208, 676, 1078, - 208, 1086, 674, 208, 677, 673, 1076, 1064, 1050, 1062, - 1047, 657, 759, 651, 1048, 112, 133, 1042, 1051, 294, - 1034, 374, 778, 638, 779, 396, 636, 420, 133, 1032, - 1031, 208, 1025, 626, 627, 620, 595, 625, 615, 940, - 831, 1022, 611, 789, 792, 608, 1020, 602, 597, 609, - 596, 1023, 594, 591, 618, 588, 584, 630, 807, 170, - 592, 576, 808, 810, 574, 809, 1018, 171, 814, 815, - 818, 173, 1011, 820, 568, 563, 816, 565, 564, 562, - 1010, 559, 1007, 557, 208, 556, 555, 554, 841, 547, - 544, 537, 546, 545, 540, 174, 1004, 539, 538, 175, - 940, 994, 996, 1005, 208, 250, 455, 510, 210, 257, - 208, 979, 253, 514, 501, 264, 271, 497, 267, 269, - 495, 972, 1097, 970, 286, 288, 1030, 992, 133, 133, - 363, 968, 473, 973, 975, 466, 483, 954, 324, 892, - 325, 944, 893, 895, 894, 901, 468, 455, 449, 321, - 451, 330, 443, 454, 333, 940, 357, 331, 348, 332, - 435, 355, 356, 928, 977, 428, 388, 921, 392, 395, - 133, 389, 403, 432, 401, 941, 924, 430, 570, 632, - 861, 632, 368, 420, 420, 210, 424, 306, 671, 210, - 731, 437, 732, 306, 682, 306, 697, 1044, 724, 726, - 264, 264, 740, 739, 1080, 1079, 1056, 397, 397, 1057, - 397, 461, 264, 210, 420, 420, 397, 632, 420, 391, - 1045, 397, 1036, 669, 666, 394, 957, 398, 306, 305, - 303, 420, 479, 300, 489, 653, 306, 697, 617, 306, - 682, 397, 613, 210, 572, 1040, 0, 210, 650, 306, - 305, 419, 422, 306, 496, 210, 632, 397, 843, 844, - 210, 390, 397, 298, 306, 309, 0, 393, 397, 210, - 302, 210, 397, 210, 397, 306, 513, 210, 823, 306, - 888, 0, 457, 459, 210, 210, 475, 367, 0, 94, - 830, 558, 306, 832, 306, 309, 29, 370, 745, 477, - 548, 253, 541, 42, 93, 532, 306, 309, 775, 860, - 306, 462, 256, 306, 309, 306, 309, 306, 309, 711, - 209, 306, 832, 306, 309, 306, 309, 306, 353, 306, - 446, 341, 336, 632, 306, 334, 210, 566, 0, 678, - 306, 309, 489, 675, 786, 969, 633, 341, 832, 0, - 715, 712, 0, 483, 306, 832, 306, 309, 0, 915, - 916, 0, 344, 917, 306, 439, 306, 604, 306, 309, - 0, 823, 306, 309, 659, 302, 306, 513, 306, 621, - 711, 94, 845, 306, 496, 633, 306, 506, 94, 94, - 341, 832, 0, 11, 306, 470, 93, 0, 29, 417, - 94, 819, 94, 93, 93, 42, 0, 720, 306, 621, - 0, 715, 712, 0, 0, 93, 1014, 93, 94, 550, - 1016, 1015, 1013, 29, 0, 845, 94, 758, 463, 95, - 42, 94, 0, 93, 306, 506, 95, 95, 0, 781, - 735, 93, 94, 531, 700, 354, 93, 447, 95, 765, - 95, 705, 335, 685, 289, 691, 199, 93, 293, 291, - 0, 499, 775, 890, 29, 851, 95, 281, 259, 0, - 0, 42, 198, 29, 95, 306, 309, 767, 313, 95, - 42, 800, 441, 302, 605, 197, 94, 94, 306, 309, - 95, 0, 370, 754, 857, 11, 622, 0, 560, 94, - 509, 93, 93, 178, 508, 328, 812, 453, 94, 472, - 805, 0, 471, 107, 93, 827, 0, 1075, 0, 0, - 11, 0, 780, 93, 629, 94, 622, 834, 817, 29, - 811, 29, 341, 336, 95, 95, 42, 29, 42, 94, - 93, 640, 279, 763, 42, 434, 0, 95, 512, 201, - 103, 94, 508, 0, 93, 438, 94, 94, 0, 0, - 94, 11, 0, 344, 0, 854, 93, 29, 94, 29, - 11, 93, 93, 95, 42, 93, 42, 104, 0, 29, - 794, 94, 797, 93, 0, 0, 42, 95, 0, 0, - 94, 96, 94, 0, 0, 29, 93, 0, 201, 95, - 369, 0, 42, 94, 95, 93, 193, 93, 95, 681, - 760, 0, 184, 327, 0, 0, 95, 94, 93, 749, - 94, 0, 796, 0, 0, 406, 11, 200, 11, 95, - 681, 753, 93, 283, 11, 93, 799, 1003, 95, 94, - 95, 681, 752, 0, 200, 42, 0, 0, 94, 0, - 0, 95, 681, 751, 93, 350, 0, 1063, 0, 94, - 662, 0, 94, 93, 11, 95, 11, 94, 95, 681, - 761, 94, 42, 200, 93, 94, 11, 93, 0, 0, - 306, 309, 93, 910, 94, 664, 93, 95, 0, 0, - 93, 94, 11, 0, 42, 0, 95, 370, 371, 93, - 201, 635, 94, 42, 750, 637, 93, 0, 201, 94, - 95, 681, 748, 94, 0, 0, 200, 93, 94, 95, - 681, 747, 200, 95, 93, 201, 1000, 409, 93, 0, - 42, 0, 200, 93, 42, 205, 0, 0, 0, 95, - 1052, 643, 1085, 0, 0, 0, 42, 0, 0, 1008, - 95, 681, 762, 0, 201, 0, 94, 95, 0, 1000, - 0, 1060, 94, 660, 42, 0, 95, 681, 680, 0, - 0, 93, 94, 645, 0, 200, 947, 93, 946, 948, - 953, 949, 952, 200, 410, 414, 200, 93, 205, 0, - 0, 200, 0, 200, 907, 0, 885, 201, 0, 205, - 1082, 1083, 0, 201, 0, 369, 205, 200, 0, 0, - 724, 726, 0, 201, 0, 94, 0, 0, 274, 0, - 885, 887, 0, 94, 11, 0, 94, 904, 0, 278, - 93, 94, 0, 94, 0, 0, 320, 0, 93, 0, - 200, 93, 0, 0, 200, 887, 93, 94, 93, 0, - 0, 0, 1052, 885, 0, 0, 201, 885, 1053, 0, - 0, 0, 93, 0, 201, 0, 0, 201, 1026, 0, - 0, 0, 201, 0, 201, 0, 0, 0, 887, 0, - 94, 1059, 887, 1026, 94, 0, 0, 947, 201, 946, - 948, 953, 949, 952, 0, 93, 1009, 0, 0, 93, - 0, 0, 947, 0, 946, 948, 953, 949, 952, 1008, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 201, 1009, 0, 0, 201, 0, 0, 947, 0, + 435, 717, 709, 708, 723, 707, 704, 703, 702, 730, + 257, 208, 1101, 1100, 699, 696, 695, 694, 693, 688, + 690, 689, 687, 264, 271, 649, 679, 267, 676, 269, + 208, 250, 980, 1095, 1098, 674, 677, 673, 636, 759, + 1094, 208, 657, 1006, 651, 638, 995, 286, 208, 778, + 779, 288, 997, 1082, 638, 940, 208, 1090, 972, 1080, + 1068, 636, 133, 626, 627, 133, 831, 620, 625, 789, + 969, 615, 792, 1005, 1066, 611, 608, 970, 968, 1054, + 609, 602, 596, 594, 112, 809, 807, 1051, 591, 808, + 810, 588, 1052, 814, 592, 815, 584, 816, 820, 576, + 325, 574, 1008, 568, 818, 133, 565, 564, 208, 563, + 559, 562, 557, 556, 554, 555, 133, 363, 1046, 547, + 841, 321, 546, 544, 545, 537, 1055, 1012, 538, 540, + 294, 539, 324, 330, 253, 973, 210, 954, 374, 331, + 510, 332, 348, 455, 514, 333, 501, 975, 396, 944, + 1019, 993, 1038, 175, 357, 495, 497, 473, 174, 483, + 171, 355, 356, 388, 173, 736, 420, 468, 389, 595, + 893, 466, 892, 894, 392, 395, 597, 895, 901, 451, + 618, 449, 454, 133, 455, 1033, 443, 401, 1026, 208, + 630, 940, 940, 921, 403, 428, 432, 424, 928, 170, + 1024, 1023, 941, 420, 924, 1021, 430, 420, 437, 977, + 978, 1034, 1035, 461, 420, 420, 420, 420, 479, 398, + 489, 368, 1040, 306, 496, 306, 513, 397, 394, 1031, + 1032, 306, 697, 632, 391, 1048, 397, 957, 397, 843, + 844, 306, 682, 397, 210, 1044, 306, 888, 397, 397, + 210, 306, 309, 632, 210, 210, 210, 210, 1049, 570, + 1060, 572, 613, 1061, 306, 305, 617, 306, 305, 210, + 393, 419, 300, 632, 303, 422, 390, 1084, 1083, 632, + 210, 548, 457, 459, 475, 477, 532, 558, 861, 397, + 830, 397, 397, 740, 739, 210, 397, 306, 697, 210, + 724, 726, 298, 210, 823, 306, 682, 306, 671, 264, + 264, 264, 210, 210, 302, 650, 0, 731, 397, 732, + 306, 309, 306, 309, 711, 1011, 367, 370, 745, 29, + 209, 253, 653, 666, 669, 210, 42, 306, 309, 306, + 309, 306, 309, 0, 541, 306, 832, 256, 306, 604, + 306, 496, 306, 513, 94, 715, 712, 306, 309, 306, + 309, 302, 633, 758, 483, 306, 309, 306, 309, 93, + 823, 306, 334, 341, 336, 341, 832, 306, 832, 306, + 832, 0, 633, 915, 916, 306, 309, 917, 306, 353, + 306, 309, 306, 621, 0, 306, 446, 306, 439, 306, + 462, 860, 566, 531, 344, 417, 434, 94, 775, 259, + 845, 819, 0, 94, 0, 735, 0, 438, 0, 94, + 94, 0, 93, 306, 506, 0, 11, 453, 93, 29, + 29, 306, 470, 0, 93, 93, 42, 42, 0, 29, + 0, 29, 306, 309, 0, 659, 42, 0, 42, 94, + 0, 29, 0, 675, 0, 95, 0, 678, 42, 370, + 700, 95, 560, 0, 93, 29, 605, 95, 95, 29, + 341, 336, 42, 94, 281, 705, 42, 685, 283, 691, + 0, 1015, 306, 506, 550, 1017, 1016, 1014, 93, 335, + 201, 291, 289, 0, 0, 313, 94, 811, 765, 306, + 309, 344, 0, 805, 817, 812, 354, 341, 832, 94, + 622, 93, 754, 447, 827, 441, 328, 463, 834, 0, + 94, 95, 29, 499, 93, 94, 11, 11, 890, 42, + 94, 0, 711, 800, 178, 93, 11, 509, 11, 632, + 93, 508, 845, 94, 95, 93, 472, 767, 11, 471, + 851, 107, 857, 0, 94, 94, 94, 95, 93, 720, + 0, 1079, 11, 715, 712, 184, 11, 369, 95, 93, + 93, 93, 94, 95, 489, 29, 786, 94, 95, 0, + 193, 763, 42, 306, 621, 640, 0, 93, 0, 293, + 0, 95, 93, 350, 0, 94, 512, 0, 279, 0, + 508, 94, 95, 95, 95, 29, 0, 103, 199, 197, + 93, 0, 42, 94, 29, 0, 93, 0, 0, 11, + 95, 42, 0, 1009, 327, 95, 198, 0, 93, 96, + 0, 94, 794, 1001, 797, 1064, 0, 200, 94, 0, + 0, 94, 201, 95, 681, 761, 93, 910, 306, 309, + 0, 0, 0, 93, 200, 94, 93, 0, 94, 0, + 0, 95, 681, 760, 1001, 370, 371, 0, 775, 0, + 93, 781, 11, 93, 796, 0, 749, 94, 0, 95, + 681, 762, 854, 200, 724, 726, 95, 200, 799, 95, + 681, 753, 93, 42, 94, 94, 1067, 1004, 94, 629, + 635, 622, 11, 95, 681, 752, 95, 681, 751, 93, + 93, 11, 0, 93, 94, 302, 94, 94, 201, 0, + 0, 406, 94, 94, 94, 0, 94, 94, 780, 93, + 0, 93, 93, 0, 0, 201, 94, 93, 93, 93, + 200, 93, 93, 95, 0, 94, 95, 681, 748, 0, + 42, 93, 637, 205, 0, 0, 94, 201, 0, 0, + 93, 750, 95, 0, 201, 95, 681, 747, 201, 42, + 95, 93, 95, 369, 95, 0, 200, 42, 200, 42, + 94, 42, 664, 320, 95, 0, 1056, 0, 1089, 205, + 643, 42, 662, 95, 0, 93, 0, 104, 660, 0, + 645, 200, 0, 0, 95, 681, 680, 947, 0, 946, + 948, 953, 949, 952, 205, 200, 94, 0, 94, 278, + 0, 201, 200, 409, 1086, 1087, 0, 0, 0, 200, + 42, 93, 0, 93, 0, 885, 0, 904, 907, 0, + 0, 94, 205, 0, 641, 0, 0, 0, 0, 0, + 200, 200, 0, 0, 0, 94, 93, 201, 0, 201, + 887, 0, 94, 885, 885, 0, 0, 0, 0, 94, + 93, 0, 274, 0, 0, 0, 0, 93, 0, 200, + 410, 414, 201, 0, 93, 0, 0, 1056, 887, 887, + 94, 94, 885, 1057, 0, 0, 201, 0, 0, 0, + 0, 0, 0, 201, 0, 93, 93, 0, 0, 0, + 201, 0, 0, 0, 0, 0, 0, 887, 0, 94, + 11, 0, 1027, 0, 0, 0, 200, 0, 0, 1009, + 0, 201, 201, 0, 93, 1010, 0, 0, 0, 205, + 0, 947, 1010, 946, 948, 953, 949, 952, 947, 0, 946, 948, 953, 949, 952, 0, 0, 0, 0, 0, + 201, 0, 0, 0, 0, 0, 94, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 93, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 205, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 94, 0, 0, 641, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 93, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 201, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 201, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1516,359 +1502,311 @@ const short QmlJSGrammar::action_info [] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0 + 0, 0, 0, 0, 0, 0, 0, 1027, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1063, 0, 0, 0, 0, 0, 947, 0, 946, 948, + 953, 949, 952, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0 }; const short QmlJSGrammar::action_check [] = { - 7, 34, 62, 57, 116, 37, 37, 57, 34, 62, - 34, 57, 37, 62, 0, 62, 34, 57, 37, 15, - 50, 0, 96, 1, 16, 37, 49, 83, 96, 96, - 34, 8, 2, 5, 5, 57, 34, 52, 5, 34, - 15, 7, 103, 57, 34, 7, 15, 8, 8, 17, - 37, 62, 17, 34, 57, 7, 20, 62, 34, 7, - 62, 34, 70, 37, 7, 48, 66, 17, 57, 62, - 8, 17, 17, 17, 7, 38, 34, 30, 35, 38, - 17, 63, 17, 30, 7, 34, 96, 7, 1, 83, - 1, 8, 48, 34, 34, 49, 2, 7, 83, 17, - 2, 52, 57, 37, 34, 37, 37, 34, 37, 30, - 7, 37, 103, 38, 17, 34, 52, 17, 7, 7, - 62, 49, 34, 62, 7, 34, 7, 7, 7, 34, - 17, 30, 116, 37, 0, -1, 116, 8, 62, 34, - 34, 63, 34, 57, 8, 1, 62, 37, -1, 57, - 57, 8, 37, 7, 2, 70, 57, 34, 30, 34, - 38, 57, 30, 30, 62, 30, 57, 30, 8, 62, - 8, -1, 23, 7, 7, 57, 62, 8, 62, 8, - -1, -1, 8, 57, 34, 17, 62, 7, -1, 34, - 17, 34, 62, 62, 52, 37, 49, 70, 37, 8, - 8, 63, 17, 63, 17, 57, 17, 8, 63, 7, - 57, 15, 34, 7, 63, 8, 62, -1, 62, 15, - 57, 62, 83, 8, 15, 8, 8, 62, 8, 25, - 34, 41, 62, 32, 58, 58, 57, -1, 57, 7, - 8, 69, 58, 53, 35, 81, 8, 106, 37, 63, - 64, 63, 64, 37, 8, 41, 63, 64, 63, 64, - 63, 64, 41, 63, 64, 58, 15, 53, 63, 64, - 43, 63, 64, 70, 53, 57, 25, 62, 58, 62, - 8, 106, 55, 99, 8, 63, 64, 63, 64, 63, - 64, 63, 64, 41, 63, 64, 114, 115, 63, 64, - 62, 8, 8, 63, 64, 53, 8, 15, 8, 7, - 107, 63, 64, 63, 64, 8, 8, 25, 117, 63, - 64, 56, 116, 8, 56, 8, 8, 116, 8, 10, - 63, 64, 116, 7, 62, 8, 8, 34, 62, 37, - 63, 64, 7, 25, 114, 115, 7, 26, 0, 28, - 8, 58, 8, 7, 7, 57, 62, 57, 7, 0, - 39, 17, 97, 8, 57, 97, 58, 30, 65, 8, - 12, 26, 57, 28, -1, 58, 57, -1, 17, 30, - 6, 34, 62, 30, 39, 58, 63, 64, -1, -1, - 62, 26, -1, 28, 20, 26, 5, 28, 63, 64, - 37, 10, 63, 64, 39, 63, 64, 63, 39, 63, - 64, 8, 48, -1, 63, 64, 79, 59, 95, 30, - 30, 57, 96, 65, 63, 7, 63, 64, 79, 92, - 30, 12, 79, 69, 26, 17, 28, 30, 12, 30, - 30, 92, 63, 64, 30, 92, 50, 39, 57, 8, - 15, 22, 23, 105, 15, 37, 22, 23, -1, 63, - 64, -1, 114, -1, 105, -1, 111, 112, 79, 79, - 35, -1, -1, 114, 35, -1, -1, 130, 59, 79, - -1, 92, 92, -1, 65, 59, 79, -1, 79, 79, - -1, 65, 92, 79, -1, 116, 18, 19, 15, 92, - -1, 92, 92, -1, 63, 64, 92, 15, 15, 18, - 19, -1, 116, 15, 111, 112, -1, -1, 35, 15, - 37, -1, 88, 89, 46, 47, -1, 35, 35, 37, - 37, 102, -1, 35, -1, 37, 102, 46, 47, 35, - 15, 37, -1, -1, 109, 110, 15, -1, 109, 110, - -1, 121, 122, 123, 124, 125, 126, -1, -1, 34, - 35, -1, 37, -1, -1, 34, 35, 10, 37, 24, - 25, -1, -1, 24, 25, -1, -1, -1, 33, 22, - 23, 36, 33, 38, -1, 36, -1, 38, -1, -1, - 10, 34, 109, 110, -1, -1, -1, 24, 25, -1, - -1, 109, 110, -1, -1, 32, 33, 109, 110, 36, - 30, 38, -1, 109, 110, -1, -1, 24, 25, -1, - -1, -1, 65, -1, -1, 32, 33, 18, 19, 36, - 30, 38, -1, -1, 109, 110, 79, 30, -1, -1, - 109, 110, -1, -1, -1, 88, 89, 15, -1, -1, - 70, 71, 72, -1, -1, 46, 47, -1, -1, 102, - -1, 116, 30, -1, -1, 116, 15, -1, -1, -1, - 70, 71, 72, -1, -1, -1, -1, 70, 71, 72, - -1, 30, -1, -1, -1, -1, 106, 107, 108, 116, - -1, -1, -1, -1, -1, -1, -1, 117, 118, 119, - -1, -1, 70, 71, 72, -1, 106, 107, 108, 116, - -1, -1, -1, 106, 107, 108, -1, 117, 118, 119, - 15, 70, 71, 72, 117, 118, 119, -1, -1, -1, - 130, -1, -1, -1, -1, 30, -1, 130, 106, 107, - 108, -1, -1, 30, -1, -1, -1, -1, -1, 117, - 118, 119, -1, -1, -1, -1, -1, 106, 107, 108, - -1, -1, 130, 30, -1, -1, -1, -1, 117, 118, - 119, -1, -1, -1, -1, 70, 71, 72, -1, -1, - -1, 130, -1, 70, 71, 72, -1, -1, -1, -1, + 57, 37, 0, 7, 62, 7, 62, 37, 57, 57, + 37, 50, 62, 7, 57, 7, 62, 0, 15, 96, + 16, 37, 1, 49, 83, 96, 8, 34, 96, 5, + 5, 37, 2, 34, 52, 7, 5, 57, 57, 34, + 7, 15, 15, 34, 8, 62, 7, 37, 103, 20, + 34, 17, 17, 8, 7, 70, 34, 62, 57, 62, + 7, 38, 48, 7, 57, 17, 66, 8, 48, 17, + 38, 34, 17, 62, 30, 37, 35, 34, 38, 17, + 30, 17, 63, 34, 96, 34, 1, 7, 17, 7, + 1, 7, 34, 2, 7, 49, 83, 37, 83, 57, + 34, 8, 37, 7, 37, 17, 52, 34, 2, 37, + 7, 37, 49, 52, 38, 34, 30, 34, 7, 62, + 7, 7, 17, 7, 34, 17, 7, 30, 116, 34, + 62, 62, 62, 8, 57, 57, 37, 7, 34, 0, + 17, 34, 8, 1, 34, -1, -1, -1, 8, 70, + 2, 57, 37, 7, 34, 63, 30, 57, 57, 37, + 62, 34, 30, 30, 62, 30, 57, 38, 30, 8, + 8, 8, 7, 23, 62, 57, 7, 7, 103, 62, + 8, 57, -1, 62, 17, 8, 7, -1, 8, 8, + 37, 34, 17, 62, 34, 8, 52, -1, 70, 62, + 49, 17, 8, 37, 63, 34, 17, 17, 7, 7, + 63, 15, 63, 57, -1, 57, 62, 34, 63, 83, + 8, 62, 15, 8, 8, -1, 62, -1, 8, 41, + 34, 7, 8, 8, 41, 62, 62, 15, 10, 8, + 58, 53, 35, 58, 8, 69, 53, 25, 57, 81, + 7, 106, 41, 8, 56, 63, 64, 8, 37, 116, + 63, 64, 63, 64, 53, 8, 63, 64, 116, 63, + 64, 63, 64, 58, 62, 37, 63, 64, 62, 70, + 63, 64, 62, 58, 106, 57, 63, 64, 56, 58, + 63, 64, 106, 6, 58, 97, 63, 64, 63, 64, + 63, 64, 57, 8, 57, 32, 8, 20, 8, 114, + 115, 62, 8, 8, 114, 115, 107, 15, 116, 62, + 8, 63, 64, 63, 64, 63, 64, 25, 8, 97, + 25, 63, 64, 63, 64, 63, 64, 116, 8, 96, + 41, 15, 58, 8, 63, 64, 43, 8, 34, 7, + 12, 25, 53, 30, 116, 57, 0, 62, 55, 30, + 12, 57, 62, 30, -1, 5, 7, 30, 37, 57, + 10, 26, 8, 28, 7, 0, -1, 30, 8, 65, + 48, 7, 62, 99, 39, 63, 64, 30, 58, 57, + 117, 30, 8, 58, 63, 64, 57, 59, 7, 22, + 23, 69, 79, 65, 12, 63, 64, 59, 79, 63, + 64, 37, 79, 65, 8, 92, 79, 57, 7, 30, + 30, 92, 63, 64, 15, 92, 79, 63, 64, 92, + 63, 64, 7, 63, 64, 30, 79, -1, 116, 92, + 79, 95, 17, 8, 35, 34, 37, 8, -1, 92, + -1, 59, 17, 92, 63, 64, 17, 65, 18, 19, + 50, 105, 37, 15, 18, 19, 22, 23, 79, 79, + 114, 15, -1, 63, 64, 18, 19, 18, 19, 102, + 105, 92, 92, 35, 79, -1, 46, 47, -1, 114, + -1, 35, 46, 47, 15, 111, 112, 92, 63, -1, + 15, -1, 63, 46, 47, 46, 47, 15, 26, -1, + 28, -1, -1, -1, 35, -1, 37, 111, 112, -1, + 35, 39, 37, 15, -1, -1, 116, 35, -1, 37, + 15, -1, 88, 89, 121, 122, 123, 124, 125, 126, + -1, 130, 34, 35, -1, 37, 102, 24, 25, 34, + 35, -1, 37, -1, -1, -1, 33, 109, 110, 36, + -1, 38, 24, 25, -1, 109, 110, -1, -1, 24, + 25, 33, -1, -1, 36, -1, 38, 32, 33, -1, + -1, 36, -1, 38, 24, 25, 30, 10, 109, 110, + -1, -1, 32, 33, 109, 110, 36, -1, 38, 22, + 23, 109, 110, -1, 30, -1, -1, -1, -1, 10, + -1, 34, -1, -1, -1, -1, 15, 109, 110, -1, + -1, -1, -1, -1, 109, 110, 70, 71, 72, 30, + -1, -1, -1, -1, -1, -1, 35, -1, 37, 116, + 15, -1, 65, -1, 70, 71, 72, -1, -1, -1, + -1, -1, -1, -1, 116, 30, 79, 15, -1, -1, + -1, 116, 106, 107, 108, 88, 89, -1, -1, 70, + 71, 72, 30, 117, 118, 119, 116, -1, -1, 102, + 106, 107, 108, -1, -1, -1, 130, -1, -1, -1, + -1, 117, 118, 119, -1, 70, 71, 72, -1, -1, + -1, -1, -1, -1, 130, 106, 107, 108, -1, -1, + 109, 110, 70, 71, 72, -1, 117, 118, 119, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 30, -1, + -1, 106, 107, 108, -1, 30, -1, -1, -1, -1, + -1, -1, 117, 118, 119, -1, -1, -1, 106, 107, + 108, -1, -1, -1, -1, 130, -1, -1, -1, 117, + 118, 119, -1, -1, -1, -1, -1, -1, 70, 71, + 72, -1, 130, -1, -1, 70, 71, 72, -1, 30, + -1, -1, -1, -1, -1, 30, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 70, 71, 72, -1, -1, -1, -1, - -1, 106, 107, 108, -1, -1, -1, -1, -1, 106, - 107, 108, 117, 118, 119, -1, -1, -1, -1, -1, - 117, 118, 119, 30, -1, 130, 30, 104, -1, 106, - 107, 108, -1, 130, -1, -1, -1, 15, -1, 116, - 117, 118, 119, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 30, 130, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 70, 71, 72, 70, 71, 72, -1, - -1, -1, -1, -1, -1, 79, -1, 30, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 92, -1, - -1, -1, 70, 71, 72, 30, -1, 104, -1, 106, - 107, 108, 106, 107, 108, -1, -1, -1, -1, 116, - 117, 118, 119, 117, 118, 119, -1, 70, 71, 72, - -1, -1, -1, 130, -1, -1, 130, 30, 106, 107, - 108, -1, -1, -1, -1, 70, 71, 72, -1, 117, - 118, 119, -1, -1, 79, -1, -1, -1, -1, -1, - -1, 104, 130, 106, 107, 108, 30, 92, -1, -1, + -1, -1, 104, -1, 106, 107, 108, -1, -1, -1, + -1, 106, 107, 108, 116, 117, 118, 119, -1, 70, + 71, 72, 117, 118, 119, 70, 71, 72, 130, 30, + -1, -1, -1, -1, 79, 130, -1, -1, -1, 15, + -1, -1, -1, -1, -1, -1, -1, 92, 30, -1, + -1, -1, -1, 104, 30, 106, 107, 108, -1, -1, + -1, 106, 107, 108, -1, 116, 117, 118, 119, 70, + 71, 72, 117, 118, 119, -1, -1, -1, 79, 130, + -1, -1, -1, -1, -1, 130, -1, -1, 70, 71, + 72, 92, -1, -1, 70, 71, 72, -1, -1, -1, + -1, -1, -1, -1, 30, 106, 107, 108, -1, -1, + -1, 37, -1, -1, -1, -1, 117, 118, 119, -1, + -1, -1, 104, -1, 106, 107, 108, -1, -1, 130, + 106, 107, 108, 30, 116, 117, 118, 119, -1, -1, + 37, 117, 118, 119, 70, 71, 72, -1, 130, -1, + -1, -1, -1, -1, 130, -1, -1, -1, 30, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 70, 71, 72, -1, -1, 104, -1, + 106, 107, 108, -1, -1, -1, -1, 30, -1, -1, + 116, 117, 118, 119, 37, -1, -1, -1, 70, 71, + 72, -1, -1, -1, 130, -1, -1, 104, 30, 106, + 107, 108, -1, -1, -1, 37, -1, -1, -1, 116, + 117, 118, 119, -1, -1, -1, -1, 70, 71, 72, + -1, -1, 104, 130, 106, 107, 108, 30, -1, -1, + -1, 34, 35, -1, 116, 117, 118, 119, 70, 71, + 72, -1, -1, -1, -1, -1, -1, -1, 130, -1, + -1, 104, 30, 106, 107, 108, -1, -1, -1, -1, -1, -1, -1, 116, 117, 118, 119, 70, 71, 72, - -1, 106, 107, 108, -1, -1, -1, 130, -1, -1, - -1, 30, 117, 118, 119, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 130, 70, 71, 72, 30, - -1, 104, -1, 106, 107, 108, 37, -1, -1, -1, - -1, -1, -1, 116, 117, 118, 119, -1, -1, -1, - -1, 70, 71, 72, -1, -1, -1, 130, -1, -1, - 104, -1, 106, 107, 108, -1, -1, -1, -1, 70, - 71, 72, 116, 117, 118, 119, -1, -1, -1, -1, - -1, -1, -1, -1, 103, 104, 130, 106, 107, 108, - 30, -1, -1, -1, -1, 30, -1, 116, 117, 118, - 119, -1, 37, 104, -1, 106, 107, 108, -1, -1, - -1, 130, -1, -1, -1, 116, 117, 118, 119, -1, + -1, -1, 104, -1, 106, 107, 108, 130, -1, -1, + -1, -1, -1, -1, 116, 117, 118, 119, -1, -1, + -1, -1, 70, 71, 72, -1, -1, -1, 130, -1, + -1, 104, -1, 106, 107, 108, -1, 3, -1, -1, + -1, -1, -1, 116, 117, 118, 119, 13, -1, -1, + -1, 17, -1, -1, -1, 103, 104, 130, 106, 107, + 108, 27, -1, 29, -1, -1, -1, -1, 116, 117, + 118, 119, -1, -1, 40, -1, 42, 43, -1, 30, + -1, -1, 130, 34, 35, 51, 30, -1, 54, 55, + 34, 35, -1, -1, 60, -1, -1, -1, -1, -1, + -1, 67, 68, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 84, 70, + 71, 72, -1, -1, -1, -1, 70, 71, 72, -1, + -1, -1, -1, -1, -1, -1, 30, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 104, -1, 106, 107, 108, -1, -1, + 104, -1, 106, 107, 108, 116, 117, 118, 119, 63, + 64, -1, 116, 117, 118, 119, 70, 71, 72, 130, + -1, -1, -1, -1, -1, -1, 130, -1, -1, -1, + 30, -1, -1, -1, 34, 35, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 30, + 104, -1, 106, 107, 108, -1, -1, -1, -1, -1, + -1, -1, 116, 117, 118, 119, -1, -1, -1, -1, + 70, 71, 72, -1, -1, -1, 130, -1, -1, -1, + -1, -1, 63, 64, -1, -1, -1, -1, -1, 70, + 71, 72, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 104, -1, 106, 107, 108, -1, + -1, -1, -1, -1, -1, -1, 116, 117, 118, 119, + -1, -1, -1, 104, -1, 106, 107, 108, -1, -1, + 130, -1, -1, -1, 3, 116, 117, 118, 119, -1, + -1, -1, -1, -1, 13, -1, -1, 30, 17, 130, + -1, 34, 35, -1, -1, -1, -1, -1, 27, -1, + 29, -1, -1, 30, -1, -1, -1, 34, 35, -1, + -1, 40, -1, 42, 43, -1, -1, -1, -1, -1, + -1, -1, 51, -1, -1, 54, 55, 70, 71, 72, + -1, 60, -1, -1, -1, -1, -1, -1, 67, 68, + -1, -1, 30, 70, 71, 72, 34, 35, -1, -1, + -1, -1, -1, -1, -1, 84, -1, -1, -1, -1, + -1, 104, -1, 106, 107, 108, -1, -1, -1, -1, + -1, -1, 99, 116, 117, 118, 119, 104, -1, 106, + 107, 108, 70, 71, 72, -1, 3, 130, -1, 116, + 117, 118, 119, -1, -1, -1, 13, -1, -1, -1, + 17, -1, -1, 130, -1, 30, -1, -1, -1, 34, + 27, 99, 29, -1, -1, 32, 104, -1, 106, 107, + 108, -1, -1, 40, -1, 42, 43, -1, 116, 117, + 118, 119, -1, -1, 51, -1, -1, 54, 55, -1, + 65, -1, 130, 60, 69, 70, 71, 72, -1, -1, + 67, 68, -1, -1, -1, -1, -1, -1, 4, 5, + 6, -1, -1, 9, 10, 11, -1, 84, 14, -1, + 16, -1, -1, -1, 20, 21, -1, 23, -1, 104, + -1, 106, 107, 108, 30, 31, 32, 33, -1, -1, + -1, 116, 117, 118, 119, -1, -1, -1, 44, -1, + 117, -1, -1, -1, -1, 130, -1, -1, -1, 30, + -1, -1, -1, 34, 35, 61, -1, -1, -1, -1, + -1, -1, -1, -1, 70, 71, 72, 73, 74, 75, + -1, 77, 78, 79, 80, 81, 82, -1, -1, 85, + 86, 87, 88, 89, -1, 91, 92, -1, -1, 70, + 71, 72, 98, -1, -1, 101, 102, 103, 104, 105, + 106, 107, 108, -1, -1, -1, -1, -1, 114, -1, + 116, 117, 118, 119, -1, -1, -1, -1, 99, -1, + -1, -1, -1, 104, 130, 106, 107, 108, -1, -1, + -1, -1, -1, -1, -1, 116, 117, 118, 119, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 130, - 70, 71, 72, -1, -1, 70, 71, 72, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 30, -1, -1, -1, -1, -1, -1, 37, -1, - -1, -1, -1, -1, 104, -1, 106, 107, 108, 104, - -1, 106, 107, 108, -1, -1, 116, 117, 118, 119, - -1, 116, 117, 118, 119, -1, -1, -1, -1, -1, - 130, 70, 71, 72, 30, 130, -1, -1, -1, -1, - -1, 37, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 30, -1, -1, -1, 34, 35, 30, - -1, -1, -1, 34, 35, 104, -1, 106, 107, 108, - -1, -1, -1, -1, 70, 71, 72, 116, 117, 118, - 119, -1, -1, -1, 30, -1, -1, -1, 34, 35, - -1, 130, -1, 70, 71, 72, -1, -1, -1, 70, - 71, 72, -1, -1, -1, -1, -1, -1, 104, 30, - 106, 107, 108, 34, 35, -1, -1, -1, -1, -1, - 116, 117, 118, 119, 70, 71, 72, 104, -1, 106, - 107, 108, -1, 104, 130, 106, 107, 108, 30, 116, - 117, 118, 119, -1, -1, 116, 117, 118, 119, 70, - 71, 72, -1, 130, -1, -1, -1, -1, 104, 130, - 106, 107, 108, -1, -1, -1, -1, -1, -1, -1, - 116, 117, 118, 119, -1, -1, -1, -1, 70, 71, - 72, -1, -1, 104, 130, 106, 107, 108, -1, -1, - -1, -1, -1, 3, -1, 116, 117, 118, 119, -1, - -1, -1, -1, 13, -1, -1, -1, 17, -1, 130, - -1, 103, 104, -1, 106, 107, 108, 27, -1, 29, - -1, -1, -1, -1, 116, 117, 118, 119, -1, -1, - 40, -1, 42, 43, -1, 30, -1, -1, 130, 34, - 35, 51, 30, -1, 54, 55, 34, 35, -1, -1, - 60, -1, -1, -1, -1, -1, -1, 67, 68, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 84, 70, 71, 72, -1, -1, - -1, -1, 70, 71, 72, -1, -1, -1, -1, -1, - -1, -1, 30, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 104, - -1, 106, 107, 108, -1, -1, 104, -1, 106, 107, - 108, 116, 117, 118, 119, 63, 64, -1, 116, 117, - 118, 119, 70, 71, 72, 130, -1, -1, -1, -1, - -1, -1, 130, -1, -1, -1, 30, -1, -1, -1, - 34, 35, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 104, -1, 106, 107, - 108, -1, -1, -1, -1, -1, -1, -1, 116, 117, - 118, 119, -1, -1, -1, -1, 70, 71, 72, -1, - 3, -1, 130, -1, -1, -1, -1, -1, -1, -1, - 13, -1, -1, -1, 17, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 27, -1, 29, -1, -1, -1, - 104, 30, 106, 107, 108, 34, -1, 40, -1, 42, - 43, -1, 116, 117, 118, 119, -1, -1, 51, -1, - -1, 54, 55, -1, -1, -1, 130, 60, -1, -1, - 30, -1, -1, -1, 67, 68, 65, -1, -1, -1, - 69, 70, 71, 72, -1, -1, -1, -1, -1, -1, - -1, 84, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 63, 64, -1, -1, -1, -1, -1, - 70, 71, 72, -1, -1, 104, -1, 106, 107, 108, - -1, -1, -1, -1, -1, 3, -1, 116, 117, 118, - 119, -1, -1, -1, -1, 13, -1, -1, -1, 17, - -1, 130, -1, -1, 104, -1, 106, 107, 108, 27, - -1, 29, -1, -1, 32, -1, 116, 117, 118, 119, - -1, -1, 40, -1, 42, 43, -1, -1, -1, -1, - 130, -1, -1, 51, 30, -1, 54, 55, 34, 35, - -1, -1, 60, -1, -1, -1, -1, -1, -1, 67, - 68, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 84, -1, -1, -1, - -1, -1, -1, -1, 70, 71, 72, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 117, - -1, -1, -1, 99, -1, -1, -1, -1, 104, -1, - 106, 107, 108, -1, -1, -1, -1, -1, -1, -1, - 116, 117, 118, 119, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 130, -1, -1, -1, 12, 13, - -1, -1, -1, -1, -1, -1, -1, -1, 22, 23, - -1, -1, -1, -1, -1, -1, 30, -1, -1, -1, - 34, 35, -1, 37, -1, -1, -1, -1, -1, -1, - 44, -1, -1, -1, 48, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 69, 70, 71, 72, -1, - 74, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 85, 86, 87, -1, -1, -1, -1, -1, 93, - -1, -1, -1, -1, -1, -1, -1, 101, 102, -1, - 104, -1, 106, 107, 108, 109, 110, -1, -1, -1, - -1, -1, 116, 117, 118, 119, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 130, -1, -1, -1, - 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, - 22, 23, -1, -1, -1, -1, -1, -1, 30, -1, - -1, -1, 34, 35, -1, 37, -1, -1, -1, -1, - -1, -1, 44, -1, -1, -1, 48, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 69, 70, 71, - 72, -1, 74, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 85, 86, 87, -1, -1, -1, -1, - -1, 93, -1, -1, -1, -1, -1, -1, -1, 101, - 102, -1, 104, -1, 106, 107, 108, 109, 110, -1, - -1, -1, -1, -1, 116, 117, 118, 119, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 130, -1, - -1, -1, 12, 13, -1, -1, -1, -1, -1, -1, - -1, -1, 22, 23, -1, -1, -1, -1, -1, -1, - 30, -1, -1, -1, 34, 35, -1, 37, -1, -1, - -1, -1, -1, -1, 44, -1, -1, -1, 48, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 69, - 70, 71, 72, -1, 74, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 85, 86, 87, -1, -1, - 90, -1, -1, 93, -1, -1, -1, -1, -1, -1, - -1, 101, 102, -1, 104, -1, 106, 107, 108, 109, - 110, -1, -1, -1, -1, -1, 116, 117, 118, 119, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 130, -1, -1, -1, 12, 13, -1, 15, -1, -1, - -1, -1, -1, -1, 22, 23, -1, -1, -1, -1, - -1, -1, 30, -1, -1, -1, 34, 35, -1, 37, - -1, -1, -1, -1, -1, -1, 44, -1, -1, -1, - 48, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 69, 70, 71, 72, -1, 74, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 85, 86, 87, - -1, -1, -1, -1, -1, 93, -1, -1, -1, -1, - -1, -1, -1, 101, 102, -1, 104, -1, 106, 107, - 108, 109, 110, -1, -1, -1, -1, -1, 116, 117, - 118, 119, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 130, -1, -1, -1, 12, 13, -1, -1, - -1, -1, -1, -1, -1, -1, 22, 23, -1, -1, - -1, -1, -1, -1, 30, -1, -1, -1, 34, 35, - -1, 37, -1, -1, -1, -1, -1, -1, 44, -1, - -1, -1, 48, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 69, 70, 71, 72, -1, 74, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 85, - 86, 87, -1, -1, -1, -1, 92, 93, -1, -1, - -1, -1, -1, -1, -1, 101, 102, -1, 104, -1, - 106, 107, 108, 109, 110, -1, -1, -1, -1, -1, - 116, 117, 118, 119, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 130, -1, -1, -1, 12, 13, - -1, 15, -1, -1, -1, -1, -1, -1, 22, 23, - -1, -1, -1, -1, -1, -1, 30, -1, -1, -1, - 34, 35, -1, 37, -1, -1, -1, -1, -1, -1, - 44, -1, -1, -1, 48, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 69, 70, 71, 72, -1, - 74, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 85, 86, 87, -1, -1, -1, -1, -1, 93, - -1, -1, -1, -1, -1, -1, -1, 101, 102, -1, - 104, -1, 106, 107, 108, 109, 110, -1, -1, -1, - -1, -1, 116, 117, 118, 119, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 130, -1, -1, -1, - 10, -1, 12, 13, -1, -1, -1, -1, -1, -1, - -1, -1, 22, 23, -1, -1, -1, -1, -1, -1, - 30, -1, -1, -1, 34, 35, -1, 37, -1, -1, - -1, -1, -1, -1, 44, -1, -1, -1, 48, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 69, - 70, 71, 72, -1, 74, -1, -1, -1, -1, 79, - -1, -1, -1, -1, -1, 85, 86, 87, -1, -1, - 90, -1, -1, 93, -1, -1, -1, -1, 98, -1, - -1, 101, 102, -1, 104, -1, 106, 107, 108, 109, - 110, -1, -1, -1, -1, -1, 116, 117, 118, 119, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 130, -1, -1, -1, 10, -1, 12, 13, -1, -1, - -1, -1, -1, -1, -1, -1, 22, 23, -1, -1, - -1, -1, -1, -1, 30, -1, -1, -1, 34, 35, - -1, 37, -1, -1, -1, -1, -1, -1, 44, -1, - -1, -1, 48, -1, -1, -1, -1, -1, -1, -1, - -1, 57, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 69, 70, 71, 72, -1, 74, -1, - -1, -1, -1, 79, -1, -1, -1, -1, -1, 85, - 86, 87, -1, -1, 90, -1, -1, 93, -1, -1, - -1, -1, 98, -1, -1, 101, 102, -1, 104, -1, - 106, 107, 108, 109, 110, -1, -1, -1, -1, -1, - 116, 117, 118, 119, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 130, -1, -1, -1, 10, -1, - 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, - 22, 23, -1, -1, -1, -1, -1, -1, 30, -1, - -1, -1, 34, 35, -1, 37, -1, -1, -1, -1, - -1, -1, 44, -1, -1, -1, 48, -1, -1, -1, - -1, -1, -1, -1, -1, 57, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 69, 70, 71, - 72, -1, 74, -1, -1, -1, -1, 79, -1, -1, - -1, -1, -1, 85, 86, 87, -1, -1, 90, -1, - -1, 93, -1, -1, -1, -1, 98, -1, -1, 101, - 102, -1, 104, -1, 106, 107, 108, 109, 110, -1, - -1, -1, -1, -1, 116, 117, 118, 119, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 130, -1, - -1, -1, 11, 12, 13, -1, -1, -1, -1, -1, + -1, -1, -1, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, 22, 23, -1, -1, -1, -1, -1, -1, 30, -1, -1, -1, 34, 35, -1, 37, -1, - -1, -1, 41, -1, 43, 44, 45, -1, -1, 48, - -1, -1, -1, -1, 53, -1, 55, -1, -1, -1, + -1, -1, -1, -1, -1, 44, -1, -1, -1, 48, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 69, 70, 71, 72, -1, 74, -1, 76, -1, 78, - -1, 80, -1, -1, -1, -1, 85, 86, 87, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 69, 70, 71, 72, -1, 74, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 85, 86, 87, -1, -1, -1, -1, -1, 93, -1, -1, -1, -1, -1, -1, -1, 101, 102, -1, 104, -1, 106, 107, 108, 109, 110, -1, -1, -1, -1, -1, 116, 117, 118, 119, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 130, -1, -1, -1, 11, 12, 13, -1, -1, - -1, -1, -1, -1, -1, -1, 22, 23, -1, -1, - -1, -1, -1, -1, 30, -1, -1, -1, 34, 35, - -1, 37, -1, -1, -1, 41, -1, 43, 44, 45, - -1, -1, 48, -1, -1, -1, -1, 53, -1, 55, + -1, 130, -1, -1, -1, 12, 13, -1, -1, -1, + -1, -1, -1, -1, -1, 22, 23, -1, -1, -1, + -1, -1, -1, 30, -1, -1, -1, 34, 35, -1, + 37, -1, -1, -1, -1, -1, -1, 44, -1, -1, + -1, 48, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 69, 70, 71, 72, -1, 74, -1, - 76, -1, 78, -1, 80, -1, -1, -1, -1, 85, - 86, 87, -1, -1, -1, -1, -1, 93, -1, -1, - -1, -1, -1, -1, 100, 101, 102, -1, 104, -1, - 106, 107, 108, 109, 110, -1, -1, -1, -1, -1, - 116, 117, 118, 119, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 130, -1, -1, -1, 11, 12, + -1, -1, 69, 70, 71, 72, -1, 74, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 85, 86, + 87, -1, -1, -1, -1, -1, 93, -1, -1, -1, + -1, -1, -1, -1, 101, 102, -1, 104, -1, 106, + 107, 108, 109, 110, -1, -1, -1, -1, -1, 116, + 117, 118, 119, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 130, -1, -1, -1, 12, 13, -1, + -1, -1, -1, -1, -1, -1, -1, 22, 23, -1, + -1, -1, -1, -1, -1, 30, -1, -1, -1, 34, + 35, -1, 37, -1, -1, -1, -1, -1, -1, 44, + -1, -1, -1, 48, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 69, 70, 71, 72, -1, 74, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 85, 86, 87, -1, -1, -1, -1, 92, 93, -1, + -1, -1, -1, -1, -1, -1, 101, 102, -1, 104, + -1, 106, 107, 108, 109, 110, -1, -1, -1, -1, + -1, 116, 117, 118, 119, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 130, -1, -1, -1, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, 22, 23, -1, -1, -1, -1, -1, -1, 30, -1, -1, - -1, 34, 35, -1, 37, -1, -1, -1, 41, -1, - 43, 44, 45, -1, -1, 48, -1, -1, -1, -1, - 53, -1, 55, -1, -1, -1, -1, -1, -1, -1, + -1, 34, 35, -1, 37, -1, -1, -1, -1, -1, + -1, 44, -1, -1, -1, 48, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 69, 70, 71, 72, - -1, 74, -1, 76, -1, 78, -1, 80, -1, -1, - -1, -1, 85, 86, 87, -1, -1, -1, -1, -1, - 93, -1, -1, -1, -1, -1, -1, 100, 101, 102, + -1, 74, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 85, 86, 87, -1, -1, 90, -1, -1, + 93, -1, -1, -1, -1, -1, -1, -1, 101, 102, -1, 104, -1, 106, 107, 108, 109, 110, -1, -1, -1, -1, -1, 116, 117, 118, 119, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 130, -1, -1, - -1, 11, 12, 13, -1, -1, -1, -1, -1, -1, - -1, -1, 22, 23, -1, -1, -1, -1, -1, -1, - 30, -1, -1, -1, 34, 35, -1, 37, -1, -1, - -1, 41, -1, 43, 44, 45, -1, -1, 48, -1, - -1, -1, -1, 53, -1, 55, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 69, - 70, 71, 72, -1, 74, -1, 76, -1, 78, -1, - 80, -1, -1, -1, -1, 85, 86, 87, -1, -1, - -1, -1, -1, 93, -1, -1, -1, -1, -1, 99, - 100, 101, 102, -1, 104, -1, 106, 107, 108, 109, - 110, -1, -1, -1, -1, -1, 116, 117, 118, 119, + -1, 12, 13, -1, 15, -1, -1, -1, -1, -1, + -1, 22, 23, -1, -1, -1, -1, -1, -1, 30, + -1, -1, -1, 34, 35, -1, 37, -1, -1, -1, + -1, -1, -1, 44, -1, -1, -1, 48, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 130, -1, -1, -1, 11, 12, 13, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 69, 70, + 71, 72, -1, 74, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 85, 86, 87, -1, -1, -1, + -1, -1, 93, -1, -1, -1, -1, -1, -1, -1, + 101, 102, -1, 104, -1, 106, 107, 108, 109, 110, + -1, -1, -1, -1, -1, 116, 117, 118, 119, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 130, + -1, -1, -1, 12, 13, -1, 15, -1, -1, -1, + -1, -1, -1, 22, 23, -1, -1, -1, -1, -1, + -1, 30, -1, -1, -1, 34, 35, -1, 37, -1, + -1, -1, -1, -1, -1, 44, -1, -1, -1, 48, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 69, 70, 71, 72, -1, 74, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 85, 86, 87, -1, + -1, -1, -1, -1, 93, -1, -1, -1, -1, -1, + -1, -1, 101, 102, -1, 104, -1, 106, 107, 108, + 109, 110, -1, -1, -1, -1, -1, 116, 117, 118, + 119, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 130, -1, -1, -1, 10, -1, 12, 13, -1, + -1, -1, -1, -1, -1, -1, -1, 22, 23, -1, + -1, -1, -1, -1, -1, 30, -1, -1, -1, 34, + 35, -1, 37, -1, -1, -1, -1, -1, -1, 44, + -1, -1, -1, 48, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 69, 70, 71, 72, -1, 74, + -1, -1, -1, -1, 79, -1, -1, -1, -1, -1, + 85, 86, 87, -1, -1, 90, -1, -1, 93, -1, + -1, -1, -1, 98, -1, -1, 101, 102, -1, 104, + -1, 106, 107, 108, 109, 110, -1, -1, -1, -1, + -1, 116, 117, 118, 119, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 130, -1, -1, -1, 10, + -1, 12, 13, -1, -1, -1, -1, -1, -1, -1, + -1, 22, 23, -1, -1, -1, -1, -1, -1, 30, + -1, -1, -1, 34, 35, -1, 37, -1, -1, -1, + -1, -1, -1, 44, -1, -1, -1, 48, -1, -1, + -1, -1, -1, -1, -1, -1, 57, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 69, 70, + 71, 72, -1, 74, -1, -1, -1, -1, 79, -1, + -1, -1, -1, -1, 85, 86, 87, -1, -1, 90, + -1, -1, 93, -1, -1, -1, -1, 98, -1, -1, + 101, 102, -1, 104, -1, 106, 107, 108, 109, 110, + -1, -1, -1, -1, -1, 116, 117, 118, 119, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 130, + -1, -1, -1, 10, -1, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, 22, 23, -1, -1, -1, -1, -1, -1, 30, -1, -1, -1, 34, 35, -1, - 37, -1, -1, -1, 41, -1, 43, 44, 45, -1, - -1, 48, -1, -1, -1, -1, 53, -1, 55, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 65, -1, - -1, -1, 69, 70, 71, 72, -1, 74, -1, 76, - -1, 78, -1, 80, -1, -1, -1, -1, 85, 86, - 87, -1, -1, -1, -1, -1, 93, -1, -1, -1, - -1, -1, -1, 100, 101, 102, -1, 104, -1, 106, + 37, -1, -1, -1, -1, -1, -1, 44, -1, -1, + -1, 48, -1, -1, -1, -1, -1, -1, -1, -1, + 57, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 69, 70, 71, 72, -1, 74, -1, -1, + -1, -1, 79, -1, -1, -1, -1, -1, 85, 86, + 87, -1, -1, 90, -1, -1, 93, -1, -1, -1, + -1, 98, -1, -1, 101, 102, -1, 104, -1, 106, 107, 108, 109, 110, -1, -1, -1, -1, -1, 116, 117, 118, 119, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 130, -1, -1, -1, 11, 12, 13, @@ -1880,10 +1818,10 @@ const short QmlJSGrammar::action_check [] = { -1, -1, -1, -1, -1, 69, 70, 71, 72, -1, 74, -1, 76, -1, 78, -1, 80, -1, -1, -1, -1, 85, 86, 87, -1, -1, -1, -1, -1, 93, - -1, -1, -1, -1, -1, -1, 100, 101, 102, -1, + -1, -1, -1, -1, -1, -1, -1, 101, 102, -1, 104, -1, 106, 107, 108, 109, 110, -1, -1, -1, -1, -1, 116, 117, 118, 119, -1, -1, -1, -1, - -1, -1, -1, -1, 128, -1, 130, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 130, -1, -1, -1, 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, 22, 23, -1, -1, -1, -1, -1, -1, 30, -1, -1, -1, 34, 35, -1, 37, -1, -1, -1, @@ -1895,7 +1833,7 @@ const short QmlJSGrammar::action_check [] = { -1, -1, 93, -1, -1, -1, -1, -1, -1, 100, 101, 102, -1, 104, -1, 106, 107, 108, 109, 110, -1, -1, -1, -1, -1, 116, 117, 118, 119, -1, - -1, -1, -1, -1, -1, -1, 127, -1, -1, 130, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 130, -1, -1, -1, 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, 22, 23, -1, -1, -1, -1, -1, -1, 30, -1, -1, -1, 34, 35, -1, 37, @@ -1905,10 +1843,22 @@ const short QmlJSGrammar::action_check [] = { -1, 69, 70, 71, 72, -1, 74, -1, 76, -1, 78, -1, 80, -1, -1, -1, -1, 85, 86, 87, -1, -1, -1, -1, -1, 93, -1, -1, -1, -1, - -1, 99, 100, 101, 102, -1, 104, -1, 106, 107, + -1, -1, 100, 101, 102, -1, 104, -1, 106, 107, 108, 109, 110, -1, -1, -1, -1, -1, 116, 117, 118, 119, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 130, -1, -1, -1, 8, -1, -1, 11, + -1, -1, 130, -1, -1, -1, 11, 12, 13, -1, + -1, -1, -1, -1, -1, -1, -1, 22, 23, -1, + -1, -1, -1, -1, -1, 30, -1, -1, -1, 34, + 35, -1, 37, -1, -1, -1, 41, -1, 43, 44, + 45, -1, -1, 48, -1, -1, -1, -1, 53, -1, + 55, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 69, 70, 71, 72, -1, 74, + -1, 76, -1, 78, -1, 80, -1, -1, -1, -1, + 85, 86, 87, -1, -1, -1, -1, -1, 93, -1, + -1, -1, -1, -1, 99, 100, 101, 102, -1, 104, + -1, 106, 107, 108, 109, 110, -1, -1, -1, -1, + -1, 116, 117, 118, 119, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 130, -1, -1, -1, 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, 22, 23, -1, -1, -1, -1, -1, -1, 30, -1, -1, -1, 34, 35, -1, 37, -1, -1, -1, 41, @@ -1920,7 +1870,7 @@ const short QmlJSGrammar::action_check [] = { -1, 93, -1, -1, -1, -1, -1, -1, 100, 101, 102, -1, 104, -1, 106, 107, 108, 109, 110, -1, -1, -1, -1, -1, 116, 117, 118, 119, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 130, -1, + -1, -1, -1, -1, -1, -1, 128, -1, 130, -1, -1, -1, 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, 22, 23, -1, -1, -1, -1, -1, -1, 30, -1, -1, -1, 34, 35, -1, 37, -1, @@ -1958,28 +1908,16 @@ const short QmlJSGrammar::action_check [] = { 100, 101, 102, -1, 104, -1, 106, 107, 108, 109, 110, -1, -1, -1, -1, -1, 116, 117, 118, 119, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 130, -1, -1, -1, 11, 12, 13, -1, -1, -1, - -1, -1, -1, -1, -1, 22, 23, -1, -1, -1, - -1, -1, -1, 30, -1, -1, -1, 34, 35, -1, - 37, -1, -1, -1, 41, -1, 43, 44, 45, -1, - -1, 48, -1, -1, -1, -1, 53, -1, 55, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 69, 70, 71, 72, -1, 74, -1, 76, - -1, 78, -1, 80, -1, -1, -1, -1, 85, 86, - 87, -1, -1, -1, -1, -1, 93, -1, -1, -1, - -1, -1, -1, 100, 101, 102, -1, 104, -1, 106, - 107, 108, 109, 110, -1, -1, -1, -1, -1, 116, - 117, 118, 119, -1, -1, -1, -1, -1, -1, -1, - -1, 128, -1, 130, -1, -1, -1, 11, 12, 13, + 130, -1, -1, -1, 8, -1, -1, 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, 22, 23, -1, -1, -1, -1, -1, -1, 30, -1, -1, -1, 34, 35, -1, 37, -1, -1, -1, 41, -1, 43, 44, 45, -1, -1, 48, -1, -1, -1, -1, 53, - -1, 55, -1, -1, 58, -1, -1, -1, -1, -1, + -1, 55, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 69, 70, 71, 72, -1, 74, -1, 76, -1, 78, -1, 80, -1, -1, -1, -1, 85, 86, 87, -1, -1, -1, -1, -1, 93, - -1, -1, -1, -1, -1, 99, 100, 101, 102, -1, + -1, -1, -1, -1, -1, -1, 100, 101, 102, -1, 104, -1, 106, 107, 108, 109, 110, -1, -1, -1, -1, -1, 116, 117, 118, 119, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 130, -1, -1, -1, @@ -1988,10 +1926,10 @@ const short QmlJSGrammar::action_check [] = { -1, -1, -1, 34, 35, -1, 37, -1, -1, -1, 41, -1, 43, 44, 45, -1, -1, 48, -1, -1, -1, -1, 53, -1, 55, -1, -1, -1, -1, -1, - -1, 62, -1, -1, -1, -1, -1, -1, 69, 70, + -1, -1, -1, -1, 65, -1, -1, -1, 69, 70, 71, 72, -1, 74, -1, 76, -1, 78, -1, 80, -1, -1, -1, -1, 85, 86, 87, -1, -1, -1, - -1, -1, 93, -1, -1, -1, -1, -1, 99, 100, + -1, -1, 93, -1, -1, -1, -1, -1, -1, 100, 101, 102, -1, 104, -1, 106, 107, 108, 109, 110, -1, -1, -1, -1, -1, 116, 117, 118, 119, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 130, @@ -2002,329 +1940,382 @@ const short QmlJSGrammar::action_check [] = { 48, -1, -1, -1, -1, 53, -1, 55, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 69, 70, 71, 72, -1, 74, -1, 76, -1, - 78, 79, 80, -1, -1, -1, -1, 85, 86, 87, - 88, 89, -1, -1, -1, 93, -1, -1, -1, -1, - -1, -1, 100, 101, 102, -1, 104, -1, 106, 107, + 78, -1, 80, -1, -1, -1, -1, 85, 86, 87, + -1, -1, -1, -1, -1, 93, -1, -1, -1, -1, + -1, 99, 100, 101, 102, -1, 104, -1, 106, 107, 108, 109, 110, -1, -1, -1, -1, -1, 116, 117, 118, 119, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 130, -1, -1, -1, 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, 22, 23, -1, - -1, -1, -1, -1, -1, 30, 31, -1, -1, 34, + -1, -1, -1, -1, -1, 30, -1, -1, -1, 34, 35, -1, 37, -1, -1, -1, 41, -1, 43, 44, 45, -1, -1, 48, -1, -1, -1, -1, 53, -1, - 55, -1, -1, -1, -1, -1, -1, -1, 63, -1, - -1, -1, -1, -1, 69, 70, 71, 72, 73, 74, - -1, 76, 77, 78, -1, 80, -1, 82, -1, -1, + 55, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 69, 70, 71, 72, -1, 74, + -1, 76, -1, 78, -1, 80, -1, -1, -1, -1, 85, 86, 87, -1, -1, -1, -1, -1, 93, -1, -1, -1, -1, -1, -1, 100, 101, 102, -1, 104, -1, 106, 107, 108, 109, 110, -1, -1, -1, -1, -1, 116, 117, 118, 119, -1, -1, -1, -1, -1, - -1, -1, 127, 128, -1, 130, -1, -1, -1, 11, + -1, -1, 127, -1, -1, 130, -1, -1, -1, 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, - 22, 23, -1, -1, -1, -1, -1, -1, 30, 31, + 22, 23, -1, -1, -1, -1, -1, -1, 30, -1, -1, -1, 34, 35, -1, 37, -1, -1, -1, 41, -1, 43, 44, 45, -1, -1, 48, -1, -1, -1, -1, 53, -1, 55, -1, -1, -1, -1, -1, -1, - -1, 63, -1, -1, -1, -1, -1, 69, 70, 71, - 72, 73, 74, -1, 76, 77, 78, -1, 80, -1, - 82, -1, -1, 85, 86, 87, -1, -1, -1, -1, - -1, 93, -1, -1, -1, -1, -1, -1, 100, 101, - 102, -1, 104, -1, 106, 107, 108, 109, 110, -1, - -1, -1, -1, -1, 116, 117, 118, 119, -1, -1, - -1, -1, -1, -1, -1, 127, 128, -1, 130, -1, - -1, -1, 4, 5, 6, -1, -1, 9, 10, 11, - -1, -1, 14, -1, 16, -1, -1, -1, 20, 21, - -1, 23, -1, -1, -1, -1, -1, -1, 30, 31, - 32, 33, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 44, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 61, - -1, -1, -1, -1, -1, -1, -1, -1, 70, 71, - 72, 73, 74, 75, -1, 77, 78, 79, 80, 81, - 82, -1, -1, 85, 86, 87, 88, 89, -1, 91, - 92, -1, -1, -1, -1, -1, 98, -1, -1, 101, - 102, 103, 104, 105, 106, 107, 108, -1, -1, -1, - -1, -1, 114, -1, 116, 117, 118, 119, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 130, -1, - -1, -1, 4, 5, 6, -1, -1, 9, 10, 11, - -1, -1, 14, -1, 16, -1, -1, -1, 20, 21, - -1, 23, -1, -1, -1, -1, -1, -1, 30, 31, - 32, 33, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 44, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 57, -1, -1, -1, 61, - -1, -1, -1, -1, -1, -1, -1, -1, 70, 71, - 72, 73, 74, 75, -1, 77, 78, 79, 80, 81, - 82, -1, -1, 85, 86, 87, 88, 89, -1, 91, - 92, -1, -1, -1, -1, -1, 98, -1, -1, 101, - 102, 103, 104, 105, 106, 107, 108, -1, -1, -1, - -1, -1, 114, -1, 116, 117, 118, 119, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 130, -1, - -1, -1, 4, 5, 6, -1, -1, 9, 10, 11, - -1, -1, 14, -1, 16, -1, -1, -1, 20, 21, - -1, 23, -1, -1, -1, -1, -1, -1, 30, 31, - 32, 33, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 44, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 57, -1, -1, -1, 61, - -1, -1, -1, -1, -1, -1, -1, -1, 70, 71, - 72, 73, 74, 75, -1, 77, 78, 79, 80, 81, - 82, -1, -1, 85, 86, 87, 88, 89, -1, 91, - 92, -1, -1, -1, -1, -1, 98, -1, -1, 101, - 102, 103, 104, 105, 106, 107, 108, -1, -1, -1, - -1, -1, 114, -1, 116, 117, 118, 119, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 130, -1, - -1, -1, 4, 5, 6, -1, -1, 9, 10, 11, - -1, -1, 14, -1, 16, -1, -1, -1, 20, 21, - -1, 23, -1, -1, -1, -1, -1, -1, 30, 31, - 32, 33, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 44, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 57, -1, -1, -1, 61, - -1, -1, -1, -1, -1, -1, -1, -1, 70, 71, - 72, 73, 74, 75, -1, 77, 78, 79, 80, 81, - 82, -1, -1, 85, 86, 87, 88, 89, -1, 91, - 92, -1, -1, -1, -1, -1, 98, -1, -1, 101, - 102, 103, 104, 105, 106, 107, 108, -1, -1, -1, - -1, -1, 114, -1, 116, 117, 118, 119, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 130, -1, - -1, -1, 4, 5, 6, -1, -1, 9, 10, 11, - -1, -1, 14, -1, 16, -1, -1, -1, 20, 21, - -1, 23, -1, -1, -1, -1, -1, -1, 30, 31, - 32, 33, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 44, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 57, -1, -1, -1, 61, - -1, -1, -1, -1, -1, -1, -1, -1, 70, 71, - 72, 73, 74, 75, -1, 77, 78, 79, 80, 81, - 82, -1, -1, 85, 86, 87, 88, 89, -1, 91, - 92, -1, -1, -1, -1, -1, 98, -1, -1, 101, - 102, 103, 104, 105, 106, 107, 108, -1, -1, -1, - -1, -1, 114, -1, 116, 117, 118, 119, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 130, -1, - -1, -1, 4, 5, 6, -1, -1, 9, 10, 11, - -1, -1, 14, -1, 16, -1, -1, -1, 20, 21, - -1, 23, -1, -1, -1, -1, -1, -1, 30, 31, - 32, 33, -1, 35, -1, -1, -1, -1, -1, -1, - -1, -1, 44, -1, -1, -1, 48, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 61, -1, -1, -1, -1, -1, -1, -1, 69, 70, 71, - 72, 73, 74, 75, -1, 77, 78, 79, 80, 81, - 82, -1, -1, 85, 86, 87, 88, 89, -1, 91, - 92, -1, -1, -1, -1, -1, 98, -1, -1, 101, - 102, 103, 104, 105, 106, 107, 108, -1, -1, -1, - -1, -1, 114, -1, 116, 117, 118, 119, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 130, -1, - -1, -1, 4, 5, 6, -1, -1, 9, 10, 11, - -1, -1, 14, -1, 16, -1, -1, -1, 20, 21, - -1, 23, -1, -1, -1, -1, -1, -1, 30, 31, - 32, 33, -1, 35, -1, -1, -1, -1, -1, -1, - -1, -1, 44, -1, -1, -1, 48, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 61, - -1, -1, -1, 65, -1, -1, -1, 69, 70, 71, - 72, 73, 74, 75, -1, 77, 78, 79, 80, 81, - 82, -1, -1, 85, 86, 87, 88, 89, -1, 91, - 92, -1, -1, -1, -1, -1, 98, -1, -1, 101, - 102, 103, 104, 105, 106, 107, 108, -1, -1, -1, - -1, -1, 114, -1, 116, 117, 118, 119, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 130, -1, - -1, -1, 4, 5, 6, -1, -1, 9, 10, 11, - -1, -1, 14, -1, 16, -1, -1, -1, 20, 21, - -1, 23, -1, -1, -1, -1, -1, -1, 30, 31, - 32, 33, -1, 35, -1, -1, -1, -1, -1, -1, - -1, -1, 44, -1, -1, -1, 48, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 61, - -1, 63, -1, 65, -1, -1, -1, 69, 70, 71, - 72, 73, 74, 75, -1, 77, 78, 79, 80, 81, - 82, -1, -1, 85, 86, 87, 88, 89, -1, 91, - 92, -1, -1, -1, -1, -1, 98, -1, -1, 101, - 102, 103, 104, 105, 106, 107, 108, -1, -1, -1, - -1, -1, 114, -1, 116, 117, 118, 119, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 130, -1, - -1, -1, 4, 5, 6, -1, -1, 9, 10, 11, - -1, -1, 14, -1, 16, -1, -1, -1, 20, 21, - -1, 23, -1, -1, -1, -1, -1, -1, 30, 31, - 32, 33, -1, 35, -1, -1, -1, -1, -1, -1, - -1, -1, 44, -1, -1, -1, 48, -1, -1, -1, - -1, -1, -1, -1, -1, 57, -1, -1, -1, 61, - -1, -1, -1, 65, -1, -1, -1, 69, 70, 71, - 72, 73, 74, 75, -1, 77, 78, 79, 80, 81, - 82, -1, -1, 85, 86, 87, 88, 89, -1, 91, - 92, -1, -1, -1, -1, -1, 98, -1, -1, 101, - 102, 103, 104, 105, 106, 107, 108, -1, -1, -1, - -1, -1, 114, -1, 116, 117, 118, 119, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 130, -1, - -1, -1, 4, 5, 6, -1, -1, 9, 10, 11, - -1, -1, 14, -1, 16, -1, -1, -1, 20, 21, - -1, 23, -1, -1, -1, -1, -1, -1, 30, 31, - 32, 33, -1, 35, -1, -1, -1, -1, -1, -1, - -1, -1, 44, -1, -1, -1, 48, -1, -1, -1, - -1, -1, -1, -1, -1, 57, -1, -1, -1, 61, - -1, -1, -1, 65, -1, -1, -1, 69, 70, 71, - 72, 73, 74, 75, -1, 77, 78, 79, 80, 81, - 82, -1, -1, 85, 86, 87, 88, 89, -1, 91, - 92, -1, -1, -1, -1, -1, 98, -1, -1, 101, - 102, 103, 104, 105, 106, 107, 108, -1, -1, -1, - -1, -1, 114, -1, 116, 117, 118, 119, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 130, -1, - -1, -1, 4, -1, -1, -1, -1, 9, -1, 11, - 12, 13, 14, -1, -1, -1, -1, -1, -1, 21, - 22, 23, -1, -1, -1, -1, -1, -1, 30, 31, - -1, -1, 34, 35, -1, 37, -1, -1, -1, 41, - -1, 43, 44, 45, -1, -1, 48, -1, -1, -1, - -1, 53, -1, 55, -1, -1, -1, -1, -1, 61, - -1, 63, -1, -1, -1, -1, -1, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, - 82, -1, -1, 85, 86, 87, -1, -1, -1, 91, + 72, -1, 74, -1, 76, -1, 78, -1, 80, -1, + -1, -1, -1, 85, 86, 87, -1, -1, -1, -1, -1, 93, -1, -1, -1, -1, -1, -1, 100, 101, 102, -1, 104, -1, 106, 107, 108, 109, 110, -1, -1, -1, -1, -1, 116, 117, 118, 119, -1, -1, -1, -1, -1, -1, -1, -1, 128, -1, 130, -1, - -1, -1, 4, -1, -1, -1, -1, 9, -1, 11, - 12, 13, 14, -1, -1, -1, -1, -1, -1, 21, - 22, 23, -1, -1, -1, -1, -1, -1, 30, 31, - -1, -1, 34, 35, -1, 37, -1, -1, -1, 41, - -1, 43, 44, 45, -1, -1, 48, -1, -1, -1, - -1, 53, -1, 55, -1, -1, -1, -1, -1, 61, - -1, 63, -1, -1, -1, -1, -1, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, - 82, -1, -1, 85, 86, 87, -1, -1, -1, 91, - -1, 93, -1, -1, -1, -1, -1, -1, 100, 101, - 102, -1, 104, -1, 106, 107, 108, 109, 110, -1, - -1, -1, -1, -1, 116, 117, 118, 119, -1, -1, - -1, -1, -1, -1, -1, 127, 128, -1, 130, -1, - -1, -1, 4, -1, -1, -1, -1, 9, -1, 11, - 12, 13, 14, -1, -1, -1, -1, -1, -1, 21, - 22, 23, -1, -1, -1, -1, -1, -1, 30, 31, - -1, -1, 34, 35, -1, 37, -1, -1, -1, 41, - -1, 43, 44, 45, -1, -1, 48, -1, -1, -1, - -1, 53, -1, 55, -1, -1, -1, -1, -1, 61, - -1, 63, -1, -1, -1, -1, -1, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, - 82, -1, -1, 85, 86, 87, -1, -1, -1, 91, - -1, 93, -1, -1, -1, -1, -1, -1, 100, 101, - 102, -1, 104, -1, 106, 107, 108, 109, 110, -1, - -1, -1, -1, -1, 116, 117, 118, 119, -1, -1, - -1, -1, -1, -1, -1, 127, 128, -1, 130, -1, - -1, -1, 4, -1, -1, -1, -1, 9, -1, 11, - 12, 13, 14, -1, -1, -1, -1, -1, -1, 21, - 22, 23, -1, -1, -1, -1, -1, -1, 30, 31, - -1, -1, 34, 35, -1, 37, -1, -1, -1, 41, - -1, 43, 44, 45, -1, -1, 48, -1, -1, -1, - -1, 53, -1, 55, -1, -1, -1, -1, -1, 61, - -1, 63, -1, -1, -1, -1, -1, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, - 82, -1, -1, 85, 86, 87, -1, -1, -1, 91, - -1, 93, -1, -1, -1, -1, -1, -1, 100, 101, - 102, -1, 104, -1, 106, 107, 108, 109, 110, -1, - -1, -1, -1, -1, 116, 117, 118, 119, -1, -1, - -1, -1, -1, -1, -1, 127, 128, -1, 130, -1, - -1, -1, + -1, -1, 11, 12, 13, -1, -1, -1, -1, -1, + -1, -1, -1, 22, 23, -1, -1, -1, -1, -1, + -1, 30, -1, -1, -1, 34, 35, -1, 37, -1, + -1, -1, 41, -1, 43, 44, 45, -1, -1, 48, + -1, -1, -1, -1, 53, -1, 55, -1, -1, 58, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 69, 70, 71, 72, -1, 74, -1, 76, -1, 78, + -1, 80, -1, -1, -1, -1, 85, 86, 87, -1, + -1, -1, -1, -1, 93, -1, -1, -1, -1, -1, + 99, 100, 101, 102, -1, 104, -1, 106, 107, 108, + 109, 110, -1, -1, -1, -1, -1, 116, 117, 118, + 119, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 130, -1, -1, -1, 11, 12, 13, -1, -1, + -1, -1, -1, -1, -1, -1, 22, 23, -1, -1, + -1, -1, -1, -1, 30, -1, -1, -1, 34, 35, + -1, 37, -1, -1, -1, 41, -1, 43, 44, 45, + -1, -1, 48, -1, -1, -1, -1, 53, -1, 55, + -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, + -1, -1, -1, 69, 70, 71, 72, -1, 74, -1, + 76, -1, 78, -1, 80, -1, -1, -1, -1, 85, + 86, 87, -1, -1, -1, -1, -1, 93, -1, -1, + -1, -1, -1, 99, 100, 101, 102, -1, 104, -1, + 106, 107, 108, 109, 110, -1, -1, -1, -1, -1, + 116, 117, 118, 119, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 130, -1, -1, -1, 11, 12, + 13, -1, -1, -1, -1, -1, -1, -1, -1, 22, + 23, -1, -1, -1, -1, -1, -1, 30, -1, -1, + -1, 34, 35, -1, 37, -1, -1, -1, 41, -1, + 43, 44, 45, -1, -1, 48, -1, -1, -1, -1, + 53, -1, 55, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 69, 70, 71, 72, + -1, 74, -1, 76, -1, 78, 79, 80, -1, -1, + -1, -1, 85, 86, 87, 88, 89, -1, -1, -1, + 93, -1, -1, -1, -1, -1, -1, 100, 101, 102, + -1, 104, -1, 106, 107, 108, 109, 110, -1, -1, + -1, -1, -1, 116, 117, 118, 119, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 130, -1, -1, + -1, 11, 12, 13, -1, -1, -1, -1, -1, -1, + -1, -1, 22, 23, -1, -1, -1, -1, -1, -1, + 30, 31, -1, -1, 34, 35, -1, 37, -1, -1, + -1, 41, -1, 43, 44, 45, -1, -1, 48, -1, + -1, -1, -1, 53, -1, 55, -1, -1, -1, -1, + -1, -1, -1, 63, -1, -1, -1, -1, -1, 69, + 70, 71, 72, 73, 74, -1, 76, 77, 78, -1, + 80, -1, 82, -1, -1, 85, 86, 87, -1, -1, + -1, -1, -1, 93, -1, -1, -1, -1, -1, -1, + 100, 101, 102, -1, 104, -1, 106, 107, 108, 109, + 110, -1, -1, -1, -1, -1, 116, 117, 118, 119, + -1, -1, -1, -1, -1, -1, -1, 127, 128, -1, + 130, -1, -1, -1, 11, 12, 13, -1, -1, -1, + -1, -1, -1, -1, -1, 22, 23, -1, -1, -1, + -1, -1, -1, 30, 31, -1, -1, 34, 35, -1, + 37, -1, -1, -1, 41, -1, 43, 44, 45, -1, + -1, 48, -1, -1, -1, -1, 53, -1, 55, -1, + -1, -1, -1, -1, -1, -1, 63, -1, -1, -1, + -1, -1, 69, 70, 71, 72, 73, 74, -1, 76, + 77, 78, -1, 80, -1, 82, -1, -1, 85, 86, + 87, -1, -1, -1, -1, -1, 93, -1, -1, -1, + -1, -1, -1, 100, 101, 102, -1, 104, -1, 106, + 107, 108, 109, 110, -1, -1, -1, -1, -1, 116, + 117, 118, 119, -1, -1, -1, -1, -1, -1, -1, + 127, 128, -1, 130, -1, -1, -1, 4, 5, 6, + -1, -1, 9, 10, 11, -1, -1, 14, -1, 16, + -1, -1, -1, 20, 21, -1, 23, -1, -1, -1, + -1, -1, -1, 30, 31, 32, 33, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 44, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 61, -1, -1, -1, -1, -1, + -1, -1, -1, 70, 71, 72, 73, 74, 75, -1, + 77, 78, 79, 80, 81, 82, -1, -1, 85, 86, + 87, 88, 89, -1, 91, 92, -1, -1, -1, -1, + -1, 98, -1, -1, 101, 102, 103, 104, 105, 106, + 107, 108, -1, -1, -1, -1, -1, 114, -1, 116, + 117, 118, 119, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 130, -1, -1, -1, 4, 5, 6, + -1, -1, 9, 10, 11, -1, -1, 14, -1, 16, + -1, -1, -1, 20, 21, -1, 23, -1, -1, -1, + -1, -1, -1, 30, 31, 32, 33, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 44, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 57, -1, -1, -1, 61, -1, -1, -1, -1, -1, + -1, -1, -1, 70, 71, 72, 73, 74, 75, -1, + 77, 78, 79, 80, 81, 82, -1, -1, 85, 86, + 87, 88, 89, -1, 91, 92, -1, -1, -1, -1, + -1, 98, -1, -1, 101, 102, 103, 104, 105, 106, + 107, 108, -1, -1, -1, -1, -1, 114, -1, 116, + 117, 118, 119, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 130, -1, -1, -1, 4, 5, 6, + -1, -1, 9, 10, 11, -1, -1, 14, -1, 16, + -1, -1, -1, 20, 21, -1, 23, -1, -1, -1, + -1, -1, -1, 30, 31, 32, 33, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 44, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 57, -1, -1, -1, 61, -1, -1, -1, -1, -1, + -1, -1, -1, 70, 71, 72, 73, 74, 75, -1, + 77, 78, 79, 80, 81, 82, -1, -1, 85, 86, + 87, 88, 89, -1, 91, 92, -1, -1, -1, -1, + -1, 98, -1, -1, 101, 102, 103, 104, 105, 106, + 107, 108, -1, -1, -1, -1, -1, 114, -1, 116, + 117, 118, 119, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 130, -1, -1, -1, 4, 5, 6, + -1, -1, 9, 10, 11, -1, -1, 14, -1, 16, + -1, -1, -1, 20, 21, -1, 23, -1, -1, -1, + -1, -1, -1, 30, 31, 32, 33, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 44, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 57, -1, -1, -1, 61, -1, -1, -1, -1, -1, + -1, -1, -1, 70, 71, 72, 73, 74, 75, -1, + 77, 78, 79, 80, 81, 82, -1, -1, 85, 86, + 87, 88, 89, -1, 91, 92, -1, -1, -1, -1, + -1, 98, -1, -1, 101, 102, 103, 104, 105, 106, + 107, 108, -1, -1, -1, -1, -1, 114, -1, 116, + 117, 118, 119, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 130, -1, -1, -1, 4, 5, 6, + -1, -1, 9, 10, 11, -1, -1, 14, -1, 16, + -1, -1, -1, 20, 21, -1, 23, -1, -1, -1, + -1, -1, -1, 30, 31, 32, 33, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 44, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 57, -1, -1, -1, 61, -1, -1, -1, -1, -1, + -1, -1, -1, 70, 71, 72, 73, 74, 75, -1, + 77, 78, 79, 80, 81, 82, -1, -1, 85, 86, + 87, 88, 89, -1, 91, 92, -1, -1, -1, -1, + -1, 98, -1, -1, 101, 102, 103, 104, 105, 106, + 107, 108, -1, -1, -1, -1, -1, 114, -1, 116, + 117, 118, 119, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 130, -1, -1, -1, 4, 5, 6, + -1, -1, 9, 10, 11, -1, -1, 14, -1, 16, + -1, -1, -1, 20, 21, -1, 23, -1, -1, -1, + -1, -1, -1, 30, 31, 32, 33, -1, 35, -1, + -1, -1, -1, -1, -1, -1, -1, 44, -1, -1, + -1, 48, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 61, -1, -1, -1, -1, -1, + -1, -1, 69, 70, 71, 72, 73, 74, 75, -1, + 77, 78, 79, 80, 81, 82, -1, -1, 85, 86, + 87, 88, 89, -1, 91, 92, -1, -1, -1, -1, + -1, 98, -1, -1, 101, 102, 103, 104, 105, 106, + 107, 108, -1, -1, -1, -1, -1, 114, -1, 116, + 117, 118, 119, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 130, -1, -1, -1, 4, 5, 6, + -1, -1, 9, 10, 11, -1, -1, 14, -1, 16, + -1, -1, -1, 20, 21, -1, 23, -1, -1, -1, + -1, -1, -1, 30, 31, 32, 33, -1, 35, -1, + -1, -1, -1, -1, -1, -1, -1, 44, -1, -1, + -1, 48, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 61, -1, -1, -1, 65, -1, + -1, -1, 69, 70, 71, 72, 73, 74, 75, -1, + 77, 78, 79, 80, 81, 82, -1, -1, 85, 86, + 87, 88, 89, -1, 91, 92, -1, -1, -1, -1, + -1, 98, -1, -1, 101, 102, 103, 104, 105, 106, + 107, 108, -1, -1, -1, -1, -1, 114, -1, 116, + 117, 118, 119, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 130, -1, -1, -1, 4, 5, 6, + -1, -1, 9, 10, 11, -1, -1, 14, -1, 16, + -1, -1, -1, 20, 21, -1, 23, -1, -1, -1, + -1, -1, -1, 30, 31, 32, 33, -1, 35, -1, + -1, -1, -1, -1, -1, -1, -1, 44, -1, -1, + -1, 48, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 61, -1, 63, -1, 65, -1, + -1, -1, 69, 70, 71, 72, 73, 74, 75, -1, + 77, 78, 79, 80, 81, 82, -1, -1, 85, 86, + 87, 88, 89, -1, 91, 92, -1, -1, -1, -1, + -1, 98, -1, -1, 101, 102, 103, 104, 105, 106, + 107, 108, -1, -1, -1, -1, -1, 114, -1, 116, + 117, 118, 119, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 130, -1, -1, -1, 4, 5, 6, + -1, -1, 9, 10, 11, -1, -1, 14, -1, 16, + -1, -1, -1, 20, 21, -1, 23, -1, -1, -1, + -1, -1, -1, 30, 31, 32, 33, -1, 35, -1, + -1, -1, -1, -1, -1, -1, -1, 44, -1, -1, + -1, 48, -1, -1, -1, -1, -1, -1, -1, -1, + 57, -1, -1, -1, 61, -1, -1, -1, 65, -1, + -1, -1, 69, 70, 71, 72, 73, 74, 75, -1, + 77, 78, 79, 80, 81, 82, -1, -1, 85, 86, + 87, 88, 89, -1, 91, 92, -1, -1, -1, -1, + -1, 98, -1, -1, 101, 102, 103, 104, 105, 106, + 107, 108, -1, -1, -1, -1, -1, 114, -1, 116, + 117, 118, 119, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 130, -1, -1, -1, 4, 5, 6, + -1, -1, 9, 10, 11, -1, -1, 14, -1, 16, + -1, -1, -1, 20, 21, -1, 23, -1, -1, -1, + -1, -1, -1, 30, 31, 32, 33, -1, 35, -1, + -1, -1, -1, -1, -1, -1, -1, 44, -1, -1, + -1, 48, -1, -1, -1, -1, -1, -1, -1, -1, + 57, -1, -1, -1, 61, -1, -1, -1, 65, -1, + -1, -1, 69, 70, 71, 72, 73, 74, 75, -1, + 77, 78, 79, 80, 81, 82, -1, -1, 85, 86, + 87, 88, 89, -1, 91, 92, -1, -1, -1, -1, + -1, 98, -1, -1, 101, 102, 103, 104, 105, 106, + 107, 108, -1, -1, -1, -1, -1, 114, -1, 116, + 117, 118, 119, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 130, -1, -1, -1, 4, -1, -1, + -1, -1, 9, -1, 11, 12, 13, 14, -1, -1, + -1, -1, -1, -1, 21, 22, 23, -1, -1, -1, + -1, -1, -1, 30, 31, -1, -1, 34, 35, -1, + 37, -1, -1, -1, 41, -1, 43, 44, 45, -1, + -1, 48, -1, -1, -1, -1, 53, -1, 55, -1, + -1, -1, -1, -1, 61, -1, 63, -1, -1, -1, + -1, -1, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, -1, -1, 85, 86, + 87, -1, -1, -1, 91, -1, 93, -1, -1, -1, + -1, -1, -1, 100, 101, 102, -1, 104, -1, 106, + 107, 108, 109, 110, -1, -1, -1, -1, -1, 116, + 117, 118, 119, -1, -1, -1, -1, -1, -1, -1, + -1, 128, -1, 130, -1, -1, -1, 4, -1, -1, + -1, -1, 9, -1, 11, 12, 13, 14, -1, -1, + -1, -1, -1, -1, 21, 22, 23, -1, -1, -1, + -1, -1, -1, 30, 31, -1, -1, 34, 35, -1, + 37, -1, -1, -1, 41, -1, 43, 44, 45, -1, + -1, 48, -1, -1, -1, -1, 53, -1, 55, -1, + -1, -1, -1, -1, 61, -1, 63, -1, -1, -1, + -1, -1, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, -1, -1, 85, 86, + 87, -1, -1, -1, 91, -1, 93, -1, -1, -1, + -1, -1, -1, 100, 101, 102, -1, 104, -1, 106, + 107, 108, 109, 110, -1, -1, -1, -1, -1, 116, + 117, 118, 119, -1, -1, -1, -1, -1, -1, -1, + 127, 128, -1, 130, -1, -1, -1, 4, -1, -1, + -1, -1, 9, -1, 11, 12, 13, 14, -1, -1, + -1, -1, -1, -1, 21, 22, 23, -1, -1, -1, + -1, -1, -1, 30, 31, -1, -1, 34, 35, -1, + 37, -1, -1, -1, 41, -1, 43, 44, 45, -1, + -1, 48, -1, -1, -1, -1, 53, -1, 55, -1, + -1, -1, -1, -1, 61, -1, 63, -1, -1, -1, + -1, -1, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, -1, -1, 85, 86, + 87, -1, -1, -1, 91, -1, 93, -1, -1, -1, + -1, -1, -1, 100, 101, 102, -1, 104, -1, 106, + 107, 108, 109, 110, -1, -1, -1, -1, -1, 116, + 117, 118, 119, -1, -1, -1, -1, -1, -1, -1, + 127, 128, -1, 130, -1, -1, -1, 4, -1, -1, + -1, -1, 9, -1, 11, 12, 13, 14, -1, -1, + -1, -1, -1, -1, 21, 22, 23, -1, -1, -1, + -1, -1, -1, 30, 31, -1, -1, 34, 35, -1, + 37, -1, -1, -1, 41, -1, 43, 44, 45, -1, + -1, 48, -1, -1, -1, -1, 53, -1, 55, -1, + -1, -1, -1, -1, 61, -1, 63, -1, -1, -1, + -1, -1, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, -1, -1, 85, 86, + 87, -1, -1, -1, 91, -1, 93, -1, -1, -1, + -1, -1, -1, 100, 101, 102, -1, 104, -1, 106, + 107, 108, 109, 110, -1, -1, -1, -1, -1, 116, + 117, 118, 119, -1, -1, -1, -1, -1, -1, -1, + 127, 128, -1, 130, -1, -1, -1, - 86, 206, 205, 196, 206, 205, 196, 78, 20, 15, - 204, 78, 198, 76, 197, 15, 196, 62, 71, 198, - 197, 196, 62, 20, 120, 212, 115, 71, 212, 15, - 71, 15, 210, 71, 210, 209, 14, 24, 15, 24, - 43, 78, 97, 73, 20, 197, 57, 43, 20, 15, - 15, 139, 15, 115, 15, 15, 120, 73, 57, 47, - 15, 71, 32, 96, 86, 78, 73, 62, 73, 15, - 225, 20, 73, 226, 78, 37, 43, 192, 37, 37, - 15, 20, 159, 159, 78, 186, 189, 15, 62, 203, - 73, 73, 196, 198, 15, 197, 43, 78, 196, 205, - 210, 196, 15, 212, 73, 196, 206, 206, 205, 62, - 24, 204, 32, 198, 71, 197, 196, 62, 225, 198, - 62, 62, 197, 196, 198, 197, 15, 197, 196, 198, - 15, 43, 20, 20, 71, 73, 86, 62, 57, 73, - 71, 20, 78, 209, 196, 78, 78, 204, 78, 78, - 15, 78, 15, 15, 78, 78, 47, 43, 57, 57, - 76, 83, 62, 36, 15, 62, 159, 37, 78, 62, - 96, 32, 196, 198, 197, 24, 94, 86, 62, 96, - 95, 62, 62, 94, 198, 15, 78, 196, 96, 197, - 73, 96, 96, 20, 47, 73, 78, 43, 15, 15, - 57, 78, 15, 183, 73, 20, 43, 2, 2, 32, - 2, 32, 76, 73, 73, 57, 2, 57, 58, 57, - 78, 2, 80, 57, 58, 57, 58, 20, 78, 79, - 78, 78, 73, 74, 11, 12, 32, 32, 32, 35, - 32, 2, 78, 57, 73, 73, 32, 32, 73, 15, - 43, 32, 20, 101, 101, 15, 32, 2, 57, 58, - 154, 73, 2, 2, 53, 101, 57, 58, 2, 57, - 58, 32, 2, 57, 2, 43, -1, 57, 92, 57, - 58, 141, 141, 57, 58, 57, 32, 32, 228, 229, - 57, 57, 32, 32, 57, 58, -1, 57, 32, 57, - 194, 57, 32, 57, 32, 57, 58, 57, 92, 57, - 58, -1, 141, 141, 57, 57, 141, 181, -1, 57, - 92, 88, 57, 58, 57, 58, 105, 74, 75, 141, - 88, 78, 88, 112, 72, 89, 57, 58, 161, 160, - 57, 58, 92, 57, 58, 57, 58, 57, 58, 57, + 73, 86, 206, 205, 78, 196, 206, 205, 196, 76, + 73, 71, 15, 20, 204, 198, 197, 196, 62, 196, + 198, 197, 62, 78, 78, 71, 212, 78, 212, 78, + 71, 73, 20, 15, 15, 210, 210, 209, 120, 97, + 20, 71, 78, 20, 73, 115, 43, 78, 71, 15, + 15, 78, 20, 15, 115, 15, 71, 15, 78, 14, + 24, 120, 57, 96, 86, 57, 225, 78, 62, 226, + 15, 73, 78, 15, 24, 73, 37, 15, 83, 15, + 37, 192, 15, 159, 197, 197, 62, 43, 159, 196, + 198, 186, 20, 196, 73, 205, 189, 206, 212, 73, + 96, 15, 32, 73, 210, 57, 206, 205, 71, 196, + 204, 62, 198, 197, 62, 196, 57, 76, 43, 198, + 225, 96, 197, 62, 196, 62, 20, 15, 196, 198, + 15, 197, 78, 62, 78, 36, 57, 37, 139, 196, + 62, 197, 96, 86, 209, 198, 196, 15, 15, 32, + 43, 43, 15, 198, 78, 15, 204, 62, 197, 159, + 78, 96, 96, 78, 196, 78, 73, 94, 78, 73, + 196, 62, 62, 197, 15, 15, 37, 198, 24, 95, + 78, 62, 94, 57, 86, 15, 62, 73, 32, 71, + 15, 15, 15, 43, 15, 73, 183, 2, 20, 203, + 20, 20, 20, 73, 43, 43, 2, 73, 2, 46, + 47, 46, 47, 2, 73, 73, 73, 73, 2, 2, + 53, 76, 20, 57, 58, 57, 58, 32, 15, 46, + 47, 57, 58, 32, 15, 20, 32, 32, 32, 228, + 229, 57, 58, 32, 57, 43, 57, 58, 32, 32, + 57, 57, 58, 32, 57, 57, 57, 57, 43, 2, + 32, 2, 2, 35, 57, 58, 2, 57, 58, 57, + 57, 141, 2, 32, 154, 141, 57, 11, 12, 32, + 57, 88, 141, 141, 141, 141, 89, 88, 2, 32, + 92, 32, 32, 73, 74, 57, 32, 57, 58, 57, + 78, 79, 32, 57, 92, 57, 58, 57, 58, 78, + 78, 78, 57, 57, 194, 92, -1, 78, 32, 80, + 57, 58, 57, 58, 57, 24, 181, 74, 75, 105, + 92, 78, 101, 101, 101, 57, 112, 57, 58, 57, + 58, 57, 58, -1, 88, 57, 58, 92, 57, 58, + 57, 58, 57, 58, 57, 88, 89, 57, 58, 57, + 58, 194, 161, 3, 159, 57, 58, 57, 58, 72, 92, 57, 58, 57, 58, 57, 58, 57, 58, 57, - 58, 57, 58, 32, 57, 58, 57, 105, -1, 211, - 57, 58, 53, 211, 55, 15, 161, 57, 58, -1, - 88, 89, -1, 159, 57, 58, 57, 58, -1, 46, - 47, -1, 88, 50, 57, 58, 57, 58, 57, 58, - -1, 92, 57, 58, 81, 194, 57, 58, 57, 58, - 57, 57, 92, 57, 58, 161, 57, 58, 57, 57, - 57, 58, -1, 202, 57, 58, 72, -1, 105, 81, - 57, 211, 57, 72, 72, 112, -1, 84, 57, 58, - -1, 88, 89, -1, -1, 72, 46, 72, 57, 182, - 50, 51, 52, 105, -1, 92, 57, 3, 175, 105, - 112, 57, -1, 72, 57, 58, 105, 105, -1, 150, - 81, 72, 57, 216, 195, 175, 72, 175, 105, 81, - 105, 195, 175, 195, 130, 195, 111, 72, 126, 128, - -1, 195, 161, 195, 105, 230, 105, 124, 17, -1, - -1, 112, 111, 105, 105, 57, 58, 108, 195, 105, - 112, 53, 175, 194, 175, 111, 57, 57, 57, 58, - 105, -1, 74, 3, 230, 202, 175, -1, 199, 57, - 171, 72, 72, 118, 175, 74, 195, 81, 57, 172, - 195, -1, 175, 81, 72, 236, -1, 17, -1, -1, - 202, -1, 221, 72, 173, 57, 175, 230, 209, 105, - 204, 105, 57, 58, 105, 105, 112, 105, 112, 57, - 72, 112, 112, 81, 112, 81, -1, 105, 171, 98, - 108, 57, 175, -1, 72, 81, 57, 57, -1, -1, - 57, 202, -1, 88, -1, 232, 72, 105, 57, 105, - 202, 72, 72, 105, 112, 72, 112, 109, -1, 105, - 152, 57, 154, 72, -1, -1, 112, 105, -1, -1, - 57, 109, 57, -1, -1, 105, 72, -1, 98, 105, - 182, -1, 112, 57, 105, 72, 112, 72, 105, 106, - 107, -1, 113, 182, -1, -1, 105, 57, 72, 17, - 57, -1, 194, -1, -1, 3, 202, 17, 202, 105, - 106, 107, 72, 122, 202, 72, 208, 27, 105, 57, - 105, 106, 107, -1, 17, 112, -1, -1, 57, -1, - -1, 105, 106, 107, 72, 180, -1, 30, -1, 57, - 127, -1, 57, 72, 202, 105, 202, 57, 105, 106, - 107, 57, 112, 17, 72, 57, 202, 72, -1, -1, - 57, 58, 72, 27, 57, 125, 72, 105, -1, -1, - 72, 57, 202, -1, 112, -1, 105, 74, 75, 72, - 98, 119, 57, 112, 102, 114, 72, -1, 98, 57, - 105, 106, 107, 57, -1, -1, 17, 72, 57, 105, - 106, 107, 17, 105, 72, 98, 27, 105, 72, -1, - 112, -1, 17, 72, 112, 30, -1, -1, -1, 105, - 25, 123, 27, -1, -1, -1, 112, -1, -1, 17, - 105, 106, 107, -1, 98, -1, 57, 105, -1, 27, - -1, 29, 57, 129, 112, -1, 105, 106, 107, -1, - -1, 72, 57, 121, -1, 17, 36, 72, 38, 39, - 40, 41, 42, 17, 162, 163, 17, 72, 30, -1, - -1, 17, -1, 17, 4, -1, 30, 98, -1, 30, - 26, 27, -1, 98, -1, 182, 30, 17, -1, -1, - 78, 79, -1, 98, -1, 57, -1, -1, 60, -1, - 30, 55, -1, 57, 202, -1, 57, 4, -1, 60, - 72, 57, -1, 57, -1, -1, 60, -1, 72, -1, - 17, 72, -1, -1, 17, 55, 72, 57, 72, -1, - -1, -1, 25, 30, -1, -1, 98, 30, 31, -1, - -1, -1, 72, -1, 98, -1, -1, 98, 17, -1, - -1, -1, 98, -1, 98, -1, -1, -1, 55, -1, - 57, 30, 55, 17, 57, -1, -1, 36, 98, 38, - 39, 40, 41, 42, -1, 72, 30, -1, -1, 72, - -1, -1, 36, -1, 38, 39, 40, 41, 42, 17, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 98, 30, -1, -1, 98, -1, -1, 36, -1, + 58, -1, 161, 46, 47, 57, 58, 50, 57, 58, + 57, 58, 57, 58, -1, 57, 58, 57, 58, 57, + 58, 160, 105, 216, 88, 81, 81, 57, 161, 17, + 92, 211, -1, 57, -1, 81, -1, 81, -1, 57, + 57, -1, 72, 57, 58, -1, 202, 81, 72, 105, + 105, 57, 58, -1, 72, 72, 112, 112, -1, 105, + -1, 105, 57, 58, -1, 81, 112, -1, 112, 57, + -1, 105, -1, 211, -1, 105, -1, 211, 112, 74, + 195, 105, 199, -1, 72, 105, 175, 105, 105, 105, + 57, 58, 112, 57, 124, 195, 112, 195, 122, 195, + -1, 46, 57, 58, 182, 50, 51, 52, 72, 175, + 98, 128, 130, -1, -1, 195, 57, 204, 81, 57, + 58, 88, -1, 195, 209, 195, 175, 57, 58, 57, + 175, 72, 3, 175, 236, 175, 74, 175, 230, -1, + 57, 105, 105, 195, 72, 57, 202, 202, 195, 112, + 57, -1, 57, 53, 118, 72, 202, 171, 202, 32, + 72, 175, 92, 57, 105, 72, 172, 108, 202, 175, + 230, 81, 230, -1, 57, 57, 57, 105, 72, 84, + -1, 17, 202, 88, 89, 113, 202, 182, 105, 72, + 72, 72, 57, 105, 53, 105, 55, 57, 105, -1, + 112, 81, 112, 57, 58, 112, -1, 72, -1, 126, + -1, 105, 72, 180, -1, 57, 171, -1, 112, -1, + 175, 57, 105, 105, 105, 105, -1, 108, 111, 111, + 72, -1, 112, 57, 105, -1, 72, -1, -1, 202, + 105, 112, -1, 17, 182, 105, 111, -1, 72, 109, + -1, 57, 152, 27, 154, 29, -1, 17, 57, -1, + -1, 57, 98, 105, 106, 107, 72, 27, 57, 58, + -1, -1, -1, 72, 17, 57, 72, -1, 57, -1, + -1, 105, 106, 107, 27, 74, 75, -1, 161, -1, + 72, 150, 202, 72, 194, -1, 17, 57, -1, 105, + 106, 107, 232, 17, 78, 79, 105, 17, 208, 105, + 106, 107, 72, 112, 57, 57, 30, 27, 57, 173, + 119, 175, 202, 105, 106, 107, 105, 106, 107, 72, + 72, 202, -1, 72, 57, 194, 57, 57, 98, -1, + -1, 3, 57, 57, 57, -1, 57, 57, 221, 72, + -1, 72, 72, -1, -1, 98, 57, 72, 72, 72, + 17, 72, 72, 105, -1, 57, 105, 106, 107, -1, + 112, 72, 114, 30, -1, -1, 57, 98, -1, -1, + 72, 102, 105, -1, 98, 105, 106, 107, 98, 112, + 105, 72, 105, 182, 105, -1, 17, 112, 17, 112, + 57, 112, 125, 60, 105, -1, 25, -1, 27, 30, + 123, 112, 127, 105, -1, 72, -1, 109, 129, -1, + 121, 17, -1, -1, 105, 106, 107, 36, -1, 38, + 39, 40, 41, 42, 30, 17, 57, -1, 57, 60, + -1, 98, 17, 105, 26, 27, -1, -1, -1, 17, + 112, 72, -1, 72, -1, 30, -1, 4, 4, -1, + -1, 57, 30, -1, 60, -1, -1, -1, -1, -1, + 17, 17, -1, -1, -1, 57, 72, 98, -1, 98, + 55, -1, 57, 30, 30, -1, -1, -1, -1, 57, + 72, -1, 60, -1, -1, -1, -1, 72, -1, 17, + 162, 163, 98, -1, 72, -1, -1, 25, 55, 55, + 57, 57, 30, 31, -1, -1, 98, -1, -1, -1, + -1, -1, -1, 98, -1, 72, 72, -1, -1, -1, + 98, -1, -1, -1, -1, -1, -1, 55, -1, 57, + 202, -1, 17, -1, -1, -1, 17, -1, -1, 17, + -1, 98, 98, -1, 72, 30, -1, -1, -1, 30, + -1, 36, 30, 38, 39, 40, 41, 42, 36, -1, 38, 39, 40, 41, 42, -1, -1, -1, -1, -1, + 98, -1, -1, -1, -1, -1, 57, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 72, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 17, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 30, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 57, -1, -1, 60, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 72, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 98, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 98, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -2338,6 +2329,28 @@ const short QmlJSGrammar::action_check [] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1 + -1, -1, -1, -1, -1, -1, -1, 17, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 30, -1, -1, -1, -1, -1, 36, -1, 38, 39, + 40, 41, 42, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1 }; diff --git a/src/libs/qmljs/parser/qmljsgrammar_p.h b/src/libs/qmljs/parser/qmljsgrammar_p.h index ca006cfd96c..d4c9593add3 100644 --- a/src/libs/qmljs/parser/qmljsgrammar_p.h +++ b/src/libs/qmljs/parser/qmljsgrammar_p.h @@ -166,15 +166,15 @@ public: T_XOR_EQ = 84, T_YIELD = 100, - ACCEPT_STATE = 1098, - RULE_COUNT = 616, - STATE_COUNT = 1099, + ACCEPT_STATE = 1102, + RULE_COUNT = 619, + STATE_COUNT = 1103, TERMINAL_COUNT = 134, NON_TERMINAL_COUNT = 238, - GOTO_INDEX_OFFSET = 1099, - GOTO_INFO_OFFSET = 6942, - GOTO_CHECK_OFFSET = 6942 + GOTO_INDEX_OFFSET = 1103, + GOTO_INFO_OFFSET = 6857, + GOTO_CHECK_OFFSET = 6857 }; static const char *const spell[]; diff --git a/src/libs/qmljs/parser/qmljsparser.cpp b/src/libs/qmljs/parser/qmljsparser.cpp index fdc442694ae..c9b79e7f47d 100644 --- a/src/libs/qmljs/parser/qmljsparser.cpp +++ b/src/libs/qmljs/parser/qmljsparser.cpp @@ -1,3 +1,5 @@ + +#line 134 "qmljs.g" /**************************************************************************** ** ** Copyright (C) 2016 The Qt Company Ltd. @@ -22,7 +24,6 @@ ** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ****************************************************************************/ -#line 172 "qmljs.g" #include "qmljs/parser/qmljsengine_p.h" #include "qmljs/parser/qmljslexer_p.h" @@ -780,14 +781,45 @@ case 59: case 78: { AST::UiPublicMember *node = sym(2).UiPublicMember; - node->isDefaultMember = true; - node->defaultToken = loc(1); + node->isRequired = true; + node->requiredToken = loc(1); sym(1).Node = node; } break; #line 1334 "qmljs.g" case 79: { + AST::UiPublicMember *node = sym(3).UiPublicMember; + node->isRequired = true; + node->requiredToken = loc(2); + node->isDefaultMember = true; + node->defaultToken = loc(1); + sym(1).Node = node; + } break; + +#line 1346 "qmljs.g" + + case 80: { + AST::UiPublicMember *node = sym(3).UiPublicMember; + node->isRequired = true; + node->requiredToken = loc(1); + node->isDefaultMember = true; + node->defaultToken = loc(2); + sym(1).Node = node; + } break; + +#line 1358 "qmljs.g" + + case 81: { + AST::UiPublicMember *node = sym(2).UiPublicMember; + node->isDefaultMember = true; + node->defaultToken = loc(1); + sym(1).Node = node; + } break; + +#line 1368 "qmljs.g" + + case 82: { AST::UiPublicMember *node = sym(3).UiPublicMember; node->isDefaultMember = true; node->defaultToken = loc(1); @@ -796,9 +828,9 @@ case 59: sym(1).Node = node; } break; -#line 1347 "qmljs.g" +#line 1381 "qmljs.g" - case 80: { + case 83: { AST::UiPublicMember *node = sym(3).UiPublicMember; node->isDefaultMember = true; node->defaultToken = loc(2); @@ -807,32 +839,32 @@ case 59: sym(1).Node = node; } break; -#line 1359 "qmljs.g" +#line 1393 "qmljs.g" /* we need OptionalSemicolon because UiScriptStatement might already parse the last semicolon and then we would miss a semicolon (see tests/auto/quick/qquickvisualdatamodel/data/objectlist.qml)*/ -#line 1365 "qmljs.g" +#line 1399 "qmljs.g" - case 83: { + case 86: { AST::UiRequired *node = new (pool) AST::UiRequired(stringRef(2)); node->requiredToken = loc(1); node->semicolonToken = loc(3); sym(1).Node = node; } break; -#line 1377 "qmljs.g" +#line 1411 "qmljs.g" - case 85: { + case 88: { AST::UiPublicMember *node = sym(2).UiPublicMember; node->requiredToken = loc(1); node->isRequired = true; sym(1).Node = node; } break; -#line 1387 "qmljs.g" +#line 1421 "qmljs.g" - case 86: { + case 89: { AST::UiPublicMember *node = new (pool) AST::UiPublicMember(sym(2).UiQualifiedId->finish(), stringRef(3), sym(5).Statement); node->propertyToken = loc(1); node->typeToken = loc(2); @@ -841,27 +873,27 @@ case 59: sym(1).Node = node; } break; -#line 1401 "qmljs.g" +#line 1435 "qmljs.g" - case 88: { + case 91: { AST::UiPublicMember *node = sym(2).UiPublicMember; node->isReadonlyMember = true; node->readonlyToken = loc(1); sym(1).Node = node; } break; -#line 1411 "qmljs.g" +#line 1445 "qmljs.g" - case 89: { + case 92: { AST::UiPublicMember *node = sym(2).UiPublicMember; node->isDefaultMember = true; node->defaultToken = loc(1); sym(1).Node = node; } break; -#line 1421 "qmljs.g" +#line 1455 "qmljs.g" - case 90: { + case 93: { AST::UiPublicMember *node = new (pool) AST::UiPublicMember(sym(4).UiQualifiedId->finish(), stringRef(6)); node->typeModifier = stringRef(2); node->propertyToken = loc(1); @@ -884,18 +916,18 @@ case 59: sym(1).Node = node; } break; -#line 1449 "qmljs.g" +#line 1483 "qmljs.g" - case 92: { + case 95: { AST::UiPublicMember *node = sym(2).UiPublicMember; node->isReadonlyMember = true; node->readonlyToken = loc(1); sym(1).Node = node; } break; -#line 1459 "qmljs.g" +#line 1493 "qmljs.g" - case 93: { + case 96: { AST::UiPublicMember *node = new (pool) AST::UiPublicMember(sym(2).UiQualifiedId->finish(), stringRef(3)); node->propertyToken = loc(1); node->typeToken = loc(2); @@ -915,37 +947,37 @@ case 59: sym(1).Node = node; } break; -#line 1484 "qmljs.g" +#line 1518 "qmljs.g" - case 95: { + case 98: { AST::UiPublicMember *node = sym(2).UiPublicMember; node->isReadonlyMember = true; node->readonlyToken = loc(1); sym(1).Node = node; } break; -#line 1494 "qmljs.g" +#line 1528 "qmljs.g" - case 96: { + case 99: { auto node = new (pool) AST::UiSourceElement(sym(1).Node); sym(1).Node = node; } break; -#line 1502 "qmljs.g" +#line 1536 "qmljs.g" - case 97: { + case 100: { sym(1).Node = new (pool) AST::UiSourceElement(sym(1).Node); } break; -#line 1509 "qmljs.g" +#line 1543 "qmljs.g" - case 98: { + case 101: { sym(1).Node = new (pool) AST::UiSourceElement(sym(1).Node); } break; -#line 1516 "qmljs.g" +#line 1550 "qmljs.g" - case 99: { + case 102: { if (AST::ArrayMemberExpression *mem = AST::cast(sym(1).Expression)) { diagnostic_messages.append(compileError(mem->lbracketToken, QLatin1String("Ignored annotation"), QtWarningMsg)); @@ -965,9 +997,9 @@ case 59: } } break; -#line 1539 "qmljs.g" +#line 1573 "qmljs.g" - case 100: { + case 103: { AST::UiEnumDeclaration *enumDeclaration = new (pool) AST::UiEnumDeclaration(stringRef(2), sym(4).UiEnumMemberList->finish()); enumDeclaration->enumToken = loc(1); enumDeclaration->rbraceToken = loc(5); @@ -975,9 +1007,9 @@ case 59: break; } -#line 1550 "qmljs.g" +#line 1584 "qmljs.g" - case 101: { + case 104: { if (!stringRef(2).front().isUpper()) { diagnostic_messages.append(compileError(loc(2), QLatin1String("Type name must be upper case"), QtWarningMsg)); @@ -987,18 +1019,18 @@ case 59: sym(1).Node = inlineComponent; } break; -#line 1563 "qmljs.g" +#line 1597 "qmljs.g" - case 102: { + case 105: { AST::UiEnumMemberList *node = new (pool) AST::UiEnumMemberList(stringRef(1)); node->memberToken = loc(1); sym(1).Node = node; break; } -#line 1573 "qmljs.g" +#line 1607 "qmljs.g" - case 103: { + case 106: { AST::UiEnumMemberList *node = new (pool) AST::UiEnumMemberList(stringRef(1), sym(3).dval); node->memberToken = loc(1); node->valueToken = loc(3); @@ -1006,18 +1038,18 @@ case 59: break; } -#line 1584 "qmljs.g" +#line 1618 "qmljs.g" - case 104: { + case 107: { AST::UiEnumMemberList *node = new (pool) AST::UiEnumMemberList(sym(1).UiEnumMemberList, stringRef(3)); node->memberToken = loc(3); sym(1).Node = node; break; } -#line 1594 "qmljs.g" +#line 1628 "qmljs.g" - case 105: { + case 108: { AST::UiEnumMemberList *node = new (pool) AST::UiEnumMemberList(sym(1).UiEnumMemberList, stringRef(3), sym(5).dval); node->memberToken = loc(3); node->valueToken = loc(5); @@ -1025,79 +1057,79 @@ case 59: break; } -#line 1638 "qmljs.g" +#line 1672 "qmljs.g" - case 132: { + case 135: { sym(1).TypeArgumentList = new (pool) AST::TypeArgumentList(sym(1).Type); } break; -#line 1645 "qmljs.g" +#line 1679 "qmljs.g" - case 133: { + case 136: { sym(1).TypeArgumentList = new (pool) AST::TypeArgumentList(sym(1).TypeArgumentList, sym(3).Type); } break; -#line 1652 "qmljs.g" +#line 1686 "qmljs.g" - case 134: { + case 137: { sym(1).Type = new (pool) AST::Type(sym(1).UiQualifiedId, sym(3).TypeArgumentList->finish()); } break; -#line 1659 "qmljs.g" +#line 1693 "qmljs.g" - case 135: { + case 138: { AST::UiQualifiedId *id = new (pool) AST::UiQualifiedId(stringRef(1)); id->identifierToken = loc(1); sym(1).Type = new (pool) AST::Type(id->finish()); } break; -#line 1668 "qmljs.g" +#line 1702 "qmljs.g" - case 136: { + case 139: { sym(1).Type = new (pool) AST::Type(sym(1).UiQualifiedId); } break; -#line 1675 "qmljs.g" +#line 1709 "qmljs.g" - case 137: { + case 140: { sym(1).TypeAnnotation = new (pool) AST::TypeAnnotation(sym(2).Type); sym(1).TypeAnnotation->colonToken = loc(1); } break; -#line 1684 "qmljs.g" +#line 1718 "qmljs.g" - case 139: { + case 142: { sym(1).TypeAnnotation = nullptr; } break; -#line 1695 "qmljs.g" +#line 1729 "qmljs.g" - case 140: { + case 143: { AST::ThisExpression *node = new (pool) AST::ThisExpression(); node->thisToken = loc(1); sym(1).Node = node; } break; -#line 1704 "qmljs.g" +#line 1738 "qmljs.g" - case 141: { + case 144: { AST::IdentifierExpression *node = new (pool) AST::IdentifierExpression(stringRef(1)); node->identifierToken = loc(1); sym(1).Node = node; } break; -#line 1722 "qmljs.g" +#line 1756 "qmljs.g" - case 150: { + case 153: { if (coverExpressionType != CE_ParenthesizedExpression) { syntaxError(coverExpressionErrorLocation, "Expected token ')'."); return false; } } break; -#line 1733 "qmljs.g" +#line 1767 "qmljs.g" - case 151: { + case 154: { AST::NestedExpression *node = new (pool) AST::NestedExpression(sym(2).Expression); node->lparenToken = loc(1); node->rparenToken = loc(3); @@ -1105,26 +1137,26 @@ case 59: coverExpressionType = CE_ParenthesizedExpression; } break; -#line 1744 "qmljs.g" +#line 1778 "qmljs.g" - case 152: { + case 155: { sym(1).Node = nullptr; coverExpressionErrorLocation = loc(2); coverExpressionType = CE_FormalParameterList; } break; -#line 1753 "qmljs.g" +#line 1787 "qmljs.g" - case 153: { + case 156: { AST::FormalParameterList *node = (new (pool) AST::FormalParameterList(nullptr, sym(2).PatternElement))->finish(pool); sym(1).Node = node; coverExpressionErrorLocation = loc(2); coverExpressionType = CE_FormalParameterList; } break; -#line 1763 "qmljs.g" +#line 1797 "qmljs.g" - case 154: { + case 157: { AST::FormalParameterList *list = sym(2).Expression->reparseAsFormalParameterList(pool); if (!list) { syntaxError(loc(1), "Invalid Arrow parameter list."); @@ -1138,59 +1170,59 @@ case 59: sym(1).Node = list->finish(pool); } break; -#line 1780 "qmljs.g" +#line 1814 "qmljs.g" - case 155: { + case 158: { AST::NullExpression *node = new (pool) AST::NullExpression(); node->nullToken = loc(1); sym(1).Node = node; } break; -#line 1789 "qmljs.g" +#line 1823 "qmljs.g" - case 156: { + case 159: { AST::TrueLiteral *node = new (pool) AST::TrueLiteral(); node->trueToken = loc(1); sym(1).Node = node; } break; -#line 1798 "qmljs.g" +#line 1832 "qmljs.g" - case 157: { + case 160: { AST::FalseLiteral *node = new (pool) AST::FalseLiteral(); node->falseToken = loc(1); sym(1).Node = node; } break; -#line 1807 "qmljs.g" +#line 1841 "qmljs.g" - case 158: { + case 161: { AST::NumericLiteral *node = new (pool) AST::NumericLiteral(sym(1).dval); node->literalToken = loc(1); sym(1).Node = node; } break; -#line 1816 "qmljs.g" - case 159: Q_FALLTHROUGH(); -#line 1819 "qmljs.g" +#line 1850 "qmljs.g" + case 162: Q_FALLTHROUGH(); +#line 1853 "qmljs.g" - case 160: { + case 163: { AST::StringLiteral *node = new (pool) AST::StringLiteral(stringRef(1)); node->literalToken = loc(1); sym(1).Node = node; } break; -#line 1831 "qmljs.g" +#line 1865 "qmljs.g" { Lexer::RegExpBodyPrefix prefix; - case 161: + case 164: prefix = Lexer::NoPrefix; goto scan_regexp; -#line 1843 "qmljs.g" +#line 1877 "qmljs.g" - case 162: + case 165: prefix = Lexer::EqualPrefix; goto scan_regexp; @@ -1210,9 +1242,9 @@ case 59: } break; } -#line 1867 "qmljs.g" +#line 1901 "qmljs.g" - case 163: { + case 166: { AST::PatternElementList *list = nullptr; if (sym(2).Elision) list = (new (pool) AST::PatternElementList(sym(2).Elision, nullptr))->finish(); @@ -1222,18 +1254,18 @@ case 59: sym(1).Node = node; } break; -#line 1880 "qmljs.g" +#line 1914 "qmljs.g" - case 164: { + case 167: { AST::ArrayPattern *node = new (pool) AST::ArrayPattern(sym(2).PatternElementList->finish()); node->lbracketToken = loc(1); node->rbracketToken = loc(3); sym(1).Node = node; } break; -#line 1890 "qmljs.g" +#line 1924 "qmljs.g" - case 165: { + case 168: { auto *list = sym(2).PatternElementList; if (sym(4).Elision) { AST::PatternElementList *l = new (pool) AST::PatternElementList(sym(4).Elision, nullptr); @@ -1247,124 +1279,124 @@ case 59: Q_ASSERT(node->isValidArrayLiteral()); } break; -#line 1907 "qmljs.g" +#line 1941 "qmljs.g" - case 166: { + case 169: { AST::PatternElement *e = new (pool) AST::PatternElement(sym(1).Expression); sym(1).Node = new (pool) AST::PatternElementList(nullptr, e); } break; -#line 1915 "qmljs.g" +#line 1949 "qmljs.g" - case 167: { + case 170: { AST::PatternElement *e = new (pool) AST::PatternElement(sym(2).Expression); sym(1).Node = new (pool) AST::PatternElementList(sym(1).Elision->finish(), e); } break; -#line 1923 "qmljs.g" +#line 1957 "qmljs.g" - case 168: { + case 171: { AST::PatternElementList *node = new (pool) AST::PatternElementList(sym(1).Elision, sym(2).PatternElement); sym(1).Node = node; } break; -#line 1931 "qmljs.g" +#line 1965 "qmljs.g" - case 169: { + case 172: { AST::PatternElement *e = new (pool) AST::PatternElement(sym(4).Expression); AST::PatternElementList *node = new (pool) AST::PatternElementList(sym(3).Elision, e); sym(1).Node = sym(1).PatternElementList->append(node); } break; -#line 1940 "qmljs.g" +#line 1974 "qmljs.g" - case 170: { + case 173: { AST::PatternElementList *node = new (pool) AST::PatternElementList(sym(3).Elision, sym(4).PatternElement); sym(1).Node = sym(1).PatternElementList->append(node); } break; -#line 1948 "qmljs.g" +#line 1982 "qmljs.g" - case 171: { + case 174: { AST::Elision *node = new (pool) AST::Elision(); node->commaToken = loc(1); sym(1).Node = node; } break; -#line 1957 "qmljs.g" +#line 1991 "qmljs.g" - case 172: { + case 175: { AST::Elision *node = new (pool) AST::Elision(sym(1).Elision); node->commaToken = loc(2); sym(1).Node = node; } break; -#line 1966 "qmljs.g" +#line 2000 "qmljs.g" - case 173: { + case 176: { sym(1).Node = nullptr; } break; -#line 1973 "qmljs.g" +#line 2007 "qmljs.g" - case 174: { + case 177: { sym(1).Node = sym(1).Elision->finish(); } break; -#line 1980 "qmljs.g" +#line 2014 "qmljs.g" - case 175: { + case 178: { AST::PatternElement *node = new (pool) AST::PatternElement(sym(2).Expression, AST::PatternElement::SpreadElement); sym(1).Node = node; } break; -#line 1988 "qmljs.g" +#line 2022 "qmljs.g" - case 176: { + case 179: { AST::ObjectPattern *node = new (pool) AST::ObjectPattern(); node->lbraceToken = loc(1); node->rbraceToken = loc(2); sym(1).Node = node; } break; -#line 1998 "qmljs.g" +#line 2032 "qmljs.g" - case 177: { + case 180: { AST::ObjectPattern *node = new (pool) AST::ObjectPattern(sym(2).PatternPropertyList->finish()); node->lbraceToken = loc(1); node->rbraceToken = loc(3); sym(1).Node = node; } break; -#line 2008 "qmljs.g" +#line 2042 "qmljs.g" - case 178: { + case 181: { AST::ObjectPattern *node = new (pool) AST::ObjectPattern(sym(2).PatternPropertyList->finish()); node->lbraceToken = loc(1); node->rbraceToken = loc(4); sym(1).Node = node; } break; -#line 2019 "qmljs.g" - case 179: Q_FALLTHROUGH(); -#line 2021 "qmljs.g" +#line 2053 "qmljs.g" + case 182: Q_FALLTHROUGH(); +#line 2055 "qmljs.g" - case 180: { + case 183: { sym(1).Node = new (pool) AST::PatternPropertyList(sym(1).PatternProperty); } break; -#line 2028 "qmljs.g" - case 181: Q_FALLTHROUGH(); -#line 2030 "qmljs.g" +#line 2062 "qmljs.g" + case 184: Q_FALLTHROUGH(); +#line 2064 "qmljs.g" - case 182: { + case 185: { AST::PatternPropertyList *node = new (pool) AST::PatternPropertyList(sym(1).PatternPropertyList, sym(3).PatternProperty); sym(1).Node = node; } break; -#line 2038 "qmljs.g" +#line 2072 "qmljs.g" - case 183: { + case 186: { AST::IdentifierPropertyName *name = new (pool) AST::IdentifierPropertyName(stringRef(1)); name->propertyNameToken = loc(1); AST::IdentifierExpression *expr = new (pool) AST::IdentifierExpression(stringRef(1)); @@ -1374,9 +1406,9 @@ case 59: sym(1).Node = node; } break; -#line 2054 "qmljs.g" +#line 2088 "qmljs.g" - case 185: { + case 188: { AST::IdentifierPropertyName *name = new (pool) AST::IdentifierPropertyName(stringRef(1)); name->propertyNameToken = loc(1); AST::IdentifierExpression *left = new (pool) AST::IdentifierExpression(stringRef(1)); @@ -1393,11 +1425,11 @@ case 59: } break; -#line 2074 "qmljs.g" - case 186: Q_FALLTHROUGH(); -#line 2076 "qmljs.g" +#line 2108 "qmljs.g" + case 189: Q_FALLTHROUGH(); +#line 2110 "qmljs.g" - case 187: { + case 190: { AST::PatternProperty *node = new (pool) AST::PatternProperty(sym(1).PropertyName, sym(3).Expression); if (auto *c = asAnonymousClassDefinition(sym(3).Expression)) { if (!AST::cast(sym(1).PropertyName)) @@ -1407,120 +1439,120 @@ case 59: sym(1).Node = node; } break; -#line 2094 "qmljs.g" +#line 2128 "qmljs.g" - case 191: { + case 194: { AST::IdentifierPropertyName *node = new (pool) AST::IdentifierPropertyName(stringRef(1)); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -#line 2103 "qmljs.g" - case 192: Q_FALLTHROUGH(); -#line 2105 "qmljs.g" +#line 2137 "qmljs.g" + case 195: Q_FALLTHROUGH(); +#line 2139 "qmljs.g" - case 193: { + case 196: { AST::StringLiteralPropertyName *node = new (pool) AST::StringLiteralPropertyName(stringRef(1)); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -#line 2114 "qmljs.g" - case 194: Q_FALLTHROUGH(); -#line 2116 "qmljs.g" +#line 2148 "qmljs.g" + case 197: Q_FALLTHROUGH(); +#line 2150 "qmljs.g" - case 195: { + case 198: { AST::NumericLiteralPropertyName *node = new (pool) AST::NumericLiteralPropertyName(sym(1).dval); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -#line 2167 "qmljs.g" +#line 2201 "qmljs.g" - case 236: { + case 239: { AST::ComputedPropertyName *node = new (pool) AST::ComputedPropertyName(sym(2).Expression); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -#line 2176 "qmljs.g" - case 237: Q_FALLTHROUGH(); -#line 2178 "qmljs.g" +#line 2210 "qmljs.g" + case 240: Q_FALLTHROUGH(); +#line 2212 "qmljs.g" -case 238: { +case 241: { sym(1) = sym(2); } break; -#line 2186 "qmljs.g" - case 239: Q_FALLTHROUGH(); -#line 2188 "qmljs.g" +#line 2220 "qmljs.g" + case 242: Q_FALLTHROUGH(); +#line 2222 "qmljs.g" - case 240: { + case 243: { sym(1).Node = nullptr; } break; -#line 2198 "qmljs.g" - case 243: Q_FALLTHROUGH(); -#line 2201 "qmljs.g" +#line 2232 "qmljs.g" + case 246: Q_FALLTHROUGH(); +#line 2235 "qmljs.g" - case 244: { + case 247: { AST::TemplateLiteral *node = new (pool) AST::TemplateLiteral(stringRef(1), rawStringRef(1), nullptr); node->literalToken = loc(1); sym(1).Node = node; } break; -#line 2210 "qmljs.g" - case 245: Q_FALLTHROUGH(); -#line 2213 "qmljs.g" +#line 2244 "qmljs.g" + case 248: Q_FALLTHROUGH(); +#line 2247 "qmljs.g" - case 246: { + case 249: { AST::TemplateLiteral *node = new (pool) AST::TemplateLiteral(stringRef(1), rawStringRef(1), sym(2).Expression); node->next = sym(3).Template; node->literalToken = loc(1); sym(1).Node = node; } break; -#line 2226 "qmljs.g" +#line 2260 "qmljs.g" - case 248: { + case 251: { AST::SuperLiteral *node = new (pool) AST::SuperLiteral(); node->superToken = loc(1); sym(1).Node = node; } break; -#line 2236 "qmljs.g" - case 249: Q_FALLTHROUGH(); -#line 2238 "qmljs.g" +#line 2270 "qmljs.g" + case 252: Q_FALLTHROUGH(); +#line 2272 "qmljs.g" - case 250: { + case 253: { AST::ArrayMemberExpression *node = new (pool) AST::ArrayMemberExpression(sym(1).Expression, sym(3).Expression); node->lbracketToken = loc(2); node->rbracketToken = loc(4); sym(1).Node = node; } break; -#line 2250 "qmljs.g" - case 251: +#line 2284 "qmljs.g" + case 254: { AST::IdentifierExpression *node = new (pool) AST::IdentifierExpression(stringRef(1)); node->identifierToken= loc(1); sym(1).Node = node; } Q_FALLTHROUGH(); -#line 2258 "qmljs.g" - case 252: Q_FALLTHROUGH(); -#line 2260 "qmljs.g" +#line 2292 "qmljs.g" + case 255: Q_FALLTHROUGH(); +#line 2294 "qmljs.g" - case 253: { + case 256: { AST::FieldMemberExpression *node = new (pool) AST::FieldMemberExpression(sym(1).Expression, stringRef(3)); node->dotToken = loc(2); node->identifierToken = loc(3); sym(1).Node = node; } break; -#line 2272 "qmljs.g" +#line 2306 "qmljs.g" - case 255: { + case 258: { AST::NewMemberExpression *node = new (pool) AST::NewMemberExpression(sym(2).Expression, sym(4).ArgumentList); node->newToken = loc(1); node->lparenToken = loc(3); @@ -1528,415 +1560,415 @@ case 238: { sym(1).Node = node; } break; -#line 2288 "qmljs.g" +#line 2322 "qmljs.g" - case 258: { + case 261: { AST::NewExpression *node = new (pool) AST::NewExpression(sym(2).Expression); node->newToken = loc(1); sym(1).Node = node; } break; -#line 2298 "qmljs.g" - case 259: Q_FALLTHROUGH(); -#line 2300 "qmljs.g" +#line 2332 "qmljs.g" + case 262: Q_FALLTHROUGH(); +#line 2334 "qmljs.g" - case 260: { + case 263: { AST::TaggedTemplate *node = new (pool) AST::TaggedTemplate(sym(1).Expression, sym(2).Template); sym(1).Node = node; } break; -#line 2308 "qmljs.g" - - case 261: { - AST::CallExpression *node = new (pool) AST::CallExpression(sym(1).Expression, sym(3).ArgumentList); - node->lparenToken = loc(2); - node->rparenToken = loc(4); - sym(1).Node = node; - } break; - -#line 2318 "qmljs.g" - case 262: Q_FALLTHROUGH(); -#line 2320 "qmljs.g" - - case 263: { - AST::CallExpression *node = new (pool) AST::CallExpression(sym(1).Expression, sym(3).ArgumentList); - node->lparenToken = loc(2); - node->rparenToken = loc(4); - sym(1).Node = node; - } break; - -#line 2330 "qmljs.g" +#line 2342 "qmljs.g" case 264: { + AST::CallExpression *node = new (pool) AST::CallExpression(sym(1).Expression, sym(3).ArgumentList); + node->lparenToken = loc(2); + node->rparenToken = loc(4); + sym(1).Node = node; + } break; + +#line 2352 "qmljs.g" + case 265: Q_FALLTHROUGH(); +#line 2354 "qmljs.g" + + case 266: { + AST::CallExpression *node = new (pool) AST::CallExpression(sym(1).Expression, sym(3).ArgumentList); + node->lparenToken = loc(2); + node->rparenToken = loc(4); + sym(1).Node = node; + } break; + +#line 2364 "qmljs.g" + + case 267: { AST::ArrayMemberExpression *node = new (pool) AST::ArrayMemberExpression(sym(1).Expression, sym(3).Expression); node->lbracketToken = loc(2); node->rbracketToken = loc(4); sym(1).Node = node; } break; -#line 2340 "qmljs.g" +#line 2374 "qmljs.g" - case 265: { + case 268: { AST::FieldMemberExpression *node = new (pool) AST::FieldMemberExpression(sym(1).Expression, stringRef(3)); node->dotToken = loc(2); node->identifierToken = loc(3); sym(1).Node = node; } break; -#line 2350 "qmljs.g" +#line 2384 "qmljs.g" - case 266: { + case 269: { sym(1).Node = nullptr; } break; -#line 2357 "qmljs.g" - case 267: Q_FALLTHROUGH(); -#line 2359 "qmljs.g" +#line 2391 "qmljs.g" + case 270: Q_FALLTHROUGH(); +#line 2393 "qmljs.g" - case 268: { + case 271: { sym(1).Node = sym(1).ArgumentList->finish(); } break; -#line 2366 "qmljs.g" +#line 2400 "qmljs.g" - case 269: { + case 272: { sym(1).Node = new (pool) AST::ArgumentList(sym(1).Expression); } break; -#line 2373 "qmljs.g" +#line 2407 "qmljs.g" - case 270: { + case 273: { AST::ArgumentList *node = new (pool) AST::ArgumentList(sym(2).Expression); node->isSpreadElement = true; sym(1).Node = node; } break; -#line 2382 "qmljs.g" +#line 2416 "qmljs.g" - case 271: { + case 274: { AST::ArgumentList *node = new (pool) AST::ArgumentList(sym(1).ArgumentList, sym(3).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -#line 2391 "qmljs.g" +#line 2425 "qmljs.g" - case 272: { + case 275: { AST::ArgumentList *node = new (pool) AST::ArgumentList(sym(1).ArgumentList, sym(4).Expression); node->commaToken = loc(2); node->isSpreadElement = true; sym(1).Node = node; } break; -#line 2406 "qmljs.g" +#line 2440 "qmljs.g" - case 276: { + case 279: { AST::PostIncrementExpression *node = new (pool) AST::PostIncrementExpression(sym(1).Expression); node->incrementToken = loc(2); sym(1).Node = node; } break; -#line 2415 "qmljs.g" +#line 2449 "qmljs.g" - case 277: { + case 280: { AST::PostDecrementExpression *node = new (pool) AST::PostDecrementExpression(sym(1).Expression); node->decrementToken = loc(2); sym(1).Node = node; } break; -#line 2424 "qmljs.g" +#line 2458 "qmljs.g" - case 278: { + case 281: { AST::PreIncrementExpression *node = new (pool) AST::PreIncrementExpression(sym(2).Expression); node->incrementToken = loc(1); sym(1).Node = node; } break; -#line 2433 "qmljs.g" +#line 2467 "qmljs.g" - case 279: { + case 282: { AST::PreDecrementExpression *node = new (pool) AST::PreDecrementExpression(sym(2).Expression); node->decrementToken = loc(1); sym(1).Node = node; } break; -#line 2444 "qmljs.g" +#line 2478 "qmljs.g" - case 281: { + case 284: { AST::DeleteExpression *node = new (pool) AST::DeleteExpression(sym(2).Expression); node->deleteToken = loc(1); sym(1).Node = node; } break; -#line 2453 "qmljs.g" +#line 2487 "qmljs.g" - case 282: { + case 285: { AST::VoidExpression *node = new (pool) AST::VoidExpression(sym(2).Expression); node->voidToken = loc(1); sym(1).Node = node; } break; -#line 2462 "qmljs.g" +#line 2496 "qmljs.g" - case 283: { + case 286: { AST::TypeOfExpression *node = new (pool) AST::TypeOfExpression(sym(2).Expression); node->typeofToken = loc(1); sym(1).Node = node; } break; -#line 2471 "qmljs.g" +#line 2505 "qmljs.g" - case 284: { + case 287: { AST::UnaryPlusExpression *node = new (pool) AST::UnaryPlusExpression(sym(2).Expression); node->plusToken = loc(1); sym(1).Node = node; } break; -#line 2480 "qmljs.g" +#line 2514 "qmljs.g" - case 285: { + case 288: { AST::UnaryMinusExpression *node = new (pool) AST::UnaryMinusExpression(sym(2).Expression); node->minusToken = loc(1); sym(1).Node = node; } break; -#line 2489 "qmljs.g" +#line 2523 "qmljs.g" - case 286: { + case 289: { AST::TildeExpression *node = new (pool) AST::TildeExpression(sym(2).Expression); node->tildeToken = loc(1); sym(1).Node = node; } break; -#line 2498 "qmljs.g" +#line 2532 "qmljs.g" - case 287: { + case 290: { AST::NotExpression *node = new (pool) AST::NotExpression(sym(2).Expression); node->notToken = loc(1); sym(1).Node = node; } break; -#line 2509 "qmljs.g" +#line 2543 "qmljs.g" - case 289: { + case 292: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::Exp, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 2520 "qmljs.g" +#line 2554 "qmljs.g" - case 291: { + case 294: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, sym(2).ival, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 2529 "qmljs.g" +#line 2563 "qmljs.g" - case 292: { + case 295: { sym(1).ival = QSOperator::Mul; } break; -#line 2536 "qmljs.g" +#line 2570 "qmljs.g" - case 293: { + case 296: { sym(1).ival = QSOperator::Div; } break; -#line 2543 "qmljs.g" +#line 2577 "qmljs.g" - case 294: { + case 297: { sym(1).ival = QSOperator::Mod; } break; -#line 2552 "qmljs.g" +#line 2586 "qmljs.g" - case 296: { + case 299: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::Add, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 2561 "qmljs.g" +#line 2595 "qmljs.g" - case 297: { + case 300: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::Sub, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 2572 "qmljs.g" +#line 2606 "qmljs.g" - case 299: { + case 302: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::LShift, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 2581 "qmljs.g" +#line 2615 "qmljs.g" - case 300: { + case 303: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::RShift, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 2590 "qmljs.g" +#line 2624 "qmljs.g" - case 301: { + case 304: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::URShift, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 2602 "qmljs.g" - case 304: Q_FALLTHROUGH(); -#line 2604 "qmljs.g" +#line 2636 "qmljs.g" + case 307: Q_FALLTHROUGH(); +#line 2638 "qmljs.g" - case 305: { + case 308: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, sym(2).ival, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 2613 "qmljs.g" +#line 2647 "qmljs.g" - case 306: { + case 309: { sym(1).ival = QSOperator::Lt; } break; -#line 2619 "qmljs.g" +#line 2653 "qmljs.g" - case 307: { + case 310: { sym(1).ival = QSOperator::Gt; } break; -#line 2625 "qmljs.g" +#line 2659 "qmljs.g" - case 308: { + case 311: { sym(1).ival = QSOperator::Le; } break; -#line 2631 "qmljs.g" +#line 2665 "qmljs.g" - case 309: { + case 312: { sym(1).ival = QSOperator::Ge; } break; -#line 2637 "qmljs.g" +#line 2671 "qmljs.g" - case 310: { + case 313: { sym(1).ival = QSOperator::InstanceOf; } break; -#line 2644 "qmljs.g" +#line 2678 "qmljs.g" - case 311: { + case 314: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::In, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 2653 "qmljs.g" - case 312: Q_FALLTHROUGH(); -#line 2655 "qmljs.g" +#line 2687 "qmljs.g" + case 315: Q_FALLTHROUGH(); +#line 2689 "qmljs.g" - case 313: { + case 316: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::As, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 2670 "qmljs.g" - case 318: Q_FALLTHROUGH(); -#line 2672 "qmljs.g" +#line 2704 "qmljs.g" + case 321: Q_FALLTHROUGH(); +#line 2706 "qmljs.g" - case 319: { + case 322: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, sym(2).ival, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 2681 "qmljs.g" +#line 2715 "qmljs.g" - case 320: { + case 323: { sym(1).ival = QSOperator::Equal; } break; -#line 2687 "qmljs.g" +#line 2721 "qmljs.g" - case 321: { + case 324: { sym(1).ival = QSOperator::NotEqual; } break; -#line 2693 "qmljs.g" +#line 2727 "qmljs.g" - case 322: { + case 325: { sym(1).ival = QSOperator::StrictEqual; } break; -#line 2699 "qmljs.g" +#line 2733 "qmljs.g" - case 323: { + case 326: { sym(1).ival = QSOperator::StrictNotEqual; } break; -#line 2710 "qmljs.g" - case 326: Q_FALLTHROUGH(); -#line 2712 "qmljs.g" +#line 2744 "qmljs.g" + case 329: Q_FALLTHROUGH(); +#line 2746 "qmljs.g" - case 327: { + case 330: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::BitAnd, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 2725 "qmljs.g" - case 330: Q_FALLTHROUGH(); -#line 2727 "qmljs.g" +#line 2759 "qmljs.g" + case 333: Q_FALLTHROUGH(); +#line 2761 "qmljs.g" - case 331: { + case 334: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::BitXor, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 2739 "qmljs.g" - case 334: Q_FALLTHROUGH(); -#line 2741 "qmljs.g" +#line 2773 "qmljs.g" + case 337: Q_FALLTHROUGH(); +#line 2775 "qmljs.g" - case 335: { + case 338: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::BitOr, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 2753 "qmljs.g" - case 338: Q_FALLTHROUGH(); -#line 2755 "qmljs.g" +#line 2787 "qmljs.g" + case 341: Q_FALLTHROUGH(); +#line 2789 "qmljs.g" - case 339: { + case 342: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::And, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 2767 "qmljs.g" - case 342: Q_FALLTHROUGH(); -#line 2769 "qmljs.g" +#line 2801 "qmljs.g" + case 345: Q_FALLTHROUGH(); +#line 2803 "qmljs.g" - case 343: { + case 346: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, QSOperator::Or, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 2781 "qmljs.g" - case 346: Q_FALLTHROUGH(); -#line 2783 "qmljs.g" +#line 2815 "qmljs.g" + case 349: Q_FALLTHROUGH(); +#line 2817 "qmljs.g" - case 347: { + case 350: { auto *lhs = sym(1).Expression; auto *rhs = sym(3).Expression; @@ -1964,22 +1996,22 @@ case 238: { sym(1).Node = node; } break; -#line 2817 "qmljs.g" - case 350: Q_FALLTHROUGH(); -#line 2819 "qmljs.g" +#line 2851 "qmljs.g" + case 353: Q_FALLTHROUGH(); +#line 2853 "qmljs.g" - case 351: { + case 354: { AST::ConditionalExpression *node = new (pool) AST::ConditionalExpression(sym(1).Expression, sym(3).Expression, sym(5).Expression); node->questionToken = loc(2); node->colonToken = loc(4); sym(1).Node = node; } break; -#line 2838 "qmljs.g" - case 358: Q_FALLTHROUGH(); -#line 2840 "qmljs.g" +#line 2872 "qmljs.g" + case 361: Q_FALLTHROUGH(); +#line 2874 "qmljs.g" - case 359: { + case 362: { // need to convert the LHS to an AssignmentPattern if it was an Array/ObjectLiteral if (AST::Pattern *p = sym(1).Expression->patternCast()) { SourceLocation errorLoc; @@ -2004,208 +2036,208 @@ case 238: { sym(1).Node = node; } break; -#line 2868 "qmljs.g" - case 360: Q_FALLTHROUGH(); -#line 2870 "qmljs.g" +#line 2902 "qmljs.g" + case 363: Q_FALLTHROUGH(); +#line 2904 "qmljs.g" - case 361: { + case 364: { AST::BinaryExpression *node = new (pool) AST::BinaryExpression(sym(1).Expression, sym(2).ival, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -#line 2879 "qmljs.g" +#line 2913 "qmljs.g" - case 362: { + case 365: { sym(1).ival = QSOperator::InplaceMul; } break; -#line 2886 "qmljs.g" +#line 2920 "qmljs.g" - case 363: { + case 366: { sym(1).ival = QSOperator::InplaceExp; } break; -#line 2893 "qmljs.g" +#line 2927 "qmljs.g" - case 364: { + case 367: { sym(1).ival = QSOperator::InplaceDiv; } break; -#line 2900 "qmljs.g" +#line 2934 "qmljs.g" - case 365: { + case 368: { sym(1).ival = QSOperator::InplaceMod; } break; -#line 2907 "qmljs.g" +#line 2941 "qmljs.g" - case 366: { + case 369: { sym(1).ival = QSOperator::InplaceAdd; } break; -#line 2914 "qmljs.g" +#line 2948 "qmljs.g" - case 367: { + case 370: { sym(1).ival = QSOperator::InplaceSub; } break; -#line 2921 "qmljs.g" +#line 2955 "qmljs.g" - case 368: { + case 371: { sym(1).ival = QSOperator::InplaceLeftShift; } break; -#line 2928 "qmljs.g" +#line 2962 "qmljs.g" - case 369: { + case 372: { sym(1).ival = QSOperator::InplaceRightShift; } break; -#line 2935 "qmljs.g" +#line 2969 "qmljs.g" - case 370: { + case 373: { sym(1).ival = QSOperator::InplaceURightShift; } break; -#line 2942 "qmljs.g" +#line 2976 "qmljs.g" - case 371: { + case 374: { sym(1).ival = QSOperator::InplaceAnd; } break; -#line 2949 "qmljs.g" +#line 2983 "qmljs.g" - case 372: { + case 375: { sym(1).ival = QSOperator::InplaceXor; } break; -#line 2956 "qmljs.g" +#line 2990 "qmljs.g" - case 373: { + case 376: { sym(1).ival = QSOperator::InplaceOr; } break; -#line 2966 "qmljs.g" - case 376: Q_FALLTHROUGH(); -#line 2968 "qmljs.g" +#line 3000 "qmljs.g" + case 379: Q_FALLTHROUGH(); +#line 3002 "qmljs.g" - case 377: { + case 380: { AST::Expression *node = new (pool) AST::Expression(sym(1).Expression, sym(3).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -#line 2977 "qmljs.g" - case 378: Q_FALLTHROUGH(); -#line 2979 "qmljs.g" +#line 3011 "qmljs.g" + case 381: Q_FALLTHROUGH(); +#line 3013 "qmljs.g" - case 379: { + case 382: { sym(1).Node = nullptr; } break; -#line 2991 "qmljs.g" +#line 3025 "qmljs.g" - case 382: { + case 385: { sym(1).Node = sym(3).Node; } break; -#line 2998 "qmljs.g" - case 383: Q_FALLTHROUGH(); -#line 3000 "qmljs.g" - case 384: Q_FALLTHROUGH(); -#line 3002 "qmljs.g" - case 385: Q_FALLTHROUGH(); -#line 3004 "qmljs.g" +#line 3032 "qmljs.g" case 386: Q_FALLTHROUGH(); -#line 3006 "qmljs.g" +#line 3034 "qmljs.g" case 387: Q_FALLTHROUGH(); -#line 3008 "qmljs.g" +#line 3036 "qmljs.g" case 388: Q_FALLTHROUGH(); -#line 3010 "qmljs.g" +#line 3038 "qmljs.g" case 389: Q_FALLTHROUGH(); -#line 3012 "qmljs.g" +#line 3040 "qmljs.g" case 390: Q_FALLTHROUGH(); -#line 3014 "qmljs.g" +#line 3042 "qmljs.g" case 391: Q_FALLTHROUGH(); -#line 3016 "qmljs.g" +#line 3044 "qmljs.g" case 392: Q_FALLTHROUGH(); -#line 3018 "qmljs.g" +#line 3046 "qmljs.g" case 393: Q_FALLTHROUGH(); -#line 3020 "qmljs.g" +#line 3048 "qmljs.g" case 394: Q_FALLTHROUGH(); -#line 3022 "qmljs.g" +#line 3050 "qmljs.g" + case 395: Q_FALLTHROUGH(); +#line 3052 "qmljs.g" + case 396: Q_FALLTHROUGH(); +#line 3054 "qmljs.g" + case 397: Q_FALLTHROUGH(); +#line 3056 "qmljs.g" - case 395: { + case 398: { sym(1).Node = sym(2).Node; } break; -#line 3044 "qmljs.g" +#line 3078 "qmljs.g" - case 406: { + case 409: { AST::Block *node = new (pool) AST::Block(sym(2).StatementList); node->lbraceToken = loc(1); node->rbraceToken = loc(3); sym(1).Node = node; } break; -#line 3056 "qmljs.g" - - case 408: { - sym(1).StatementList = sym(1).StatementList->append(sym(2).StatementList); - } break; - -#line 3063 "qmljs.g" - - case 409: { - sym(1).StatementList = new (pool) AST::StatementList(sym(1).Statement); - } break; - -#line 3070 "qmljs.g" - - case 410: { - sym(1).Node = new (pool) AST::StatementList(sym(3).FunctionDeclaration); - } break; - -#line 3077 "qmljs.g" +#line 3090 "qmljs.g" case 411: { - sym(1).Node = nullptr; - } break; - -#line 3084 "qmljs.g" - - case 412: { - sym(1).Node = sym(1).StatementList->finish(); - } break; - -#line 3091 "qmljs.g" - - case 413: { - sym(1).scope = AST::VariableScope::Let; + sym(1).StatementList = sym(1).StatementList->append(sym(2).StatementList); } break; #line 3097 "qmljs.g" - case 414: { - sym(1).scope = AST::VariableScope::Const; + case 412: { + sym(1).StatementList = new (pool) AST::StatementList(sym(1).Statement); } break; #line 3104 "qmljs.g" - case 415: { - sym(1).scope = AST::VariableScope::Var; + case 413: { + sym(1).Node = new (pool) AST::StatementList(sym(3).FunctionDeclaration); } break; #line 3111 "qmljs.g" - case 416: Q_FALLTHROUGH(); -#line 3113 "qmljs.g" - case 417: Q_FALLTHROUGH(); -#line 3115 "qmljs.g" - case 418: Q_FALLTHROUGH(); -#line 3117 "qmljs.g" - case 419: { + case 414: { + sym(1).Node = nullptr; + } break; + +#line 3118 "qmljs.g" + + case 415: { + sym(1).Node = sym(1).StatementList->finish(); + } break; + +#line 3125 "qmljs.g" + + case 416: { + sym(1).scope = AST::VariableScope::Let; + } break; + +#line 3131 "qmljs.g" + + case 417: { + sym(1).scope = AST::VariableScope::Const; + } break; + +#line 3138 "qmljs.g" + + case 418: { + sym(1).scope = AST::VariableScope::Var; + } break; + +#line 3145 "qmljs.g" + case 419: Q_FALLTHROUGH(); +#line 3147 "qmljs.g" + case 420: Q_FALLTHROUGH(); +#line 3149 "qmljs.g" + case 421: Q_FALLTHROUGH(); +#line 3151 "qmljs.g" + + case 422: { AST::VariableDeclarationList *declarations = sym(2).VariableDeclarationList->finish(sym(1).scope); for (auto it = declarations; it; it = it->next) { if (it->declaration && it->declaration->typeAnnotation) { @@ -2218,41 +2250,41 @@ case 238: { sym(1).Node = node; } break; -#line 3135 "qmljs.g" - case 421: Q_FALLTHROUGH(); -#line 3137 "qmljs.g" - case 422: Q_FALLTHROUGH(); -#line 3139 "qmljs.g" - case 423: Q_FALLTHROUGH(); -#line 3141 "qmljs.g" +#line 3169 "qmljs.g" + case 424: Q_FALLTHROUGH(); +#line 3171 "qmljs.g" + case 425: Q_FALLTHROUGH(); +#line 3173 "qmljs.g" + case 426: Q_FALLTHROUGH(); +#line 3175 "qmljs.g" - case 424: { + case 427: { sym(1).Node = new (pool) AST::VariableDeclarationList(sym(1).PatternElement); } break; -#line 3148 "qmljs.g" - case 425: Q_FALLTHROUGH(); -#line 3150 "qmljs.g" - case 426: Q_FALLTHROUGH(); -#line 3152 "qmljs.g" - case 427: Q_FALLTHROUGH(); -#line 3154 "qmljs.g" +#line 3182 "qmljs.g" + case 428: Q_FALLTHROUGH(); +#line 3184 "qmljs.g" + case 429: Q_FALLTHROUGH(); +#line 3186 "qmljs.g" + case 430: Q_FALLTHROUGH(); +#line 3188 "qmljs.g" - case 428: { + case 431: { AST::VariableDeclarationList *node = new (pool) AST::VariableDeclarationList(sym(1).VariableDeclarationList, sym(3).PatternElement); node->commaToken = loc(2); sym(1).Node = node; } break; -#line 3163 "qmljs.g" - case 429: Q_FALLTHROUGH(); -#line 3165 "qmljs.g" - case 430: Q_FALLTHROUGH(); -#line 3167 "qmljs.g" - case 431: Q_FALLTHROUGH(); -#line 3169 "qmljs.g" +#line 3197 "qmljs.g" + case 432: Q_FALLTHROUGH(); +#line 3199 "qmljs.g" + case 433: Q_FALLTHROUGH(); +#line 3201 "qmljs.g" + case 434: Q_FALLTHROUGH(); +#line 3203 "qmljs.g" - case 432: { + case 435: { auto *node = new (pool) AST::PatternElement(stringRef(1), sym(2).TypeAnnotation, sym(3).Expression); node->identifierToken = loc(1); sym(1).Node = node; @@ -2263,23 +2295,23 @@ case 238: { c->name = stringRef(1); } break; -#line 3183 "qmljs.g" - case 433: Q_FALLTHROUGH(); -#line 3185 "qmljs.g" - case 434: Q_FALLTHROUGH(); -#line 3187 "qmljs.g" - case 435: Q_FALLTHROUGH(); -#line 3189 "qmljs.g" +#line 3217 "qmljs.g" + case 436: Q_FALLTHROUGH(); +#line 3219 "qmljs.g" + case 437: Q_FALLTHROUGH(); +#line 3221 "qmljs.g" + case 438: Q_FALLTHROUGH(); +#line 3223 "qmljs.g" - case 436: { + case 439: { auto *node = new (pool) AST::PatternElement(sym(1).Pattern, sym(2).Expression); node->identifierToken = loc(1); sym(1).Node = node; } break; -#line 3198 "qmljs.g" +#line 3232 "qmljs.g" - case 437: { + case 440: { auto *node = new (pool) AST::ObjectPattern(sym(2).PatternPropertyList); node->lbraceToken = loc(1); node->rbraceToken = loc(3); @@ -2287,9 +2319,9 @@ case 238: { sym(1).Node = node; } break; -#line 3209 "qmljs.g" +#line 3243 "qmljs.g" - case 438: { + case 441: { auto *node = new (pool) AST::ArrayPattern(sym(2).PatternElementList); node->lbracketToken = loc(1); node->rbracketToken = loc(3); @@ -2297,23 +2329,23 @@ case 238: { sym(1).Node = node; } break; -#line 3220 "qmljs.g" +#line 3254 "qmljs.g" - case 439: { + case 442: { sym(1).Node = nullptr; } break; -#line 3227 "qmljs.g" - case 440: -#line 3229 "qmljs.g" +#line 3261 "qmljs.g" + case 443: +#line 3263 "qmljs.g" - case 441: { + case 444: { sym(1).Node = sym(1).PatternPropertyList->finish(); } break; -#line 3236 "qmljs.g" +#line 3270 "qmljs.g" - case 442: { + case 445: { if (sym(1).Elision || sym(2).Node) { auto *l = new (pool) AST::PatternElementList(sym(1).Elision, sym(2).PatternElement); sym(1).Node = l->finish(); @@ -2322,15 +2354,15 @@ case 238: { } } break; -#line 3248 "qmljs.g" +#line 3282 "qmljs.g" - case 443: { + case 446: { sym(1).Node = sym(1).PatternElementList->finish(); } break; -#line 3255 "qmljs.g" +#line 3289 "qmljs.g" - case 444: { + case 447: { if (sym(3).Elision || sym(4).Node) { auto *l = new (pool) AST::PatternElementList(sym(3).Elision, sym(4).PatternElement); l = sym(1).PatternElementList->append(l); @@ -2339,33 +2371,33 @@ case 238: { sym(1).Node = sym(1).PatternElementList->finish(); } break; -#line 3267 "qmljs.g" +#line 3301 "qmljs.g" - case 445: { + case 448: { sym(1).Node = new (pool) AST::PatternPropertyList(sym(1).PatternProperty); } break; -#line 3274 "qmljs.g" +#line 3308 "qmljs.g" - case 446: { + case 449: { sym(1).Node = new (pool) AST::PatternPropertyList(sym(1).PatternPropertyList, sym(3).PatternProperty); } break; -#line 3283 "qmljs.g" +#line 3317 "qmljs.g" - case 448: { + case 451: { sym(1).PatternElementList = sym(1).PatternElementList->append(sym(3).PatternElementList); } break; -#line 3290 "qmljs.g" +#line 3324 "qmljs.g" - case 449: { + case 452: { sym(1).Node = new (pool) AST::PatternElementList(sym(1).Elision, sym(2).PatternElement); } break; -#line 3298 "qmljs.g" +#line 3332 "qmljs.g" - case 450: { + case 453: { AST::StringLiteralPropertyName *name = new (pool) AST::StringLiteralPropertyName(stringRef(1)); name->propertyNameToken = loc(1); // if initializer is an anonymous function expression, we need to assign identifierref as it's name @@ -2376,23 +2408,23 @@ case 238: { sym(1).Node = new (pool) AST::PatternProperty(name, stringRef(1), sym(2).Expression); } break; -#line 3312 "qmljs.g" +#line 3346 "qmljs.g" - case 451: { + case 454: { AST::PatternProperty *node = new (pool) AST::PatternProperty(sym(1).PropertyName, stringRef(3), sym(4).Expression); sym(1).Node = node; } break; -#line 3320 "qmljs.g" +#line 3354 "qmljs.g" - case 452: { + case 455: { AST::PatternProperty *node = new (pool) AST::PatternProperty(sym(1).PropertyName, sym(3).Pattern, sym(4).Expression); sym(1).Node = node; } break; -#line 3328 "qmljs.g" +#line 3362 "qmljs.g" - case 453: { + case 456: { AST::PatternElement *node = new (pool) AST::PatternElement(stringRef(1), sym(2).TypeAnnotation, sym(3).Expression); node->identifierToken = loc(1); // if initializer is an anonymous function expression, we need to assign identifierref as it's name @@ -2403,45 +2435,45 @@ case 238: { sym(1).Node = node; } break; -#line 3342 "qmljs.g" +#line 3376 "qmljs.g" - case 454: { + case 457: { AST::PatternElement *node = new (pool) AST::PatternElement(sym(1).Pattern, sym(2).Expression); sym(1).Node = node; } break; -#line 3350 "qmljs.g" +#line 3384 "qmljs.g" - case 455: { + case 458: { AST::PatternElement *node = new (pool) AST::PatternElement(stringRef(2), /*type annotation*/nullptr, nullptr, AST::PatternElement::RestElement); node->identifierToken = loc(2); sym(1).Node = node; } break; -#line 3359 "qmljs.g" +#line 3393 "qmljs.g" - case 456: { + case 459: { AST::PatternElement *node = new (pool) AST::PatternElement(sym(2).Pattern, nullptr, AST::PatternElement::RestElement); sym(1).Node = node; } break; -#line 3367 "qmljs.g" +#line 3401 "qmljs.g" - case 457: { + case 460: { sym(1).Node = nullptr; } break; -#line 3377 "qmljs.g" +#line 3411 "qmljs.g" - case 459: { + case 462: { AST::EmptyStatement *node = new (pool) AST::EmptyStatement(); node->semicolonToken = loc(1); sym(1).Node = node; } break; -#line 3392 "qmljs.g" +#line 3426 "qmljs.g" - case 460: { + case 463: { int token = lookaheadToken(lexer); if (token == T_LBRACE) pushToken(T_FORCE_BLOCK); @@ -2449,17 +2481,17 @@ case 238: { pushToken(T_FORCE_DECLARATION); } break; -#line 3403 "qmljs.g" +#line 3437 "qmljs.g" - case 461: { + case 464: { AST::ExpressionStatement *node = new (pool) AST::ExpressionStatement(sym(1).Expression); node->semicolonToken = loc(2); sym(1).Node = node; } break; -#line 3412 "qmljs.g" +#line 3446 "qmljs.g" - case 462: { + case 465: { AST::IfStatement *node = new (pool) AST::IfStatement(sym(3).Expression, sym(5).Statement, sym(7).Statement); node->ifToken = loc(1); node->lparenToken = loc(2); @@ -2468,9 +2500,9 @@ case 238: { sym(1).Node = node; } break; -#line 3424 "qmljs.g" +#line 3458 "qmljs.g" - case 463: { + case 466: { AST::IfStatement *node = new (pool) AST::IfStatement(sym(3).Expression, sym(5).Statement); node->ifToken = loc(1); node->lparenToken = loc(2); @@ -2478,9 +2510,9 @@ case 238: { sym(1).Node = node; } break; -#line 3437 "qmljs.g" +#line 3471 "qmljs.g" - case 465: { + case 468: { AST::DoWhileStatement *node = new (pool) AST::DoWhileStatement(sym(2).Statement, sym(5).Expression); node->doToken = loc(1); node->whileToken = loc(3); @@ -2490,9 +2522,9 @@ case 238: { sym(1).Node = node; } break; -#line 3450 "qmljs.g" +#line 3484 "qmljs.g" - case 466: { + case 469: { AST::WhileStatement *node = new (pool) AST::WhileStatement(sym(3).Expression, sym(5).Statement); node->whileToken = loc(1); node->lparenToken = loc(2); @@ -2500,9 +2532,9 @@ case 238: { sym(1).Node = node; } break; -#line 3461 "qmljs.g" +#line 3495 "qmljs.g" - case 467: { + case 470: { AST::ForStatement *node = new (pool) AST::ForStatement(sym(3).Expression, sym(5).Expression, sym(7).Expression, sym(9).Statement); node->forToken = loc(1); node->lparenToken = loc(2); @@ -2512,11 +2544,11 @@ case 238: { sym(1).Node = node; } break; -#line 3474 "qmljs.g" - case 468: Q_FALLTHROUGH(); -#line 3476 "qmljs.g" +#line 3508 "qmljs.g" + case 471: Q_FALLTHROUGH(); +#line 3510 "qmljs.g" - case 469: { + case 472: { // ### get rid of the static_cast! AST::ForStatement *node = new (pool) AST::ForStatement( static_cast(sym(3).Node)->declarations, sym(5).Expression, @@ -2529,21 +2561,21 @@ case 238: { sym(1).Node = node; } break; -#line 3492 "qmljs.g" +#line 3526 "qmljs.g" - case 470: { + case 473: { sym(1).forEachType = AST::ForEachType::In; } break; -#line 3499 "qmljs.g" +#line 3533 "qmljs.g" - case 471: { + case 474: { sym(1).forEachType = AST::ForEachType::Of; } break; -#line 3506 "qmljs.g" +#line 3540 "qmljs.g" - case 472: { + case 475: { // need to convert the LHS to an AssignmentPattern if it was an Array/ObjectLiteral if (AST::Pattern *p = sym(3).Expression->patternCast()) { SourceLocation errorLoc; @@ -2562,9 +2594,9 @@ case 238: { sym(1).Node = node; } break; -#line 3528 "qmljs.g" +#line 3562 "qmljs.g" - case 473: { + case 476: { AST::ForEachStatement *node = new (pool) AST::ForEachStatement(sym(3).PatternElement, sym(5).Expression, sym(7).Statement); node->forToken = loc(1); node->lparenToken = loc(2); @@ -2574,11 +2606,11 @@ case 238: { sym(1).Node = node; } break; -#line 3541 "qmljs.g" - case 474: Q_FALLTHROUGH(); -#line 3543 "qmljs.g" +#line 3575 "qmljs.g" + case 477: Q_FALLTHROUGH(); +#line 3577 "qmljs.g" - case 475: { + case 478: { if (auto typeAnnotation = sym(3).TypeAnnotation) { syntaxError(typeAnnotation->firstSourceLocation(), "Type annotations are not permitted in variable declarations"); return false; @@ -2590,29 +2622,29 @@ case 238: { sym(1).Node = node; } break; -#line 3558 "qmljs.g" - case 476: Q_FALLTHROUGH(); -#line 3560 "qmljs.g" +#line 3592 "qmljs.g" + case 479: Q_FALLTHROUGH(); +#line 3594 "qmljs.g" - case 477: { + case 480: { auto *node = new (pool) AST::PatternElement(sym(2).Pattern, nullptr); node->scope = sym(1).scope; node->isForDeclaration = true; sym(1).Node = node; } break; -#line 3570 "qmljs.g" +#line 3604 "qmljs.g" - case 478: { + case 481: { AST::ContinueStatement *node = new (pool) AST::ContinueStatement(); node->continueToken = loc(1); node->semicolonToken = loc(2); sym(1).Node = node; } break; -#line 3580 "qmljs.g" +#line 3614 "qmljs.g" - case 479: { + case 482: { AST::ContinueStatement *node = new (pool) AST::ContinueStatement(stringRef(2)); node->continueToken = loc(1); node->identifierToken = loc(2); @@ -2620,18 +2652,18 @@ case 238: { sym(1).Node = node; } break; -#line 3591 "qmljs.g" +#line 3625 "qmljs.g" - case 480: { + case 483: { AST::BreakStatement *node = new (pool) AST::BreakStatement(QStringRef()); node->breakToken = loc(1); node->semicolonToken = loc(2); sym(1).Node = node; } break; -#line 3601 "qmljs.g" +#line 3635 "qmljs.g" - case 481: { + case 484: { AST::BreakStatement *node = new (pool) AST::BreakStatement(stringRef(2)); node->breakToken = loc(1); node->identifierToken = loc(2); @@ -2639,9 +2671,9 @@ case 238: { sym(1).Node = node; } break; -#line 3612 "qmljs.g" +#line 3646 "qmljs.g" - case 482: { + case 485: { if (!functionNestingLevel) { syntaxError(loc(1), "Return statement not allowed outside of Function declaration."); return false; @@ -2652,9 +2684,9 @@ case 238: { sym(1).Node = node; } break; -#line 3626 "qmljs.g" +#line 3660 "qmljs.g" - case 483: { + case 486: { AST::WithStatement *node = new (pool) AST::WithStatement(sym(3).Expression, sym(5).Statement); node->withToken = loc(1); node->lparenToken = loc(2); @@ -2662,9 +2694,9 @@ case 238: { sym(1).Node = node; } break; -#line 3637 "qmljs.g" +#line 3671 "qmljs.g" - case 484: { + case 487: { AST::SwitchStatement *node = new (pool) AST::SwitchStatement(sym(3).Expression, sym(5).CaseBlock); node->switchToken = loc(1); node->lparenToken = loc(2); @@ -2672,118 +2704,118 @@ case 238: { sym(1).Node = node; } break; -#line 3648 "qmljs.g" +#line 3682 "qmljs.g" - case 485: { + case 488: { AST::CaseBlock *node = new (pool) AST::CaseBlock(sym(2).CaseClauses); node->lbraceToken = loc(1); node->rbraceToken = loc(3); sym(1).Node = node; } break; -#line 3658 "qmljs.g" +#line 3692 "qmljs.g" - case 486: { + case 489: { AST::CaseBlock *node = new (pool) AST::CaseBlock(sym(2).CaseClauses, sym(3).DefaultClause, sym(4).CaseClauses); node->lbraceToken = loc(1); node->rbraceToken = loc(5); sym(1).Node = node; } break; -#line 3668 "qmljs.g" +#line 3702 "qmljs.g" - case 487: { + case 490: { sym(1).Node = new (pool) AST::CaseClauses(sym(1).CaseClause); } break; -#line 3675 "qmljs.g" +#line 3709 "qmljs.g" - case 488: { + case 491: { sym(1).Node = new (pool) AST::CaseClauses(sym(1).CaseClauses, sym(2).CaseClause); } break; -#line 3682 "qmljs.g" +#line 3716 "qmljs.g" - case 489: { + case 492: { sym(1).Node = nullptr; } break; -#line 3689 "qmljs.g" +#line 3723 "qmljs.g" - case 490: { + case 493: { sym(1).Node = sym(1).CaseClauses->finish(); } break; -#line 3696 "qmljs.g" +#line 3730 "qmljs.g" - case 491: { + case 494: { AST::CaseClause *node = new (pool) AST::CaseClause(sym(2).Expression, sym(4).StatementList); node->caseToken = loc(1); node->colonToken = loc(3); sym(1).Node = node; } break; -#line 3706 "qmljs.g" +#line 3740 "qmljs.g" - case 492: { + case 495: { AST::DefaultClause *node = new (pool) AST::DefaultClause(sym(3).StatementList); node->defaultToken = loc(1); node->colonToken = loc(2); sym(1).Node = node; } break; -#line 3716 "qmljs.g" +#line 3750 "qmljs.g" - case 493: { + case 496: { AST::LabelledStatement *node = new (pool) AST::LabelledStatement(stringRef(1), sym(3).Statement); node->identifierToken = loc(1); node->colonToken = loc(2); sym(1).Node = node; } break; -#line 3728 "qmljs.g" +#line 3762 "qmljs.g" - case 495: { + case 498: { syntaxError(loc(3), "FunctionDeclarations are not allowed after a label."); return false; } break; -#line 3736 "qmljs.g" +#line 3770 "qmljs.g" - case 496: { + case 499: { AST::ThrowStatement *node = new (pool) AST::ThrowStatement(sym(2).Expression); node->throwToken = loc(1); node->semicolonToken = loc(3); sym(1).Node = node; } break; -#line 3746 "qmljs.g" +#line 3780 "qmljs.g" - case 497: { + case 500: { AST::TryStatement *node = new (pool) AST::TryStatement(sym(2).Statement, sym(3).Catch); node->tryToken = loc(1); sym(1).Node = node; } break; -#line 3755 "qmljs.g" +#line 3789 "qmljs.g" - case 498: { + case 501: { AST::TryStatement *node = new (pool) AST::TryStatement(sym(2).Statement, sym(3).Finally); node->tryToken = loc(1); sym(1).Node = node; } break; -#line 3764 "qmljs.g" +#line 3798 "qmljs.g" - case 499: { + case 502: { AST::TryStatement *node = new (pool) AST::TryStatement(sym(2).Statement, sym(3).Catch, sym(4).Finally); node->tryToken = loc(1); sym(1).Node = node; } break; -#line 3773 "qmljs.g" +#line 3807 "qmljs.g" - case 500: { + case 503: { AST::Catch *node = new (pool) AST::Catch(sym(3).PatternElement, sym(5).Block); node->catchToken = loc(1); node->lparenToken = loc(2); @@ -2792,43 +2824,43 @@ case 238: { sym(1).Node = node; } break; -#line 3785 "qmljs.g" +#line 3819 "qmljs.g" - case 501: { + case 504: { AST::Finally *node = new (pool) AST::Finally(sym(2).Block); node->finallyToken = loc(1); sym(1).Node = node; } break; -#line 3794 "qmljs.g" +#line 3828 "qmljs.g" - case 502: { + case 505: { AST::PatternElement *node = new (pool) AST::PatternElement(stringRef(1)); node->identifierToken = loc(1); node->scope = AST::VariableScope::Let; sym(1).Node = node; } break; -#line 3804 "qmljs.g" +#line 3838 "qmljs.g" - case 503: { + case 506: { AST::PatternElement *node = new (pool) AST::PatternElement(sym(1).Pattern); node->scope = AST::VariableScope::Let; sym(1).Node = node; } break; -#line 3813 "qmljs.g" +#line 3847 "qmljs.g" - case 504: { + case 507: { AST::DebuggerStatement *node = new (pool) AST::DebuggerStatement(); node->debuggerToken = loc(1); node->semicolonToken = loc(2); sym(1).Node = node; } break; -#line 3830 "qmljs.g" +#line 3864 "qmljs.g" - case 506: { + case 509: { if (!ensureNoFunctionTypeAnnotations(sym(6).TypeAnnotation, sym(4).FormalParameterList)) return false; AST::FunctionDeclaration *node = new (pool) AST::FunctionDeclaration(stringRef(2), sym(4).FormalParameterList, sym(8).StatementList, @@ -2842,9 +2874,9 @@ case 238: { sym(1).Node = node; } break; -#line 3847 "qmljs.g" +#line 3881 "qmljs.g" - case 507: { + case 510: { AST::FunctionDeclaration *node = new (pool) AST::FunctionDeclaration(stringRef(2), sym(4).FormalParameterList, sym(8).StatementList, sym(6).TypeAnnotation); node->functionToken = loc(1); @@ -2856,9 +2888,9 @@ case 238: { sym(1).Node = node; } break; -#line 3863 "qmljs.g" +#line 3897 "qmljs.g" - case 509: { + case 512: { if (!ensureNoFunctionTypeAnnotations(sym(5).TypeAnnotation, sym(3).FormalParameterList)) return false; AST::FunctionDeclaration *node = new (pool) AST::FunctionDeclaration(QStringRef(), sym(3).FormalParameterList, sym(7).StatementList, @@ -2871,9 +2903,9 @@ case 238: { sym(1).Node = node; } break; -#line 3879 "qmljs.g" +#line 3913 "qmljs.g" - case 510: { + case 513: { if (!ensureNoFunctionTypeAnnotations(sym(6).TypeAnnotation, sym(4).FormalParameterList)) return false; AST::FunctionExpression *node = new (pool) AST::FunctionExpression(stringRef(2), sym(4).FormalParameterList, sym(8).StatementList, @@ -2888,9 +2920,9 @@ case 238: { sym(1).Node = node; } break; -#line 3897 "qmljs.g" +#line 3931 "qmljs.g" - case 511: { + case 514: { if (!ensureNoFunctionTypeAnnotations(sym(5).TypeAnnotation, sym(3).FormalParameterList)) return false; AST::FunctionExpression *node = new (pool) AST::FunctionExpression(QStringRef(), sym(3).FormalParameterList, sym(7).StatementList, @@ -2903,65 +2935,65 @@ case 238: { sym(1).Node = node; } break; -#line 3915 "qmljs.g" - - case 513: { - sym(1).Node = nullptr; - } break; - -#line 3922 "qmljs.g" - - case 514: { - AST::FormalParameterList *node = (new (pool) AST::FormalParameterList(nullptr, sym(1).PatternElement))->finish(pool); - sym(1).Node = node; - } break; - -#line 3930 "qmljs.g" - case 515: -#line 3932 "qmljs.g" +#line 3949 "qmljs.g" case 516: { - sym(1).Node = sym(1).FormalParameterList->finish(pool); - } break; - -#line 3939 "qmljs.g" - - case 517: { - AST::FormalParameterList *node = (new (pool) AST::FormalParameterList(sym(1).FormalParameterList, sym(3).PatternElement))->finish(pool); - sym(1).Node = node; - } break; - -#line 3947 "qmljs.g" - - case 518: { - AST::FormalParameterList *node = new (pool) AST::FormalParameterList(nullptr, sym(1).PatternElement); - sym(1).Node = node; + sym(1).Node = nullptr; } break; #line 3956 "qmljs.g" - case 519: { - AST::FormalParameterList *node = new (pool) AST::FormalParameterList(sym(1).FormalParameterList, sym(3).PatternElement); + case 517: { + AST::FormalParameterList *node = (new (pool) AST::FormalParameterList(nullptr, sym(1).PatternElement))->finish(pool); sym(1).Node = node; } break; +#line 3964 "qmljs.g" + case 518: #line 3966 "qmljs.g" - case 521: { - ++functionNestingLevel; + case 519: { + sym(1).Node = sym(1).FormalParameterList->finish(pool); } break; #line 3973 "qmljs.g" + case 520: { + AST::FormalParameterList *node = (new (pool) AST::FormalParameterList(sym(1).FormalParameterList, sym(3).PatternElement))->finish(pool); + sym(1).Node = node; + } break; + +#line 3981 "qmljs.g" + + case 521: { + AST::FormalParameterList *node = new (pool) AST::FormalParameterList(nullptr, sym(1).PatternElement); + sym(1).Node = node; + } break; + +#line 3990 "qmljs.g" + case 522: { + AST::FormalParameterList *node = new (pool) AST::FormalParameterList(sym(1).FormalParameterList, sym(3).PatternElement); + sym(1).Node = node; + } break; + +#line 4000 "qmljs.g" + + case 524: { + ++functionNestingLevel; + } break; + +#line 4007 "qmljs.g" + + case 525: { --functionNestingLevel; } break; -#line 3983 "qmljs.g" - case 524: Q_FALLTHROUGH(); -#line 3985 "qmljs.g" +#line 4017 "qmljs.g" + case 527: Q_FALLTHROUGH(); +#line 4019 "qmljs.g" - case 525: { + case 528: { AST::ReturnStatement *ret = new (pool) AST::ReturnStatement(sym(4).Expression); ret->returnToken = sym(4).Node->firstSourceLocation(); ret->semicolonToken = sym(4).Node->lastSourceLocation(); @@ -2974,11 +3006,11 @@ case 238: { sym(1).Node = f; } break; -#line 4001 "qmljs.g" - case 526: Q_FALLTHROUGH(); -#line 4003 "qmljs.g" +#line 4035 "qmljs.g" + case 529: Q_FALLTHROUGH(); +#line 4037 "qmljs.g" - case 527: { + case 530: { AST::FunctionExpression *f = new (pool) AST::FunctionExpression(QStringRef(), sym(1).FormalParameterList, sym(6).StatementList); f->isArrowFunction = true; f->functionToken = sym(1).Node ? sym(1).Node->firstSourceLocation() : loc(1); @@ -2987,17 +3019,17 @@ case 238: { sym(1).Node = f; } break; -#line 4015 "qmljs.g" +#line 4049 "qmljs.g" - case 528: { + case 531: { AST::PatternElement *e = new (pool) AST::PatternElement(stringRef(1), /*type annotation*/nullptr, nullptr, AST::PatternElement::Binding); e->identifierToken = loc(1); sym(1).FormalParameterList = (new (pool) AST::FormalParameterList(nullptr, e))->finish(pool); } break; -#line 4026 "qmljs.g" +#line 4060 "qmljs.g" - case 529: { + case 532: { if (coverExpressionType != CE_FormalParameterList) { AST::NestedExpression *ne = static_cast(sym(1).Node); AST::FormalParameterList *list = ne->expression->reparseAsFormalParameterList(pool); @@ -3009,16 +3041,16 @@ case 238: { } } break; -#line 4044 "qmljs.g" +#line 4078 "qmljs.g" - case 530: { + case 533: { if (lookaheadToken(lexer) == T_LBRACE) pushToken(T_FORCE_BLOCK); } break; -#line 4052 "qmljs.g" +#line 4086 "qmljs.g" - case 531: { + case 534: { if (!ensureNoFunctionTypeAnnotations(sym(5).TypeAnnotation, sym(3).FormalParameterList)) return false; AST::FunctionExpression *f = new (pool) AST::FunctionExpression(stringRef(1), sym(3).FormalParameterList, sym(7).StatementList); @@ -3032,9 +3064,9 @@ case 238: { sym(1).Node = node; } break; -#line 4069 "qmljs.g" +#line 4103 "qmljs.g" - case 532: { + case 535: { if (!ensureNoFunctionTypeAnnotations(sym(6).TypeAnnotation, sym(4).FormalParameterList)) return false; AST::FunctionExpression *f = new (pool) AST::FunctionExpression(stringRef(2), sym(4).FormalParameterList, sym(8).StatementList); @@ -3049,9 +3081,9 @@ case 238: { sym(1).Node = node; } break; -#line 4088 "qmljs.g" +#line 4122 "qmljs.g" - case 533: { + case 536: { if (!ensureNoFunctionTypeAnnotations(sym(5).TypeAnnotation, /*formals*/nullptr)) return false; AST::FunctionExpression *f = new (pool) AST::FunctionExpression(stringRef(2), nullptr, sym(7).StatementList); @@ -3065,9 +3097,9 @@ case 238: { sym(1).Node = node; } break; -#line 4105 "qmljs.g" +#line 4139 "qmljs.g" - case 534: { + case 537: { if (!ensureNoFunctionTypeAnnotations(sym(6).TypeAnnotation, sym(4).FormalParameterList)) return false; AST::FunctionExpression *f = new (pool) AST::FunctionExpression(stringRef(2), sym(4).FormalParameterList, sym(8).StatementList); @@ -3081,29 +3113,29 @@ case 238: { sym(1).Node = node; } break; -#line 4123 "qmljs.g" +#line 4157 "qmljs.g" - case 535: { + case 538: { AST::FormalParameterList *node = (new (pool) AST::FormalParameterList(nullptr, sym(1).PatternElement))->finish(pool); sym(1).Node = node; } break; -#line 4131 "qmljs.g" +#line 4165 "qmljs.g" - case 536: { + case 539: { lexer->enterGeneratorBody(); } break; -#line 4138 "qmljs.g" +#line 4172 "qmljs.g" - case 537: { + case 540: { --functionNestingLevel; lexer->leaveGeneratorBody(); } break; -#line 4148 "qmljs.g" +#line 4182 "qmljs.g" - case 539: { + case 542: { AST::FunctionDeclaration *node = new (pool) AST::FunctionDeclaration(stringRef(2), sym(4).FormalParameterList, sym(7).StatementList); node->functionToken = loc(1); node->identifierToken = loc(2); @@ -3115,9 +3147,9 @@ case 238: { sym(1).Node = node; } break; -#line 4164 "qmljs.g" +#line 4198 "qmljs.g" - case 541: { + case 544: { AST::FunctionDeclaration *node = new (pool) AST::FunctionDeclaration(QStringRef(), sym(3).FormalParameterList, sym(6).StatementList); node->functionToken = loc(1); node->lparenToken = loc(2); @@ -3128,9 +3160,9 @@ case 238: { sym(1).Node = node; } break; -#line 4178 "qmljs.g" +#line 4212 "qmljs.g" - case 542: { + case 545: { AST::FunctionExpression *node = new (pool) AST::FunctionExpression(stringRef(2), sym(4).FormalParameterList, sym(7).StatementList); node->functionToken = loc(1); if (!stringRef(2).isNull()) @@ -3143,9 +3175,9 @@ case 238: { sym(1).Node = node; } break; -#line 4194 "qmljs.g" +#line 4228 "qmljs.g" - case 543: { + case 546: { AST::FunctionExpression *node = new (pool) AST::FunctionExpression(QStringRef(), sym(3).FormalParameterList, sym(6).StatementList); node->functionToken = loc(1); node->lparenToken = loc(2); @@ -3156,40 +3188,40 @@ case 238: { sym(1).Node = node; } break; -#line 4210 "qmljs.g" - case 545: Q_FALLTHROUGH(); -#line 4212 "qmljs.g" +#line 4244 "qmljs.g" + case 548: Q_FALLTHROUGH(); +#line 4246 "qmljs.g" - case 546: { + case 549: { AST::YieldExpression *node = new (pool) AST::YieldExpression(); node->yieldToken = loc(1); sym(1).Node = node; } break; -#line 4221 "qmljs.g" - case 547: Q_FALLTHROUGH(); -#line 4223 "qmljs.g" +#line 4255 "qmljs.g" + case 550: Q_FALLTHROUGH(); +#line 4257 "qmljs.g" - case 548: { + case 551: { AST::YieldExpression *node = new (pool) AST::YieldExpression(sym(3).Expression); node->yieldToken = loc(1); node->isYieldStar = true; sym(1).Node = node; } break; -#line 4233 "qmljs.g" - case 549: Q_FALLTHROUGH(); -#line 4235 "qmljs.g" +#line 4267 "qmljs.g" + case 552: Q_FALLTHROUGH(); +#line 4269 "qmljs.g" - case 550: { + case 553: { AST::YieldExpression *node = new (pool) AST::YieldExpression(sym(2).Expression); node->yieldToken = loc(1); sym(1).Node = node; } break; -#line 4245 "qmljs.g" +#line 4279 "qmljs.g" - case 551: { + case 554: { AST::ClassDeclaration *node = new (pool) AST::ClassDeclaration(stringRef(2), sym(3).Expression, sym(5).ClassElementList); node->classToken = loc(1); node->identifierToken = loc(2); @@ -3198,9 +3230,9 @@ case 238: { sym(1).Node = node; } break; -#line 4257 "qmljs.g" +#line 4291 "qmljs.g" - case 552: { + case 555: { AST::ClassExpression *node = new (pool) AST::ClassExpression(stringRef(2), sym(3).Expression, sym(5).ClassElementList); node->classToken = loc(1); node->identifierToken = loc(2); @@ -3209,9 +3241,9 @@ case 238: { sym(1).Node = node; } break; -#line 4269 "qmljs.g" +#line 4303 "qmljs.g" - case 553: { + case 556: { AST::ClassDeclaration *node = new (pool) AST::ClassDeclaration(QStringRef(), sym(2).Expression, sym(4).ClassElementList); node->classToken = loc(1); node->lbraceToken = loc(3); @@ -3219,9 +3251,9 @@ case 238: { sym(1).Node = node; } break; -#line 4280 "qmljs.g" +#line 4314 "qmljs.g" - case 554: { + case 557: { AST::ClassExpression *node = new (pool) AST::ClassExpression(QStringRef(), sym(2).Expression, sym(4).ClassElementList); node->classToken = loc(1); node->lbraceToken = loc(3); @@ -3229,48 +3261,48 @@ case 238: { sym(1).Node = node; } break; -#line 4293 "qmljs.g" +#line 4327 "qmljs.g" - case 556: { + case 559: { lexer->setStaticIsKeyword(true); } break; -#line 4300 "qmljs.g" - case 557: -#line 4302 "qmljs.g" +#line 4334 "qmljs.g" + case 560: +#line 4336 "qmljs.g" - case 558: { + case 561: { lexer->setStaticIsKeyword(false); } break; -#line 4309 "qmljs.g" +#line 4343 "qmljs.g" - case 559: { + case 562: { sym(1).Node = nullptr; } break; -#line 4316 "qmljs.g" +#line 4350 "qmljs.g" - case 560: { + case 563: { sym(1).Node = sym(2).Node; } break; -#line 4323 "qmljs.g" +#line 4357 "qmljs.g" - case 561: { + case 564: { sym(1).Node = nullptr; } break; -#line 4330 "qmljs.g" +#line 4364 "qmljs.g" - case 562: { + case 565: { if (sym(1).Node) sym(1).Node = sym(1).ClassElementList->finish(); } break; -#line 4340 "qmljs.g" +#line 4374 "qmljs.g" - case 564: { + case 567: { if (sym(1).Node) { if (sym(2).Node) sym(1).ClassElementList = sym(1).ClassElementList->append(sym(2).ClassElementList); @@ -3279,246 +3311,246 @@ case 238: { } } break; -#line 4352 "qmljs.g" +#line 4386 "qmljs.g" - case 565: { + case 568: { AST::ClassElementList *node = new (pool) AST::ClassElementList(sym(1).PatternProperty, false); sym(1).Node = node; } break; -#line 4360 "qmljs.g" +#line 4394 "qmljs.g" - case 566: { + case 569: { lexer->setStaticIsKeyword(true); AST::ClassElementList *node = new (pool) AST::ClassElementList(sym(2).PatternProperty, true); sym(1).Node = node; } break; -#line 4369 "qmljs.g" - - case 567: { - sym(1).Node = nullptr; - } break; - -#line 4378 "qmljs.g" - - case 568: { - sym(1).Node = nullptr; - } break; - -#line 4387 "qmljs.g" +#line 4403 "qmljs.g" case 570: { + sym(1).Node = nullptr; + } break; + +#line 4412 "qmljs.g" + + case 571: { + sym(1).Node = nullptr; + } break; + +#line 4421 "qmljs.g" + + case 573: { sym(1).Node = new (pool) AST::Program(sym(1).StatementList->finish()); } break; -#line 4394 "qmljs.g" - case 571: { +#line 4428 "qmljs.g" + case 574: { sym(1).Node = new (pool) AST::ESModule(sym(1).StatementList); } break; -#line 4400 "qmljs.g" +#line 4434 "qmljs.g" - case 572: { + case 575: { sym(1).StatementList = sym(1).StatementList->finish(); } break; -#line 4407 "qmljs.g" +#line 4441 "qmljs.g" - case 573: { + case 576: { sym(1).StatementList = nullptr; } break; -#line 4417 "qmljs.g" +#line 4451 "qmljs.g" - case 576: { + case 579: { sym(1).StatementList = sym(1).StatementList->append(sym(2).StatementList); } break; -#line 4425 "qmljs.g" - case 577: Q_FALLTHROUGH(); -#line 4427 "qmljs.g" +#line 4459 "qmljs.g" + case 580: Q_FALLTHROUGH(); +#line 4461 "qmljs.g" - case 578: { + case 581: { sym(1).StatementList = new (pool) AST::StatementList(sym(1).Node); } break; -#line 4436 "qmljs.g" +#line 4470 "qmljs.g" - case 580: { + case 583: { auto decl = new (pool) AST::ImportDeclaration(sym(2).ImportClause, sym(3).FromClause); decl->importToken = loc(1); sym(1).Node = decl; } break; -#line 4444 "qmljs.g" +#line 4478 "qmljs.g" - case 581: { + case 584: { auto decl = new (pool) AST::ImportDeclaration(stringRef(2)); decl->importToken = loc(1); decl->moduleSpecifierToken = loc(2); sym(1).Node = decl; } break; -#line 4454 "qmljs.g" +#line 4488 "qmljs.g" - case 582: { + case 585: { auto clause = new (pool) AST::ImportClause(stringRef(1)); clause->importedDefaultBindingToken = loc(1); sym(1).ImportClause = clause; } break; -#line 4462 "qmljs.g" +#line 4496 "qmljs.g" - case 583: { + case 586: { sym(1).ImportClause = new (pool) AST::ImportClause(sym(1).NameSpaceImport); } break; -#line 4468 "qmljs.g" +#line 4502 "qmljs.g" - case 584: { + case 587: { sym(1).ImportClause = new (pool) AST::ImportClause(sym(1).NamedImports); } break; -#line 4474 "qmljs.g" +#line 4508 "qmljs.g" - case 585: { + case 588: { auto importClause = new (pool) AST::ImportClause(stringRef(1), sym(3).NameSpaceImport); importClause->importedDefaultBindingToken = loc(1); sym(1).ImportClause = importClause; } break; -#line 4482 "qmljs.g" +#line 4516 "qmljs.g" - case 586: { + case 589: { auto importClause = new (pool) AST::ImportClause(stringRef(1), sym(3).NamedImports); importClause->importedDefaultBindingToken = loc(1); sym(1).ImportClause = importClause; } break; -#line 4493 "qmljs.g" +#line 4527 "qmljs.g" - case 588: { + case 591: { auto import = new (pool) AST::NameSpaceImport(stringRef(3)); import->starToken = loc(1); import->importedBindingToken = loc(3); sym(1).NameSpaceImport = import; } break; -#line 4503 "qmljs.g" +#line 4537 "qmljs.g" - case 589: { + case 592: { auto namedImports = new (pool) AST::NamedImports(); namedImports->leftBraceToken = loc(1); namedImports->rightBraceToken = loc(2); sym(1).NamedImports = namedImports; } break; -#line 4512 "qmljs.g" +#line 4546 "qmljs.g" - case 590: { + case 593: { auto namedImports = new (pool) AST::NamedImports(sym(2).ImportsList->finish()); namedImports->leftBraceToken = loc(1); namedImports->rightBraceToken = loc(3); sym(1).NamedImports = namedImports; } break; -#line 4521 "qmljs.g" +#line 4555 "qmljs.g" - case 591: { + case 594: { auto namedImports = new (pool) AST::NamedImports(sym(2).ImportsList->finish()); namedImports->leftBraceToken = loc(1); namedImports->rightBraceToken = loc(4); sym(1).NamedImports = namedImports; } break; -#line 4531 "qmljs.g" +#line 4565 "qmljs.g" - case 592: { + case 595: { auto clause = new (pool) AST::FromClause(stringRef(2)); clause->fromToken = loc(1); clause->moduleSpecifierToken = loc(2); sym(1).FromClause = clause; } break; -#line 4541 "qmljs.g" +#line 4575 "qmljs.g" - case 593: { + case 596: { auto importsList = new (pool) AST::ImportsList(sym(1).ImportSpecifier); importsList->importSpecifierToken = loc(1); sym(1).ImportsList = importsList; } break; -#line 4549 "qmljs.g" +#line 4583 "qmljs.g" - case 594: { + case 597: { auto importsList = new (pool) AST::ImportsList(sym(1).ImportsList, sym(3).ImportSpecifier); importsList->importSpecifierToken = loc(3); sym(1).ImportsList = importsList; } break; -#line 4561 "qmljs.g" +#line 4595 "qmljs.g" - case 595: { + case 598: { auto importSpecifier = new (pool) AST::ImportSpecifier(stringRef(1)); importSpecifier->importedBindingToken = loc(1); sym(1).ImportSpecifier = importSpecifier; } break; -#line 4569 "qmljs.g" +#line 4603 "qmljs.g" - case 596: { + case 599: { auto importSpecifier = new (pool) AST::ImportSpecifier(stringRef(1), stringRef(3)); importSpecifier->identifierToken = loc(1); importSpecifier->importedBindingToken = loc(3); sym(1).ImportSpecifier = importSpecifier; } break; -#line 4586 "qmljs.g" +#line 4620 "qmljs.g" - case 599: { + case 602: { int token = lookaheadToken(lexer); if (token == T_FUNCTION || token == T_FUNCTION_STAR || token == T_CLASS) pushToken(T_FORCE_DECLARATION); } break; -#line 4595 "qmljs.g" +#line 4629 "qmljs.g" - case 600: { + case 603: { auto exportDeclaration = new (pool) AST::ExportDeclaration(sym(3).FromClause); exportDeclaration->exportToken = loc(1); sym(1).ExportDeclaration = exportDeclaration; } break; -#line 4603 "qmljs.g" +#line 4637 "qmljs.g" - case 601: { + case 604: { auto exportDeclaration = new (pool) AST::ExportDeclaration(sym(2).ExportClause, sym(3).FromClause); exportDeclaration->exportToken = loc(1); sym(1).ExportDeclaration = exportDeclaration; } break; -#line 4611 "qmljs.g" +#line 4645 "qmljs.g" - case 602: { + case 605: { auto exportDeclaration = new (pool) AST::ExportDeclaration(sym(2).ExportClause); exportDeclaration->exportToken = loc(1); sym(1).ExportDeclaration = exportDeclaration; } break; -#line 4619 "qmljs.g" - case 603: Q_FALLTHROUGH(); -#line 4621 "qmljs.g" +#line 4653 "qmljs.g" + case 606: Q_FALLTHROUGH(); +#line 4655 "qmljs.g" - case 604: { + case 607: { auto exportDeclaration = new (pool) AST::ExportDeclaration(/*exportDefault=*/false, sym(2).Node); exportDeclaration->exportToken = loc(1); sym(1).ExportDeclaration = exportDeclaration; } break; -#line 4629 "qmljs.g" +#line 4663 "qmljs.g" - case 605: { + case 608: { if (auto *f = AST::cast(sym(5).Node)) { if (f->name.isEmpty()) { f->name = stringRef(2); @@ -3527,9 +3559,9 @@ case 238: { } } Q_FALLTHROUGH(); -#line 4640 "qmljs.g" +#line 4674 "qmljs.g" - case 606: { + case 609: { // Emulate 15.2.3.11 if (auto *cls = AST::cast(sym(5).Node)) { if (cls->name.isEmpty()) { @@ -3543,9 +3575,9 @@ case 238: { sym(1).ExportDeclaration = exportDeclaration; } break; -#line 4656 "qmljs.g" +#line 4690 "qmljs.g" - case 607: { + case 610: { // if lhs is an identifier expression and rhs is an anonymous function expression, we need to assign the name of lhs to the function if (auto *f = asAnonymousFunctionDefinition(sym(4).Node)) { f->name = stringRef(2); @@ -3559,63 +3591,63 @@ case 238: { sym(1).ExportDeclaration = exportDeclaration; } break; -#line 4673 "qmljs.g" +#line 4707 "qmljs.g" - case 608: { + case 611: { auto exportClause = new (pool) AST::ExportClause(); exportClause->leftBraceToken = loc(1); exportClause->rightBraceToken = loc(2); sym(1).ExportClause = exportClause; } break; -#line 4682 "qmljs.g" +#line 4716 "qmljs.g" - case 609: { + case 612: { auto exportClause = new (pool) AST::ExportClause(sym(2).ExportsList->finish()); exportClause->leftBraceToken = loc(1); exportClause->rightBraceToken = loc(3); sym(1).ExportClause = exportClause; } break; -#line 4691 "qmljs.g" +#line 4725 "qmljs.g" - case 610: { + case 613: { auto exportClause = new (pool) AST::ExportClause(sym(2).ExportsList->finish()); exportClause->leftBraceToken = loc(1); exportClause->rightBraceToken = loc(4); sym(1).ExportClause = exportClause; } break; -#line 4701 "qmljs.g" +#line 4735 "qmljs.g" - case 611: { + case 614: { sym(1).ExportsList = new (pool) AST::ExportsList(sym(1).ExportSpecifier); } break; -#line 4707 "qmljs.g" +#line 4741 "qmljs.g" - case 612: { + case 615: { sym(1).ExportsList = new (pool) AST::ExportsList(sym(1).ExportsList, sym(3).ExportSpecifier); } break; -#line 4714 "qmljs.g" +#line 4748 "qmljs.g" - case 613: { + case 616: { auto exportSpecifier = new (pool) AST::ExportSpecifier(stringRef(1)); exportSpecifier->identifierToken = loc(1); sym(1).ExportSpecifier = exportSpecifier; } break; -#line 4722 "qmljs.g" +#line 4756 "qmljs.g" - case 614: { + case 617: { auto exportSpecifier = new (pool) AST::ExportSpecifier(stringRef(1), stringRef(3)); exportSpecifier->identifierToken = loc(1); exportSpecifier->exportedIdentifierToken = loc(3); sym(1).ExportSpecifier = exportSpecifier; } break; -#line 4733 "qmljs.g" +#line 4767 "qmljs.g" // ------------ end of switch statement } // switch diff --git a/src/libs/qmljs/parser/qmljsparser_p.h b/src/libs/qmljs/parser/qmljsparser_p.h index 9d9a0f2fc95..e7a81f32084 100644 --- a/src/libs/qmljs/parser/qmljsparser_p.h +++ b/src/libs/qmljs/parser/qmljsparser_p.h @@ -1,3 +1,5 @@ + +#line 185 "qmljs.g" /**************************************************************************** ** ** Copyright (C) 2016 The Qt Company Ltd. @@ -22,7 +24,6 @@ ** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ****************************************************************************/ -#line 223 "qmljs.g" // @@ -291,27 +292,27 @@ protected: -#line 1828 "qmljs.g" +#line 1862 "qmljs.g" -#define J_SCRIPT_REGEXPLITERAL_RULE1 161 +#define J_SCRIPT_REGEXPLITERAL_RULE1 164 -#line 1840 "qmljs.g" +#line 1874 "qmljs.g" -#define J_SCRIPT_REGEXPLITERAL_RULE2 162 +#define J_SCRIPT_REGEXPLITERAL_RULE2 165 -#line 3389 "qmljs.g" +#line 3423 "qmljs.g" -#define J_SCRIPT_EXPRESSIONSTATEMENTLOOKAHEAD_RULE 460 +#define J_SCRIPT_EXPRESSIONSTATEMENTLOOKAHEAD_RULE 463 -#line 4041 "qmljs.g" +#line 4075 "qmljs.g" -#define J_SCRIPT_CONCISEBODYLOOKAHEAD_RULE 530 +#define J_SCRIPT_CONCISEBODYLOOKAHEAD_RULE 533 -#line 4583 "qmljs.g" +#line 4617 "qmljs.g" -#define J_SCRIPT_EXPORTDECLARATIONLOOKAHEAD_RULE 599 +#define J_SCRIPT_EXPORTDECLARATIONLOOKAHEAD_RULE 602 -#line 4867 "qmljs.g" +#line 4901 "qmljs.g" QT_QML_END_NAMESPACE diff --git a/tests/auto/qml/codemodel/check/RequiredListProperties.qml b/tests/auto/qml/codemodel/check/RequiredListProperties.qml new file mode 100644 index 00000000000..38c604e463d --- /dev/null +++ b/tests/auto/qml/codemodel/check/RequiredListProperties.qml @@ -0,0 +1,6 @@ +import QtQuick 2.15 + +Item { + required property list listA + default required property list listDefault +} diff --git a/tests/auto/qml/codemodel/check/RequiredListPropertiesUser.qml b/tests/auto/qml/codemodel/check/RequiredListPropertiesUser.qml new file mode 100644 index 00000000000..d8ac85d27c9 --- /dev/null +++ b/tests/auto/qml/codemodel/check/RequiredListPropertiesUser.qml @@ -0,0 +1,7 @@ +import QtQuick 2.15 + +RequiredListProperties { + Rectangle {} + Rectangle {} + listA: [Item {}, Item {}] +} From 9b249033d27259c01b8ecb87cbfda8f0c6c5867b Mon Sep 17 00:00:00 2001 From: Henning Gruendl Date: Wed, 1 Jul 2020 10:51:26 +0200 Subject: [PATCH 086/108] QmlDesigner: Set unique id as object name Task-number: QDS-1821 Change-Id: I2021e2862797a40ea82ac4b279e33ba9e77a0dd7 Reviewed-by: Tanja Remes Reviewed-by: Thomas Hartmann --- src/plugins/qmldesigner/designmodewidget.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/plugins/qmldesigner/designmodewidget.cpp b/src/plugins/qmldesigner/designmodewidget.cpp index c6b4af7054c..64b72c32910 100644 --- a/src/plugins/qmldesigner/designmodewidget.cpp +++ b/src/plugins/qmldesigner/designmodewidget.cpp @@ -326,6 +326,9 @@ void DesignModeWidget::setup() dockWidget->setWindowTitle(title); m_dockManager->addDockWidget(ADS::NoDockWidgetArea, dockWidget); + // Set unique id as object name + navigationView.widget->setObjectName(uniqueId); + // Create menu action auto command = Core::ActionManager::registerAction(dockWidget->toggleViewAction(), actionToggle.withSuffix(uniqueId + "Widget"), @@ -346,6 +349,9 @@ void DesignModeWidget::setup() // Add to view widgets m_viewWidgets.append(widgetInfo.widget); + // Set unique id as object name + widgetInfo.widget->setObjectName(widgetInfo.uniqueId); + // Create menu action auto command = Core::ActionManager::registerAction(dockWidget->toggleViewAction(), actionToggle.withSuffix(widgetInfo.uniqueId + "Widget"), @@ -356,11 +362,16 @@ void DesignModeWidget::setup() // Finally the output pane { + const QString uniqueId = "OutputPane"; auto outputPanePlaceholder = new Core::OutputPanePlaceHolder(Core::Constants::MODE_DESIGN); - m_outputPaneDockWidget = new ADS::DockWidget("OutputPane"); + m_outputPaneDockWidget = new ADS::DockWidget(uniqueId); m_outputPaneDockWidget->setWidget(outputPanePlaceholder); m_outputPaneDockWidget->setWindowTitle("Output Pane"); m_dockManager->addDockWidget(ADS::NoDockWidgetArea, m_outputPaneDockWidget); + + // Set unique id as object name + outputPanePlaceholder->setObjectName(uniqueId); + // Create menu action auto command = Core::ActionManager::registerAction(m_outputPaneDockWidget->toggleViewAction(), actionToggle.withSuffix("OutputPaneWidget"), From 9d6f69abe9d08f4abdce0dbd0864ad79f5fc74d6 Mon Sep 17 00:00:00 2001 From: Henning Gruendl Date: Thu, 16 Jul 2020 12:47:51 +0200 Subject: [PATCH 087/108] QmlDesigner: Sort incompatible properties Sort incompatible properties before showing them in the dialog. Task-number: QDS-2560 Change-Id: I9871bc8ea488be04fcfac7b9c0f1a7cbf185072a Reviewed-by: Thomas Hartmann --- .../components/propertyeditor/propertyeditorcontextobject.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.cpp index 524debfe176..8032f41ad8b 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.cpp @@ -206,6 +206,8 @@ void PropertyEditorContextObject::changeTypeName(const QString &typeName) incompatibleProperties.append(property.name()); } + Utils::sort(incompatibleProperties); + if (!incompatibleProperties.empty()) { QString detailedText = QString("Incompatible properties:
"); From bb79a7fb90cc5e008c3aaf347eb6c43352c541b5 Mon Sep 17 00:00:00 2001 From: Henning Gruendl Date: Thu, 16 Jul 2020 13:05:03 +0200 Subject: [PATCH 088/108] QmlDesigner: Fix duplicate items auto completion Fix duplicate items in the auto completion result by trimming the strings. Otherwise items like "Item " and "Item" will both show up in the result. Task-number: QDS-2561 Change-Id: I0244fed19cf358d5c72ee169cd8ffa13672edce2 Reviewed-by: Thomas Hartmann --- src/plugins/qmljseditor/qmljscompletionassist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/qmljseditor/qmljscompletionassist.cpp b/src/plugins/qmljseditor/qmljscompletionassist.cpp index 5cfa28c609a..0f7fdf0a881 100644 --- a/src/plugins/qmljseditor/qmljscompletionassist.cpp +++ b/src/plugins/qmljseditor/qmljscompletionassist.cpp @@ -355,7 +355,7 @@ QStringList qmlJSAutoComplete(QTextDocument *textDocument, } for (int i = 0; i < model->size(); ++i) - list.append(proposal->model()->text(i)); + list.append(proposal->model()->text(i).trimmed()); list.append(prefix); } From 1fb1e829eea0e877f7e907c807203e81b45fef21 Mon Sep 17 00:00:00 2001 From: Henning Gruendl Date: Tue, 14 Jul 2020 12:47:18 +0200 Subject: [PATCH 089/108] QmlDesigner: Replace alias icon with font icon Task-number: QDS-2559 Change-Id: Ibcc4c6565eff6a5c5f7011fbf39af2277da9eec0 Reviewed-by: Thomas Hartmann --- .../QtQuick/ItemPane.qml | 57 ++++++++++++++----- .../QtQuick/QtObjectPane.qml | 52 ++++++++++++++--- 2 files changed, 87 insertions(+), 22 deletions(-) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml index db877b65cd7..5f989a672f1 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml @@ -127,6 +127,7 @@ Rectangle { } SecondColumnLayout { + spacing: 2 LineEdit { id: lineEdit @@ -139,29 +140,55 @@ Rectangle { showExtendedFunctionButton: false enabled: !modelNodeBackend.multiSelection } - // workaround: without this item the lineedit does not shrink to the - // right size after resizing to a wider width - Image { - visible: !modelNodeBackend.multiSelection - Layout.preferredWidth: 20 - Layout.preferredHeight: 20 - horizontalAlignment: Image.AlignHCenter - verticalAlignment: Image.AlignVCenter - source: hasAliasExport ? "image://icons/alias-export-checked" : "image://icons/alias-export-unchecked" + Rectangle { + id: aliasIndicator + color: "transparent" + border.color: "transparent" + implicitWidth: StudioTheme.Values.height + implicitHeight: StudioTheme.Values.height + z: 10 + + Label { + id: aliasIndicatorIcon + enabled: !modelNodeBackend.multiSelection + anchors.fill: parent + text: { + if (!aliasIndicatorIcon.enabled) + return StudioTheme.Constants.idAliasOff + + return hasAliasExport ? StudioTheme.Constants.idAliasOn : StudioTheme.Constants.idAliasOff + } + color: { + if (!aliasIndicatorIcon.enabled) + return StudioTheme.Values.themeTextColorDisabled + + return hasAliasExport ? StudioTheme.Values.themeInteraction : StudioTheme.Values.themeTextColor + } + font.family: StudioTheme.Constants.iconFont.family + font.pixelSize: Math.round(16 * StudioTheme.Values.scaleFactor) + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + states: [ + State { + name: "hovered" + when: toolTipArea.containsMouse && aliasIndicatorIcon.enabled + PropertyChanges { + target: aliasIndicatorIcon + scale: 1.2 + } + } + ] + } + ToolTipArea { + id: toolTipArea enabled: !modelNodeBackend.multiSelection anchors.fill: parent onClicked: toogleExportAlias() tooltip: qsTr("Toggles whether this item is exported as an alias property of the root item.") } } - Item { //dummy object to preserve layout in case of multiselection - Layout.preferredWidth: 20 - Layout.preferredHeight: 20 - enabled: modelNodeBackend.multiSelection - visible: enabled - } } Label { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/QtObjectPane.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/QtObjectPane.qml index 5b3a641f4c0..3d8678e1121 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/QtObjectPane.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/QtObjectPane.qml @@ -27,6 +27,7 @@ import QtQuick 2.15 import QtQuick.Layouts 1.0 import QtQuickDesignerTheme 1.0 import HelperWidgets 2.0 +import StudioTheme 1.0 as StudioTheme Rectangle { id: itemPane @@ -104,8 +105,8 @@ Rectangle { } Item { - Layout.preferredWidth: 16 - Layout.preferredHeight: 16 + Layout.preferredWidth: 20 + Layout.preferredHeight: 20 } } @@ -114,6 +115,7 @@ Rectangle { } SecondColumnLayout { + spacing: 2 LineEdit { id: lineEdit @@ -127,12 +129,48 @@ Rectangle { enabled: !modelNodeBackend.multiSelection } - Image { - visible: !modelNodeBackend.multiSelection - Layout.preferredWidth: 16 - Layout.preferredHeight: 16 - source: hasAliasExport ? "image://icons/alias-export-checked" : "image://icons/alias-export-unchecked" + Rectangle { + id: aliasIndicator + color: "transparent" + border.color: "transparent" + implicitWidth: StudioTheme.Values.height + implicitHeight: StudioTheme.Values.height + z: 10 + + Label { + id: aliasIndicatorIcon + enabled: !modelNodeBackend.multiSelection + anchors.fill: parent + text: { + if (!aliasIndicatorIcon.enabled) + return StudioTheme.Constants.idAliasOff + + return hasAliasExport ? StudioTheme.Constants.idAliasOn : StudioTheme.Constants.idAliasOff + } + color: { + if (!aliasIndicatorIcon.enabled) + return StudioTheme.Values.themeTextColorDisabled + + return hasAliasExport ? StudioTheme.Values.themeInteraction : StudioTheme.Values.themeTextColor + } + font.family: StudioTheme.Constants.iconFont.family + font.pixelSize: Math.round(16 * StudioTheme.Values.scaleFactor) + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + states: [ + State { + name: "hovered" + when: toolTipArea.containsMouse && aliasIndicatorIcon.enabled + PropertyChanges { + target: aliasIndicatorIcon + scale: 1.2 + } + } + ] + } + ToolTipArea { + id: toolTipArea enabled: !modelNodeBackend.multiSelection anchors.fill: parent onClicked: toogleExportAlias() From f726b0d90ba5c586425e4e8e5c08421e97997720 Mon Sep 17 00:00:00 2001 From: Henning Gruendl Date: Mon, 13 Jul 2020 17:17:39 +0200 Subject: [PATCH 090/108] QmlDesigner: Enable modes/states with icon font Add functionality to use modes and states when generating a QIcon from a font in StyleHelper Task-number: QDS-2558 Change-Id: I764e8434a645d0984c6104cd1868fd5b0091d225 Reviewed-by: Thomas Hartmann --- src/libs/utils/stylehelper.cpp | 35 ++++++++++++++++++++++++++++++++++ src/libs/utils/stylehelper.h | 30 +++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) diff --git a/src/libs/utils/stylehelper.cpp b/src/libs/utils/stylehelper.cpp index 6f8868cc7b2..4b317116c42 100644 --- a/src/libs/utils/stylehelper.cpp +++ b/src/libs/utils/stylehelper.cpp @@ -546,6 +546,41 @@ QLinearGradient StyleHelper::statusBarGradient(const QRect &statusBarRect) return grad; } +QIcon StyleHelper::getIconFromIconFont(const QString &fontName, const QList ¶meters) +{ + QFontDatabase a; + + QTC_ASSERT(a.hasFamily(fontName), {}); + + if (!a.hasFamily(fontName)) + return {}; + + QIcon icon; + + for (const IconFontHelper &p : parameters) { + const int maxDpr = qRound(qApp->devicePixelRatio()); + for (int dpr = 1; dpr <= maxDpr; dpr++) { + QPixmap pixmap(p.size() * dpr); + pixmap.setDevicePixelRatio(dpr); + pixmap.fill(Qt::transparent); + + QFont font(fontName); + font.setPixelSize(p.size().height()); + + QPainter painter(&pixmap); + painter.save(); + painter.setPen(p.color()); + painter.setFont(font); + painter.drawText(QRectF(QPoint(0, 0), p.size()), p.iconSymbol()); + painter.restore(); + + icon.addPixmap(pixmap, p.mode(), p.state()); + } + } + + return icon; +} + QIcon StyleHelper::getIconFromIconFont(const QString &fontName, const QString &iconSymbol, int fontSize, int iconSize, QColor color) { QFontDatabase a; diff --git a/src/libs/utils/stylehelper.h b/src/libs/utils/stylehelper.h index 09f32534352..a1a24a8d5b5 100644 --- a/src/libs/utils/stylehelper.h +++ b/src/libs/utils/stylehelper.h @@ -93,6 +93,36 @@ public: static void tintImage(QImage &img, const QColor &tintColor); static QLinearGradient statusBarGradient(const QRect &statusBarRect); + class IconFontHelper + { + public: + IconFontHelper(const QString &iconSymbol, + const QColor &color, + const QSize &size, + QIcon::Mode mode = QIcon::Normal, + QIcon::State state = QIcon::Off) + : m_iconSymbol(iconSymbol) + , m_color(color) + , m_size(size) + , m_mode(mode) + , m_state(state) + {} + + QString iconSymbol() const { return m_iconSymbol; } + QColor color() const { return m_color; } + QSize size() const { return m_size; } + QIcon::Mode mode() const { return m_mode; } + QIcon::State state() const { return m_state; } + + private: + QString m_iconSymbol; + QColor m_color; + QSize m_size; + QIcon::Mode m_mode; + QIcon::State m_state; + }; + + static QIcon getIconFromIconFont(const QString &fontName, const QList ¶meters); static QIcon getIconFromIconFont(const QString &fontName, const QString &iconSymbol, int fontSize, int iconSize, QColor color); static QIcon getIconFromIconFont(const QString &fontName, const QString &iconSymbol, int fontSize, int iconSize); From 520c70bd8c599bc34dfba3f3542764174d2e3612 Mon Sep 17 00:00:00 2001 From: Henning Gruendl Date: Mon, 13 Jul 2020 17:20:25 +0200 Subject: [PATCH 091/108] QmlDesigner: Make use of mode for zoom icons Add mode disabled to the zoom all button in FormEditor widget Task-number: QDS-2558 Change-Id: Ie0da97cca5ea4c2411e21fc3cbea202397e02097 Reviewed-by: Thomas Hartmann --- .../formeditor/formeditorwidget.cpp | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp b/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp index 303c79ea965..74fa9d3b730 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp +++ b/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp @@ -147,19 +147,31 @@ FormEditorWidget::FormEditorWidget(FormEditorView *view) : // Zoom actions const QString fontName = "qtds_propertyIconFont.ttf"; - QColor buttonColor(Theme::getColor(Theme::QmlDesigner_TabLight)); + const QColor textColorNormal(Theme::getColor(Theme::MenuItemTextColorNormal)); + const QColor textColorDisabled(Theme::getColor(Theme::MenuBarItemTextColorDisabled)); const QIcon zoomAllIcon = Utils::StyleHelper::getIconFromIconFont(fontName, Theme::getIconUnicode(Theme::Icon::zoomAll), - 28, 28, buttonColor); + 28, 28, textColorNormal); + + const QString zoomSelectionUnicode = Theme::getIconUnicode(Theme::Icon::zoomSelection); + const auto zoomSelectionNormal = Utils::StyleHelper::IconFontHelper(zoomSelectionUnicode, + textColorNormal, + QSize(28, 28), + QIcon::Normal); + const auto zoomSelectionDisabeld = Utils::StyleHelper::IconFontHelper(zoomSelectionUnicode, + textColorDisabled, + QSize(28, 28), + QIcon::Disabled); + const QIcon zoomSelectionIcon = Utils::StyleHelper::getIconFromIconFont(fontName, - Theme::getIconUnicode(Theme::Icon::zoomSelection), - 28, 28, buttonColor); + {zoomSelectionNormal, + zoomSelectionDisabeld}); const QIcon zoomInIcon = Utils::StyleHelper::getIconFromIconFont(fontName, Theme::getIconUnicode(Theme::Icon::zoomIn), - 28, 28, buttonColor); + 28, 28, textColorNormal); const QIcon zoomOutIcon = Utils::StyleHelper::getIconFromIconFont(fontName, Theme::getIconUnicode(Theme::Icon::zoomOut), - 28, 28, buttonColor); + 28, 28, textColorNormal); m_zoomInAction = new QAction(zoomInIcon, tr("Zoom in"), this); m_zoomInAction->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Plus)); From c113a7e8515bddb03d467167927b2f434222d245 Mon Sep 17 00:00:00 2001 From: Henning Gruendl Date: Mon, 13 Jul 2020 17:24:49 +0200 Subject: [PATCH 092/108] QmlDesigner: Make use of states in ADS icons * Add the on state to the tab close QIcon to have a different color in focused tabs * Make the tab close icon checkable if FocusHighlighting is enabled to exploit the QIcon state for the color change * Adapt the focused font color in the dockwidget stylesheet Task-number: QDS-2558 Change-Id: I9fdfb93f0677f724336da8efdb2fb219af9c9e87 Reviewed-by: Thomas Hartmann --- .../advanceddockingsystem/dockwidgettab.cpp | 12 +++++++++++- .../components/resources/dockwidgets.css | 2 +- src/plugins/qmldesigner/designmodewidget.cpp | 19 ++++++++++++++++--- 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/src/libs/advanceddockingsystem/dockwidgettab.cpp b/src/libs/advanceddockingsystem/dockwidgettab.cpp index af0ce4baef5..7a4784b6e0d 100644 --- a/src/libs/advanceddockingsystem/dockwidgettab.cpp +++ b/src/libs/advanceddockingsystem/dockwidgettab.cpp @@ -201,6 +201,9 @@ namespace ADS boxLayout->addSpacing(qRound(spacing * 4.0 / 3.0)); boxLayout->setAlignment(Qt::AlignCenter | Qt::AlignVCenter); + if (DockManager::testConfigFlag(DockManager::FocusHighlighting)) + m_closeButton->setCheckable(true); + m_titleLabel->setVisible(true); } @@ -425,7 +428,6 @@ namespace ADS setFocus(Qt::OtherFocusReason); updateFocusStyle = true; } - if (d->m_isActiveTab == active) { if (updateFocusStyle) updateStyle(); @@ -527,6 +529,7 @@ namespace ADS d->m_titleLabel->setToolTip(text); } #endif + return Super::event(event); } @@ -547,6 +550,13 @@ namespace ADS void DockWidgetTab::updateStyle() { + if (DockManager::testConfigFlag(DockManager::FocusHighlighting)) { + if (property("focused").toBool()) + d->m_closeButton->setChecked(true); + else + d->m_closeButton->setChecked(false); + } + internal::repolishStyle(this, internal::RepolishDirectChildren); } diff --git a/src/plugins/qmldesigner/components/resources/dockwidgets.css b/src/plugins/qmldesigner/components/resources/dockwidgets.css index 0aac817fbc9..3eb3c5a0450 100644 --- a/src/plugins/qmldesigner/components/resources/dockwidgets.css +++ b/src/plugins/qmldesigner/components/resources/dockwidgets.css @@ -148,7 +148,7 @@ ADS--DockWidgetTab[focused="true"] > #tabCloseButton:pressed { } ADS--DockWidgetTab[focused="true"] QLabel { - color: palette(creatorTheme.QmlDesigner_TabDark); + color: palette(creatorTheme.DStextColor); } ADS--DockAreaTitleBar { diff --git a/src/plugins/qmldesigner/designmodewidget.cpp b/src/plugins/qmldesigner/designmodewidget.cpp index 64b72c32910..d17bf5a10c8 100644 --- a/src/plugins/qmldesigner/designmodewidget.cpp +++ b/src/plugins/qmldesigner/designmodewidget.cpp @@ -238,19 +238,32 @@ void DesignModeWidget::setup() m_dockManager->setStyleSheet(Theme::replaceCssColors(sheet)); // Setup icons - QColor buttonColor(Theme::getColor(Theme::QmlDesigner_TabLight)); // TODO Use correct color roles - QColor tabColor(Theme::getColor(Theme::QmlDesigner_TabDark)); + const QColor buttonColor(Theme::getColor(Theme::QmlDesigner_TabLight)); // TODO Use correct color roles + const QColor tabColor(Theme::getColor(Theme::QmlDesigner_TabDark)); const QString closeUnicode = Theme::getIconUnicode(Theme::Icon::adsClose); const QString menuUnicode = Theme::getIconUnicode(Theme::Icon::adsDropDown); const QString undockUnicode = Theme::getIconUnicode(Theme::Icon::adsDetach); const QString fontName = "qtds_propertyIconFont.ttf"; - const QIcon tabsCloseIcon = Utils::StyleHelper::getIconFromIconFont(fontName, closeUnicode, 28, 28, tabColor); const QIcon menuIcon = Utils::StyleHelper::getIconFromIconFont(fontName, menuUnicode, 28, 28, buttonColor); const QIcon undockIcon = Utils::StyleHelper::getIconFromIconFont(fontName, undockUnicode, 28, 28, buttonColor); const QIcon closeIcon = Utils::StyleHelper::getIconFromIconFont(fontName, closeUnicode, 28, 28, buttonColor); + auto closeIconNormal = Utils::StyleHelper::IconFontHelper(closeUnicode, + tabColor, + QSize(28, 28), + QIcon::Normal, + QIcon::Off); + + auto closeIconFocused = Utils::StyleHelper::IconFontHelper(closeUnicode, + Theme::getColor(Theme::DStextColor), + QSize(28, 28), + QIcon::Normal, + QIcon::On); + + const QIcon tabsCloseIcon = Utils::StyleHelper::getIconFromIconFont(fontName, {closeIconNormal, closeIconFocused}); + m_dockManager->iconProvider().registerCustomIcon(ADS::TabCloseIcon, tabsCloseIcon); m_dockManager->iconProvider().registerCustomIcon(ADS::DockAreaMenuIcon, menuIcon); m_dockManager->iconProvider().registerCustomIcon(ADS::DockAreaUndockIcon, undockIcon); From d1aabbe262589fab96a9cf1fa98aa1c7e63e4b5b Mon Sep 17 00:00:00 2001 From: Henning Gruendl Date: Fri, 17 Jul 2020 15:09:01 +0200 Subject: [PATCH 093/108] QmlDesigner: Fix change type to include signals * Fix the change type dialog to also include checking for signals * Add check for same type * Add dynamic properties and signals Task-number: QDS-2562 Change-Id: I34652e702d9051fb5a237afae584e345c731622f Reviewed-by: Thomas Hartmann --- .../propertyeditorcontextobject.cpp | 42 +++++++++++++++++-- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.cpp index 8032f41ad8b..5f17ca77ffa 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.cpp @@ -194,24 +194,60 @@ void PropertyEditorContextObject::changeTypeName(const QString &typeName) ModelNode selectedNode = rewriterView->selectedModelNodes().constFirst(); + // Check if the requested type is the same as already set + if (selectedNode.simplifiedTypeName() == typeName) + return; + NodeMetaInfo metaInfo = m_model->metaInfo(typeName.toLatin1()); if (!metaInfo.isValid()) { Core::AsynchronousMessageBox::warning(tr("Invalid Type"), tr("%1 is an invalid type.").arg(typeName)); return; } + // Create a list of properties available for the new type + QList propertiesAndSignals(metaInfo.propertyNames()); + // Add signals to the list + for (const auto &signal : metaInfo.signalNames()) { + if (signal.isEmpty()) + continue; + + PropertyName name = signal; + QChar firstChar = QChar(signal.at(0)).toUpper().toLatin1(); + name[0] = firstChar.toLatin1(); + name.prepend("on"); + propertiesAndSignals.append(name); + } + + // Add dynamic properties and respective change signals + for (const auto &property : selectedNode.properties()) { + if (!property.isDynamic()) + continue; + + // Add dynamic property + propertiesAndSignals.append(property.name()); + // Add its change signal + PropertyName name = property.name(); + QChar firstChar = QChar(property.name().at(0)).toUpper().toLatin1(); + name[0] = firstChar.toLatin1(); + name.prepend("on"); + name.append("Changed"); + propertiesAndSignals.append(name); + } + + // Compare current properties and signals with the once available for change type QList incompatibleProperties; - for (auto property : selectedNode.properties()) { - if (!metaInfo.propertyNames().contains(property.name())) + for (const auto &property : selectedNode.properties()) { + if (!propertiesAndSignals.contains(property.name())) incompatibleProperties.append(property.name()); } Utils::sort(incompatibleProperties); + // Create a dialog showing incompatible properties and signals if (!incompatibleProperties.empty()) { QString detailedText = QString("Incompatible properties:
"); - for (auto p : incompatibleProperties) + for (const auto &p : incompatibleProperties) detailedText.append("- " + QString::fromUtf8(p) + "
"); detailedText.chop(QString("
").size()); From 9f2bb4abaf7f99f741bb422135f651d429bf89d3 Mon Sep 17 00:00:00 2001 From: Henning Gruendl Date: Thu, 16 Jul 2020 13:01:41 +0200 Subject: [PATCH 094/108] QmlDesigner: Fix ExpressionTextField popup Fix the ListView/Popup which is shown on the ExpressionTextField when requesting auto completion. * Fix key behavior of the auto completion list * Adapt to the look and feel of the property editor * Fix size and position of the TextField and the overlayed Label Task-number: QDS-2561 Change-Id: Ie8df6a2960b1c273600543532f0a136eb0c542b5 Reviewed-by: Thomas Hartmann --- .../QtQuick/ItemPane.qml | 22 +- .../QtQuick/QtObjectPane.qml | 29 ++- .../HelperWidgets/ExpressionTextField.qml | 229 +++++++++++++----- 3 files changed, 197 insertions(+), 83 deletions(-) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml index 5f989a672f1..9118cae9bee 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml @@ -66,15 +66,12 @@ Rectangle { RoundedPanel { Layout.fillWidth: true - height: 24 + height: StudioTheme.Values.height Label { - x: 6 anchors.fill: parent - anchors.leftMargin: 16 - + anchors.leftMargin: StudioTheme.Values.inputHorizontalPadding text: backendValues.className.value - verticalAlignment: Text.AlignVCenter } ToolTipArea { anchors.fill: parent @@ -88,10 +85,10 @@ Rectangle { } ExpressionTextField { - z: 2 id: typeLineEdit + z: 2 completeOnlyTypes: true - + replaceCurrentTextByCompletion: true anchors.fill: parent visible: false @@ -107,11 +104,18 @@ Rectangle { typeLineEdit.blockEditingFinished = true - if (visible) + if (typeLineEdit.visible) changeTypeName(typeLineEdit.text.trim()) - visible = false + typeLineEdit.visible = false typeLineEdit.blockEditingFinished = false + + typeLineEdit.completionList.model = null + } + + onRejected: { + typeLineEdit.visible = false + typeLineEdit.completionList.model = null } } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/QtObjectPane.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/QtObjectPane.qml index 3d8678e1121..78d99f4d28f 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/QtObjectPane.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/QtObjectPane.qml @@ -63,15 +63,12 @@ Rectangle { RoundedPanel { Layout.fillWidth: true - height: 24 + height: StudioTheme.Values.height Label { - x: 6 anchors.fill: parent - anchors.leftMargin: 16 - + anchors.leftMargin: StudioTheme.Values.inputHorizontalPadding text: backendValues.className.value - verticalAlignment: Text.AlignVCenter } ToolTipArea { anchors.fill: parent @@ -88,7 +85,7 @@ Rectangle { z: 2 id: typeLineEdit completeOnlyTypes: true - + replaceCurrentTextByCompletion: true anchors.fill: parent visible: false @@ -96,10 +93,26 @@ Rectangle { showButtons: false fixedSize: true + property bool blockEditingFinished: false + onEditingFinished: { - if (visible) + if (typeLineEdit.blockEditingFinished) + return + + typeLineEdit.blockEditingFinished = true + + if (typeLineEdit.visible) changeTypeName(typeLineEdit.text.trim()) - visible = false + typeLineEdit.visible = false + + typeLineEdit.blockEditingFinished = false + + typeLineEdit.completionList.model = null + } + + onRejected: { + typeLineEdit.visible = false + typeLineEdit.completionList.model = null } } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ExpressionTextField.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ExpressionTextField.qml index e0de0d3b88f..53557780d1a 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ExpressionTextField.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ExpressionTextField.qml @@ -23,13 +23,14 @@ ** ****************************************************************************/ -import QtQuick 2.1 -import "Constants.js" as Constants -import StudioControls 1.0 as StudioControls +import QtQuick 2.15 +import QtQuick.Window 2.15 +import QtQuick.Controls 2.15 import QtQuickDesignerTheme 1.0 +import StudioControls 1.0 as StudioControls +import StudioTheme 1.0 as StudioTheme StudioControls.TextField { - id: textField signal rejected @@ -38,103 +39,199 @@ StudioControls.TextField { actionIndicator.visible: false property bool completeOnlyTypes: false - - property bool completionActive: listView.count > 0 + property bool completionActive: listView.model !== null property bool dotCompletion: false property int dotCursorPos: 0 property string prefix - property alias showButtons: buttonrow.visible - property bool fixedSize: false + property bool replaceCurrentTextByCompletion: false + + property alias completionList: listView function commitCompletion() { - var cursorPos = textField.cursorPosition - - var string = textField.text - var before = string.slice(0, cursorPos - textField.prefix.length) - var after = string.slice(cursorPos) - - textField.text = before + listView.currentItem.text + after - - textField.cursorPosition = cursorPos + listView.currentItem.text.length - prefix.length + if (replaceCurrentTextByCompletion) { + textField.text = listView.currentItem.text + } else { + var cursorPos = textField.cursorPosition + var string = textField.text + var before = string.slice(0, cursorPos - textField.prefix.length) + var after = string.slice(cursorPos) + textField.text = before + listView.currentItem.text + after + textField.cursorPosition = cursorPos + listView.currentItem.text.length - prefix.length + } listView.model = null } - ListView { - id: listView + Popup { + id: textFieldPopup + x: textField.x + y: textField.height - StudioTheme.Values.border + width: textField.width + // TODO Setting the height on the popup solved the problem with the popup of height 0, + // but it has the problem that it sometimes extend over the border of the actual window + // and is then cut off. + height: Math.min(contentItem.implicitHeight + textFieldPopup.topPadding + textFieldPopup.bottomPadding, + textField.Window.height - topMargin - bottomMargin, + StudioTheme.Values.maxComboBoxPopupHeight) + padding: StudioTheme.Values.border + margins: 0 // If not defined margin will be -1 + closePolicy: Popup.CloseOnPressOutside | Popup.CloseOnPressOutsideParent + | Popup.CloseOnEscape | Popup.CloseOnReleaseOutside + | Popup.CloseOnReleaseOutsideParent - clip: true - cacheBuffer: 0 - snapMode: ListView.SnapToItem - boundsBehavior: Flickable.StopAtBounds visible: textField.completionActive - delegate: Text { - text: modelData - color: Theme.color(Theme.PanelTextColorLight) - Rectangle { - visible: index === listView.currentIndex - z: -1 - anchors.fill: parent - color: Theme.qmlDesignerBackgroundColorDarkAlternate() + + onClosed: listView.model = null + + contentItem: ListView { + id: listView + clip: true + implicitHeight: contentHeight + boundsBehavior: Flickable.StopAtBounds + ScrollBar.vertical: StudioControls.ScrollBar { + id: popupScrollBar } + + model: null + + delegate: ItemDelegate { + id: myItemDelegate + + width: textFieldPopup.width - textFieldPopup.leftPadding - textFieldPopup.rightPadding + - (popupScrollBar.visible ? popupScrollBar.contentItem.implicitWidth + + 2 : 0) // TODO Magic number + height: StudioTheme.Values.height - 2 * StudioTheme.Values.border + padding: 0 + text: itemDelegateText.text + + contentItem: Text { + id: itemDelegateText + leftPadding: 8 + text: modelData + color: StudioTheme.Values.themeTextColor + font: textField.font + elide: Text.ElideRight + verticalAlignment: Text.AlignVCenter + } + background: Rectangle { + color: "transparent" + } + + hoverEnabled: true + onHoveredChanged: { + if (hovered) + listView.currentIndex = index + } + onClicked: { + listView.currentIndex = index + if (textField.completionActive) + textField.commitCompletion() + } + } + + highlight: Rectangle { + id: listViewHighlight + width: textFieldPopup.width - textFieldPopup.leftPadding - textFieldPopup.rightPadding + - (popupScrollBar.visible ? popupScrollBar.contentItem.implicitWidth + + 2 : 0) + height: StudioTheme.Values.height - 2 * StudioTheme.Values.border + color: StudioTheme.Values.themeInteraction + y: listView.currentItem.y + } + highlightFollowsCurrentItem: false } - anchors.top: parent.top - anchors.topMargin: 26 - anchors.bottomMargin: textField.fixedSize ? -180 : 12 - anchors.bottom: parent.bottom - anchors.left: parent.left - width: 200 - spacing: 2 - children: [ - Rectangle { - visible: textField.fixedSize - anchors.fill: parent - color: Theme.qmlDesignerBackgroundColorDarker() - border.color: Theme.qmlDesignerBorderColor() - anchors.rightMargin: 12 - z: -1 - } + background: Rectangle { + color: StudioTheme.Values.themeControlBackground + border.color: StudioTheme.Values.themeInteraction + border.width: StudioTheme.Values.border + } - ] + enter: Transition { + } + exit: Transition { + } } verticalAlignment: Text.AlignTop + onPressed: listView.model = null + Keys.priority: Keys.BeforeItem Keys.onPressed: { + var text = textField.text + var pos = textField.cursorPosition + var explicitComplete = true - if (event.key === Qt.Key_Period) { + switch (event.key) { + + case Qt.Key_Period: textField.dotCursorPos = textField.cursorPosition + 1 - var list = autoComplete(textField.text+".", textField.dotCursorPos, false, textField.completeOnlyTypes) - textField.prefix = list.pop() - listView.model = list; + text = textField.text + "." + pos = textField.dotCursorPos + explicitComplete = false textField.dotCompletion = true - } else { - if (textField.completionActive) { - var list2 = autoComplete(textField.text + event.text, - textField.cursorPosition + event.text.length, - true, textField.completeOnlyTypes) - textField.prefix = list2.pop() - listView.model = list2; - } + break + + case Qt.Key_Right: + if (!textField.completionActive) + return + + pos = Math.min(textField.cursorPosition + 1, textField.text.length) + break + + case Qt.Key_Left: + if (!textField.completionActive) + return + + pos = Math.max(0, textField.cursorPosition - 1) + break + + case Qt.Key_Backspace: + if (!textField.completionActive) + return + + pos = textField.cursorPosition - 1 + if (pos < 0) + return + + text = textField.text.substring(0, pos) + textField.text.substring(textField.cursorPosition) + break + + case Qt.Key_Delete: + return + + default: + if (!textField.completionActive) + return + + var tmp = textField.text + text = tmp.substring(0, textField.cursorPosition) + event.text + tmp.substring(textField.cursorPosition) + pos = textField.cursorPosition + event.text.length } + + var list = autoComplete(text.trim(), pos, explicitComplete, textField.completeOnlyTypes) + textField.prefix = text.substring(0, pos) + + if (list.length && list[list.length - 1] === textField.prefix) + list.pop() + + listView.model = list } Keys.onSpacePressed: { if (event.modifiers & Qt.ControlModifier) { var list = autoComplete(textField.text, textField.cursorPosition, true, textField.completeOnlyTypes) - textField.prefix = list.pop() - listView.model = list; + textField.prefix = textField.text.substring(0, textField.cursorPosition) + if (list.length && list[list.length - 1] === textField.prefix) + list.pop() + + listView.model = list textField.dotCompletion = false event.accepted = true; - - if (list.length === 1) - textField.commitCompletion() - } else { event.accepted = false } From 4d45e2defe0cf0e7ed71dc34af694a4147067d22 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Tue, 4 Aug 2020 10:19:24 +0300 Subject: [PATCH 095/108] QmlDesigner: Fix 3D overlay object colors Recent changes to Quick3D changed how NoLighting materials work. Emissive color no longer has effect in that case, so use diffuse color instead. Change-Id: Idde43f5bdf06a432a5dd06f9c52d6812fa790a73 Reviewed-by: Mahmoud Badri --- share/qtcreator/qml/qmlpuppet/mockfiles/AxisHelperArm.qml | 4 ++-- share/qtcreator/qml/qmlpuppet/mockfiles/CameraFrustum.qml | 2 +- .../qml/qmlpuppet/mockfiles/DirectionalDraggable.qml | 4 ++-- share/qtcreator/qml/qmlpuppet/mockfiles/EditView3D.qml | 2 +- share/qtcreator/qml/qmlpuppet/mockfiles/HelperGrid.qml | 8 ++++---- share/qtcreator/qml/qmlpuppet/mockfiles/LightGizmo.qml | 2 +- share/qtcreator/qml/qmlpuppet/mockfiles/Line3D.qml | 2 +- .../qtcreator/qml/qmlpuppet/mockfiles/PlanarDraggable.qml | 4 ++-- share/qtcreator/qml/qmlpuppet/mockfiles/RotateGizmo.qml | 2 +- share/qtcreator/qml/qmlpuppet/mockfiles/RotateRing.qml | 4 ++-- share/qtcreator/qml/qmlpuppet/mockfiles/ScaleGizmo.qml | 2 +- share/qtcreator/qml/qmlpuppet/mockfiles/ScaleRod.qml | 2 +- share/qtcreator/qml/qmlpuppet/mockfiles/SelectionBox.qml | 2 +- 13 files changed, 20 insertions(+), 20 deletions(-) diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/AxisHelperArm.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/AxisHelperArm.qml index 0fd5ad1e989..0121938cada 100644 --- a/share/qtcreator/qml/qmlpuppet/mockfiles/AxisHelperArm.qml +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/AxisHelperArm.qml @@ -45,7 +45,7 @@ Node { source: "meshes/axishelper.mesh" materials: DefaultMaterial { id: posMat - emissiveColor: posModel.hovering ? armRoot.hoverColor : armRoot.color + diffuseColor: posModel.hovering ? armRoot.hoverColor : armRoot.color lighting: DefaultMaterial.NoLighting } pickable: true @@ -62,7 +62,7 @@ Node { scale: Qt.vector3d(0.025, 0.025, 0.025) materials: DefaultMaterial { id: negMat - emissiveColor: negModel.hovering ? armRoot.hoverColor : armRoot.color + diffuseColor: negModel.hovering ? armRoot.hoverColor : armRoot.color lighting: DefaultMaterial.NoLighting } pickable: true diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/CameraFrustum.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/CameraFrustum.qml index 0ba02e362b9..22c404ff67d 100644 --- a/share/qtcreator/qml/qmlpuppet/mockfiles/CameraFrustum.qml +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/CameraFrustum.qml @@ -48,7 +48,7 @@ Model { materials: [ DefaultMaterial { id: defaultMaterial - emissiveColor: cameraFrustum.selected ? "#FF0000" : "#555555" + diffuseColor: cameraFrustum.selected ? "#FF0000" : "#555555" lighting: DefaultMaterial.NoLighting cullMode: Material.NoCulling } diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/DirectionalDraggable.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/DirectionalDraggable.qml index e88b9c4c51c..29548bee1e3 100644 --- a/share/qtcreator/qml/qmlpuppet/mockfiles/DirectionalDraggable.qml +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/DirectionalDraggable.qml @@ -31,7 +31,7 @@ Model { id: rootModel property View3D view3D - property alias color: material.emissiveColor + property alias color: material.diffuseColor property Node targetNode: null property bool dragging: mouseAreaYZ.dragging || mouseAreaXZ.dragging property bool active: false @@ -52,7 +52,7 @@ Model { DefaultMaterial { id: material - emissiveColor: "white" + diffuseColor: "white" lighting: DefaultMaterial.NoLighting } diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/EditView3D.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/EditView3D.qml index 2bf81b837f1..280ab68c82d 100644 --- a/share/qtcreator/qml/qmlpuppet/mockfiles/EditView3D.qml +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/EditView3D.qml @@ -520,7 +520,7 @@ Item { id: lineMat lighting: DefaultMaterial.NoLighting cullMode: Material.NoCulling - emissiveColor: pivotLine.color + diffuseColor: pivotLine.color } ] } diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/HelperGrid.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/HelperGrid.qml index 70e6e82ee32..dbd7f38523c 100644 --- a/share/qtcreator/qml/qmlpuppet/mockfiles/HelperGrid.qml +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/HelperGrid.qml @@ -47,7 +47,7 @@ Node { materials: [ DefaultMaterial { id: mainGridMaterial - emissiveColor: "#aaaaaa" + diffuseColor: "#aaaaaa" lighting: DefaultMaterial.NoLighting cullMode: Material.NoCulling } @@ -65,7 +65,7 @@ Node { materials: [ DefaultMaterial { id: subGridMaterial - emissiveColor: mainGridMaterial.emissiveColor + diffuseColor: mainGridMaterial.diffuseColor lighting: DefaultMaterial.NoLighting cullMode: Material.NoCulling } @@ -82,7 +82,7 @@ Node { materials: [ DefaultMaterial { id: vCenterLineMaterial - emissiveColor: "#00a1d2" + diffuseColor: "#00a1d2" lighting: DefaultMaterial.NoLighting cullMode: Material.NoCulling } @@ -99,7 +99,7 @@ Node { materials: [ DefaultMaterial { id: hCenterLineMaterial - emissiveColor: "#cb211a" + diffuseColor: "#cb211a" lighting: DefaultMaterial.NoLighting cullMode: Material.NoCulling } diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/LightGizmo.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/LightGizmo.qml index ee1c5017eff..2e9791dc282 100644 --- a/share/qtcreator/qml/qmlpuppet/mockfiles/LightGizmo.qml +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/LightGizmo.qml @@ -336,7 +336,7 @@ Node { DefaultMaterial { id: lightMaterial - emissiveColor: lightGizmo.color + diffuseColor: lightGizmo.color lighting: DefaultMaterial.NoLighting cullMode: Material.NoCulling } diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/Line3D.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/Line3D.qml index 79718d042f2..f9af7070571 100644 --- a/share/qtcreator/qml/qmlpuppet/mockfiles/Line3D.qml +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/Line3D.qml @@ -33,7 +33,7 @@ Node { property alias startPos: lineGeometry.startPos property alias endPos: lineGeometry.endPos property alias name: lineGeometry.name // Name must be unique for each line - property alias color: lineMat.emissiveColor + property alias color: lineMat.diffuseColor Model { geometry: LineGeometry { diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/PlanarDraggable.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/PlanarDraggable.qml index 41a44f23863..0d66033eaad 100644 --- a/share/qtcreator/qml/qmlpuppet/mockfiles/PlanarDraggable.qml +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/PlanarDraggable.qml @@ -31,7 +31,7 @@ Model { id: rootModel property View3D view3D - property alias color: gizmoMaterial.emissiveColor + property alias color: gizmoMaterial.diffuseColor property alias priority: mouseArea.priority property Node targetNode: null property bool dragging: mouseArea.dragging @@ -53,7 +53,7 @@ Model { DefaultMaterial { id: gizmoMaterial - emissiveColor: "white" + diffuseColor: "white" lighting: DefaultMaterial.NoLighting cullMode: Material.NoCulling } diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/RotateGizmo.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/RotateGizmo.qml index 8ed85f32969..6fccfbcdc79 100644 --- a/share/qtcreator/qml/qmlpuppet/mockfiles/RotateGizmo.qml +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/RotateGizmo.qml @@ -175,7 +175,7 @@ Node { source: "#Sphere" materials: DefaultMaterial { id: material - emissiveColor: "black" + diffuseColor: "black" opacity: mouseAreaFree.hovering ? 0.15 : 0 lighting: DefaultMaterial.NoLighting } diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/RotateRing.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/RotateRing.qml index fc803c679a2..00494a5d91b 100644 --- a/share/qtcreator/qml/qmlpuppet/mockfiles/RotateRing.qml +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/RotateRing.qml @@ -31,7 +31,7 @@ Model { id: rotateRing property View3D view3D - property alias color: material.emissiveColor + property alias color: material.diffuseColor property Node targetNode: null property bool dragging: mouseAreaMain.dragging property bool active: false @@ -60,7 +60,7 @@ Model { materials: DefaultMaterial { id: material - emissiveColor: "white" + diffuseColor: "white" lighting: DefaultMaterial.NoLighting } diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/ScaleGizmo.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/ScaleGizmo.qml index ff64957699a..076f8d53a62 100644 --- a/share/qtcreator/qml/qmlpuppet/mockfiles/ScaleGizmo.qml +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/ScaleGizmo.qml @@ -170,7 +170,7 @@ Node { scale: Qt.vector3d(0.024, 0.024, 0.024) materials: DefaultMaterial { id: material - emissiveColor: highlightOnHover + diffuseColor: highlightOnHover && (centerMouseArea.hovering || centerMouseArea.dragging) ? Qt.lighter(Qt.rgba(0.5, 0.5, 0.5, 1)) : Qt.rgba(0.5, 0.5, 0.5, 1) diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/ScaleRod.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/ScaleRod.qml index ead4f1458da..fcdf4a74158 100644 --- a/share/qtcreator/qml/qmlpuppet/mockfiles/ScaleRod.qml +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/ScaleRod.qml @@ -44,7 +44,7 @@ DirectionalDraggable { scale: Qt.vector3d(0.020, 0.020, 0.020) materials: DefaultMaterial { id: material - emissiveColor: scaleRod.color + diffuseColor: scaleRod.color lighting: DefaultMaterial.NoLighting } } diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/SelectionBox.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/SelectionBox.qml index 739c7a6d34b..201d1a63775 100644 --- a/share/qtcreator/qml/qmlpuppet/mockfiles/SelectionBox.qml +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/SelectionBox.qml @@ -56,7 +56,7 @@ Node { materials: [ DefaultMaterial { - emissiveColor: "#fff600" + diffuseColor: "#fff600" lighting: DefaultMaterial.NoLighting cullMode: Material.NoCulling } From 6a5cc268d260d248e5f8e7ab7606750d3ecc0c81 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 4 Aug 2020 16:52:09 +0200 Subject: [PATCH 096/108] Core: Fix crash on exit We accessed a reference after removing the value from the container. Change-Id: Idfb97093b7a23ba04e5cb0582c81031f431dce88 Reviewed-by: Christian Stenger --- src/plugins/coreplugin/statusbarmanager.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/plugins/coreplugin/statusbarmanager.cpp b/src/plugins/coreplugin/statusbarmanager.cpp index 5d9116379fe..182375b264b 100644 --- a/src/plugins/coreplugin/statusbarmanager.cpp +++ b/src/plugins/coreplugin/statusbarmanager.cpp @@ -143,12 +143,11 @@ void StatusBarManager::addStatusBarWidget(QWidget *widget, void StatusBarManager::destroyStatusBarWidget(QWidget *widget) { QTC_ASSERT(widget, return); - for (const QPointer &context : m_contexts) { - if (context->widget() == widget) { - m_contexts.removeAll(context); - delete context; - break; - } + const auto it = std::find_if(m_contexts.begin(), m_contexts.end(), + [widget](const auto &context) { return context->widget() == widget; }); + if (it != m_contexts.end()) { + delete *it; + m_contexts.erase(it); } widget->setParent(nullptr); delete widget; From 52f971ce5edb6fe70e40ee7b6fc511e8d0bae093 Mon Sep 17 00:00:00 2001 From: Henning Gruendl Date: Tue, 4 Aug 2020 10:47:18 +0200 Subject: [PATCH 097/108] QmlDesigner: Fix StatesDelegate TextField size Task-number: QDS-2572 Change-Id: I0b797724ce626870921649807246ec692c7c40d3 Reviewed-by: Thomas Hartmann --- .../qmldesigner/statesEditorQmlSources/StatesDelegate.qml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesDelegate.qml b/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesDelegate.qml index 29f019e6c68..ef624574ac8 100644 --- a/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesDelegate.qml +++ b/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesDelegate.qml @@ -132,7 +132,6 @@ Rectangle { StudioControls.TextField { id: stateNameField - actionIndicatorVisible: !isBaseState || (isBaseState && modelHasDefaultState) actionIndicator.onClicked: { stateNameField.actionIndicator.forceVisible = true @@ -151,7 +150,7 @@ Rectangle { y: 4 anchors.left: parent.left // use the spacing which the image to the delegate rectangle has - anchors.leftMargin: (isBaseState ? StudioTheme.Values.height : 0) + 4 + anchors.leftMargin: 4 anchors.right: removeStateButton.left anchors.rightMargin: 2 From d56d03e3227ebe5919c1c7f60de070e242aecd4d Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 6 Aug 2020 15:51:54 +0300 Subject: [PATCH 098/108] QmlDesigner: Don't highlight EditableListView items when not focused Change-Id: I0897d57ad417f39fb72c6ce19c1349f8f6030c0b Fixes: QDS-2416 Reviewed-by: Mahmoud Badri --- .../imports/HelperWidgets/EditableListView.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/EditableListView.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/EditableListView.qml index e1d177fe074..c3344fcfe02 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/EditableListView.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/EditableListView.qml @@ -104,6 +104,7 @@ Rectangle { color: "transparent" border.width: StudioTheme.Values.border border.color: StudioTheme.Values.themeInteraction + visible: myColumn.currentItem ? myColumn.currentItem.focus : false x: myColumn.currentItem ? myColumn.currentItem.x : 0 y: myColumn.currentItem ? myColumn.currentItem.y : 0 z: 10 From 9e1d6ca395a664f9aae3681c0ab7e4df7cc0ef1f Mon Sep 17 00:00:00 2001 From: Richard Weickelt Date: Thu, 6 Aug 2020 15:04:45 +0200 Subject: [PATCH 099/108] Update qbs submodule To HEAD of 1.17 branch. Change-Id: If128125a5e6a24efe7cdd523e133634e2bfe72d4 Reviewed-by: Christian Kandeler --- src/shared/qbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/qbs b/src/shared/qbs index 0ac5a146743..2ebe1e5bf9c 160000 --- a/src/shared/qbs +++ b/src/shared/qbs @@ -1 +1 @@ -Subproject commit 0ac5a1467433cafe98e01598de25f155f24fcb2f +Subproject commit 2ebe1e5bf9c8cc2f4b97a1cf8a1edc97257de15f From 61601899db4ab2df16f5c430d4c34eb022f8d746 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Thu, 6 Aug 2020 21:16:22 +0300 Subject: [PATCH 100/108] UnitTest: Fix escaping of LLVM output on Windows Complements 1929c38a9fd6df8257069ba505c88c8a57a5352f. Change-Id: I95e32baf477e42003f1e97c73fd557b480de33a7 Reviewed-by: Christian Stenger --- tests/unit/unittest/clang_dependency.pri | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/unittest/clang_dependency.pri b/tests/unit/unittest/clang_dependency.pri index ef67eac5282..100bda296d8 100644 --- a/tests/unit/unittest/clang_dependency.pri +++ b/tests/unit/unittest/clang_dependency.pri @@ -18,7 +18,7 @@ include(../../../src/shared/clang/clang_defines.pri) LIBS += $$ALL_CLANG_LIBS - !contains(QMAKE_DEFAULT_LIBDIRS, $$LLVM_LIBDIR): QMAKE_RPATHDIR += $$LLVM_LIBDIR + !contains(QMAKE_DEFAULT_LIBDIRS, $$re_escape($$LLVM_LIBDIR)): QMAKE_RPATHDIR += $$LLVM_LIBDIR LLVM_CXXFLAGS ~= s,-g\d?, QMAKE_CXXFLAGS_WARN_ON *= $$LLVM_CXXFLAGS_WARNINGS From 5343490eb44590e11cc9e8b4bc42efbc2bb051a6 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 6 Aug 2020 16:32:35 +0300 Subject: [PATCH 101/108] QmlDesigner: Fix pivot point scaling Now pivot point in 3D edit view will always appear same size regardless of the viewing angle. Change-Id: Iddd4fc8800eecbc63f16fc130b7f93dcba4d5d65 Fixes: QDS-2570 Reviewed-by: Mahmoud Badri Reviewed-by: Thomas Hartmann --- share/qtcreator/qml/qmlpuppet/mockfiles/EditView3D.qml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/EditView3D.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/EditView3D.qml index 280ab68c82d..bb09c48d4a2 100644 --- a/share/qtcreator/qml/qmlpuppet/mockfiles/EditView3D.qml +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/EditView3D.qml @@ -487,6 +487,12 @@ Item { position: moveGizmo.scenePosition } + AutoScaleHelper { + id: pivotAutoScale + view3D: overlayView + position: pivotLine.startPos + } + Line3D { id: pivotLine visible: viewRoot.selectedNode @@ -513,7 +519,7 @@ Item { Model { id: pivotCap source: "#Sphere" - scale: autoScale.getScale(Qt.vector3d(0.03, 0.03, 0.03)) + scale: pivotAutoScale.getScale(Qt.vector3d(0.03, 0.03, 0.03)) position: pivotLine.startPos materials: [ DefaultMaterial { From 8b04c7ff0cb7481d2333771973a05df5dceda15d Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Wed, 8 Jul 2020 18:39:17 +0200 Subject: [PATCH 102/108] QmlDesigner: Warn if no properties can be animated in transitions Do not fail silently. Change-Id: Id8470f8b81a75dc660906ed53538e75563068527 Reviewed-by: Leena Miettinen Reviewed-by: Thomas Hartmann --- .../transitioneditor/transitioneditorview.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/plugins/qmldesigner/components/transitioneditor/transitioneditorview.cpp b/src/plugins/qmldesigner/components/transitioneditor/transitioneditorview.cpp index a7ead0afd26..71f6c3ed885 100644 --- a/src/plugins/qmldesigner/components/transitioneditor/transitioneditorview.cpp +++ b/src/plugins/qmldesigner/components/transitioneditor/transitioneditorview.cpp @@ -272,6 +272,16 @@ ModelNode TransitionEditorView::addNewTransition() } } }); + } else { + QString properties; + for (const PropertyName &property : validProperties) + properties.append(QString::fromUtf8(property) + ", "); + if (!properties.isEmpty()) + properties.chop(2); + Core::AsynchronousMessageBox::warning( + tr("No properties to animate found."), + tr("To add transitions, first change the properties that you want to animate in states (%1).") + .arg(properties)); } if (m_transitionEditorWidget) @@ -285,9 +295,6 @@ TransitionEditorWidget *TransitionEditorView::createWidget() if (!m_transitionEditorWidget) m_transitionEditorWidget = new TransitionEditorWidget(this); - //auto *timelineContext = new TimelineContext(m_timelineWidget); - //Core::ICore::addContextObject(timelineContext); - return m_transitionEditorWidget; } From a774890a10834a1d1aae5623316882f53d18aad0 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Fri, 7 Aug 2020 13:13:47 +0300 Subject: [PATCH 103/108] QmlDesigner: Fix default transformMode setting in 3D edit view Change-Id: Ia918d05bf58d9460e25e9fa4dd592c68c03bd0cf Reviewed-by: Mahmoud Badri --- share/qtcreator/qml/qmlpuppet/mockfiles/EditView3D.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/EditView3D.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/EditView3D.qml index bb09c48d4a2..6eb68643ed7 100644 --- a/share/qtcreator/qml/qmlpuppet/mockfiles/EditView3D.qml +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/EditView3D.qml @@ -202,7 +202,7 @@ Item { if ("transformMode" in toolStates) transformMode = toolStates.transformMode; else if (resetToDefault) - selectionMode = EditView3D.TransformMode.Move; + transformMode = EditView3D.TransformMode.Move; if ("editCamState" in toolStates) cameraControl.restoreCameraState(toolStates.editCamState); From 32f71ca8ffc317a0844fe910bfa32fa84737433f Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Fri, 7 Aug 2020 13:24:55 +0300 Subject: [PATCH 104/108] QmlDesigner: Fix group selection for 3D scenes that have Models as root Change-Id: If6ec2bcb4a4627fcf658e23f6998115a68718ee8 Fixes: QDS-2467 Reviewed-by: Mahmoud Badri --- share/qtcreator/qml/qmlpuppet/mockfiles/EditView3D.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/EditView3D.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/EditView3D.qml index 6eb68643ed7..95245aae5eb 100644 --- a/share/qtcreator/qml/qmlpuppet/mockfiles/EditView3D.qml +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/EditView3D.qml @@ -266,8 +266,10 @@ Item { { var theObject = object; if (selectionMode === EditView3D.SelectionMode.Group) { - while (theObject && theObject !== activeScene && theObject.parent !== activeScene) + while (theObject && theObject !== activeScene + && (activeScene instanceof Model || theObject.parent !== activeScene)) { theObject = theObject.parent; + } } // Object selection logic: // Regular click: Clear any multiselection, single-selects the clicked object From c25a40f6ed77b2af70a63b6740ef293947483de5 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Tue, 4 Aug 2020 08:21:26 +0200 Subject: [PATCH 105/108] AutoTest: Fix possible crash Do not access list items if there are none. Amends 502ad9badb731. Fixes: QTCREATORBUG-24421 Change-Id: I2982f675bba36eac98cb116acf64472a9f415977 Reviewed-by: hjk --- src/plugins/autotest/testconfiguration.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/autotest/testconfiguration.cpp b/src/plugins/autotest/testconfiguration.cpp index c5ff9202604..10709e38a61 100644 --- a/src/plugins/autotest/testconfiguration.cpp +++ b/src/plugins/autotest/testconfiguration.cpp @@ -151,7 +151,8 @@ void TestConfiguration::completeTestInformation(TestRunMode runMode) if (buildTargets.size() > 1 ) // there are multiple executables with the same build target return; // let the user decide which one to run - const BuildTargetInfo targetInfo = buildTargets.first(); + const BuildTargetInfo targetInfo = buildTargets.size() ? buildTargets.first() + : BuildTargetInfo(); // we might end up with an empty targetFilePath - e.g. when having a library we just link to // there would be no BuildTargetInfo that could match From c6c320a6ea4245bfa4efb83a495c9dc91a555887 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Fri, 31 Jul 2020 14:59:56 +0200 Subject: [PATCH 106/108] Debugger: Avoid decoding error when fetching native value Change-Id: I4cfe144c7d96134e373e6d6d6141eb05a7dfe911 Reviewed-by: David Schulz --- share/qtcreator/debugger/cdbbridge.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/share/qtcreator/debugger/cdbbridge.py b/share/qtcreator/debugger/cdbbridge.py index aa76d698920..8f2dbada3b6 100644 --- a/share/qtcreator/debugger/cdbbridge.py +++ b/share/qtcreator/debugger/cdbbridge.py @@ -110,7 +110,10 @@ class Dumper(DumperBase): # There is no cdb api for the size of bitfields. # Workaround this issue by parsing the native debugger text for integral types. if val.type.code == TypeCode.Integral: - integerString = nativeValue.nativeDebuggerValue() + try: + integerString = nativeValue.nativeDebuggerValue() + except UnicodeDecodeError: + integerString = '' # cannot decode - read raw if integerString == 'true': val.ldata = int(1).to_bytes(1, byteorder='little') elif integerString == 'false': From 63823a55acf2739c77a27a1b56ecf4c5a3f52ad7 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Tue, 21 Jul 2020 12:42:37 +0200 Subject: [PATCH 107/108] AutoTest: Display relative path for file nodes Using the full path for the file nodes may be quite long depending on the location of the project. Display its name relative to the project directory or the parent group node instead. Fixes: QTCREATORBUG-24374 Change-Id: I4ce57a0940008d99c51e63c2265a371a0ffe20ef Reviewed-by: David Schulz --- src/plugins/autotest/catch/catchtreeitem.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/plugins/autotest/catch/catchtreeitem.cpp b/src/plugins/autotest/catch/catchtreeitem.cpp index cdd48d85368..e62cbe0da78 100644 --- a/src/plugins/autotest/catch/catchtreeitem.cpp +++ b/src/plugins/autotest/catch/catchtreeitem.cpp @@ -27,6 +27,7 @@ #include "catchconfiguration.h" #include "catchframework.h" +#include #include #include @@ -38,14 +39,26 @@ QString CatchTreeItem::testCasesString() const return m_state & CatchTreeItem::Parameterized ? QString(name() + " -*") : name(); } +static QString nonRootDisplayName(const CatchTreeItem *it) +{ + if (it->type() != TestTreeItem::TestSuite) + return it->name(); + ProjectExplorer::Project *project = ProjectExplorer::SessionManager::startupProject(); + if (!project) + return it->name(); + TestTreeItem *parent = it->parentItem(); + int baseDirSize = (parent->type() == TestTreeItem::GroupNode) + ? parent->filePath().size() : project->projectDirectory().toString().size(); + return it->name().mid(baseDirSize + 1); +} + QVariant CatchTreeItem::data(int column, int role) const { - switch (role) { case Qt::DisplayRole: if (type() == Root) break; - return QString(name() + stateSuffix()); + return QString(nonRootDisplayName(this) + stateSuffix()); case Qt::CheckStateRole: switch (type()) { case Root: From acadee710e00cca55736db864263bdcdcbac31a6 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Fri, 7 Aug 2020 15:26:51 +0200 Subject: [PATCH 108/108] ProjectExplorer: Do not pass invalid regex to match Change-Id: I9917c9fa7a79132c253269efde90976e18f9b805 Reviewed-by: Christian Kandeler --- src/plugins/projectexplorer/customparserconfigdialog.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/projectexplorer/customparserconfigdialog.cpp b/src/plugins/projectexplorer/customparserconfigdialog.cpp index 5584ae480af..f67cd25b9d9 100644 --- a/src/plugins/projectexplorer/customparserconfigdialog.cpp +++ b/src/plugins/projectexplorer/customparserconfigdialog.cpp @@ -278,7 +278,8 @@ bool CustomParserConfigDialog::checkPattern(QLineEdit *pattern, const QString &o pattern->setPalette(palette); pattern->setToolTip(rx.isValid() ? QString() : rx.errorString()); - *match = rx.match(outputText); + if (rx.isValid()) + *match = rx.match(outputText); if (rx.pattern().isEmpty() || !rx.isValid() || !match->hasMatch()) { *errorMessage = QString::fromLatin1("%2 ").arg( Utils::creatorTheme()->color(Utils::Theme::TextColorError).name(),