From 6753bb2f611428bfc88dba72e6fdcb98cda66a16 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Sun, 17 Aug 2014 22:53:06 +0200 Subject: [PATCH 01/10] version bump Change-Id: Iaacd1793497a836ae7ddab7f7f6de34b89cf51d8 Reviewed-by: Eike Ziller --- qtcreator.pri | 4 ++-- qtcreator.qbs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/qtcreator.pri b/qtcreator.pri index 0ebe56f8429..a9dd72f8b33 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 = 3.1.85 -QTCREATOR_COMPAT_VERSION = 3.1.85 +QTCREATOR_VERSION = 3.2.0 +QTCREATOR_COMPAT_VERSION = 3.2.0 BINARY_ARTIFACTS_BRANCH = 3.2 # enable c++11 diff --git a/qtcreator.qbs b/qtcreator.qbs index d68e8d7cf2c..efdf665efd3 100644 --- a/qtcreator.qbs +++ b/qtcreator.qbs @@ -4,12 +4,12 @@ Project { minimumQbsVersion: "1.3" property bool withAutotests: qbs.buildVariant === "debug" property string ide_version_major: '3' - property string ide_version_minor: '1' - property string ide_version_release: '85' + property string ide_version_minor: '2' + 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: '3' - property string ide_compat_version_minor: '1' - property string ide_compat_version_release: '85' + property string ide_compat_version_minor: '2' + property string ide_compat_version_release: '0' property string qtcreator_compat_version: ide_compat_version_major + '.' + ide_compat_version_minor + '.' + ide_compat_version_release property path ide_source_tree: path property string ide_app_path: qbs.targetOS.contains("osx") ? "" : "bin" From 05dffd36757737d69a57502abaac7911a25e48dd Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Thu, 14 Aug 2014 16:07:33 +0300 Subject: [PATCH 02/10] Android: Use the new gdbserver name for Qt 5.4+ Starting with Qt 5.4 we are packaging the gdbserver tool as libgdbserver.so, otherwise gradle will refuse to add it to the package. Gdbserver is renamed also for ant. Change-Id: I4ef6408226ab05ea7b4e3d6f41dd368f5a602c7d Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/plugins/android/androidrunner.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/android/androidrunner.cpp b/src/plugins/android/androidrunner.cpp index af47f62cb2c..14b39f9511f 100644 --- a/src/plugins/android/androidrunner.cpp +++ b/src/plugins/android/androidrunner.cpp @@ -95,10 +95,12 @@ AndroidRunner::AndroidRunner(QObject *parent, m_pingFile = packageDir + _("/debug-ping"); m_pongFile = _("/data/local/tmp/qt/debug-pong-") + m_packageName; m_gdbserverSocket = packageDir + _("/debug-socket"); - m_gdbserverPath = packageDir + _("/lib/gdbserver"); const QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target->kit()); if (version && version->qtVersion() >= QtSupport::QtVersionNumber(5, 4, 0)) - m_gdbserverPath += _(".so"); + m_gdbserverPath = packageDir + _("/lib/libgdbserver.so"); + else + m_gdbserverPath = packageDir + _("/lib/gdbserver"); + m_gdbserverCommand = m_gdbserverPath + _(" --multi +") + m_gdbserverSocket; // Detect busybox, as we need to pass -w to ps to get wide output. From b1d8156742fdf3a0da67fe88cefdcf766c90062d Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Wed, 13 Aug 2014 13:20:34 +0200 Subject: [PATCH 03/10] Doc: column editing Change-Id: I6d8f2269b616e91409de4218eebecf087a4a0215 Reviewed-by: Nikolai Kosjar --- doc/src/editors/creator-editors.qdoc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/src/editors/creator-editors.qdoc b/doc/src/editors/creator-editors.qdoc index 05b984eff86..002fcf7762a 100644 --- a/doc/src/editors/creator-editors.qdoc +++ b/doc/src/editors/creator-editors.qdoc @@ -1549,6 +1549,12 @@ The instances of the symbol are highlighted in code and you can edit the symbol. All instances of the local symbol are changed as you type. + \section1 Column Editing + + To apply a change to several rows in a column simultaneously, press + \key Alt, select the rows, and enter or remove text. The changes are made + simultaneously at the cursor position on all the selected rows. + \section1 Applying Refactoring Actions \QC allows you to quickly and conveniently apply actions to refactor From bc03271f0e700bbe8bfa58687ec386131887a304 Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Fri, 15 Aug 2014 17:53:07 +0200 Subject: [PATCH 04/10] Squish: Remove unused objects Should have done so in 4541173535d4a0df240636ab1a0618abc2794569 Change-Id: I2f6b578db506d8e9e35b90d0a7fbc2ae833b148c Reviewed-by: Christian Stenger --- tests/system/objects.map | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/system/objects.map b/tests/system/objects.map index 8637b38df7d..e2861281ba7 100644 --- a/tests/system/objects.map +++ b/tests/system/objects.map @@ -113,8 +113,6 @@ :New.templateCategoryView_QTreeView {name='templateCategoryView' type='QTreeView' visible='1' window=':New_Core::Internal::NewDialog'} :New_Core::Internal::NewDialog {name='Core__Internal__NewDialog' type='Core::Internal::NewDialog' visible='1' windowTitle='New'} :Next_QPushButton {text~='(Next.*|Continue)' type='QPushButton' visible='1'} -:Open File.File name:_QLabel {name='fileNameLabel' text='File name:' type='QLabel' visible='1' window=':Open File_QFileDialog'} -:Open File_QFileDialog {name='QFileDialog' type='QFileDialog' visible='1' windowTitle='Open File'} :OpenDocuments_Widget {type='Core::Internal::OpenEditorsWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Open Documents'} :OpenProject_QStyleItem {clip='false' container=':WelcomePage.scrollView_ScrollView' enabled='true' text='Open Project' type='Button' unnamed='1' visible='true'} :Options.Cancel_QPushButton {text='Cancel' type='QPushButton' unnamed='1' visible='1' window=':Options_Core::Internal::SettingsDialog'} @@ -214,7 +212,6 @@ :Working Copy_Utils::BaseValidatingLineEdit {container=':Git Repository Clone.Working Copy_QGroupBox' type='Utils::FancyLineEdit' unnamed='1' visible='1'} :WritePermissions_Core::Internal::ReadOnlyFilesDialog {name='Core__Internal__ReadOnlyFilesDialog' type='Core::Internal::ReadOnlyFilesDialog' visible='1' windowTitle='Files Without Write Permissions'} :addToVersionControlComboBox_QComboBox {name='addToVersionControlComboBox' type='QComboBox' visible='1'} -:fileNameEdit_QLineEdit {buddy=':Open File.File name:_QLabel' name='fileNameEdit' type='QLineEdit' visible='1'} :formFileLineEdit_Utils::FileNameValidatingLineEdit {buddy=':Qt Gui Application.Form file:_QLabel' name='formFileLineEdit' type='Utils::FileNameValidatingLineEdit' visible='1'} :frame.templateDescription_QTextBrowser {container=':New.frame_QFrame' name='templateDescription' type='QTextBrowser' visible='1'} :headerFileLineEdit_Utils::FileNameValidatingLineEdit {buddy=':Qt Gui Application.Header file:_QLabel' name='headerFileLineEdit' type='Utils::FileNameValidatingLineEdit' visible='1'} From be3dbd2699c8daed8ddf61f8cf08f68a481717d2 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Mon, 18 Aug 2014 12:25:11 +0200 Subject: [PATCH 05/10] CppEditor: copy snapshot before FunctionDeclDefLink change calculation. FunctionDeclDefLink::changes is called from CPPEditorWidget::updateFunctionDeclDefLinkNow() where it receives the snapshot by reference from the semantic info. The semantic info is recalculated in a/the future, so it might change the snapshot or its documents while it's still being used by the decl/def link finder. So, this patch takes a copy of all relevant semantic info (snapshot and document) before starting to calculate the changes. Change-Id: I78244a4ca8149233403b3c35ee05a2d4ed4b2770 Reviewed-by: Nikolai Kosjar --- src/plugins/cppeditor/cppeditor.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/plugins/cppeditor/cppeditor.cpp b/src/plugins/cppeditor/cppeditor.cpp index 6507f6d4bea..ce1d201ce81 100644 --- a/src/plugins/cppeditor/cppeditor.cpp +++ b/src/plugins/cppeditor/cppeditor.cpp @@ -1029,22 +1029,24 @@ void CPPEditorWidget::updateFunctionDeclDefLinkNow() { if (Core::EditorManager::currentEditor() != editor()) return; + const Snapshot semanticSnapshot = d->m_lastSemanticInfo.snapshot; + const Document::Ptr semanticDoc = d->m_lastSemanticInfo.doc; if (d->m_declDefLink) { // update the change marker - const Utils::ChangeSet changes = d->m_declDefLink->changes(d->m_lastSemanticInfo.snapshot); + const Utils::ChangeSet changes = d->m_declDefLink->changes(semanticSnapshot); if (changes.isEmpty()) d->m_declDefLink->hideMarker(this); else d->m_declDefLink->showMarker(this); return; } - if (!d->m_lastSemanticInfo.doc || isOutdated()) + if (semanticDoc.isNull() || isOutdated()) return; Snapshot snapshot = CppModelManagerInterface::instance()->snapshot(); - snapshot.insert(d->m_lastSemanticInfo.doc); + snapshot.insert(semanticDoc); - d->m_declDefLinkFinder->startFindLinkAt(textCursor(), d->m_lastSemanticInfo.doc, snapshot); + d->m_declDefLinkFinder->startFindLinkAt(textCursor(), semanticDoc, snapshot); } void CPPEditorWidget::onFunctionDeclDefLinkFound(QSharedPointer link) From a01f6cadf492f6fba0e1f7024faeed56412c3d70 Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Mon, 18 Aug 2014 10:26:39 +0200 Subject: [PATCH 06/10] CppEditor: Return on invalid code in ExtractLiteralAsParameter::match No declarator was provided but we assumed one. Task-number: QTCREATORBUG-12853 Change-Id: I5faf96b63f39aff43c0165f7277345737e53f191 Reviewed-by: Erik Verbruggen Reviewed-by: Eike Ziller --- src/plugins/cppeditor/cppeditorplugin.h | 3 ++- src/plugins/cppeditor/cppquickfix_test.cpp | 18 ++++++++++++++++++ src/plugins/cppeditor/cppquickfixes.cpp | 14 ++++++++------ 3 files changed, 28 insertions(+), 7 deletions(-) diff --git a/src/plugins/cppeditor/cppeditorplugin.h b/src/plugins/cppeditor/cppeditorplugin.h index ec1f6aa8eb9..2490c8d27fb 100644 --- a/src/plugins/cppeditor/cppeditorplugin.h +++ b/src/plugins/cppeditor/cppeditorplugin.h @@ -201,13 +201,14 @@ private slots: void test_quickfix_ExtractLiteralAsParameter_typeDeduction(); void test_quickfix_ExtractLiteralAsParameter_freeFunction_separateFiles(); void test_quickfix_ExtractLiteralAsParameter_memberFunction_separateFiles(); + void test_quickfix_ExtractLiteralAsParameter_notTriggeringForInvalidCode(); void test_quickfix_InsertVirtualMethods_data(); void test_quickfix_InsertVirtualMethods(); void test_quickfix_InsertVirtualMethods_implementationFile(); void test_quickfix_InsertVirtualMethods_BaseClassInNamespace(); - // tests for "Include Hiererchy" + // tests for "Include Hierarchy" void test_includehierarchy_data(); void test_includehierarchy(); diff --git a/src/plugins/cppeditor/cppquickfix_test.cpp b/src/plugins/cppeditor/cppquickfix_test.cpp index 3e28a2025a8..2ef0c891227 100644 --- a/src/plugins/cppeditor/cppquickfix_test.cpp +++ b/src/plugins/cppeditor/cppquickfix_test.cpp @@ -3614,3 +3614,21 @@ void CppEditorPlugin::test_quickfix_ExtractLiteralAsParameter_memberFunction_sep ExtractLiteralAsParameter factory; QuickFixTestCase(testFiles, &factory); } + +void CppEditorPlugin::test_quickfix_ExtractLiteralAsParameter_notTriggeringForInvalidCode() +{ + QList testFiles; + QByteArray original; + QByteArray expected; + + original = + "T(\"test\")\n" + "{\n" + " const int i = @14;\n" + "}\n"; + expected = original; + testFiles << QuickFixTestDocument::create("file.cpp", original, expected); + + ExtractLiteralAsParameter factory; + QuickFixTestCase(testFiles, &factory); +} diff --git a/src/plugins/cppeditor/cppquickfixes.cpp b/src/plugins/cppeditor/cppquickfixes.cpp index dfdcfbc18f2..590b6ed7f19 100644 --- a/src/plugins/cppeditor/cppquickfixes.cpp +++ b/src/plugins/cppeditor/cppquickfixes.cpp @@ -3884,13 +3884,15 @@ void ExtractLiteralAsParameter::match(const CppQuickFixInterface &interface, return; } - FunctionDeclaratorAST *functionDeclarator - = function->declarator->postfix_declarator_list->value->asFunctionDeclarator(); - if (functionDeclarator - && functionDeclarator->parameter_declaration_clause - && functionDeclarator->parameter_declaration_clause->dot_dot_dot_token) { - // Do not handle functions with ellipsis parameter. + PostfixDeclaratorListAST * const declaratorList = function->declarator->postfix_declarator_list; + if (!declaratorList) return; + if (FunctionDeclaratorAST *declarator = declaratorList->value->asFunctionDeclarator()) { + if (declarator->parameter_declaration_clause + && declarator->parameter_declaration_clause->dot_dot_dot_token) { + // Do not handle functions with ellipsis parameter. + return; + } } const int priority = path.size() - 1; From 996a999b551ff64024c820a2ead66909a1372a19 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Mon, 11 Aug 2014 20:36:05 +0300 Subject: [PATCH 07/10] GDB: Upgrade to 7.8 Change-Id: If68a6b17b624c5093d4f1aaaae55db35a654a4fb Reviewed-by: hjk --- dist/gdb/Makefile.linux | 14 +++++++------- dist/gdb/Makefile.mingw | 14 +++++++------- dist/gdb/Makefile.osx | 14 +++++++------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/dist/gdb/Makefile.linux b/dist/gdb/Makefile.linux index ec4842a94da..871e7143a94 100644 --- a/dist/gdb/Makefile.linux +++ b/dist/gdb/Makefile.linux @@ -5,7 +5,7 @@ staging=${broot}/staging pyversion=2.7 expatversion=2.1.0 arch=`uname -sm | sed 's/ /-/g' | tr A-Z a-z` -version=7.7.1 +version=7.8 targetdir=${broot}/qtcreator-gdb-${version} gdbtargets=$(addprefix ${targetdir}/gdb-, ${targets}) packagename=qtcreator-gdb-${version}-${arch}.tar.gz @@ -36,12 +36,12 @@ ${source}/Python-${pyversion}.tgz: | makesourcedir wget -q http://www.python.org/ftp/python/${pyversion}/Python-${pyversion}.tgz && \ touch ${source}/Python-${pyversion}.tgz -${source}/gdb-${version}.tar.bz2: | makesourcedir +${source}/gdb-${version}.tar.xz: | makesourcedir cd ${source} && \ echo "Downloading gdb..." && \ - wget -q http://ftp.gnu.org/gnu/gdb/gdb-${version}.tar.bz2 || \ - wget -Oq gdb-${version}.tar.bz2 http://ftp.gnu.org/gnu/gdb/gdb-${version}a.tar.bz2 && \ - touch gdb-*.tar.bz2 + wget -q http://ftp.gnu.org/gnu/gdb/gdb-${version}.tar.xz || \ + wget -Oq gdb-${version}.tar.xz http://ftp.gnu.org/gnu/gdb/gdb-${version}a.tar.xz && \ + touch gdb-*.tar.xz ${staging}/lib/libexpat.a: ${source}/expat-${expatversion}.tar.gz | makestagingdir cd ${staging} && \ @@ -61,10 +61,10 @@ ${targetdir}/python/include/python${pyversion}/pyconfig.h: ${staging}/lib/libpyt mkdir -p ${targetdir}/python/lib && cp -a ${staging}/lib/python${pyversion} ${targetdir}/python/lib/ mkdir -p ${targetdir}/python/include/python${pyversion} && cp ${staging}/include/python${pyversion}/pyconfig.h ${targetdir}/python/include/python${pyversion}/ -${staging}/gdb-${version}/configure: ${source}/gdb-${version}.tar.bz2 | makestagingdir +${staging}/gdb-${version}/configure: ${source}/gdb-${version}.tar.xz | makestagingdir cd ${staging} && \ echo "Extracting gdb..." && \ - tar xf ${source}/gdb-${version}.tar.bz2 && \ + tar xf ${source}/gdb-${version}.tar.xz && \ cd gdb-${version} && \ touch configure diff --git a/dist/gdb/Makefile.mingw b/dist/gdb/Makefile.mingw index 7e563dc039b..8b7e34c5192 100644 --- a/dist/gdb/Makefile.mingw +++ b/dist/gdb/Makefile.mingw @@ -6,7 +6,7 @@ pyversion=2.7 pydir=${broot}/python expatversion=2.1.0 iconvversion=1.14 -version=7.7.1 +version=7.8 targetdir=${broot}/qtcreator-gdb-${version} gdbtargets=$(addprefix ${targetdir}/gdb-, ${targets}) packageparts=${targetdir}/lib ${targetdir}/data-directory ${targetdir}/libiconv-2.dll ${targetdir}/python27.dll ${targetdir}/libexpat-1.dll @@ -48,12 +48,12 @@ ${broot}/python/python.exe: ${source}/python.zip | checkunzip checkwget: wget -V &> /dev/null || mingw-get install msys-wget-bin -${source}/gdb-${version}.tar.bz2: | makesourcedir checkwget +${source}/gdb-${version}.tar.xz: | makesourcedir checkwget cd ${source} && \ echo "Downloading gdb..." && \ - wget -q http://ftp.gnu.org/gnu/gdb/gdb-${version}.tar.bz2 || \ - wget -Oq gdb-${version}.tar.bz2 http://ftp.gnu.org/gnu/gdb/gdb-${version}a.tar.bz2 && \ - touch gdb-${version}.tar.bz2 + wget -q http://ftp.gnu.org/gnu/gdb/gdb-${version}.tar.xz || \ + wget -Oq gdb-${version}.tar.xz http://ftp.gnu.org/gnu/gdb/gdb-${version}a.tar.xz && \ + touch gdb-${version}.tar.xz ${source}/libiconv-${iconvversion}.tar.gz: | makesourcedir checkwget cd ${source} && \ @@ -67,10 +67,10 @@ ${source}/expat-${expatversion}.tar.gz: | makesourcedir checkwget wget -q http://sourceforge.net/projects/expat/files/expat/${expatversion}/expat-${expatversion}.tar.gz/download && \ touch ${source}/expat-${expatversion}.tar.gz -${staging}/gdb-${version}/configure: ${source}/gdb-${version}.tar.bz2 | makestagingdir +${staging}/gdb-${version}/configure: ${source}/gdb-${version}.tar.xz | makestagingdir cd ${staging} && \ echo "Extracting gdb..." && \ - tar xf ${source}/gdb-${version}.tar.bz2 && \ + tar xf ${source}/gdb-${version}.tar.xz && \ cd gdb-${version} && \ touch configure diff --git a/dist/gdb/Makefile.osx b/dist/gdb/Makefile.osx index 6f257079179..0e9b17f6f82 100644 --- a/dist/gdb/Makefile.osx +++ b/dist/gdb/Makefile.osx @@ -5,7 +5,7 @@ staging=${broot}/staging pyversion=2.7 expatversion=2.1.0 arch=`uname -sm | sed 's/ /-/g' | tr A-Z a-z` -version=7.7.1 +version=7.8 targetdir=${broot}/qtcreator-gdb-${version} gdbtargets=$(addprefix ${targetdir}/gdb-, ${targets}) packagename=qtcreator-gdb-${version}-${arch}.tar.gz @@ -36,12 +36,12 @@ ${source}/Python-${pyversion}.tgz: | makesourcedir curl -Osf http://www.python.org/ftp/python/${pyversion}/Python-${pyversion}.tgz && \ touch ${source}/Python-${pyversion}.tgz -${source}/gdb-${version}.tar.bz2: | makesourcedir +${source}/gdb-${version}.tar.xz: | makesourcedir cd ${source} && \ echo "Downloading gdb..." && \ - curl -Osf http://ftp.gnu.org/gnu/gdb/gdb-${version}.tar.bz2 || \ - curl -osf gdb-${version}.tar.bz2 http://ftp.gnu.org/gnu/gdb/gdb-${version}a.tar.bz2 && \ - touch gdb-*.tar.bz2 + curl -Osf http://ftp.gnu.org/gnu/gdb/gdb-${version}.tar.xz || \ + curl -osf gdb-${version}.tar.xz http://ftp.gnu.org/gnu/gdb/gdb-${version}a.tar.xz && \ + touch gdb-*.tar.xz ${staging}/lib/libexpat.a: ${source}/expat-${expatversion}.tar.gz | makestagingdir cd ${staging} && \ @@ -60,10 +60,10 @@ ${targetdir}/python/include/python${pyversion}/pyconfig.h: ${staging}/lib/libpyt mkdir -p ${targetdir}/python/lib && cp -a ${staging}/lib/python${pyversion} ${targetdir}/python/lib/ mkdir -p ${targetdir}/python/include/python${pyversion} && cp ${staging}/include/python${pyversion}/pyconfig.h ${targetdir}/python/include/python${pyversion}/ -${staging}/gdb-${version}/configure: ${source}/gdb-${version}.tar.bz2 | makestagingdir +${staging}/gdb-${version}/configure: ${source}/gdb-${version}.tar.xz | makestagingdir cd ${staging} && \ echo "Extracting gdb..." && \ - tar xf ${source}/gdb-${version}.tar.bz2 && \ + tar xf ${source}/gdb-${version}.tar.xz && \ cd gdb-${version} && \ touch configure From 742db5115cd58e9f00b6f4a1323dbb5f416d6319 Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Mon, 18 Aug 2014 14:37:17 +0200 Subject: [PATCH 08/10] Squish: Use small letters in shortcuts Following Squish documentation. Capital letters even caused problems in nativeType(). Change-Id: I902984da40c7b57c1c40d35c2cd183e95481f1cf Reviewed-by: Christian Stenger --- tests/system/shared/editor_utils.py | 2 +- tests/system/shared/utils.py | 2 +- tests/system/suite_CSUP/tst_CSUP04/test.py | 2 +- tests/system/suite_CSUP/tst_CSUP05/test.py | 2 +- tests/system/suite_QMLS/tst_QMLS01/test.py | 8 ++++---- tests/system/suite_QMLS/tst_QMLS03/test.py | 2 +- tests/system/suite_QMLS/tst_QMLS08/test.py | 6 +++--- tests/system/suite_editors/tst_basic_cpp_support/test.py | 6 +++--- tests/system/suite_editors/tst_qml_indent/test.py | 8 ++++---- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/tests/system/shared/editor_utils.py b/tests/system/shared/editor_utils.py index d29465d2df2..125234c06ce 100644 --- a/tests/system/shared/editor_utils.py +++ b/tests/system/shared/editor_utils.py @@ -115,7 +115,7 @@ def markText(editor, direction, typeCount=1): # works for all standard editors def replaceEditorContent(editor, newcontent): - type(editor, "") + type(editor, "") type(editor, "") type(editor, newcontent) diff --git a/tests/system/shared/utils.py b/tests/system/shared/utils.py index 913e5b2fbfa..1c457dab2c6 100644 --- a/tests/system/shared/utils.py +++ b/tests/system/shared/utils.py @@ -289,7 +289,7 @@ def addHelpDocumentation(which): if listWidget.count > 0: rect = listWidget.visualItemRect(listWidget.item(0)) mouseClick(listWidget, rect.x+5, rect.y+5, 0, Qt.LeftButton) - type(listWidget, "") + type(listWidget, "") mouseClick(waitForObject("{type='QPushButton' name='removeButton' visible='1'}"), 5, 5, 0, Qt.LeftButton) for qch in which: clickButton(waitForObject("{type='QPushButton' name='addButton' visible='1' text='Add...'}")) diff --git a/tests/system/suite_CSUP/tst_CSUP04/test.py b/tests/system/suite_CSUP/tst_CSUP04/test.py index 16217a52970..dd8fa406d57 100644 --- a/tests/system/suite_CSUP/tst_CSUP04/test.py +++ b/tests/system/suite_CSUP/tst_CSUP04/test.py @@ -71,7 +71,7 @@ def main(): return for i in range(4): type(editorWidget, "") - type(editorWidget, "") + type(editorWidget, "") # wait until search finished and verify search results waitForSearchResults() validateSearchResult(3) diff --git a/tests/system/suite_CSUP/tst_CSUP05/test.py b/tests/system/suite_CSUP/tst_CSUP05/test.py index c853e37e52f..32271b0ae73 100644 --- a/tests/system/suite_CSUP/tst_CSUP05/test.py +++ b/tests/system/suite_CSUP/tst_CSUP05/test.py @@ -60,7 +60,7 @@ def main(): return type(editorWidget, "") markText(editorWidget, "Left", 6) - type(editorWidget, "") + type(editorWidget, "") # verify if find toolbar exists and if search text contains selected word test.verify(checkIfObjectExists(":*Qt Creator.Find_Find::Internal::FindToolBar"), "Verifying if: Find/Replace pane is displayed at the bottom of the view.") diff --git a/tests/system/suite_QMLS/tst_QMLS01/test.py b/tests/system/suite_QMLS/tst_QMLS01/test.py index 3e1c8d26b95..57319fe89d7 100644 --- a/tests/system/suite_QMLS/tst_QMLS01/test.py +++ b/tests/system/suite_QMLS/tst_QMLS01/test.py @@ -33,8 +33,8 @@ source("../../shared/suites_qtta.py") # go to proper line, make backup, type needed text def __beginTestSuggestions__(editorArea, lineText, textToType): # make source code backup to clipboard - type(editorArea, "") - type(editorArea, "") + type(editorArea, "") + type(editorArea, "") # place cursor to proper position and start typing if not placeCursorToLine(editorArea, lineText): return False @@ -53,8 +53,8 @@ def verifySuggestions(textToType): # restore source code from clipboard backup def __endTestSuggestions__(editorArea): - type(editorArea, "") - type(editorArea, "") + type(editorArea, "") + type(editorArea, "") def testSuggestionsAuto(lineText, textToType, expectedText, keyToUseSuggestion): # get editor diff --git a/tests/system/suite_QMLS/tst_QMLS03/test.py b/tests/system/suite_QMLS/tst_QMLS03/test.py index bec51c5100d..ee9d5970591 100644 --- a/tests/system/suite_QMLS/tst_QMLS03/test.py +++ b/tests/system/suite_QMLS/tst_QMLS03/test.py @@ -132,7 +132,7 @@ def main(): return for i in range(5): type(editorArea, "") - type(editorArea, "") + type(editorArea, "") # check if usage was properly found expectedResults = [ExpectedResult("color-animation.qml", 87, "SequentialAnimation on opacity {")] resultsView = waitForObject(":Qt Creator_Find::Internal::SearchResultTreeView") diff --git a/tests/system/suite_QMLS/tst_QMLS08/test.py b/tests/system/suite_QMLS/tst_QMLS08/test.py index 8e14e7e1b6c..415b5d13c7a 100644 --- a/tests/system/suite_QMLS/tst_QMLS08/test.py +++ b/tests/system/suite_QMLS/tst_QMLS08/test.py @@ -74,13 +74,13 @@ def main(): if not verifyIndentation(editorArea): return # cancel indentation - type(editorArea, "") + type(editorArea, "") for i in range(5): type(editorArea, "") # select unindented block - type(editorArea, "") + type(editorArea, "") # do indentation - type(editorArea, "") + type(editorArea, "") # verify invoked indentation if not verifyIndentation(editorArea): return diff --git a/tests/system/suite_editors/tst_basic_cpp_support/test.py b/tests/system/suite_editors/tst_basic_cpp_support/test.py index 22187c8d037..6534cb7436c 100644 --- a/tests/system/suite_editors/tst_basic_cpp_support/test.py +++ b/tests/system/suite_editors/tst_basic_cpp_support/test.py @@ -63,7 +63,7 @@ def main(): # - Press F2 or select from the menu: Tools / C++ / Follow Symbol under Cursor # Creator will show you the declaration of the variable. - type(cppwindow, "") + type(cppwindow, "") type(waitForObject(":*Qt Creator.findEdit_Utils::FilterLineEdit"), " xi") type(waitForObject(":*Qt Creator.findEdit_Utils::FilterLineEdit"), "") __typeAndWaitForAction__(cppwindow, "") @@ -72,7 +72,7 @@ def main(): # - Move the cursor to a function call. # - Press F2 or select from the menu: Tools / C++ / Follow Symbol under Cursor # Creator will show you the definition of the function. - type(cppwindow, "") + type(cppwindow, "") clickButton(waitForObject(":*Qt Creator_Utils::IconButton")) type(waitForObject(":*Qt Creator.findEdit_Utils::FilterLineEdit"), "freefunc2") type(waitForObject(":*Qt Creator.findEdit_Utils::FilterLineEdit"), "") @@ -94,7 +94,7 @@ def main(): else: type(cppwindow, "") - type(cppwindow, "") + type(cppwindow, "") clickButton(waitForObject(":*Qt Creator_Utils::IconButton")) type(waitForObject(":*Qt Creator.findEdit_Utils::FilterLineEdit"), "Dummy::Dummy") # Take us to the second instance diff --git a/tests/system/suite_editors/tst_qml_indent/test.py b/tests/system/suite_editors/tst_qml_indent/test.py index 9f163542892..f9ee862be52 100644 --- a/tests/system/suite_editors/tst_qml_indent/test.py +++ b/tests/system/suite_editors/tst_qml_indent/test.py @@ -65,9 +65,9 @@ def prepareQmlFile(): markText(editor, "Ctrl+End") # unmark the last line type(editor, "") - type(editor, "") + type(editor, "") for j in range(10): - type(editor, "") + type(editor, "") # assume the current editor content to be indented correctly originalText = "%s" % editor.plainText indented = editor.plainText @@ -80,10 +80,10 @@ def testReIndent(originalText): editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget") correctIndented = len(originalText) incorrectIndented = correctIndented + 4004 - type(editor, "") + type(editor, "") test.log("calling re-indent") starttime = datetime.utcnow() - type(editor, "") + type(editor, "") waitFor("len(str(editor.plainText)) in (incorrectIndented, correctIndented)", 25000) endtime = datetime.utcnow() test.xverify(originalText == str(editor.plainText), From ad239a766c33e8a3f7b4b788ba16cd408bb6871e Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 24 Jul 2014 13:53:12 +0200 Subject: [PATCH 09/10] Squish: Revive WELP04 for Squish 5.1.1+ Change-Id: If357eca07661df58484ea12d22a881d3d6564523 Reviewed-by: Robert Loehning --- tests/system/objects.map | 3 - tests/system/suite_WELP/tst_WELP04/test.py | 69 +++++++++++----------- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/tests/system/objects.map b/tests/system/objects.map index e2861281ba7..3e52c4ff081 100644 --- a/tests/system/objects.map +++ b/tests/system/objects.map @@ -124,14 +124,12 @@ :Path.Utils_BaseValidatingLineEdit {container=':qt_tabwidget_stackedwidget_QWidget' name='LineEdit' type='Utils::FancyLineEdit' visible='1'} :QML Debugging.No_QPushButton {text='No' type='QPushButton' unnamed='1' visible='1' window=':QML Debugging_QMessageBox'} :QML Debugging_QMessageBox {text='The option will only take effect if the project is recompiled. Do you want to recompile now?' type='QMessageBox' unnamed='1' visible='1'} -:QWebPage {type='QWebPage' unnamed='1'} :QmlJSTools::Internal::QmlConsoleEdit {columnIndex='0' container=':DebugModeWidget_QmlJSTools::Internal::QmlConsoleView' rowIndex='0' type='QmlJSTools::Internal::QmlConsoleEdit' unnamed='1' visible='1'} :Qt Creator.Add Bookmark_QToolButton {text='Add Bookmark' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator.Analyzer Toolbar_QDockWidget {name='Analyzer Toolbar' type='QDockWidget' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Analyzer Toolbar'} :Qt Creator.CloseFind_QToolButton {name='close' type='QToolButton' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator.Compile Output_Core::OutputWindow {type='Core::OutputWindow' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Compile Output'} :Qt Creator.DebugModeWidget_QSplitter {name='DebugModeWidget' type='QSplitter' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} -:Qt Creator.Go to Help Mode_QToolButton {text='Go to Help Mode' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator.Issues_QListView {type='QListView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Issues'} :Qt Creator.Project.Menu.File_QMenu {name='Project.Menu.File' type='QMenu'} :Qt Creator.Project.Menu.Folder_QMenu {name='Project.Menu.Folder' type='QMenu' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} @@ -166,7 +164,6 @@ :Qt Creator_Issues_Core::Internal::OutputPaneToggleButton {occurrence='1' type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator_ProFileEditorWidget {type='QmakeProjectManager::Internal::ProFileEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator_PythonEditor::EditorWidget {type='PythonEditor::Internal::EditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} -:Qt Creator_QDeclarativeView {type='QDeclarativeView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator_QHelpContentWidget {type='QHelpContentWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator_QTableView {type='QTableView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator_QmlJSEditor::Internal::QmlJSOutlineTreeView {type='QmlJSEditor::Internal::QmlJSOutlineTreeView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} diff --git a/tests/system/suite_WELP/tst_WELP04/test.py b/tests/system/suite_WELP/tst_WELP04/test.py index 753283e867b..8cb4cd7b362 100644 --- a/tests/system/suite_WELP/tst_WELP04/test.py +++ b/tests/system/suite_WELP/tst_WELP04/test.py @@ -31,47 +31,50 @@ source("../../shared/qtcreator.py") source("../../shared/suites_qtta.py") def main(): - test.log("Welcome mode is not scriptable at the moment") - return + if isQt4Build or not canTestEmbeddedQtQuick(): + test.log("Welcome mode is not available or not scriptable with this Squish version") + return # open Qt Creator startApplication("qtcreator" + SettingsPath) if not startedWithoutPluginError(): return - if not test.verify(checkIfObjectExists(getQmlItem("Text", ":Qt Creator_QDeclarativeView", False, - "text='Getting Started'")), - "Verifying: Qt Creator displays Welcome Page with Getting Started."): - mouseClick(waitForObject(getQmlItem("LinkedText", ":Qt Creator_QDeclarativeView", False, - "text='Getting Started'")), 5, 5, 0, Qt.LeftButton) - # select "Tutorials" topic - mouseClick(waitForObject(getQmlItem("LinkedText", ":Qt Creator_QDeclarativeView", False, + getStarted = getQmlItem("Button", ":WelcomePage.scrollView_ScrollView", False, + "text='Get Started Now' id='gettingStartedButton'") + if not test.verify(checkIfObjectExists(getStarted), + "Verifying: Qt Creator displays Welcome Page with Get Started Now button."): + test.fatal("Something's wrong here - leaving test.") + invokeMenuItem("File", "Exit") + return + # select "Tutorials" + mouseClick(waitForObject(getQmlItem("Button", ":WelcomePage.scrollView_ScrollView", False, "text='Tutorials'")), 5, 5, 0, Qt.LeftButton) - mouseClick(waitForObject(getQmlItem("Text", ":Qt Creator_QDeclarativeView", False, - "text='Search in Tutorials...'")), 5, 5, 0, Qt.LeftButton) - searchTutsAndExmpl = getQmlItem("TextInput", ":Qt Creator_QDeclarativeView", False) - replaceEditorContent(waitForObject(searchTutsAndExmpl), "qwerty") - test.verify(checkIfObjectExists(getQmlItem("Text", ":Qt Creator_QDeclarativeView", False, + searchTut = getQmlItem("TextField", ":WelcomePage.scrollView_ScrollView", False, + "placeholderText='Search in Tutorials...' id='lineEdit'") + mouseClick(waitForObject(searchTut), 5, 5, 0, Qt.LeftButton) + replaceEditorContent(waitForObject(searchTut), "qwerty") + test.verify(checkIfObjectExists(getQmlItem("Text", ":WelcomePage.scrollView_ScrollView", False, "text='Tutorials'")) and - checkIfObjectExists("{clip='true' container=':Qt Creator_QDeclarativeView' " - "enabled='true' id='captionItem' type='Text' unnamed='1' " - "visible='true'}", False), + checkIfObjectExists(getQmlItem("Delegate", ":WelcomePage.scrollView_ScrollView", + False, "id='delegate' radius='0' caption~='.*'"), + False), "Verifying: 'Tutorials' topic is opened and nothing is shown.") - replaceEditorContent(waitForObject(searchTutsAndExmpl), - "building and running an example application") - bldRunExmpl = getQmlItem("Text", ":Qt Creator_QDeclarativeView", True, - "text='Building and Running an Example Application'") - test.verify(checkIfObjectExists(bldRunExmpl), "Verifying: Text and Video tutorials are shown.") + replaceEditorContent(waitForObject(searchTut), "building and running an example application") + bldRunExmpl = getQmlItem("Delegate", ":WelcomePage.scrollView_ScrollView", False, + "caption='Building and Running an Example Application' " + "id='delegate' radius='0'") + test.verify(checkIfObjectExists(bldRunExmpl), "Verifying: Expected Text tutorial is shown.") # select a text tutorial mouseClick(waitForObject(bldRunExmpl), 5, 5, 0, Qt.LeftButton) - test.verify(checkIfObjectExists(":Qt Creator.Go to Help Mode_QToolButton") and - checkIfObjectExists(":DebugModeWidget.Debugger Toolbar_QDockWidget", False) and - checkIfObjectExists(":Qt Creator.Analyzer Toolbar_QDockWidget", False), - "Verifying: The tutorial is opened and located to the right part. " - "The view is in 'Edit' mode.") - # go to "Welcome" page -> "Tutorials" topic again and check the video tutorial link - switchViewTo(ViewConstants.WELCOME) - replaceEditorContent(waitForObject(searchTutsAndExmpl), "meet qt quick") - test.verify(checkIfObjectExists(getQmlItem("Text", ":Qt Creator_QDeclarativeView", True, - "text='Meet Qt Quick'")), - "Verifying: Link to the video tutorial exists.") + test.verify("Building and Running an Example" in + str(waitForObject(":Help Widget_Help::Internal::HelpWidget").windowTitle), + "Verifying: The tutorial is opened inside Help.") + # close help widget again to avoid focus issues + sendEvent("QCloseEvent", waitForObject(":Help Widget_Help::Internal::HelpWidget")) + # check a demonstration video link + replaceEditorContent(waitForObject(searchTut), "embedded linux") + test.verify(checkIfObjectExists(getQmlItem("Delegate", ":WelcomePage.scrollView_ScrollView", + False, "id='delegate' radius='0' caption=" + "'Developing Embedded Linux Applications with Qt'")), + "Verifying: Link to the expected demonstration video exists.") # exit Qt Creator invokeMenuItem("File", "Exit") From 507ad11f945b0320fcbce7cac465f0226ba73199 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 19 Aug 2014 10:19:28 +0200 Subject: [PATCH 10/10] Update qbs submodule. To HEAD of 1.3 branch. Task-number: QTCREATORBUG-12833 Change-Id: Ic19267265ccc9035a7e82f973fe894843ce054e0 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 713ee6a92c6..82c459ea14d 160000 --- a/src/shared/qbs +++ b/src/shared/qbs @@ -1 +1 @@ -Subproject commit 713ee6a92c6785d4e126df06dd0a345dcefbdd54 +Subproject commit 82c459ea14dcd8981e397038a30c501a6c3d7697