From dbf48009cc9ac78b99f9c0f01210f38f9ca41f77 Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Mon, 10 Oct 2011 13:10:34 +0200 Subject: [PATCH 1/4] Squish: Don't add temporary files to git Change-Id: Ia076166a867c1c1a9031ea6515143876f4a73d34 Reviewed-on: http://codereview.qt-project.org/6263 Sanity-Review: Qt Sanity Bot Reviewed-by: Christian Stenger --- tests/system/objects.map | 1 + tests/system/shared/project.py | 2 ++ tests/system/suite_qtquick/tst_qtquick_creation3/test.py | 1 + tests/system/suite_qtquick/tst_qtquick_creation4/test.py | 1 + 4 files changed, 5 insertions(+) diff --git a/tests/system/objects.map b/tests/system/objects.map index 8001ac4392a..523991e592a 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 21194ca8594..ee7301b3e61 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", "") 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", "") 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 37e976aca5b..e7c191f74c2 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", "") 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 0dfa6e64049..1861aa25583 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", "") clickButton(waitForObject("{type='QPushButton' text~='(Finish|Done)' visible='1'}", 20000)) def cleanup(): From 42b56788ea347f1e4f4508db6737e69e37047235 Mon Sep 17 00:00:00 2001 From: Daniel Teske Date: Mon, 10 Oct 2011 13:31:54 +0200 Subject: [PATCH 2/4] Fix a crash with cmake and no toolchains configured Task-number: QTCREATORBUG-6252 Change-Id: I8b7237c23cd70fe8dd20724ffb3ebdef18f5bf13 Reviewed-on: http://codereview.qt-project.org/6320 Reviewed-by: Daniel Teske Sanity-Review: Qt Sanity Bot --- src/plugins/cmakeprojectmanager/cmakeproject.cpp | 8 +++++--- src/plugins/cmakeprojectmanager/makestep.cpp | 5 ++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.cpp b/src/plugins/cmakeprojectmanager/cmakeproject.cpp index f63849d7227..ae7fc11f34b 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 allHeaderPaths = activeBC->toolChain()->systemHeaderPaths(); + QList 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 d19610c2641..d3ef7c34182 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()); From 918f5a0e2d4ab966245f41a4c42af039f4fba998 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Mon, 10 Oct 2011 13:36:00 +0200 Subject: [PATCH 3/4] QmlJS: Fix bug in context property extraction. Skip forward declarations instead of giving up. Change-Id: Id3a30296a7cefc4ef255d03727557dee6a37c362 Reviewed-on: http://codereview.qt-project.org/6321 Reviewed-by: Leandro T. C. Melo Sanity-Review: Qt Sanity Bot --- src/plugins/qmljstools/qmljsfindexportedcpptypes.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/plugins/qmljstools/qmljsfindexportedcpptypes.cpp b/src/plugins/qmljstools/qmljsfindexportedcpptypes.cpp index b1f4acc2dc9..7b0550c011a 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; + } } } } From df4b9340866e5071e960682ad293ab0eb125db13 Mon Sep 17 00:00:00 2001 From: Fawzi Mohamed Date: Thu, 6 Oct 2011 18:04:29 +0200 Subject: [PATCH 4/4] gdb: workaround to lookup anonymous namespaces work around for http://sourceware.org/bugzilla/show_bug.cgi?id=13269 Change-Id: Ibfaf409d48146bbed09c0e563c140a1b7a712d4f Reviewed-by: hjk Reviewed-on: http://codereview.qt-project.org/6179 Reviewed-by: Fawzi Mohamed Sanity-Review: Qt Sanity Bot --- share/qtcreator/dumper/dumper.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/share/qtcreator/dumper/dumper.py b/share/qtcreator/dumper/dumper.py index 7eec352e299..01b3bfdee6e 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("") + if pos != -1: + # See http://sourceware.org/bugzilla/show_bug.cgi?id=13269 + return lookupType(typestring.replace("", "(anonymous namespace)")) # See http://sourceware.org/bugzilla/show_bug.cgi?id=11912 exp = "(class '%s'*)0" % ts try: