From 8366bb169400d1ba2b9c39e1bc07137f02a30364 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Fri, 5 Aug 2016 09:43:30 +0200 Subject: [PATCH 01/14] QmlDesigner: Fix visibility of Origin control Give the control the same border like all other controls. This improves the visibility with the light theme. Repeated 9 times. Needs to be made a component in master. Change-Id: I11afa8c7ef628582c3d94fa8b42a27fb4f6e1368 Reviewed-by: Tim Jenssen --- .../HelperWidgets/OriginControl.qml | 39 ++++++++++--------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/OriginControl.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/OriginControl.qml index 72cd9eaecfe..0aeaa9232a6 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/OriginControl.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/OriginControl.qml @@ -32,7 +32,8 @@ Item { property variant backendValue - property color borderColor: colorLogic.textColor + property color borderColorSelected: colorLogic.textColor + property color borderColor: creatorTheme.QmlDesignerBorderColor property bool showTranslateCheckBox: true @@ -101,8 +102,8 @@ Item { width: 15 height: 15 color: selected ? selectedColor : unselectedColor - border.color: originControl.borderColor - border.width: selected ? 2 : 0 + border.width: selected ? 2 : 1 + border.color: selected ? originControl.borderColorSelected : originControl.borderColor MouseArea { anchors.fill: parent onClicked: { @@ -116,8 +117,8 @@ Item { width: topLeft.width height: topLeft.height color: selected ? selectedColor : unselectedColor - border.width: selected ? 2 : 0 - border.color: originControl.borderColor + border.width: selected ? 2 : 1 + border.color: selected ? originControl.borderColorSelected : originControl.borderColor MouseArea { anchors.fill: parent onClicked: { @@ -131,8 +132,8 @@ Item { width: topLeft.width height: topLeft.height color: selected ? selectedColor : unselectedColor - border.width: selected ? 2 : 0 - border.color: originControl.borderColor + border.width: selected ? 2 : 1 + border.color: selected ? originControl.borderColorSelected : originControl.borderColor MouseArea { anchors.fill: parent onClicked: { @@ -146,8 +147,8 @@ Item { width: topLeft.width height: topLeft.height color: selected ? selectedColor : unselectedColor - border.width: selected ? 2 : 0 - border.color: originControl.borderColor + border.width: selected ? 2 : 1 + border.color: selected ? originControl.borderColorSelected : originControl.borderColor MouseArea { anchors.fill: parent onClicked: { @@ -161,8 +162,8 @@ Item { width: topLeft.width height: topLeft.height color: selected ? selectedColor : unselectedColor - border.width: selected ? 2 : 0 - border.color: originControl.borderColor + border.width: selected ? 2 : 1 + border.color: selected ? originControl.borderColorSelected : originControl.borderColor MouseArea { anchors.fill: parent onClicked: { @@ -176,8 +177,8 @@ Item { width: topLeft.width height: topLeft.height color: selected ? selectedColor : unselectedColor - border.width: selected ? 2 : 0 - border.color: originControl.borderColor + border.width: selected ? 2 : 1 + border.color: selected ? originControl.borderColorSelected : originControl.borderColor MouseArea { anchors.fill: parent onClicked: { @@ -191,8 +192,8 @@ Item { width: topLeft.width height: topLeft.height color: selected ? selectedColor : unselectedColor - border.width: selected ? 2 : 0 - border.color: originControl.borderColor + border.width: selected ? 2 : 1 + border.color: selected ? originControl.borderColorSelected : originControl.borderColor MouseArea { anchors.fill: parent onClicked: { @@ -206,8 +207,8 @@ Item { width: topLeft.width height: topLeft.height color: selected ? selectedColor : unselectedColor - border.width: selected ? 2 : 0 - border.color: originControl.borderColor + border.width: selected ? 2 : 1 + border.color: selected ? originControl.borderColorSelected : originControl.borderColor MouseArea { anchors.fill: parent onClicked: { @@ -221,8 +222,8 @@ Item { width: topLeft.width height: topLeft.height color: selected ? selectedColor : unselectedColor - border.width: selected ? 2 : 0 - border.color: originControl.borderColor + border.width: selected ? 2 : 1 + border.color: selected ? originControl.borderColorSelected : originControl.borderColor MouseArea { anchors.fill: parent onClicked: { From 56548a13bbb936ee6ff55cfd2a819d83edb734b0 Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 5 Aug 2016 13:33:06 +0200 Subject: [PATCH 02/14] Debugger: Fix metaObject extraction logic A variable name mixup, potentially leading to endless loops. Change-Id: I43f430ec89a8230da665fbfcef8d7f1491b0e2c0 Reviewed-by: Christian Stenger --- share/qtcreator/debugger/dumper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/qtcreator/debugger/dumper.py b/share/qtcreator/debugger/dumper.py index ce2d3d3ef37..6646cc7e75e 100644 --- a/share/qtcreator/debugger/dumper.py +++ b/share/qtcreator/debugger/dumper.py @@ -1417,7 +1417,7 @@ class DumperBase: # warn("METAOBJECT EXTRACTION FAILED FOR UNKNOWN REASON") if not result: - base = self.directBaseClass(typeobj, 0) + base = self.directBaseClass(someTypeObj, 0) if base != someTypeObj: # sanity check result = extractStaticMetaObjectPtrFromType(base) From 1a755521ff753a0b2a6922ec74e37e8db94c5978 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 5 Aug 2016 12:41:44 +0200 Subject: [PATCH 03/14] Update qbs submodule To HEAD of 1.6 branch. Change-Id: Ia524058417387e1cb4162e8d8fe35ebb35f6b471 Reviewed-by: Jake Petroules --- src/shared/qbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/qbs b/src/shared/qbs index a3466fc55fb..fabfd53ea5e 160000 --- a/src/shared/qbs +++ b/src/shared/qbs @@ -1 +1 @@ -Subproject commit a3466fc55fb7756fcc9ddd6aeabbdef80c0108e4 +Subproject commit fabfd53ea5e103b85e93b133cf0896dd6499d4e1 From cbd4f802795eec65f66adc19106718bf12382740 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Fri, 5 Aug 2016 15:02:37 +0200 Subject: [PATCH 04/14] AutoTest: Fix setting working directory If there is no working directory explicitly set inside the run configuration we end up using the current working directory of Qt Creator. We normally get an empty string if not having modified the respective target ourselves although you can see a default working directory when opening the respective target for the first time. Task-number: QTCREATORBUG-16715 Change-Id: I6e16fd4f9b15759793653a6c229c44a1be2b7739 Reviewed-by: David Schulz --- src/plugins/autotest/testconfiguration.cpp | 43 ++++++++++++++++++++++ src/plugins/autotest/testconfiguration.h | 3 +- src/plugins/autotest/testrunner.cpp | 34 +---------------- 3 files changed, 47 insertions(+), 33 deletions(-) diff --git a/src/plugins/autotest/testconfiguration.cpp b/src/plugins/autotest/testconfiguration.cpp index 1082594009b..68a9b641689 100644 --- a/src/plugins/autotest/testconfiguration.cpp +++ b/src/plugins/autotest/testconfiguration.cpp @@ -263,5 +263,48 @@ void TestConfiguration::setGuessedConfiguration(bool guessed) m_guessedConfiguration = guessed; } +QString TestConfiguration::executableFilePath() const +{ + if (m_targetFile.isEmpty()) + return QString(); + + QFileInfo commandFileInfo(m_targetFile); + if (commandFileInfo.isExecutable() && commandFileInfo.path() != ".") { + return commandFileInfo.absoluteFilePath(); + } else if (commandFileInfo.path() == "."){ + QString fullCommandFileName = m_targetFile; + #ifdef Q_OS_WIN + if (!m_targetFile.endsWith(".exe")) + fullCommandFileName = m_targetFile + QLatin1String(".exe"); + + static const QString separator(";"); + #else + static const QString separator(":"); + #endif + // TODO: check if we can use searchInPath() from Utils::Environment + const QStringList &pathList + = m_environment.toProcessEnvironment().value("PATH").split(separator); + + foreach (const QString &path, pathList) { + QString filePath(path + QDir::separator() + fullCommandFileName); + if (QFileInfo(filePath).isExecutable()) + return commandFileInfo.absoluteFilePath(); + } + } + return QString(); +} + +QString TestConfiguration::workingDirectory() const +{ + if (!m_workingDir.isEmpty()) { + const QFileInfo info(m_workingDir); + if (info.isDir()) // ensure wanted working dir does exist + return info.absoluteFilePath(); + } + + const QString executable = executableFilePath(); + return executable.isEmpty() ? executable : QFileInfo(executable).absolutePath(); +} + } // namespace Internal } // namespace Autotest diff --git a/src/plugins/autotest/testconfiguration.h b/src/plugins/autotest/testconfiguration.h index 2ea58b84cf6..224b7c279b1 100644 --- a/src/plugins/autotest/testconfiguration.h +++ b/src/plugins/autotest/testconfiguration.h @@ -74,8 +74,9 @@ public: int testCaseCount() const { return m_testCaseCount; } QString proFile() const { return m_proFile; } QString targetFile() const { return m_targetFile; } + QString executableFilePath() const; QString targetName() const { return m_targetName; } - QString workingDirectory() const { return m_workingDir; } + QString workingDirectory() const; QString buildDirectory() const { return m_buildDir; } QString displayName() const { return m_displayName; } Utils::Environment environment() const { return m_environment; } diff --git a/src/plugins/autotest/testrunner.cpp b/src/plugins/autotest/testrunner.cpp index a85bc750de2..f5f271b27b1 100644 --- a/src/plugins/autotest/testrunner.cpp +++ b/src/plugins/autotest/testrunner.cpp @@ -55,35 +55,6 @@ namespace Internal { static TestRunner *m_instance = 0; -static QString executableFilePath(const QString &command, const QProcessEnvironment &environment) -{ - if (command.isEmpty()) - return QString(); - - QFileInfo commandFileInfo(command); - if (commandFileInfo.isExecutable() && commandFileInfo.path() != QLatin1String(".")) { - return commandFileInfo.absoluteFilePath(); - } else if (commandFileInfo.path() == QLatin1String(".")){ - QString fullCommandFileName = command; - #ifdef Q_OS_WIN - if (!command.endsWith(QLatin1String(".exe"))) - fullCommandFileName = command + QLatin1String(".exe"); - - static const QString pathSeparator(QLatin1Char(';')); - #else - static const QString pathSeparator(QLatin1Char(':')); - #endif - QStringList pathList = environment.value(QLatin1String("PATH")).split(pathSeparator); - - foreach (const QString &path, pathList) { - QString filePath(path + QDir::separator() + fullCommandFileName); - if (QFileInfo(filePath).isExecutable()) - return commandFileInfo.absoluteFilePath(); - } - } - return QString(); -} - TestRunner *TestRunner::instance() { if (!m_instance) @@ -157,7 +128,7 @@ static void performTestRun(QFutureInterface &futureInterface, continue; QProcessEnvironment environment = testConfiguration->environment().toProcessEnvironment(); - QString commandFilePath = executableFilePath(testConfiguration->targetFile(), environment); + QString commandFilePath = testConfiguration->executableFilePath(); if (commandFilePath.isEmpty()) { futureInterface.reportResult(TestResultPtr(new FaultyTestResult(Result::MessageFatal, TestRunner::tr("Could not find command \"%1\". (%2)") @@ -293,8 +264,7 @@ void TestRunner::debugTests() return; } - const QString &commandFilePath = executableFilePath(config->targetFile(), - config->environment().toProcessEnvironment()); + const QString &commandFilePath = config->executableFilePath(); if (commandFilePath.isEmpty()) { emit testResultReady(TestResultPtr(new FaultyTestResult(Result::MessageFatal, TestRunner::tr("Could not find command \"%1\". (%2)") From 4c26c8970e07cb077f160f637aeb58e20f458e4a Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 8 Aug 2016 16:04:29 +0200 Subject: [PATCH 05/14] Version bump Change-Id: Ic93d220ff0ab16174b3f5aeb299ce902056163cd Reviewed-by: Eike Ziller --- qbs/modules/qtc/qtc.qbs | 8 ++++---- qtcreator.pri | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/qbs/modules/qtc/qtc.qbs b/qbs/modules/qtc/qtc.qbs index 65ea37e7149..4910f75740e 100644 --- a/qbs/modules/qtc/qtc.qbs +++ b/qbs/modules/qtc/qtc.qbs @@ -4,14 +4,14 @@ import "qtc.js" as HelperFunctions Module { property string ide_version_major: '4' - property string ide_version_minor: '0' - property string ide_version_release: '83' + property string ide_version_minor: '1' + property string ide_version_release: '0' 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: '0' - property string ide_compat_version_release: '83' + property string ide_compat_version_minor: '1' + property string ide_compat_version_release: '0' property string qtcreator_compat_version: ide_compat_version_major + '.' + ide_compat_version_minor + '.' + ide_compat_version_release diff --git a/qtcreator.pri b/qtcreator.pri index cf214e64e1d..1a29b85aa56 100644 --- a/qtcreator.pri +++ b/qtcreator.pri @@ -1,8 +1,8 @@ !isEmpty(QTCREATOR_PRI_INCLUDED):error("qtcreator.pri already included") QTCREATOR_PRI_INCLUDED = 1 -QTCREATOR_VERSION = 4.0.83 -QTCREATOR_COMPAT_VERSION = 4.0.83 +QTCREATOR_VERSION = 4.1.0 +QTCREATOR_COMPAT_VERSION = 4.1.0 VERSION = $$QTCREATOR_VERSION BINARY_ARTIFACTS_BRANCH = 4.1 From b18e084fc040f20804f22d127783060d2efe14e0 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Wed, 10 Aug 2016 14:13:43 +0200 Subject: [PATCH 06/14] Qt Quick App Wizard: Add virtual keyboard for Boot2Qt If the Boot2Qt plugin is installed, the wizard generates the required code to instantiate the virtual keyboard and to slide it in & out. Change-Id: I700a00d60de2936972713bf383570629c8bf678f Reviewed-by: Mitch Curtis Reviewed-by: Rainer Keller --- .../qtquickapplication/MainForm.ui.qml.tpl | 17 +++++- .../qmake/qtquickapplication/main.cpp | 4 ++ .../qmake/qtquickapplication/main.qml.tpl | 57 +++++++++++++++++-- .../qmake/qtquickapplication/wizard.json | 25 ++++++-- 4 files changed, 89 insertions(+), 14 deletions(-) diff --git a/share/qtcreator/templates/wizards/projects/qmake/qtquickapplication/MainForm.ui.qml.tpl b/share/qtcreator/templates/wizards/projects/qmake/qtquickapplication/MainForm.ui.qml.tpl index 5718eeef36d..a41e66157c0 100644 --- a/share/qtcreator/templates/wizards/projects/qmake/qtquickapplication/MainForm.ui.qml.tpl +++ b/share/qtcreator/templates/wizards/projects/qmake/qtquickapplication/MainForm.ui.qml.tpl @@ -2,6 +2,7 @@ import QtQuick %{QtQuickVersion} Rectangle { property alias mouseArea: mouseArea + property alias textEdit: textEdit width: 360 height: 360 @@ -11,8 +12,18 @@ Rectangle { anchors.fill: parent } - Text { - anchors.centerIn: parent - text: "Hello World" + TextEdit { + id: textEdit + text: qsTr("Enter some text...") + verticalAlignment: Text.AlignVCenter + anchors.top: parent.top + anchors.horizontalCenter: parent.horizontalCenter + anchors.topMargin: 20 + Rectangle { + anchors.fill: parent + anchors.margins: -10 + color: "transparent" + border.width: 1 + } } } diff --git a/share/qtcreator/templates/wizards/projects/qmake/qtquickapplication/main.cpp b/share/qtcreator/templates/wizards/projects/qmake/qtquickapplication/main.cpp index 69f2694815b..a15a1f0b569 100644 --- a/share/qtcreator/templates/wizards/projects/qmake/qtquickapplication/main.cpp +++ b/share/qtcreator/templates/wizards/projects/qmake/qtquickapplication/main.cpp @@ -2,6 +2,10 @@ %{JS: QtSupport.qtIncludes([], ["QtGui/QGuiApplication", "QtQml/QQmlApplicationEngine"])} int main(int argc, char *argv[]) { +@if %{UseVirtualKeyboard} + qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard")); + +@endif QGuiApplication app(argc, argv); QQmlApplicationEngine engine; diff --git a/share/qtcreator/templates/wizards/projects/qmake/qtquickapplication/main.qml.tpl b/share/qtcreator/templates/wizards/projects/qmake/qtquickapplication/main.qml.tpl index 66c4c147c2b..bf7b08db71f 100644 --- a/share/qtcreator/templates/wizards/projects/qmake/qtquickapplication/main.qml.tpl +++ b/share/qtcreator/templates/wizards/projects/qmake/qtquickapplication/main.qml.tpl @@ -1,30 +1,77 @@ import QtQuick %{QtQuickVersion} import QtQuick.Window %{QtQuickWindowVersion} +@if %{UseVirtualKeyboard} +import %{QtQuickVirtualKeyboardImport} +@endif Window { visible: true width: 640 height: 480 title: qsTr("Hello World") +@if %{UseVirtualKeyboard} + id: root +@endif @if %{IsUiFileInUse} MainForm { anchors.fill: parent mouseArea.onClicked: { - Qt.quit(); + console.log(qsTr('Clicked on background. Text: "' + textEdit.text + '"')) } } @else MouseArea { anchors.fill: parent onClicked: { - Qt.quit(); + console.log(qsTr('Clicked on background. Text: "' + textEdit.text + '"')) } } - Text { - text: qsTr("Hello World") - anchors.centerIn: parent + TextEdit { + id: textEdit + text: qsTr("Enter some text...") + verticalAlignment: Text.AlignVCenter + anchors.top: parent.top + anchors.horizontalCenter: parent.horizontalCenter + anchors.topMargin: 20 + Rectangle { + anchors.fill: parent + anchors.margins: -10 + color: "transparent" + border.width: 1 + } + } +@endif +@if %{UseVirtualKeyboard} + + InputPanel { + id: inputPanel + z: 99 + x: 0 + y: root.height + width: root.width + + states: State { + name: "visible" + when: %{QtQuickVirtualKeyboardWhenVisible} + PropertyChanges { + target: inputPanel + y: root.height - inputPanel.height + } + } + transitions: Transition { + from: "" + to: "visible" + reversible: true + ParallelAnimation { + NumberAnimation { + properties: "y" + duration: 250 + easing.type: Easing.InOutQuad + } + } + } } @endif } diff --git a/share/qtcreator/templates/wizards/projects/qmake/qtquickapplication/wizard.json b/share/qtcreator/templates/wizards/projects/qmake/qtquickapplication/wizard.json index e2722e14355..059c7b98ad6 100644 --- a/share/qtcreator/templates/wizards/projects/qmake/qtquickapplication/wizard.json +++ b/share/qtcreator/templates/wizards/projects/qmake/qtquickapplication/wizard.json @@ -16,9 +16,12 @@ { "key": "MainCppFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src')}" }, { "key": "QtQuickVersion", "value": "%{JS: %{QtVersion}.qtQuickVersion}" }, { "key": "QtQuickWindowVersion", "value": "%{JS: %{QtVersion}.qtQuickWindowVersion}" }, + { "key": "QtQuickVirtualKeyboardImport", "value": "%{JS: %{QtVersion}.qtQuickVirtualKeyboardImport}" }, + { "key": "QtQuickVirtualKeyboardWhenVisible", "value": "%{JS: %{QtVersion}.qtQuickVirtualKeyboardWhenVisible}" }, { "key": "QtQuickFeature", "value": "QtSupport.Wizards.FeatureQtQuick.%{QtQuickVersion}" }, { "key": "UiSupport", "value": "%{JS: '%{QtQuickVersion}' !== '2.3' }" }, - { "key": "IsUiFileInUse", "value": "%{JS: %{UiSupport} && %{QmlUiSplit} }" } + { "key": "IsUiFileInUse", "value": "%{JS: %{UiSupport} && %{QmlUiSplit} }" }, + { "key": "UseVirtualKeyboard", "value": "%{JS: [ %{Plugins} ].indexOf('Boot2Qt') >= 0}" } ], "pages": @@ -48,7 +51,9 @@ "value": "{ 'qtQuickVersion': '2.7', - 'qtQuickWindowVersion': '2.2' + 'qtQuickWindowVersion': '2.2', + 'qtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.1', + 'qtQuickVirtualKeyboardWhenVisible': 'inputPanel.active' }" }, { @@ -56,7 +61,9 @@ "value": "{ 'qtQuickVersion': '2.6', - 'qtQuickWindowVersion': '2.2' + 'qtQuickWindowVersion': '2.2', + 'qtQuickVirtualKeyboardImport': 'QtQuick.Enterprise.VirtualKeyboard 2.0', + 'qtQuickVirtualKeyboardWhenVisible': 'inputPanel.active' }" }, { @@ -64,7 +71,9 @@ "value": "{ 'qtQuickVersion': '2.5', - 'qtQuickWindowVersion': '2.2' + 'qtQuickWindowVersion': '2.2', + 'qtQuickVirtualKeyboardImport': 'QtQuick.Enterprise.VirtualKeyboard 1.3', + 'qtQuickVirtualKeyboardWhenVisible': 'Qt.inputMethod.visible' }" }, { @@ -72,7 +81,9 @@ "value": "{ 'qtQuickVersion': '2.4', - 'qtQuickWindowVersion': '2.2' + 'qtQuickWindowVersion': '2.2', + 'qtQuickVirtualKeyboardImport': 'QtQuick.Enterprise.VirtualKeyboard 1.0', + 'qtQuickVirtualKeyboardWhenVisible': 'Qt.inputMethod.visible' }" }, { @@ -80,7 +91,9 @@ "value": "{ 'qtQuickVersion': '2.3', - 'qtQuickWindowVersion': '2.2' + 'qtQuickWindowVersion': '2.2', + 'qtQuickVirtualKeyboardImport': 'QtQuick.Enterprise.VirtualKeyboard 1.0', + 'qtQuickVirtualKeyboardWhenVisible': 'Qt.inputMethod.visible' }" } ] From 809257ca1b4ffa7ff4557aa9094401af87646618 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Tue, 9 Aug 2016 18:30:33 +0200 Subject: [PATCH 07/14] Qt Quick Controls 2 App Wizard: Add virtual keyboard for Boot2Qt If the Boot2Qt plugin is installed, the wizard generates the required code to instantiate the virtual keyboard and to slide it in & out. Change-Id: I1610575729b1a2bd570ef7d7b6870f579f5e34f0 Reviewed-by: Mitch Curtis Reviewed-by: Rainer Keller --- .../qtquickcontrols2application/Page1.qml.tpl | 5 +-- .../Page1Form.ui.qml.tpl | 18 +++++---- .../qtquickcontrols2application/main.cpp | 4 ++ .../qtquickcontrols2application/main.qml.tpl | 37 +++++++++++++++++++ .../qtquickcontrols2application/wizard.json | 4 +- 5 files changed, 55 insertions(+), 13 deletions(-) diff --git a/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrols2application/Page1.qml.tpl b/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrols2application/Page1.qml.tpl index bb8b52b439f..71c6c623624 100644 --- a/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrols2application/Page1.qml.tpl +++ b/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrols2application/Page1.qml.tpl @@ -2,9 +2,6 @@ import QtQuick %{QtQuickVersion} Page1Form { button1.onClicked: { - console.log("Button 1 clicked."); - } - button2.onClicked: { - console.log("Button 2 clicked."); + console.log("Button Pressed. Entered text: " + textField1.text); } } diff --git a/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrols2application/Page1Form.ui.qml.tpl b/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrols2application/Page1Form.ui.qml.tpl index 1f831a02ab6..f2fcc8cff3c 100644 --- a/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrols2application/Page1Form.ui.qml.tpl +++ b/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrols2application/Page1Form.ui.qml.tpl @@ -3,20 +3,22 @@ import QtQuick.Controls %{QtQuickControls2Version} import QtQuick.Layouts %{QtQuickLayoutsVersion} Item { + property alias textField1: textField1 property alias button1: button1 - property alias button2: button2 RowLayout { - anchors.centerIn: parent + anchors.horizontalCenter: parent.horizontalCenter + anchors.topMargin: 20 + anchors.top: parent.top + + TextField { + id: textField1 + placeholderText: qsTr("Text Field") + } Button { id: button1 - text: qsTr("Press Me 1") - } - - Button { - id: button2 - text: qsTr("Press Me 2") + text: qsTr("Press Me") } } } diff --git a/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrols2application/main.cpp b/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrols2application/main.cpp index 4142815437d..e08a85e3fde 100644 --- a/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrols2application/main.cpp +++ b/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrols2application/main.cpp @@ -2,6 +2,10 @@ %{JS: QtSupport.qtIncludes([], ["QtGui/QGuiApplication", "QtQml/QQmlApplicationEngine"])} int main(int argc, char *argv[]) { +@if %{UseVirtualKeyboard} + qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard")); + +@endif QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QGuiApplication app(argc, argv); diff --git a/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrols2application/main.qml.tpl b/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrols2application/main.qml.tpl index 26349844595..8c55ad596a5 100644 --- a/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrols2application/main.qml.tpl +++ b/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrols2application/main.qml.tpl @@ -1,12 +1,18 @@ import QtQuick %{QtQuickVersion} import QtQuick.Controls %{QtQuickControls2Version} import QtQuick.Layouts %{QtQuickLayoutsVersion} +@if %{UseVirtualKeyboard} +import QtQuick.VirtualKeyboard %{QtQuickVirtualKeyboardVersion} +@endif ApplicationWindow { visible: true width: 640 height: 480 title: qsTr("Hello World") +@if %{UseVirtualKeyboard} + id: root +@endif SwipeView { id: swipeView @@ -34,4 +40,35 @@ ApplicationWindow { text: qsTr("Second") } } +@if %{UseVirtualKeyboard} + + InputPanel { + id: inputPanel + z: 99 + x: 0 + y: root.height + width: root.width + + states: State { + name: "visible" + when: inputPanel.active + PropertyChanges { + target: inputPanel + y: root.height - inputPanel.height + } + } + transitions: Transition { + from: "" + to: "visible" + reversible: true + ParallelAnimation { + NumberAnimation { + properties: "y" + duration: 250 + easing.type: Easing.InOutQuad + } + } + } + } +@endif } diff --git a/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrols2application/wizard.json b/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrols2application/wizard.json index d91a1c1039c..4193461bf31 100644 --- a/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrols2application/wizard.json +++ b/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrols2application/wizard.json @@ -17,7 +17,9 @@ { "key": "QtQuickVersion", "value": "2.7" }, { "key": "QtQuickControls2Version", "value": "2.0" }, { "key": "QtQuickDialogsVersion", "value": "1.0" }, - { "key": "QtQuickLayoutsVersion", "value": "1.0" } + { "key": "QtQuickLayoutsVersion", "value": "1.0" }, + { "key": "QtQuickVirtualKeyboardVersion", "value": "2.1" }, + { "key": "UseVirtualKeyboard", "value": "%{JS: [ %{Plugins} ].indexOf('Boot2Qt') >= 0}" } ], "pages": From 252a3f89c61ae9a14427f66788b26597e6d24a6c Mon Sep 17 00:00:00 2001 From: David Faure Date: Mon, 8 Aug 2016 15:32:56 +0200 Subject: [PATCH 08/14] Fix wrong code in list/table model templates rowCount should return 0 if the parent *is* valid, and return the actual number of rows when queried with an invalid index. Change-Id: I00e3d4ea79e1aaf0be1974da876c5a871d3924e6 Reviewed-by: Alessandro Portale --- .../templates/wizards/classes/itemmodel/listmodel.cpp | 2 +- .../templates/wizards/classes/itemmodel/tablemodel.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/share/qtcreator/templates/wizards/classes/itemmodel/listmodel.cpp b/share/qtcreator/templates/wizards/classes/itemmodel/listmodel.cpp index 5d7fa72875f..2881513ab68 100644 --- a/share/qtcreator/templates/wizards/classes/itemmodel/listmodel.cpp +++ b/share/qtcreator/templates/wizards/classes/itemmodel/listmodel.cpp @@ -28,7 +28,7 @@ bool %{CN}::setHeaderData(int section, Qt::Orientation orientation, const QVaria int %{CN}::rowCount(const QModelIndex &parent) const { - if (!parent.isValid()) + if (parent.isValid()) return 0; // FIXME: Implement me! diff --git a/share/qtcreator/templates/wizards/classes/itemmodel/tablemodel.cpp b/share/qtcreator/templates/wizards/classes/itemmodel/tablemodel.cpp index fb452feace5..80bedf58990 100644 --- a/share/qtcreator/templates/wizards/classes/itemmodel/tablemodel.cpp +++ b/share/qtcreator/templates/wizards/classes/itemmodel/tablemodel.cpp @@ -29,7 +29,7 @@ bool %{CN}::setHeaderData(int section, Qt::Orientation orientation, const QVaria int %{CN}::rowCount(const QModelIndex &parent) const { - if (!parent.isValid()) + if (parent.isValid()) return 0; // FIXME: Implement me! @@ -37,7 +37,7 @@ int %{CN}::rowCount(const QModelIndex &parent) const int %{CN}::columnCount(const QModelIndex &parent) const { - if (!parent.isValid()) + if (parent.isValid()) return 0; // FIXME: Implement me! From e84abe3af1335c000b8f581c351b5e387101ea8f Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Wed, 3 Aug 2016 16:27:22 +0200 Subject: [PATCH 09/14] Debugger: Only use random QML port if none was given This is a cherry-pick of 20db17e4f07c298874f01eb0f9ebeb26a7887fdd from 4.1. The problem also occurs in 4.0 and as another version of 4.0 might be released, we should fix it there, too. Change-Id: I3cf42abfa9d0ea5812495be6e2728264dc115ba9 Task-number: QTCREATORBUG-16708 Reviewed-by: Christian Stenger --- src/plugins/debugger/debuggerruncontrol.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/plugins/debugger/debuggerruncontrol.cpp b/src/plugins/debugger/debuggerruncontrol.cpp index 9f077c46527..e925f7896fa 100644 --- a/src/plugins/debugger/debuggerruncontrol.cpp +++ b/src/plugins/debugger/debuggerruncontrol.cpp @@ -450,15 +450,18 @@ void DebuggerRunControlCreator::enrich(const RunConfiguration *runConfig, const if (m_rp.languages & QmlLanguage) { if (m_rp.device && m_rp.device->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) { - QTcpServer server; - const bool canListen = server.listen(QHostAddress::LocalHost) - || server.listen(QHostAddress::LocalHostIPv6); - if (!canListen) { - m_errors.append(DebuggerPlugin::tr("Not enough free ports for QML debugging.") + QLatin1Char(' ')); - return; + if (m_rp.qmlServerAddress.isEmpty() || m_rp.qmlServerPort == InvalidPort) { + QTcpServer server; + const bool canListen = server.listen(QHostAddress::LocalHost) + || server.listen(QHostAddress::LocalHostIPv6); + if (!canListen) { + m_errors.append(DebuggerPlugin::tr("Not enough free ports for QML debugging.") + + QLatin1Char(' ')); + return; + } + m_rp.qmlServerAddress = server.serverAddress().toString(); + m_rp.qmlServerPort = server.serverPort(); } - m_rp.qmlServerAddress = server.serverAddress().toString(); - m_rp.qmlServerPort = server.serverPort(); // Makes sure that all bindings go through the JavaScript engine, so that // breakpoints are actually hit! From 4556cee18e2c34be505a9422229cbcefdc8b3e1d Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Wed, 10 Aug 2016 16:32:37 +0200 Subject: [PATCH 10/14] Qt labs Controls App Wizard: Add virtual keyboard for Boot2Qt If the Boot2Qt plugin is installed, the wizard generates the required code to instantiate the virtual keyboard and to slide it in & out. Change-Id: Ibd78ac216841c1c05128272abfa7b86a14131022 Reviewed-by: Mitch Curtis Reviewed-by: Rainer Keller --- .../qtlabscontrolsapplication/Page1.qml.tpl | 5 +-- .../Page1Form.ui.qml.tpl | 18 +++++---- .../qmake/qtlabscontrolsapplication/main.cpp | 4 ++ .../qtlabscontrolsapplication/main.qml.tpl | 37 +++++++++++++++++++ .../qtlabscontrolsapplication/wizard.json | 4 +- 5 files changed, 55 insertions(+), 13 deletions(-) diff --git a/share/qtcreator/templates/wizards/projects/qmake/qtlabscontrolsapplication/Page1.qml.tpl b/share/qtcreator/templates/wizards/projects/qmake/qtlabscontrolsapplication/Page1.qml.tpl index bb8b52b439f..71c6c623624 100644 --- a/share/qtcreator/templates/wizards/projects/qmake/qtlabscontrolsapplication/Page1.qml.tpl +++ b/share/qtcreator/templates/wizards/projects/qmake/qtlabscontrolsapplication/Page1.qml.tpl @@ -2,9 +2,6 @@ import QtQuick %{QtQuickVersion} Page1Form { button1.onClicked: { - console.log("Button 1 clicked."); - } - button2.onClicked: { - console.log("Button 2 clicked."); + console.log("Button Pressed. Entered text: " + textField1.text); } } diff --git a/share/qtcreator/templates/wizards/projects/qmake/qtlabscontrolsapplication/Page1Form.ui.qml.tpl b/share/qtcreator/templates/wizards/projects/qmake/qtlabscontrolsapplication/Page1Form.ui.qml.tpl index 863df116c72..422a94cc56c 100644 --- a/share/qtcreator/templates/wizards/projects/qmake/qtlabscontrolsapplication/Page1Form.ui.qml.tpl +++ b/share/qtcreator/templates/wizards/projects/qmake/qtlabscontrolsapplication/Page1Form.ui.qml.tpl @@ -3,20 +3,22 @@ import Qt.labs.controls %{QtLabsControlsVersion} import QtQuick.Layouts %{QtQuickLayoutsVersion} Item { + property alias textField1: textField1 property alias button1: button1 - property alias button2: button2 RowLayout { - anchors.centerIn: parent + anchors.horizontalCenter: parent.horizontalCenter + anchors.topMargin: 20 + anchors.top: parent.top + + TextField { + id: textField1 + placeholderText: qsTr("Text Field") + } Button { id: button1 - text: qsTr("Press Me 1") - } - - Button { - id: button2 - text: qsTr("Press Me 2") + text: qsTr("Press Me") } } } diff --git a/share/qtcreator/templates/wizards/projects/qmake/qtlabscontrolsapplication/main.cpp b/share/qtcreator/templates/wizards/projects/qmake/qtlabscontrolsapplication/main.cpp index 4142815437d..e08a85e3fde 100644 --- a/share/qtcreator/templates/wizards/projects/qmake/qtlabscontrolsapplication/main.cpp +++ b/share/qtcreator/templates/wizards/projects/qmake/qtlabscontrolsapplication/main.cpp @@ -2,6 +2,10 @@ %{JS: QtSupport.qtIncludes([], ["QtGui/QGuiApplication", "QtQml/QQmlApplicationEngine"])} int main(int argc, char *argv[]) { +@if %{UseVirtualKeyboard} + qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard")); + +@endif QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QGuiApplication app(argc, argv); diff --git a/share/qtcreator/templates/wizards/projects/qmake/qtlabscontrolsapplication/main.qml.tpl b/share/qtcreator/templates/wizards/projects/qmake/qtlabscontrolsapplication/main.qml.tpl index 284a7b30dbe..f38e96dcbeb 100644 --- a/share/qtcreator/templates/wizards/projects/qmake/qtlabscontrolsapplication/main.qml.tpl +++ b/share/qtcreator/templates/wizards/projects/qmake/qtlabscontrolsapplication/main.qml.tpl @@ -1,12 +1,18 @@ import QtQuick %{QtQuickVersion} import QtQuick.Layouts %{QtQuickLayoutsVersion} import Qt.labs.controls %{QtLabsControlsVersion} +@if %{UseVirtualKeyboard} +import QtQuick.Enterprise.VirtualKeyboard %{QtQuickVirtualKeyboardVersion} +@endif ApplicationWindow { visible: true width: 640 height: 480 title: qsTr("Hello World") +@if %{UseVirtualKeyboard} + id: root +@endif SwipeView { id: swipeView @@ -34,4 +40,35 @@ ApplicationWindow { text: qsTr("Second") } } +@if %{UseVirtualKeyboard} + + InputPanel { + id: inputPanel + z: 99 + x: 0 + y: root.height + width: root.width + + states: State { + name: "visible" + when: inputPanel.active + PropertyChanges { + target: inputPanel + y: root.height - inputPanel.height + } + } + transitions: Transition { + from: "" + to: "visible" + reversible: true + ParallelAnimation { + NumberAnimation { + properties: "y" + duration: 250 + easing.type: Easing.InOutQuad + } + } + } + } +@endif } diff --git a/share/qtcreator/templates/wizards/projects/qmake/qtlabscontrolsapplication/wizard.json b/share/qtcreator/templates/wizards/projects/qmake/qtlabscontrolsapplication/wizard.json index 126df3ccf8f..b196d125897 100644 --- a/share/qtcreator/templates/wizards/projects/qmake/qtlabscontrolsapplication/wizard.json +++ b/share/qtcreator/templates/wizards/projects/qmake/qtlabscontrolsapplication/wizard.json @@ -17,7 +17,9 @@ { "key": "QtQuickVersion", "value": "2.6" }, { "key": "QtLabsControlsVersion", "value": "1.0" }, { "key": "QtQuickDialogsVersion", "value": "1.0" }, - { "key": "QtQuickLayoutsVersion", "value": "1.0" } + { "key": "QtQuickLayoutsVersion", "value": "1.0" }, + { "key": "QtQuickVirtualKeyboardVersion", "value": "2.0" }, + { "key": "UseVirtualKeyboard", "value": "%{JS: [ %{Plugins} ].indexOf('Boot2Qt') >= 0}" } ], "pages": From 486c3670cf3bbc1a3e90ebe1b7bcb2ca748a7f11 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Thu, 11 Aug 2016 17:10:39 +0200 Subject: [PATCH 11/14] Fix the QmlProject app wizard Change-Id: I710b446b5e4346b45f1aa4c7a851428b6bc57454 Reviewed-by: Robert Loehning --- .../wizards/projects/qmlproject/qtquickapplication/wizard.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/qtcreator/templates/wizards/projects/qmlproject/qtquickapplication/wizard.json b/share/qtcreator/templates/wizards/projects/qmlproject/qtquickapplication/wizard.json index 9307bd7c5d7..559729e66f3 100644 --- a/share/qtcreator/templates/wizards/projects/qmlproject/qtquickapplication/wizard.json +++ b/share/qtcreator/templates/wizards/projects/qmlproject/qtquickapplication/wizard.json @@ -17,7 +17,8 @@ { "key": "QtQuickVersion", "value": "%{JS: %{QtVersion}.qtQuickVersion}" }, { "key": "QtQuickWindowVersion", "value": "%{JS: %{QtVersion}.qtQuickWindowVersion}" }, { "key": "UiSupport", "value": "%{JS: '%{QtQuickVersion}' !== '2.3' }" }, - { "key": "IsUiFileInUse", "value": "%{JS: %{UiSupport} && %{QmlUiSplit} }" } + { "key": "IsUiFileInUse", "value": "%{JS: %{UiSupport} && %{QmlUiSplit} }" }, + { "key": "UseVirtualKeyboard", "value": "false" } ], "pages": From aa29fcf1fb525f37a1ea2588864922a1b036ed76 Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Thu, 11 Aug 2016 17:25:39 +0200 Subject: [PATCH 12/14] Squish: Update tst_SCOM02 Project template was changed in b18e084fc040f20804f22d127783060d2efe14e0 Change-Id: I4959c15a452cf713cad86af10b81376b59b816b0 Reviewed-by: Christian Stenger --- tests/system/suite_SCOM/tst_SCOM02/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/system/suite_SCOM/tst_SCOM02/test.py b/tests/system/suite_SCOM/tst_SCOM02/test.py index 87cd57990a4..7c9dd60cea7 100644 --- a/tests/system/suite_SCOM/tst_SCOM02/test.py +++ b/tests/system/suite_SCOM/tst_SCOM02/test.py @@ -35,7 +35,7 @@ def main(): createNewQtQuickApplication(tempDir(), "SampleApp") # create syntax error in qml file openDocument("SampleApp.Resources.qml\.qrc./.main\\.qml") - if not appendToLine(waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget"), "Text {", "SyntaxError"): + if not appendToLine(waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget"), "TextEdit {", "SyntaxError"): invokeMenuItem("File", "Exit") return # save all to invoke qml parsing From 5dd44e0a7be92448cc84210f67f930cc6fe06535 Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Thu, 11 Aug 2016 15:42:29 +0200 Subject: [PATCH 13/14] Squish: Update testdata for tst_simple_analyze Project template was changed in b18e084fc040f20804f22d127783060d2efe14e0 Change-Id: Ib37b1e5c5c30f75bac302d605403755c8f450fbf Reviewed-by: Christian Stenger --- .../tst_simple_analyze/testdata/events_qt5.tsv | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt5.tsv b/tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt5.tsv index b7422391d58..f59b0df27eb 100644 --- a/tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt5.tsv +++ b/tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt5.tsv @@ -1,15 +1,20 @@ "0" "1" "6" "11" "" "" "1" "Main Program" -"main.qml:4" "Create" "2" "QtQuick.Window/Window" "main.qml:15" "Signal" "2" "onTriggered: { runCount += 1; var i; for (i = 1; i < 2500; ++i) { var j = i * i; console.log(j); } }" "main.qml:15" "JavaScript" "2" "onTriggered" -"main.qml:33" "Create" "2" "QtQuick/Text" +"main.qml:4" "Create" "2" "QtQuick.Window/Window" +"main.qml:33" "Create" "2" "QtQuick/TextEdit" "main.qml:1" "Compile" "1" "main.qml" "main.qml:10" "Create" "2" "QtQuick/Timer" -"main.qml:35" "Binding" "1" "anchors.centerIn: parent" -"main.qml:26" "Create" "2" "QtQuick/MouseArea" +"main.qml:37" "Binding" "1" "anchors.top: parent.top" +"main.qml:40" "Create" "2" "QtQuick/Rectangle" +"main.qml:37" "JavaScript" "1" "expression for top" "main.qml:14" "Binding" "3" "running: runCount < 2" -"main.qml:35" "JavaScript" "1" "expression for centerIn" +"main.qml:26" "Create" "2" "QtQuick/MouseArea" +"main.qml:38" "Binding" "1" "anchors.horizontalCenter: parent.horizontalCenter" +"main.qml:38" "JavaScript" "1" "expression for horizontalCenter" +"main.qml:41" "Binding" "1" "anchors.fill: parent" "main.qml:27" "Binding" "1" "anchors.fill: parent" "main.qml:14" "JavaScript" "3" "expression for running" -"main.qml:27" "JavaScript" "1" "expression for fill" +"main.qml:41" JavaScript "1" "expression for fill" +"main.qml:27" JavaScript "1" "expression for fill" From 68e38b89e38668a5570b4fc9194288abf5c86bee Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Thu, 11 Aug 2016 16:54:18 +0200 Subject: [PATCH 14/14] Squish: Update suite_QMLS Project template was changed in b18e084fc040f20804f22d127783060d2efe14e0 Change-Id: I89bf518756cd7d7859ffc6e9a56f1aed2e7e435f Reviewed-by: Christian Stenger --- tests/system/suite_QMLS/tst_QMLS01/test.py | 8 ++++---- tests/system/suite_QMLS/tst_QMLS02/test.py | 2 +- tests/system/suite_QMLS/tst_QMLS04/test.py | 8 ++++---- tests/system/suite_QMLS/tst_QMLS05/test.py | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/system/suite_QMLS/tst_QMLS01/test.py b/tests/system/suite_QMLS/tst_QMLS01/test.py index 49892cdec4d..cb8f6447a2a 100644 --- a/tests/system/suite_QMLS/tst_QMLS01/test.py +++ b/tests/system/suite_QMLS/tst_QMLS01/test.py @@ -116,23 +116,23 @@ def main(): if not startQtCreatorWithNewAppAtQMLEditor(tempDir(), "SampleApp"): return # test "color: " suggestion usage with Enter key - if not testSuggestionsAuto("Text {", "col", "color:", ""): + if not testSuggestionsAuto("TextEdit {", "col", "color:", ""): saveAndExit() return # test "color: " suggestion usage with Tab key - if not testSuggestionsAuto("Text {", "col", "color:", ""): + if not testSuggestionsAuto("TextEdit {", "col", "color:", ""): saveAndExit() return # test "textChanged: " suggestion - automatic insert, because only one suggestion available shortcutToSuggestions = "" if platform.system() == "Darwin": shortcutToSuggestions = "" - if not testSuggestionsAuto("Text {","textChan", "textChanged:", shortcutToSuggestions): + if not testSuggestionsAuto("TextEdit {","baseu", "baseUrl:", shortcutToSuggestions): saveAndExit() return # change settings to manual insertion of suggestions changeAutocompleteToManual() # test manual suggestions - testSuggestionsManual("Text {", "col", "color:") + testSuggestionsManual("TextEdit {", "col", "color:") # exit qt creator saveAndExit() diff --git a/tests/system/suite_QMLS/tst_QMLS02/test.py b/tests/system/suite_QMLS/tst_QMLS02/test.py index 0672239e217..78101fc08fe 100644 --- a/tests/system/suite_QMLS/tst_QMLS02/test.py +++ b/tests/system/suite_QMLS/tst_QMLS02/test.py @@ -27,7 +27,7 @@ source("../shared/qmls.py") source("../../shared/suites_qtta.py") def main(): - editorArea = startQtCreatorWithNewAppAtQMLEditor(tempDir(), "SampleApp", "Text {") + editorArea = startQtCreatorWithNewAppAtQMLEditor(tempDir(), "SampleApp", "TextEdit {") if not editorArea: return # write code with error (C should be lower case) diff --git a/tests/system/suite_QMLS/tst_QMLS04/test.py b/tests/system/suite_QMLS/tst_QMLS04/test.py index e387ecfd0eb..5dabdf7f0f2 100644 --- a/tests/system/suite_QMLS/tst_QMLS04/test.py +++ b/tests/system/suite_QMLS/tst_QMLS04/test.py @@ -27,7 +27,7 @@ source("../shared/qmls.py") def main(): projectDir = tempDir() - editorArea = startQtCreatorWithNewAppAtQMLEditor(projectDir, "SampleApp", "Text {") + editorArea = startQtCreatorWithNewAppAtQMLEditor(projectDir, "SampleApp", "TextEdit {") if not editorArea: return for i in range(5): @@ -45,9 +45,9 @@ def main(): # verify if refactoring is done correctly waitFor("'MyComponent' in str(editorArea.plainText)", 2000) codeText = str(editorArea.plainText) - patternCodeToAdd = "MyComponent\s+\{\s*\}" - patternCodeToMove = "Text\s+\{.*\}" - # there should be empty MyComponent item instead of Text item + patternCodeToAdd = "MyComponent\s+\{\s*id: textEdit\s*\}" + patternCodeToMove = "TextEdit\s+\{.*\}" + # there should be empty MyComponent item instead of TextEdit item if re.search(patternCodeToAdd, codeText, re.DOTALL) and not re.search(patternCodeToMove, codeText, re.DOTALL): test.passes("Refactoring was properly applied in source file") else: diff --git a/tests/system/suite_QMLS/tst_QMLS05/test.py b/tests/system/suite_QMLS/tst_QMLS05/test.py index 58860c27a6e..3db2f02f015 100644 --- a/tests/system/suite_QMLS/tst_QMLS05/test.py +++ b/tests/system/suite_QMLS/tst_QMLS05/test.py @@ -26,7 +26,7 @@ source("../shared/qmls.py") def main(): - editorArea = startQtCreatorWithNewAppAtQMLEditor(tempDir(), "SampleApp", "Text {") + editorArea = startQtCreatorWithNewAppAtQMLEditor(tempDir(), "SampleApp", "TextEdit {") if not editorArea: return homeKey = ""