diff --git a/share/qtcreator/dumper/dumper.py b/share/qtcreator/dumper/dumper.py index 7eec352e2997f12eb015450284e49d078fb5a36f..01b3bfdee6e1d6c3179801a01ef6261359deb78b 100644 --- a/share/qtcreator/dumper/dumper.py +++ b/share/qtcreator/dumper/dumper.py @@ -147,6 +147,11 @@ def lookupType(typestring): type = gdb.lookup_type(ts) except RuntimeError, error: #warn("LOOKING UP '%s': %s" % (ts, error)) + if type is None: + pos = typestring.find("<unnamed>") + if pos != -1: + # See http://sourceware.org/bugzilla/show_bug.cgi?id=13269 + return lookupType(typestring.replace("<unnamed>", "(anonymous namespace)")) # See http://sourceware.org/bugzilla/show_bug.cgi?id=11912 exp = "(class '%s'*)0" % ts try: diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.cpp b/src/plugins/cmakeprojectmanager/cmakeproject.cpp index f63849d7227ccc58e508883627f99dc433911f27..ae7fc11f34b491cfaba6d6abe58bc81498cca644 100644 --- a/src/plugins/cmakeprojectmanager/cmakeproject.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeproject.cpp @@ -288,7 +288,9 @@ bool CMakeProject::parseCMakeLists() allIncludePaths.append(cbpparser.includeFiles()); QStringList allFrameworkPaths; - QList<ProjectExplorer::HeaderPath> allHeaderPaths = activeBC->toolChain()->systemHeaderPaths(); + QList<ProjectExplorer::HeaderPath> allHeaderPaths; + if (activeBC->toolChain()) + allHeaderPaths = activeBC->toolChain()->systemHeaderPaths(); foreach (const ProjectExplorer::HeaderPath &headerPath, allHeaderPaths) { if (headerPath.kind() == ProjectExplorer::HeaderPath::FrameworkHeaderPath) allFrameworkPaths.append(headerPath.path()); @@ -302,12 +304,12 @@ bool CMakeProject::parseCMakeLists() CPlusPlus::CppModelManagerInterface::ProjectInfo pinfo = modelmanager->projectInfo(this); if (pinfo.includePaths != allIncludePaths || pinfo.sourceFiles != m_files - || pinfo.defines != activeBC->toolChain()->predefinedMacros() + || pinfo.defines != (activeBC->toolChain() ? activeBC->toolChain()->predefinedMacros() : QByteArray()) || pinfo.frameworkPaths != allFrameworkPaths) { pinfo.includePaths = allIncludePaths; // TODO we only want C++ files, not all other stuff that might be in the project pinfo.sourceFiles = m_files; - pinfo.defines = activeBC->toolChain()->predefinedMacros(); // TODO this is to simplistic + pinfo.defines = (activeBC->toolChain() ? activeBC->toolChain()->predefinedMacros() : QByteArray()); // TODO this is to simplistic pinfo.frameworkPaths = allFrameworkPaths; modelmanager->updateProjectInfo(pinfo); m_codeModelFuture.cancel(); diff --git a/src/plugins/cmakeprojectmanager/makestep.cpp b/src/plugins/cmakeprojectmanager/makestep.cpp index d19610c264171b43480c1a8313e13702dfb02042..d3ef7c34182c482c9f0a878caeb1f86475d57355 100644 --- a/src/plugins/cmakeprojectmanager/makestep.cpp +++ b/src/plugins/cmakeprojectmanager/makestep.cpp @@ -142,7 +142,10 @@ bool MakeStep::init() pp->setMacroExpander(bc->macroExpander()); pp->setEnvironment(bc->environment()); pp->setWorkingDirectory(bc->buildDirectory()); - pp->setCommand(bc->toolChain()->makeCommand()); + if (bc->toolChain()) + pp->setCommand(bc->toolChain()->makeCommand()); + else + pp->setCommand(QLatin1String("make")); pp->setArguments(arguments); setOutputParser(new ProjectExplorer::GnuMakeParser()); diff --git a/src/plugins/qmljstools/qmljsfindexportedcpptypes.cpp b/src/plugins/qmljstools/qmljsfindexportedcpptypes.cpp index b1f4acc2dc92dc63cbb68b6934b429dcc134d302..7b0550c011ad60c85390fef7d239c8dd29f6672e 100644 --- a/src/plugins/qmljstools/qmljsfindexportedcpptypes.cpp +++ b/src/plugins/qmljstools/qmljsfindexportedcpptypes.cpp @@ -659,10 +659,13 @@ static void buildContextProperties( typeScope = scope; // incorrect but may be an ok fallback ClassOrNamespace *binding = typeOf.context().lookupType(namedType->name(), typeScope); if (binding && !binding->symbols().isEmpty()) { - Class *klass = binding->symbols().first()->asClass(); - if (klass) { - FakeMetaObject::Ptr fmo = buildFakeMetaObject(klass, fakeMetaObjects, typeOf); - typeName = fmo->className(); + // find the best 'Class' symbol + for (int i = binding->symbols().size() - 1; i >= 0; --i) { + if (Class *klass = binding->symbols().at(i)->asClass()) { + FakeMetaObject::Ptr fmo = buildFakeMetaObject(klass, fakeMetaObjects, typeOf); + typeName = fmo->className(); + break; + } } } } diff --git a/tests/system/objects.map b/tests/system/objects.map index 8001ac4392abae3f77c4d3d484a94fab13c117e2..523991e592a6c2fd585d44e44623b5a0ac434590 100644 --- a/tests/system/objects.map +++ b/tests/system/objects.map @@ -38,6 +38,7 @@ :Qt Gui Application_Qt4ProjectManager::Internal::GuiAppWizardDialog {type='Qt4ProjectManager::Internal::GuiAppWizardDialog' unnamed='1' visible='1' windowTitle='Qt Gui Application'} :QtCreator.MenuBar_ProjectExplorer::Internal::MiniProjectTargetSelector {type='ProjectExplorer::Internal::MiniProjectTargetSelector'} :QtCreator.MenuBar_ProjectExplorer::Internal::ProjectListWidget {type='ProjectExplorer::Internal::ProjectListWidget' window=':QtCreator.MenuBar_ProjectExplorer::Internal::MiniProjectTargetSelector'} +:addToVersionControlComboBox_QComboBox {name='addToVersionControlComboBox' type='QComboBox' visible='1'} :formFileLineEdit_Utils::FileNameValidatingLineEdit {buddy=':Qt Gui Application.Form file:_QLabel' name='formFileLineEdit' type='Utils::FileNameValidatingLineEdit' visible='1'} :frame.nameLineEdit_Utils::ProjectNameValidatingLineEdit {container=':Qt Gui Application.frame_QFrame' name='nameLineEdit' type='Utils::ProjectNameValidatingLineEdit' visible='1'} :frame_Utils::BaseValidatingLineEdit {container=':Qt Gui Application.frame_QFrame' type='Utils::BaseValidatingLineEdit' unnamed='1' visible='1'} diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py index 21194ca859493ed7b0f04bf994f806f154840ab2..ee7301b3e61b13974765ed2061847a2ecfda65b3 100644 --- a/tests/system/shared/project.py +++ b/tests/system/shared/project.py @@ -112,6 +112,7 @@ def createProject_Qt_GUI(path, projectName, qtVersion, checks): test.verify(ui_found > cpp_found, "'" + ui_file + "' found at index " + str(ui_found)) test.verify(pro_found > ui_found, "'" + pro_file + "' found at index " + str(pro_found)) + selectFromCombo(":addToVersionControlComboBox_QComboBox", "<None>") clickButton(waitForObject(":Qt Gui Application.Finish_QPushButton")) if checks: @@ -159,4 +160,5 @@ def createNewQtQuickApplication(workingDir, projectName = None, templateFile = N chooseDestination(destination) snooze(1) clickButton(nextButton) + selectFromCombo(":addToVersionControlComboBox_QComboBox", "<None>") clickButton(waitForObject("{type='QPushButton' text~='(Finish|Done)' visible='1'}", 20000)) diff --git a/tests/system/suite_qtquick/tst_qtquick_creation3/test.py b/tests/system/suite_qtquick/tst_qtquick_creation3/test.py index 37e976aca5b5ab8b27b6bd4e85360cba29b63d74..e7c191f74c298a334d74043e48c7e7f120f3b062 100644 --- a/tests/system/suite_qtquick/tst_qtquick_creation3/test.py +++ b/tests/system/suite_qtquick/tst_qtquick_creation3/test.py @@ -30,6 +30,7 @@ def createNewQtQuickUI(): clickButton(cbDefaultLocation) # now there's the 'untitled' project inside a temporary directory - step forward...! clickButton(waitForObject("{text~='(Next.*|Continue)' type='QPushButton' visible='1'}", 20000)) + selectFromCombo(":addToVersionControlComboBox_QComboBox", "<None>") clickButton(waitForObject("{type='QPushButton' text~='(Finish|Done)' visible='1'}", 20000)) def cleanup(): diff --git a/tests/system/suite_qtquick/tst_qtquick_creation4/test.py b/tests/system/suite_qtquick/tst_qtquick_creation4/test.py index 0dfa6e64049040659f20c25d3a8141a51b9dfffa..1861aa25583fcfecb9adacc0b8f86e699d6c674b 100644 --- a/tests/system/suite_qtquick/tst_qtquick_creation4/test.py +++ b/tests/system/suite_qtquick/tst_qtquick_creation4/test.py @@ -45,6 +45,7 @@ def createNewQmlExtension(): "type='QLineEdit' unnamed='1' visible='1'}", 20000) replaceEditorContent(uriLineEd, "com.nokia.test.qmlcomponents") clickButton(nextButton) + selectFromCombo(":addToVersionControlComboBox_QComboBox", "<None>") clickButton(waitForObject("{type='QPushButton' text~='(Finish|Done)' visible='1'}", 20000)) def cleanup():