diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppet.pri b/share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppet.pri index 0834e574c7eca3e0b8f80563ae7ff3f0223fb36b..894234d9ee928ae1c52e692be6386dcc850e4ffa 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppet.pri +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppet.pri @@ -1,6 +1,6 @@ QT += core gui widgets qml quick network v8 -contains (QT_CONFIG, webkit) { +!isEmpty(QT.webkit.name) { QT += webkit } diff --git a/share/qtcreator/snippets/cpp.xml b/share/qtcreator/snippets/cpp.xml index 05ce9bd89fca07c87780b6f21dcebadae49459c7..f6e90c9d6120e9d759a47dda0ec4373739eee983 100644 --- a/share/qtcreator/snippets/cpp.xml +++ b/share/qtcreator/snippets/cpp.xml @@ -71,5 +71,5 @@ case $value$: default: break; } -Q_PROPERTY($name$ READ $name$ WRITE set$name$ NOTIFY $name$Changed); +Q_PROPERTY($type$ $name$ READ $name$ WRITE set$name$ NOTIFY $name$Changed); diff --git a/share/qtcreator/templates/wizards/qtquick1-extension/wizard.xml b/share/qtcreator/templates/wizards/qtquick1-extension/wizard.xml index 9b29846880964332e1f973121a7c36f5c1c0054a..ecfacde25994a20952114cf79998ff37fac29353 100644 --- a/share/qtcreator/templates/wizards/qtquick1-extension/wizard.xml +++ b/share/qtcreator/templates/wizards/qtquick1-extension/wizard.xml @@ -39,7 +39,9 @@ leave room for the Qt 4 target page. id="QtQuick1ExtensionPlugin" category="G.Libraries" featuresRequired="QtSupport.Wizards.FeatureQtQuick,QtSupport.Wizards.FeatureQtQuick.1"> lib.png - Creates a C++ plugin that makes it possible to offer extensions that can be loaded dynamically into applications using the QDeclarativeEngine class. + Creates a C++ plugin that makes it possible to offer extensions that can be loaded dynamically into applications using the QDeclarativeEngine class. + + Requires <b>Qt 4.7.0</b> or newer. Qt Quick 1 Extension Plugin Libraries diff --git a/share/qtcreator/templates/wizards/qtquick2-extension/wizard.xml b/share/qtcreator/templates/wizards/qtquick2-extension/wizard.xml index bc0d297553ff76918874b423ed46812bc032f74c..5a572d2bd82c22fe883ba858acc8a1432a661a04 100644 --- a/share/qtcreator/templates/wizards/qtquick2-extension/wizard.xml +++ b/share/qtcreator/templates/wizards/qtquick2-extension/wizard.xml @@ -39,7 +39,9 @@ leave room for the Qt 4 target page. id="QtQuick2ExtensionPlugin" category="G.Libraries" featuresRequired="QtSupport.Wizards.FeatureQtQuick,QtSupport.Wizards.FeatureQtQuick.2"> lib.png - Creates a C++ plugin that makes it possible to offer extensions that can be loaded dynamically into applications using the QQmlEngine class. + Creates a C++ plugin that makes it possible to offer extensions that can be loaded dynamically into applications using the QQmlEngine class. + + Requires <b>Qt 5.0</b> or newer. Qt Quick 2 Extension Plugin Libraries diff --git a/src/plugins/debugger/debuggerkitinformation.cpp b/src/plugins/debugger/debuggerkitinformation.cpp index 0305bb50a210d110732941950d73f2b3e111ff3b..60652509a5a57075eebab6f03df44868301f0c94 100644 --- a/src/plugins/debugger/debuggerkitinformation.cpp +++ b/src/plugins/debugger/debuggerkitinformation.cpp @@ -295,6 +295,8 @@ static const char binaryKeyC[] = "Binary"; DebuggerKitInformation::DebuggerItem DebuggerKitInformation::variantToItem(const QVariant &v) { DebuggerItem result; + if (v.isNull()) + return result; if (v.type() == QVariant::String) { // Convert legacy config items, remove later. const QString binary = v.toString(); result.binary = Utils::FileName::fromString(binary); diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro index a6cba4d49938f89f02528dc98b07d2a5ed61260f..4dd6923123de2b682ea09d771bf802a3e49b2d74 100644 --- a/src/plugins/plugins.pro +++ b/src/plugins/plugins.pro @@ -64,7 +64,7 @@ linux-* { include(../../qtcreator.pri) -contains(QT_CONFIG, declarative) { +contains(QT_CONFIG, declarative)|!isEmpty(QT.declarative.name) { SUBDIRS += \ plugin_qmlprojectmanager \ plugin_qmlprofiler diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorscene.cpp b/src/plugins/qmldesigner/components/formeditor/formeditorscene.cpp index 0d2fafc4e600854b8e05e87a9faf12c44aa30dcc..245899f1997be9b5932ef6cf611c831b8c82fc17 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditorscene.cpp +++ b/src/plugins/qmldesigner/components/formeditor/formeditorscene.cpp @@ -78,6 +78,7 @@ void FormEditorScene::setupScene() m_formLayerItem = new LayerItem(this); m_manipulatorLayerItem = new LayerItem(this); m_manipulatorLayerItem->setZValue(1.0); + m_manipulatorLayerItem->setFlag(QGraphicsItem::ItemClipsChildrenToShape, false); m_formLayerItem->setZValue(0.0); m_formLayerItem->setFlag(QGraphicsItem::ItemClipsChildrenToShape, false); } diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp b/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp index cf994e80bc3d6b934daf5ca3c778a2c6586b3959..dfc6de76224e17787e39608d03cf74428db49f40 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp +++ b/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp @@ -178,11 +178,15 @@ void FormEditorView::modelAboutToBeDetached(Model *model) m_moveTool->clear(); m_resizeTool->clear(); m_dragTool->clear(); + foreach (AbstractCustomTool *customTool, m_customToolList) + customTool->clear(); m_scene->clearFormEditorItems(); m_formEditorWidget->updateActions(); m_formEditorWidget->resetView(); scene()->resetScene(); + m_currentTool = m_selectionTool; + QmlModelView::modelAboutToBeDetached(model); } diff --git a/tests/manual/debugger/simple/simple_test_app.pro b/tests/manual/debugger/simple/simple_test_app.pro index aad44498a0c80d478c1b9e8c1bef0a74496f4062..ffe5812f96426ce33afdaee13e5517f545485aaa 100644 --- a/tests/manual/debugger/simple/simple_test_app.pro +++ b/tests/manual/debugger/simple/simple_test_app.pro @@ -10,7 +10,7 @@ QT += network QT += script QT += xml -contains(QT_CONFIG, webkit) { +contains(QT_CONFIG, webkit)|!isEmpty(QT.webkit.name) { QT += webkit greaterThan(QT_MAJOR_VERSION, 4) { QT += webkitwidgets diff --git a/tests/system/README b/tests/system/README index 7564980161753d4cbc9a032cf5e5772a15b91ca6..203c9212b29473e15cabebf940c4ce025bbd446a 100644 --- a/tests/system/README +++ b/tests/system/README @@ -11,7 +11,10 @@ On Linux/Mac this is ~/QtSDK, and on Windows this is C:\QtSDK. After installing the QtSDK you should use the package manager of the QtSDK (SDKMaintenanceTool) to add some more packages. You'll need at least Desktop Qt versions 4.7.4, 4.8.0, Harmattan stuff (except QEmu), Maemo Toolchain, Qt Examples, Simulator, Documentation files. -Third - you'll have to provide some additional repositories (and for the hooking into subprocesses even some more Squish bundles, see below). +Third - some of the test suites/test cases expect Qt 5.0.1 installed in its default location. +On Linux/Mac this is ~/Qt5.0.1, and on Windows this is C:\Qt\5.0.1. + +Fourth - you'll have to provide some additional repositories (and for the hooking into subprocesses even some more Squish bundles, see below). These additional repositories are located inside ~/QtSDK/src or C:\QtSDK\src (depending on the OS you're on). You can also just provide them inside a different folder and specify the folder with the environment variable SYSTEST_SRCPATH. This folder must contain the following: @@ -20,7 +23,7 @@ This folder must contain the following: * a speedcrunch repository (or source copy) inside 'creator-test-data' named 'speedcrunch' * additional Squish versions for hooking into subprocesses inside different folders inside 'creator-test-data' following the information below -Fourth - you'll have to make sure that some needed tools are available (no matter on which OS you're on). +Fifth - you'll have to make sure that some needed tools are available (no matter on which OS you're on). * cmake * wget or curl Normally it should be okay to just install them as usual and add their executables' path(s) to the PATH variable. diff --git a/tests/system/settings/unix/QtProject/qtcreator/profiles.xml b/tests/system/settings/unix/QtProject/qtcreator/profiles.xml index a58ef9831de535f2401170055abd28365de8d964..341dcd6bdaacaaf31ae27b21f283b282dec0261b 100644 --- a/tests/system/settings/unix/QtProject/qtcreator/profiles.xml +++ b/tests/system/settings/unix/QtProject/qtcreator/profiles.xml @@ -1,14 +1,15 @@ - + Profile.0 false + /usr/bin/gdb - Desktop Device + Desktop Device Desktop ProjectExplorer.ToolChain.Gcc:{c3f59b87-6997-4bd8-8067-ee04dc536371} @@ -18,6 +19,7 @@ :///DESKTOP/// {4d9ea3ed-a7f0-4b0e-885f-da3b82931988} Desktop 474 GCC + false @@ -25,8 +27,9 @@ false + /usr/bin/gdb - Desktop Device + Desktop Device Desktop ProjectExplorer.ToolChain.Gcc:{c3f59b87-6997-4bd8-8067-ee04dc536371} @@ -36,6 +39,7 @@ :///DESKTOP/// {68d379f6-357c-42a6-83c6-7743840db4ea} Qt Simulator + false @@ -43,6 +47,7 @@ false + /usr/bin/gdb {68a75dff-5ec6-40cb-884f-8f383ed2ebb2} Maemo5OsType @@ -54,6 +59,7 @@ :///DESKTOP/// {f559999e-8f5d-4246-9321-ea9d1c444c85} Fremantle + false @@ -61,6 +67,7 @@ false + /usr/bin/gdb 1 @@ -75,6 +82,7 @@ :///DESKTOP/// {744799ff-3430-41e1-ad7d-d76c50c1c621} Harmattan + false @@ -82,6 +90,7 @@ false + /usr/bin/gdb 1 @@ -96,11 +105,32 @@ :///DESKTOP/// {f16848fc-b615-43b5-b0cc-16a9f57fb573} Embedded Linux + false + + + + Profile.5 + + false + + + /usr/bin/gdb + Desktop Device + Desktop + + ProjectExplorer.ToolChain.Gcc:{c3f59b87-6997-4bd8-8067-ee04dc536371} + + 7 + + :///DESKTOP/// + {9c58fcfd-9e49-4a08-971f-a677dc9ce185} + Desktop 501 default + false Profile.Count - 5 + 6 Profile.Default diff --git a/tests/system/settings/unix/QtProject/qtcreator/qtversion.xml b/tests/system/settings/unix/QtProject/qtcreator/qtversion.xml index fed739fd8d880a00e7854862681b7143afb9811a..6ec99af4c7cd08f3e2141ce68d0c8ad08db76eb2 100644 --- a/tests/system/settings/unix/QtProject/qtcreator/qtversion.xml +++ b/tests/system/settings/unix/QtProject/qtcreator/qtversion.xml @@ -52,6 +52,16 @@ false + + QtVersion.5 + + 7 + Desktop Qt 5.0.1 (SQUISH_DEFAULT_COMPILER) + ~/Qt5.0.1/5.0.1/SQUISH_DEFAULT_COMPILER/bin/qmake + Qt4ProjectManager.QtVersion.Desktop + false + + Version 1 diff --git a/tests/system/settings/unix/QtProject/qtcreator/toolchains.xml b/tests/system/settings/unix/QtProject/qtcreator/toolchains.xml index a2525c73ac07224f2b6c4965bf85fadf1184619c..5c9c9b48c8f900825498905776a52e1da8a4a405 100644 --- a/tests/system/settings/unix/QtProject/qtcreator/toolchains.xml +++ b/tests/system/settings/unix/QtProject/qtcreator/toolchains.xml @@ -9,6 +9,7 @@ x86-linux-generic-elf-64bit x86-linux-generic-elf-32bit + x86-macos-generic-mach_o-64bit SET_BY_SQUISH false diff --git a/tests/system/settings/windows/QtProject/qtcreator/profiles.xml b/tests/system/settings/windows/QtProject/qtcreator/profiles.xml index ef02ba7560771dc7e5092926410d66fcf7852027..4514ec2409ae46d0a6dde771cd367d1c777e3cde 100644 --- a/tests/system/settings/windows/QtProject/qtcreator/profiles.xml +++ b/tests/system/settings/windows/QtProject/qtcreator/profiles.xml @@ -1,14 +1,15 @@ - + Profile.0 false + C:/QtSDK/pythongdb/python_2.7based/gdb-i686-pc-mingw32.exe - Desktop Device + Desktop Device Desktop ProjectExplorer.ToolChain.Mingw:{2729dd3e-84f5-42e1-aed1-6a27163346ce} @@ -18,6 +19,7 @@ :///DESKTOP/// {897290fe-c35a-4e5e-b5e2-d8e448e2aed1} Desktop 474 GCC + false @@ -25,8 +27,9 @@ false + C:/QtSDK/pythongdb/python_2.7based/gdb-i686-pc-mingw32.exe - Desktop Device + Desktop Device Desktop ProjectExplorer.ToolChain.Mingw:{2729dd3e-84f5-42e1-aed1-6a27163346ce} @@ -36,6 +39,7 @@ :///DESKTOP/// {0ce9f69f-0f60-4b04-8691-c328ee5bfe14} Qt Simulator + false @@ -43,6 +47,7 @@ false + C:/QtSDK/pythongdb/python_2.7based/gdb-arm-none-linux-gnueabi.exe {0d112162-56a5-40cb-a911-e0545489da5c} Maemo5OsType @@ -54,6 +59,7 @@ :///DESKTOP/// {618722a5-c008-4869-9404-07f755973496} Fremantle + false @@ -61,6 +67,7 @@ false + C:\QtSDK\pythongdb\python_2.7based\gdb-arm-none-linux-gnueabi.exe 1 @@ -75,6 +82,7 @@ :///DESKTOP/// {3800d54f-6c86-4cd1-88a9-7456bbef6dce} Harmattan + false @@ -82,11 +90,12 @@ false + C:\Program Files\Debugging Tools for Windows (x64)\cdb.exe 4 - Desktop Device + Desktop Device Desktop ProjectExplorer.ToolChain.Msvc:{b86e54dd-debd-409c-b4d7-1a5c710eaa37} @@ -96,11 +105,35 @@ :///DESKTOP/// {9b35bbe6-25a7-4cce-ba07-487c795f5265} Desktop 474 MSVC2008 + false + + + + Profile.5 + + false + + + + C:\Program Files\Debugging Tools for Windows (x64)\cdb.exe + 4 + + Desktop Device + Desktop + + ProjectExplorer.ToolChain.Msvc:{1186dad9-c485-4f69-b7e1-aff54c89ecb2} + + 18 + + :///DESKTOP/// + {175f6238-a585-4e62-b2d3-d15e90296bb6} + Desktop 501 default + false Profile.Count - 5 + 6 Profile.Default diff --git a/tests/system/settings/windows/QtProject/qtcreator/qtversion.xml b/tests/system/settings/windows/QtProject/qtcreator/qtversion.xml index 83ca6e82cf581e71702877fa08bd345fcc7a2370..128df0933e5352bdd0ec51f09dabbcdbced120b2 100644 --- a/tests/system/settings/windows/QtProject/qtcreator/qtversion.xml +++ b/tests/system/settings/windows/QtProject/qtcreator/qtversion.xml @@ -1,6 +1,6 @@ - + QtVersion.0 @@ -22,26 +22,6 @@ false - - QtVersion.10 - - 15 - Harmattan Target (Qt SDK) - c:/qtsdk/madde/targets/harmattan_10.2011.34-1/bin/qmake.exe - Qt4ProjectManager.QtVersion.Maemo - false - - - - QtVersion.11 - - 16 - Qt for Fremantle PR1.3 Devices (Qt SDK) - c:/qtsdk/maemo/4.6.2/targets/fremantle-pr13/bin/qmake.exe - Qt4ProjectManager.QtVersion.Maemo - false - - QtVersion.2 @@ -92,6 +72,36 @@ false + + QtVersion.7 + + 15 + Harmattan Target (Qt SDK) + c:/qtsdk/madde/targets/harmattan_10.2011.34-1/bin/qmake.exe + Qt4ProjectManager.QtVersion.Maemo + false + + + + QtVersion.8 + + 16 + Qt for Fremantle PR1.3 Devices (Qt SDK) + c:/qtsdk/maemo/4.6.2/targets/fremantle-pr13/bin/qmake.exe + Qt4ProjectManager.QtVersion.Maemo + false + + + + QtVersion.9 + + 18 + Desktop Qt 5.0.1 (msvc2010) + C:/Qt/5.0.1/5.0.1/msvc2010/bin/qmake.exe + Qt4ProjectManager.QtVersion.Desktop + false + + Version 1 diff --git a/tests/system/settings/windows/QtProject/qtcreator/toolchains.xml b/tests/system/settings/windows/QtProject/qtcreator/toolchains.xml index 27bae2abb87e2ef8f4bdfd77284781e2c9c7a12f..e5d2fa114d95933462dbcb9d179e80f208c39737 100644 --- a/tests/system/settings/windows/QtProject/qtcreator/toolchains.xml +++ b/tests/system/settings/windows/QtProject/qtcreator/toolchains.xml @@ -1,6 +1,6 @@ - + ToolChain.0 @@ -43,6 +43,17 @@ ToolChain.3 + + x86-windows-msvc2010-pe-32bit + c:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/vcvarsall.bat + x86 + true + Microsoft Visual C++ Compiler 10.0 (x86) + ProjectExplorer.ToolChain.Msvc:{1186dad9-c485-4f69-b7e1-aff54c89ecb2} + + + + ToolChain.4 x86-windows-msvc2008-pe-32bit c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat @@ -53,7 +64,7 @@ ToolChain.Count - 4 + 5 Version diff --git a/tests/system/shared/classes.py b/tests/system/shared/classes.py index 96b1cc137ef9a14d53f8f4fc49bc80c1c2498289..e9ca05051ad760b0cf5435bc696689684a680b76 100644 --- a/tests/system/shared/classes.py +++ b/tests/system/shared/classes.py @@ -12,6 +12,7 @@ class QtQuickConstants: HARMATTAN = 8 EMBEDDED_LINUX = 16 DESKTOP_474_MSVC2008 = 32 + DESKTOP_501_DEFAULT = 64 @staticmethod def desktopTargetClasses(): @@ -45,6 +46,8 @@ class QtQuickConstants: return "Embedded Linux" elif target==QtQuickConstants.Targets.DESKTOP_474_MSVC2008: return "Desktop 474 MSVC2008" + elif target==QtQuickConstants.Targets.DESKTOP_501_DEFAULT: + return "Desktop 501 default" else: return None diff --git a/tests/system/shared/hook_utils.py b/tests/system/shared/hook_utils.py index 79f627153aefe3eb1448bfb53cff54ca24038051..fca63726a1995d2974ed7afb8e15c0fe4b81fb89 100644 --- a/tests/system/shared/hook_utils.py +++ b/tests/system/shared/hook_utils.py @@ -160,15 +160,18 @@ def __getMkspecFromQMakeConf__(qmakeConf): return os.path.basename(mkspec) def __getMkspecFromQmake__(qmakeCall): - QmakeConfPath = getOutputFromCmdline("%s -query QMAKE_MKSPECS" % qmakeCall).strip() - for tmpPath in QmakeConfPath.split(os.pathsep): - tmpPath = tmpPath + os.sep + "default" + os.sep +"qmake.conf" - result = __getMkspecFromQMakeConf__(tmpPath) - if result != None: - return result.strip() - test.warning("Could not find qmake.conf inside provided QMAKE_MKSPECS path", - "QMAKE_MKSPECS returned: '%s'" % QmakeConfPath) - return None + if getOutputFromCmdline("%s -query QT_VERSION" % qmakeCall).strip().startswith("5."): + return getOutputFromCmdline("%s -query QMAKE_XSPEC" % qmakeCall).strip() + else: + QmakeConfPath = getOutputFromCmdline("%s -query QMAKE_MKSPECS" % qmakeCall).strip() + for tmpPath in QmakeConfPath.split(os.pathsep): + tmpPath = tmpPath + os.sep + "default" + os.sep +"qmake.conf" + result = __getMkspecFromQMakeConf__(tmpPath) + if result != None: + return result.strip() + test.warning("Could not find qmake.conf inside provided QMAKE_MKSPECS path", + "QMAKE_MKSPECS returned: '%s'" % QmakeConfPath) + return None # helper that double clicks the table view at specified row and column # returns the QExpandingLineEdit (the editable table cell) diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py index aea7743718472fa999de7bada5d6e5fbaa85fcfc..ed3d3bc456727cd44ef3a531619dc8ba5e3b6d5d 100644 --- a/tests/system/shared/project.py +++ b/tests/system/shared/project.py @@ -273,7 +273,7 @@ def __chooseTargets__(targets=QtQuickConstants.Targets.DESKTOP_474_GCC, availabl available = availableTargets else: # following targets depend on the build environment - added for further/later tests - available = [QtQuickConstants.Targets.DESKTOP_474_GCC, + available = [QtQuickConstants.Targets.DESKTOP_474_GCC, QtQuickConstants.Targets.DESKTOP_501_DEFAULT, QtQuickConstants.Targets.MAEMO5, QtQuickConstants.Targets.EMBEDDED_LINUX, QtQuickConstants.Targets.SIMULATOR, QtQuickConstants.Targets.HARMATTAN] if platform.system() in ('Windows', 'Microsoft'): @@ -466,6 +466,7 @@ def __getSupportedPlatforms__(text, getAsStrings=False): result = [] if 'Desktop' in supports: result.append(QtQuickConstants.Targets.DESKTOP_474_GCC) + result.append(QtQuickConstants.Targets.DESKTOP_501_DEFAULT) if platform.system() in ("Linux", "Darwin"): result.append(QtQuickConstants.Targets.EMBEDDED_LINUX) elif platform.system() in ('Windows', 'Microsoft'): @@ -478,8 +479,9 @@ def __getSupportedPlatforms__(text, getAsStrings=False): result.append(QtQuickConstants.Targets.SIMULATOR) elif 'Platform independent' in text: # MAEMO5 and HARMATTAN could be wrong here - depends on having Madde plugin enabled or not - result = [QtQuickConstants.Targets.DESKTOP_474_GCC, QtQuickConstants.Targets.MAEMO5, - QtQuickConstants.Targets.SIMULATOR, QtQuickConstants.Targets.HARMATTAN] + result = [QtQuickConstants.Targets.DESKTOP_474_GCC, QtQuickConstants.Targets.DESKTOP_501_DEFAULT, + QtQuickConstants.Targets.MAEMO5, QtQuickConstants.Targets.SIMULATOR, + QtQuickConstants.Targets.HARMATTAN] if platform.system() in ('Windows', 'Microsoft'): result.append(QtQuickConstants.Targets.DESKTOP_474_MSVC2008) else: diff --git a/tests/system/shared/project_explorer.py b/tests/system/shared/project_explorer.py index 9ce4a5272b08b92d6868121a8a7f618262d7b016..d35aa2dd9f3b95f5ed19fcde477340098562a92c 100644 --- a/tests/system/shared/project_explorer.py +++ b/tests/system/shared/project_explorer.py @@ -194,7 +194,7 @@ def __selectTreeItemOnBuildAndRun__(treeViewOrWidget, itemText, isRegex=False): or itemText == dumpedItem): found = True item = ".".join([str(section.data().toString()), - dumpedItem.replace(".", "\\.")]) + dumpedItem.replace(".", "\\.").replace("_", "\\_")]) clickItem(treeViewOrWidget, item, 5, 5, 0, Qt.LeftButton) break if found: diff --git a/tests/system/shared/qtcreator.py b/tests/system/shared/qtcreator.py index 6d62b54fa43c9f2d508609fcb85545397290c859..41bbbde0b1593e462924d3d17830136b7de159d6 100644 --- a/tests/system/shared/qtcreator.py +++ b/tests/system/shared/qtcreator.py @@ -112,23 +112,45 @@ def __removeTestingDir__(): waitFor('os.path.getmtime(devicesXML) > lastMTime', 5000) waitFor('__removeIt__(testingDir)', 2000) -def substituteTildeWithinToolchains(settingsDir): - toolchains = os.path.join(settingsDir, "QtProject", 'qtcreator', 'toolchains.xml') - origToolchains = toolchains + "_orig" - home = os.path.expanduser("~") - os.rename(toolchains, origToolchains) - origFile = open(origToolchains, "r") - modifiedFile = open(toolchains, "w") +def __substitute__(fileName, search, replace): + origFileName = fileName + "_orig" + os.rename(fileName, origFileName) + origFile = open(origFileName, "r") + modifiedFile = open(fileName, "w") for line in origFile: - if "~" in line: - line = line.replace("~", home) - modifiedFile.write(line) + modifiedFile.write(line.replace(search, replace)) origFile.close() modifiedFile.close() - os.remove(origToolchains) + os.remove(origFileName) + +def substituteTildeWithinToolchains(settingsDir): + toolchains = os.path.join(settingsDir, "QtProject", 'qtcreator', 'toolchains.xml') + home = os.path.expanduser("~") + __substitute__(toolchains, "~", home) test.log("Substituted all tildes with '%s' inside toolchains.xml..." % home) +def substituteDefaultCompiler(settingsDir): + compiler = None + if platform.system() == 'Darwin': + compiler = "clang_64" + elif platform.system() == 'Linux': + if __is64BitOS__(): + compiler = "gcc_64" + else: + compiler = "gcc" + else: + test.warning("Called substituteDefaultCompiler() on wrong platform.", + "This is a script error.") + if compiler: + qtversion = os.path.join(settingsDir, "QtProject", 'qtcreator', 'qtversion.xml') + __substitute__(qtversion, "SQUISH_DEFAULT_COMPILER", compiler) + test.log("Injected default compiler '%s' to qtversion.xml..." % compiler) + def __guessABI__(supportedABIs, use64Bit): + if platform.system() == 'Linux': + supportedABIs = filter(lambda x: 'linux' in x, supportedABIs) + elif platform.system() == 'Darwin': + supportedABIs = filter(lambda x: 'macos' in x, supportedABIs) if use64Bit: searchFor = "64bit" else: @@ -144,8 +166,6 @@ def __guessABI__(supportedABIs, use64Bit): return '' def __is64BitOS__(): - if platform.system() == 'Darwin': - return sys.maxsize > (2 ** 32) if platform.system() in ('Microsoft', 'Windows'): machine = os.getenv("PROCESSOR_ARCHITEW6432", os.getenv("PROCESSOR_ARCHITECTURE")) else: @@ -216,6 +236,7 @@ def copySettingsToTmpDir(destination=None, omitFiles=[]): shutil.copy(os.path.join(r, ff), currentPath) if platform.system() in ('Linux', 'Darwin'): substituteTildeWithinToolchains(tmpSettingsDir) + substituteDefaultCompiler(tmpSettingsDir) substituteUnchosenTargetABIs(tmpSettingsDir) SettingsPath = ' -settingspath "%s"' % tmpSettingsDir diff --git a/tests/system/shared/utils.py b/tests/system/shared/utils.py index a768940356d8bd5f1b607f0e16161da4d8fa5013..169fc42fce664206e87eed99a1a5908913a4b872 100644 --- a/tests/system/shared/utils.py +++ b/tests/system/shared/utils.py @@ -196,6 +196,11 @@ def cleanUpUserFiles(pathsToProFiles=None): return doneWithoutErrors def invokeMenuItem(menu, item, subItem = None): + if platform.system() == "Darwin": + try: + waitForObject(":Qt Creator.QtCreator.MenuBar_QMenuBar", 2000) + except: + nativeMouseClick(waitForObject(":Qt Creator_Core::Internal::MainWindow", 1000), 20, 20, 0, Qt.LeftButton) menuObject = waitForObjectItem(":Qt Creator.QtCreator.MenuBar_QMenuBar", menu) waitFor("menuObject.visible", 1000) activateItem(menuObject) @@ -455,9 +460,9 @@ def iterateQtVersions(keepOptionsOpen=False, alreadyOnOptionsDialog=False, treeWidget = waitForObject(":QtSupport__Internal__QtVersionManager.qtdirList_QTreeWidget") root = treeWidget.invisibleRootItem() for rootChild in dumpChildren(root): - rootChildText = str(rootChild.text(0)).replace(".", "\\.") + rootChildText = str(rootChild.text(0)).replace(".", "\\.").replace("_", "\\_") for subChild in dumpChildren(rootChild): - subChildText = str(subChild.text(0)).replace(".", "\\.") + subChildText = str(subChild.text(0)).replace(".", "\\.").replace("_", "\\_") clickItem(treeWidget, ".".join([rootChildText,subChildText]), 5, 5, 0, Qt.LeftButton) currentText = str(waitForObject(":QtSupport__Internal__QtVersionManager.QLabel").text) matches = pattern.match(currentText) 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 14cf127eae298c12b64d9dd4f2b8548c3cf9ab23..e79148072e40b8c13bf583cc7e1968c2d31df126 100644 --- a/tests/system/suite_editors/tst_basic_cpp_support/test.py +++ b/tests/system/suite_editors/tst_basic_cpp_support/test.py @@ -38,6 +38,9 @@ def main(): # - Press F2 or select from the menu: Tools / C++ / Follow Symbol under Cursor # Creator will show you the declaration of the variable. + if platform.system() == "Darwin": + JIRA.performWorkaroundIfStillOpen(6918, JIRA.Bug.CREATOR, cppwindow) + type(cppwindow, "") type(waitForObject(":*Qt Creator.findEdit_Utils::FilterLineEdit"), " xi") type(waitForObject(":*Qt Creator.findEdit_Utils::FilterLineEdit"), "") diff --git a/tests/system/suite_editors/tst_revert_changes/test.py b/tests/system/suite_editors/tst_revert_changes/test.py index 2361086c4764e52c93398bc0332904b749d57224..8f5f5b5d20d63ffd49c58cc85b9354896c25906b 100644 --- a/tests/system/suite_editors/tst_revert_changes/test.py +++ b/tests/system/suite_editors/tst_revert_changes/test.py @@ -62,6 +62,8 @@ def __modifyProFile__(): # re-order some stuff inside header def __modifyHeader__(): global cppEditorStr, homeShortCut, endShortCut + if platform.system() == "Darwin": + JIRA.performWorkaroundIfStillOpen(6918, JIRA.Bug.CREATOR, waitForObject(cppEditorStr, 1000)) if placeCursorToLine(cppEditorStr, "class.+", True): type(cppEditorStr, homeShortCut) markText(cppEditorStr, "Down", 5) diff --git a/tests/system/suite_qtquick/tst_qtquick_creation3/test.py b/tests/system/suite_qtquick/tst_qtquick_creation3/test.py index 1ff2ef3d360d8bccc8169ce4964e2e6f4b57d44b..ee952828f0af84c0bf2d5d1b5420f073234b95e2 100644 --- a/tests/system/suite_qtquick/tst_qtquick_creation3/test.py +++ b/tests/system/suite_qtquick/tst_qtquick_creation3/test.py @@ -10,9 +10,9 @@ def main(): test.log("Running project") # TODO replace this quickfix with a proper identification of kits # changes to createNewQtQuickUI(...) after fixing QTCREATORBUG-8704 will probably handle this - kitCount = 1 + kitCount = 2 if platform.system() in ('Windows', 'Microsoft'): - kitCount = 2 + kitCount = 3 qmlViewer = modifyRunSettingsForHookIntoQtQuickUI(kitCount, workingDir, projectName, 11223) if qmlViewer!=None: qmlViewerPath = os.path.dirname(qmlViewer)