diff --git a/src/libs/3rdparty/cplusplus/Bind.cpp b/src/libs/3rdparty/cplusplus/Bind.cpp index 02675cb8bef..eb9ec735b27 100644 --- a/src/libs/3rdparty/cplusplus/Bind.cpp +++ b/src/libs/3rdparty/cplusplus/Bind.cpp @@ -1851,6 +1851,8 @@ bool Bind::visit(SimpleDeclarationAST *ast) name = elabTypeSpec->name->name; } + ensureValidClassName(&name, sourceLocation); + ForwardClassDeclaration *decl = control()->newForwardClassDeclaration(sourceLocation, name); setDeclSpecifiers(decl, type); _scope->addMember(decl); @@ -2894,20 +2896,7 @@ bool Bind::visit(ClassSpecifierAST *ast) } } - // get the unqualified class name - const QualifiedNameId *q = className->asQualifiedNameId(); - const Name *unqualifiedClassName = q ? q->name() : className; - - if (! unqualifiedClassName) // paranoia check - className = 0; - else if (! (unqualifiedClassName->isNameId() || unqualifiedClassName->isTemplateNameId())) { - translationUnit()->error(sourceLocation, "expected a class-name"); - - className = unqualifiedClassName->identifier(); - - if (q && className) - className = control()->qualifiedNameId(q->base(), className); - } + ensureValidClassName(&className, sourceLocation); } Class *klass = control()->newClass(sourceLocation, className); @@ -3136,6 +3125,24 @@ bool Bind::visit(ArrayDeclaratorAST *ast) return false; } +void Bind::ensureValidClassName(const Name **name, unsigned sourceLocation) +{ + if (!*name) + return; + + const QualifiedNameId *qName = (*name)->asQualifiedNameId(); + if (qName) + *name = qName->name(); + + if (!(*name)->isNameId() && !(*name)->isTemplateNameId()) { + translationUnit()->error(sourceLocation, "expected a class-name"); + + *name = (*name)->identifier(); + if (qName) + *name = control()->qualifiedNameId(qName->base(), *name); + } +} + int Bind::visibilityForAccessSpecifier(int tokenKind) { switch (tokenKind) { diff --git a/src/libs/3rdparty/cplusplus/Bind.h b/src/libs/3rdparty/cplusplus/Bind.h index d1fff79ea50..de0cf125573 100644 --- a/src/libs/3rdparty/cplusplus/Bind.h +++ b/src/libs/3rdparty/cplusplus/Bind.h @@ -274,6 +274,8 @@ protected: private: static const int kMaxDepth; + void ensureValidClassName(const Name **name, unsigned sourceLocation); + Scope *_scope; ExpressionTy _expression; const Name *_name; diff --git a/src/plugins/mercurial/mercurialplugin.cpp b/src/plugins/mercurial/mercurialplugin.cpp index 1dfce0a5980..4949556f5ca 100644 --- a/src/plugins/mercurial/mercurialplugin.cpp +++ b/src/plugins/mercurial/mercurialplugin.cpp @@ -549,8 +549,8 @@ void MercurialPlugin::commit() m_submitRepository = state.topLevel(); - connect(m_client, SIGNAL(parsedStatus(QList)), - this, SLOT(showCommitWidget(QList))); + connect(m_client, SIGNAL(parsedStatus(QList)), + this, SLOT(showCommitWidget(QList))); m_client->emitParsedStatus(m_submitRepository); } @@ -559,8 +559,8 @@ void MercurialPlugin::showCommitWidget(const QList &s VcsBaseOutputWindow *outputWindow = VcsBaseOutputWindow::instance(); //Once we receive our data release the connection so it can be reused elsewhere - disconnect(m_client, SIGNAL(parsedStatus(QList)), - this, SLOT(showCommitWidget(QList))); + disconnect(m_client, SIGNAL(parsedStatus(QList)), + this, SLOT(showCommitWidget(QList))); if (status.isEmpty()) { outputWindow->appendError(tr("There are no changes to commit.")); diff --git a/tests/system/objects.map b/tests/system/objects.map index 5dc463410fa..7a393d2b77d 100644 --- a/tests/system/objects.map +++ b/tests/system/objects.map @@ -59,8 +59,6 @@ :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'} -:projects.projects.pro_QModelIndex {column='0' container=':projects_QModelIndex' text='projects.pro' type='QModelIndex'} -:projects_QModelIndex {column='0' container=':Qt Creator_Utils::NavigationTreeView' text='projects' type='QModelIndex'} :qt_tabwidget_stackedwidget.QtSupport__Internal__QtVersionManager_QtSupport::Internal::QtOptionsPageWidget {container=':Options.qt_tabwidget_stackedwidget_QStackedWidget' name='QtSupport__Internal__QtVersionManager' type='QtSupport::Internal::QtOptionsPageWidget' visible='1'} :scrollArea.Create Build Configurations:_QComboBox_2 {container=':Qt Gui Application.scrollArea_QScrollArea' leftWidget=':scrollArea.Create Build Configurations:_QLabel_2' type='QComboBox' unnamed='1' visible='1'} :scrollArea.Create Build Configurations:_QLabel_2 {container=':Qt Gui Application.scrollArea_QScrollArea' text='Create build configurations:' type='QLabel' unnamed='1' visible='1'} diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py index a9d7123ab1b..c3a102e8e4a 100644 --- a/tests/system/shared/project.py +++ b/tests/system/shared/project.py @@ -153,7 +153,9 @@ def __verifyFileCreation__(path, expectedFiles): # created for this version. If it is None, all Qt versions will be used # param checks turns tests in the function on if set to True def createProject_Qt_GUI(path, projectName, qtVersion = None, checks = True): - available = __createProjectSelectType__(" Applications", "Qt Gui Application") + template = "Qt Gui Application" + available = __createProjectSelectType__(" Applications", template) + JIRA.performWorkaroundIfStillOpen(6994, JIRA.Bug.CREATOR, template, available) __createProjectSetNameAndPath__(path, projectName, checks) __selectQtVersionDesktop__(qtVersion, checks, available) diff --git a/tests/system/shared/workarounds.py b/tests/system/shared/workarounds.py index 9d3edbf271a..6f756abe0ab 100644 --- a/tests/system/shared/workarounds.py +++ b/tests/system/shared/workarounds.py @@ -221,7 +221,10 @@ class JIRA: def _workaroundCreator6994_(self, *args): if args[0] in ('Mobile Qt Application', 'Qt Gui Application', 'Qt Custom Designer Widget'): - args[1].remove('Harmattan') + if QtQuickConstants.Targets.HARMATTAN in args[1]: + args[1].remove(QtQuickConstants.Targets.HARMATTAN) + else: + args[1].remove(QtQuickConstants.getStringForTarget(QtQuickConstants.Targets.HARMATTAN)) test.xverify(False, "Removed Harmattan from expected targets.") def _workaroundCreator6853_(self, *args): diff --git a/tests/system/suite_debugger/suite.conf b/tests/system/suite_debugger/suite.conf index d776d72c7a0..17d36a99df2 100644 --- a/tests/system/suite_debugger/suite.conf +++ b/tests/system/suite_debugger/suite.conf @@ -7,6 +7,6 @@ HOOK_SUB_PROCESSES=false IMPLICITAUTSTART=0 LANGUAGE=Python OBJECTMAP=../objects.map -TEST_CASES=tst_build_new_project tst_cli_output_console +TEST_CASES=tst_build_new_project tst_cli_output_console tst_simple_debug VERSION=2 WRAPPERS=Qt diff --git a/tests/system/suite_general/shared/testdata/creator_tree.tsv b/tests/system/suite_general/shared/testdata/creator_tree.tsv deleted file mode 100644 index 7c31458f157..00000000000 --- a/tests/system/suite_general/shared/testdata/creator_tree.tsv +++ /dev/null @@ -1 +0,0 @@ -"node" "value" diff --git a/tests/system/suite_general/shared/testdata/qt_tree.tsv b/tests/system/suite_general/shared/testdata/qt_tree.tsv deleted file mode 100644 index e40c8e78f3b..00000000000 --- a/tests/system/suite_general/shared/testdata/qt_tree.tsv +++ /dev/null @@ -1,3 +0,0 @@ -"node" "value" -":projects.projects.pro_QModelIndex" "projects.pro" -":projects_QModelIndex" "projects" diff --git a/tests/system/suite_general/shared/testdata/speedcrunch_tree.tsv b/tests/system/suite_general/shared/testdata/speedcrunch_tree.tsv deleted file mode 100644 index 7c31458f157..00000000000 --- a/tests/system/suite_general/shared/testdata/speedcrunch_tree.tsv +++ /dev/null @@ -1 +0,0 @@ -"node" "value" diff --git a/tests/system/suite_general/tst_build_speedcrunch/test.py b/tests/system/suite_general/tst_build_speedcrunch/test.py index 147cc967fc8..bb10b13c714 100644 --- a/tests/system/suite_general/tst_build_speedcrunch/test.py +++ b/tests/system/suite_general/tst_build_speedcrunch/test.py @@ -18,12 +18,6 @@ def main(): openQmakeProject(SpeedCrunchPath) waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)") - # Test that some of the expected items are in the navigation tree - for row, record in enumerate(testData.dataset("speedcrunch_tree.tsv")): - node = testData.field(record, "node") - value = testData.field(record, "value") - test.compare(waitForObject(node).text, value) - fancyToolButton = waitForObject(":*Qt Creator_Core::Internal::FancyToolButton") qtVerPattern = re.compile("\d\.\d(\.\d+)?") diff --git a/tests/system/suite_general/tst_cmake_speedcrunch/test.py b/tests/system/suite_general/tst_cmake_speedcrunch/test.py index 76244acb2d5..da99b28e5df 100644 --- a/tests/system/suite_general/tst_cmake_speedcrunch/test.py +++ b/tests/system/suite_general/tst_cmake_speedcrunch/test.py @@ -23,12 +23,6 @@ def main(): return waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)") - # Test that some of the expected items are in the navigation tree - for row, record in enumerate(testData.dataset("speedcrunch_tree.tsv")): - node = testData.field(record, "node") - value = testData.field(record, "value") - test.compare(findObject(node).text, value) - # Invoke a rebuild of the application invokeMenuItem("Build", "Rebuild All") diff --git a/tests/system/suite_general/tst_openqt_creator/test.py b/tests/system/suite_general/tst_openqt_creator/test.py index 77966b3eaad..2fd8983796a 100644 --- a/tests/system/suite_general/tst_openqt_creator/test.py +++ b/tests/system/suite_general/tst_openqt_creator/test.py @@ -15,17 +15,6 @@ def main(): # Wait for parsing to complete waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)", 300000) - # Test that some of the expected items are in the navigation tree - for row, record in enumerate(testData.dataset("creator_tree.tsv")): - node = testData.field(record, "node") - value = testData.field(record, "value") - test.compare(waitForObject(node).text, value) - - for row, record in enumerate(testData.dataset("speedcrunch_tree.tsv")): - node = testData.field(record, "node") - value = testData.field(record, "value") - test.compare(waitForObject(node).text, value) - # Now check some basic lookups in the search box selectFromLocator(": Qlist::QList", "QList::QList") test.compare(wordUnderCursor(waitForObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget")), "QList")