aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2018-05-14 09:44:43 +0200
committerEike Ziller <eike.ziller@qt.io>2018-05-14 09:44:43 +0200
commit2278ebed1e0d290861a5616f4238eeec68607443 (patch)
treee1e475b97c1cbe461c38a502c23afb8c9c49b2b1
parentb67db8bc221a9b2a413cf9748ab0239a17ccb683 (diff)
parent3cfc715d7d33b724ad896c540af4a914d922e9bc (diff)
Merge remote-tracking branch 'origin/4.6' into 4.7
Conflicts: qbs/modules/qtc/qtc.qbs qtcreator.pri src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp Change-Id: I873a2fa112321225e7b478739fc017b01d24ce18
-rw-r--r--qtcreator.pri18
-rw-r--r--src/plugins/coreplugin/locator/commandlocator.cpp8
-rw-r--r--src/plugins/coreplugin/menubarfilter.cpp9
-rw-r--r--src/plugins/cpptools/compileroptionsbuilder.cpp12
-rw-r--r--src/plugins/debugger/debuggerplugin.cpp11
-rw-r--r--src/plugins/projectexplorer/abstractmsvctoolchain.cpp18
-rw-r--r--src/plugins/projectexplorer/runconfiguration.cpp6
-rw-r--r--src/plugins/projectexplorer/runconfiguration.h1
-rw-r--r--tests/system/README4
-rw-r--r--tests/system/shared/classes.py5
-rw-r--r--tests/system/shared/project_explorer.py81
-rw-r--r--tests/system/shared/utils.py20
-rw-r--r--tests/system/suite_debugger/tst_debug_empty_main/test.py9
-rw-r--r--tests/system/suite_debugger/tst_qml_locals/test.py10
-rw-r--r--tests/system/suite_debugger/tst_simple_analyze/test.py11
-rw-r--r--tests/system/suite_general/tst_installed_languages/test.py19
-rw-r--r--tests/system/suite_general/tst_installed_languages/testdata/languages.tsv24
17 files changed, 97 insertions, 169 deletions
diff --git a/qtcreator.pri b/qtcreator.pri
index 9e681b65cb..d7600b4c32 100644
--- a/qtcreator.pri
+++ b/qtcreator.pri
@@ -193,6 +193,13 @@ for(dir, QTC_PLUGIN_DIRS) {
INCLUDEPATH += $$dir
}
+QTC_LIB_DIRS_FROM_ENVIRONMENT = $$(QTC_LIB_DIRS)
+QTC_LIB_DIRS += $$split(QTC_LIB_DIRS_FROM_ENVIRONMENT, $$QMAKE_DIRLIST_SEP)
+QTC_LIB_DIRS += $$IDE_SOURCE_TREE/src/libs
+for(dir, QTC_LIB_DIRS) {
+ INCLUDEPATH += $$dir
+}
+
CONFIG += \
depend_includepath \
no_include_pwd
@@ -276,7 +283,16 @@ for(ever) {
break()
done_libs += $$QTC_LIB_DEPENDS
for(dep, QTC_LIB_DEPENDS) {
- include($$PWD/src/libs/$$dep/$${dep}_dependencies.pri)
+ dependencies_file =
+ for(dir, QTC_LIB_DIRS) {
+ exists($$dir/$$dep/$${dep}_dependencies.pri) {
+ dependencies_file = $$dir/$$dep/$${dep}_dependencies.pri
+ break()
+ }
+ }
+ isEmpty(dependencies_file): \
+ error("Library dependency $$dep not found")
+ include($$dependencies_file)
LIBS += -l$$qtLibraryName($$QTC_LIB_NAME)
}
QTC_LIB_DEPENDS = $$unique(QTC_LIB_DEPENDS)
diff --git a/src/plugins/coreplugin/locator/commandlocator.cpp b/src/plugins/coreplugin/locator/commandlocator.cpp
index 2768dca3a3..7546d0f9b0 100644
--- a/src/plugins/coreplugin/locator/commandlocator.cpp
+++ b/src/plugins/coreplugin/locator/commandlocator.cpp
@@ -31,6 +31,7 @@
#include <utils/stringutils.h>
#include <QAction>
+#include <QTimer>
namespace Core {
@@ -104,8 +105,11 @@ void CommandLocator::accept(LocatorFilterEntry entry,
const int index = entry.internalData.toInt();
QTC_ASSERT(index >= 0 && index < d->commands.size(), return);
QAction *action = d->commands.at(index)->action();
- QTC_ASSERT(action->isEnabled(), return);
- action->trigger();
+ // avoid nested stack trace and blocking locator by delayed triggering
+ QTimer::singleShot(0, action, [action] {
+ if (action->isEnabled())
+ action->trigger();
+ });
}
void CommandLocator::refresh(QFutureInterface<void> &)
diff --git a/src/plugins/coreplugin/menubarfilter.cpp b/src/plugins/coreplugin/menubarfilter.cpp
index 029b8f2253..6a82d8676e 100644
--- a/src/plugins/coreplugin/menubarfilter.cpp
+++ b/src/plugins/coreplugin/menubarfilter.cpp
@@ -36,6 +36,7 @@
#include <QMenuBar>
#include <QPointer>
#include <QRegularExpression>
+#include <QTimer>
using namespace Core::Internal;
using namespace Core;
@@ -77,8 +78,12 @@ void MenuBarFilter::accept(LocatorFilterEntry selection, QString *newText,
Q_UNUSED(newText);
Q_UNUSED(selectionStart);
Q_UNUSED(selectionLength);
- if (auto action = selection.internalData.value<QPointer<QAction>>())
- action->trigger();
+ if (auto action = selection.internalData.value<QPointer<QAction>>()) {
+ QTimer::singleShot(0, action, [action] {
+ if (action->isEnabled())
+ action->trigger();
+ });
+ }
}
void MenuBarFilter::refresh(QFutureInterface<void> &future)
diff --git a/src/plugins/cpptools/compileroptionsbuilder.cpp b/src/plugins/cpptools/compileroptionsbuilder.cpp
index 57f937fb18..d6921b07ff 100644
--- a/src/plugins/cpptools/compileroptionsbuilder.cpp
+++ b/src/plugins/cpptools/compileroptionsbuilder.cpp
@@ -53,6 +53,11 @@ QStringList CompilerOptionsBuilder::build(CppTools::ProjectFile::Kind fileKind,
{
m_options.clear();
+ if (fileKind == ProjectFile::CHeader || fileKind == ProjectFile::CSource) {
+ QTC_ASSERT(m_projectPart.languageVersion <= ProjectPart::LatestCVersion,
+ return QStringList(););
+ }
+
addWordWidth();
addTargetTriple();
addExtraCodeModelFlags();
@@ -118,7 +123,8 @@ void CompilerOptionsBuilder::addExtraCodeModelFlags()
void CompilerOptionsBuilder::enableExceptions()
{
- add(QLatin1String("-fcxx-exceptions"));
+ if (m_projectPart.languageVersion > ProjectPart::LatestCVersion)
+ add(QLatin1String("-fcxx-exceptions"));
add(QLatin1String("-fexceptions"));
}
@@ -286,6 +292,7 @@ void CompilerOptionsBuilder::addOptionsForLanguage(bool checkForBorlandExtension
QStringList opts;
const ProjectPart::LanguageExtensions languageExtensions = m_projectPart.languageExtensions;
const bool gnuExtensions = languageExtensions & ProjectPart::GnuExtensions;
+
switch (m_projectPart.languageVersion) {
case ProjectPart::C89:
opts << (gnuExtensions ? QLatin1String("-std=gnu89") : QLatin1String("-std=c89"));
@@ -471,8 +478,7 @@ QString CompilerOptionsBuilder::includeOption() const
bool CompilerOptionsBuilder::excludeDefineDirective(const ProjectExplorer::Macro &macro) const
{
- // This is a quick fix for QTCREATORBUG-11501.
- // TODO: do a proper fix, see QTCREATORBUG-11709.
+ // TODO: Remove in QtCreator 4.7
if (macro.key == "__cplusplus")
return true;
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index 9f683f3ec8..f92b55d6ea 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -1188,7 +1188,8 @@ bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it,
if (!kit)
kit = guessKitFromAbis(Abi::abisOfBinary(FileName::fromString(executable)));
- auto runControl = new RunControl(nullptr, ProjectExplorer::Constants::DEBUG_RUN_MODE);
+ IDevice::ConstPtr device = DeviceKitInformation::device(kit);
+ auto runControl = new RunControl(device, ProjectExplorer::Constants::DEBUG_RUN_MODE);
auto debugger = new DebuggerRunTool(runControl, kit);
debugger->setInferiorExecutable(executable);
if (pid) {
@@ -1953,7 +1954,8 @@ void DebuggerPluginPrivate::attachCore()
setConfigValue("LastExternalStartScript", dlg.overrideStartScript());
setConfigValue("LastForceLocalCoreFile", dlg.forcesLocalCoreFile());
- auto runControl = new RunControl(nullptr, ProjectExplorer::Constants::DEBUG_RUN_MODE);
+ IDevice::ConstPtr device = DeviceKitInformation::device(dlg.kit());
+ auto runControl = new RunControl(device, ProjectExplorer::Constants::DEBUG_RUN_MODE);
auto debugger = new DebuggerRunTool(runControl, dlg.kit());
debugger->setInferiorExecutable(dlg.localExecutableFile());
debugger->setCoreFileName(dlg.localCoreFile());
@@ -1980,7 +1982,8 @@ void DebuggerPluginPrivate::startRemoteCdbSession()
return;
setConfigValue(connectionKey, dlg.connection());
- auto runControl = new RunControl(nullptr, ProjectExplorer::Constants::DEBUG_RUN_MODE);
+ IDevice::ConstPtr device = DeviceKitInformation::device(kit);
+ auto runControl = new RunControl(device, ProjectExplorer::Constants::DEBUG_RUN_MODE);
auto debugger = new DebuggerRunTool(runControl, kit);
debugger->setStartMode(AttachToRemoteServer);
debugger->setCloseMode(KillAtClose);
@@ -2038,7 +2041,7 @@ void DebuggerPluginPrivate::attachToRunningApplication()
if (device->type() == PE::DESKTOP_DEVICE_TYPE) {
attachToRunningProcess(kit, process, false);
} else {
- auto runControl = new RunControl(nullptr, ProjectExplorer::Constants::DEBUG_RUN_MODE);
+ auto runControl = new RunControl(device, ProjectExplorer::Constants::DEBUG_RUN_MODE);
auto debugger = new RemoteAttachRunner(runControl, kit, process.pid);
debugger->startRunControl();
}
diff --git a/src/plugins/projectexplorer/abstractmsvctoolchain.cpp b/src/plugins/projectexplorer/abstractmsvctoolchain.cpp
index 12c5a15316..fd2948c458 100644
--- a/src/plugins/projectexplorer/abstractmsvctoolchain.cpp
+++ b/src/plugins/projectexplorer/abstractmsvctoolchain.cpp
@@ -133,15 +133,27 @@ ToolChain::CompilerFlags AbstractMsvcToolChain::compilerFlags(const QStringList
if (cxxflags.contains(QLatin1String("/Za")))
flags &= ~MicrosoftExtensions;
+ bool cLanguage = (language() == ProjectExplorer::Constants::C_LANGUAGE_ID);
+
switch (m_abi.osFlavor()) {
case Abi::WindowsMsvc2010Flavor:
- case Abi::WindowsMsvc2012Flavor: flags |= StandardCxx11;
+ case Abi::WindowsMsvc2012Flavor:
+ if (cLanguage)
+ flags |= StandardC99;
+ else
+ flags |= StandardCxx11;
break;
case Abi::WindowsMsvc2013Flavor:
- case Abi::WindowsMsvc2015Flavor: flags |= StandardCxx14;
+ case Abi::WindowsMsvc2015Flavor:
+ if (cLanguage)
+ flags |= StandardC99;
+ else
+ flags |= StandardCxx14;
break;
case Abi::WindowsMsvc2017Flavor:
- if (cxxflags.contains("/std:c++17") || cxxflags.contains("/std:c++latest"))
+ if (cLanguage)
+ flags |= StandardC11;
+ else if (cxxflags.contains("/std:c++17") || cxxflags.contains("/std:c++latest"))
flags |= StandardCxx17;
else
flags |= StandardCxx14;
diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp
index a77478a52c..c29e1807e6 100644
--- a/src/plugins/projectexplorer/runconfiguration.cpp
+++ b/src/plugins/projectexplorer/runconfiguration.cpp
@@ -921,6 +921,12 @@ RunControl::RunControl(RunConfiguration *runConfiguration, Core::Id mode) :
#endif
}
+RunControl::RunControl(const IDevice::ConstPtr &device, Core::Id mode)
+ : RunControl(nullptr, mode)
+{
+ d->device = device;
+}
+
RunControl::~RunControl()
{
#ifdef WITH_JOURNALD
diff --git a/src/plugins/projectexplorer/runconfiguration.h b/src/plugins/projectexplorer/runconfiguration.h
index 8a918a9773..292ac59d2e 100644
--- a/src/plugins/projectexplorer/runconfiguration.h
+++ b/src/plugins/projectexplorer/runconfiguration.h
@@ -461,6 +461,7 @@ class PROJECTEXPLORER_EXPORT RunControl : public QObject
public:
RunControl(RunConfiguration *runConfiguration, Core::Id mode);
+ RunControl(const IDevice::ConstPtr &device, Core::Id mode);
~RunControl() override;
void initiateStart();
diff --git a/tests/system/README b/tests/system/README
index 86f5a1053d..9988635940 100644
--- a/tests/system/README
+++ b/tests/system/README
@@ -76,8 +76,8 @@ Attention! If any of these prerequisites cannot be satisfied the tests will like
Prerequisites - debugging and analyzing
-----------------------------------------
-In some tests, Creator needs to read data from an application it started.
-On Windows, those have the following prerequisites:
+In tst_simple_debug from suite_debbugger, Creator needs to read data from an application it
+started. On Windows, this has the following prerequisites:
Either:
* have no firewall at all enabled (sure that's a bad idea)
Or:
diff --git a/tests/system/shared/classes.py b/tests/system/shared/classes.py
index c9a84e5c24..398928366e 100644
--- a/tests/system/shared/classes.py
+++ b/tests/system/shared/classes.py
@@ -118,11 +118,6 @@ class ViewConstants:
return None
return toolTip % (viewTab + 1)
-class QtInformation:
- QT_VERSION = 0
- QT_BINPATH = 1
- QT_LIBPATH = 2
-
class LibType:
SHARED = 0
STATIC = 1
diff --git a/tests/system/shared/project_explorer.py b/tests/system/shared/project_explorer.py
index c506690d70..dc18935e31 100644
--- a/tests/system/shared/project_explorer.py
+++ b/tests/system/shared/project_explorer.py
@@ -157,64 +157,13 @@ def getQtInformationForBuildSettings(kitCount, alreadyOnProjectsBuildSettings=Fa
qmakeCallLabel = waitForObject("{text?='<b>qmake:</b> qmake*' type='QLabel' unnamed='1' visible='1' "
"window=':Qt Creator_Core::Internal::MainWindow'}")
- mkspec = __getMkspecFromQMakeCall__(str(qmakeCallLabel.text))
- qtVersion = getQtInformationByQMakeCall(qtDir, QtInformation.QT_VERSION)
- qtLibPath = getQtInformationByQMakeCall(qtDir, QtInformation.QT_LIBPATH)
- qtBinPath = getQtInformationByQMakeCall(qtDir, QtInformation.QT_BINPATH)
+ qtVersion = getQtInformationByQMakeCall(qtDir)
if afterSwitchTo:
if ViewConstants.FIRST_AVAILABLE <= afterSwitchTo <= ViewConstants.LAST_AVAILABLE:
switchViewTo(afterSwitchTo)
else:
test.warning("Don't know where you trying to switch to (%s)" % afterSwitchTo)
- return qtVersion, mkspec, qtBinPath, qtLibPath
-
-def getQtInformationForQmlProject():
- fancyToolButton = waitForObject(":*Qt Creator_Core::Internal::FancyToolButton")
- kit = __getTargetFromToolTip__(str(fancyToolButton.toolTip))
- if not kit:
- test.fatal("Could not figure out which kit you're using...")
- return None
- test.log("Searching for Qt information for kit '%s'" % kit)
- invokeMenuItem("Tools", "Options...")
- waitForObjectItem(":Options_QListView", "Build & Run")
- clickItem(":Options_QListView", "Build & Run", 14, 15, 0, Qt.LeftButton)
- clickOnTab(":Options.qt_tabwidget_tabbar_QTabBar", "Kits")
- targetsTreeView = waitForObject(":BuildAndRun_QTreeView")
- if not __selectTreeItemOnBuildAndRun__(targetsTreeView, "%s(\s\(default\))?" % kit, True):
- test.fatal("Found no matching kit - this shouldn't happen.")
- clickButton(waitForObject(":Options.Cancel_QPushButton"))
- return None
- qtVersionStr = str(waitForObject(":Kits_QtVersion_QComboBox").currentText)
- test.log("Kit '%s' uses Qt Version '%s'" % (kit, qtVersionStr))
- clickOnTab(":Options.qt_tabwidget_tabbar_QTabBar", "Qt Versions")
- treeView = waitForObject(":qtdirList_QTreeView")
- if not __selectTreeItemOnBuildAndRun__(treeView, qtVersionStr):
- test.fatal("Found no matching Qt Version for kit - this shouldn't happen.")
- clickButton(waitForObject(":Options.Cancel_QPushButton"))
- return None
- qmake = str(waitForObject(":QtSupport__Internal__QtVersionManager.qmake_QLabel").text)
- test.log("Qt Version '%s' uses qmake at '%s'" % (qtVersionStr, qmake))
- clickButton(waitForObject(":Options.Cancel_QPushButton"))
- return qmake
-
-def __selectTreeItemOnBuildAndRun__(treeViewOrWidget, itemText, isRegex=False):
- model = treeViewOrWidget.model()
- test.compare(model.rowCount(), 2, "Verifying expected section count")
- autoDetected = model.index(0, 0)
- test.compare(autoDetected.data().toString(), "Auto-detected", "Verifying label for section")
- manual = model.index(1, 0)
- test.compare(manual.data().toString(), "Manual", "Verifying label for section")
- if isRegex:
- pattern = re.compile(itemText)
- for section in [autoDetected, manual]:
- for dumpedItem in dumpItems(model, section):
- if (isRegex and pattern.match(dumpedItem)
- or itemText == dumpedItem):
- item = ".".join([str(section.data().toString()),
- dumpedItem.replace(".", "\\.").replace("_", "\\_")])
- clickItem(treeViewOrWidget, item, 5, 5, 0, Qt.LeftButton)
- return True
- return False
+ return qtVersion
def __getTargetFromToolTip__(toolTip):
if toolTip == None or not isinstance(toolTip, (str, unicode)):
@@ -240,20 +189,10 @@ def getExecutableAndTargetFromToolTip(toolTip):
return None, target
return exe.group(1).strip(), target
-def __getMkspecFromQMakeCall__(qmakeCall):
- qCall = qmakeCall.split("</b>")[1].strip()
- tmp = qCall.split()
- for i in range(len(tmp)):
- if tmp[i] == '-spec' and i + 1 < len(tmp):
- return tmp[i + 1]
- test.fatal("Couldn't get mkspec from qmake call '%s'" % qmakeCall)
- return None
-
-# this function queries information from qmake
+# this function queries the version number from qmake
# param qtDir set this to a path that holds a valid Qt
-# param which set this to one of the QtInformation "constants"
# the function will return the wanted information or None if something went wrong
-def getQtInformationByQMakeCall(qtDir, which):
+def getQtInformationByQMakeCall(qtDir):
qmake = os.path.join(qtDir, "bin", "qmake")
if platform.system() in ('Microsoft', 'Windows'):
qmake += ".exe"
@@ -261,17 +200,7 @@ def getQtInformationByQMakeCall(qtDir, which):
test.fatal("Given Qt directory does not exist or does not contain bin/qmake.",
"Constructed path: '%s'" % qmake)
return None
- query = ""
- if which == QtInformation.QT_VERSION:
- query = "QT_VERSION"
- elif which == QtInformation.QT_BINPATH:
- query = "QT_INSTALL_BINS"
- elif which == QtInformation.QT_LIBPATH:
- query = "QT_INSTALL_LIBS"
- else:
- test.fatal("You're trying to fetch an unknown information (%s)" % which)
- return None
- return getOutputFromCmdline([qmake, "-query", query]).strip()
+ return getOutputFromCmdline([qmake, "-query", "QT_VERSION"]).strip()
def invokeContextMenuOnProject(projectName, menuItem):
try:
diff --git a/tests/system/shared/utils.py b/tests/system/shared/utils.py
index c8bd71da6f..0b8fb5818f 100644
--- a/tests/system/shared/utils.py
+++ b/tests/system/shared/utils.py
@@ -114,6 +114,7 @@ def selectFromLocator(filter, itemName = None):
# clicking the wanted item
# if you replace this by pressing ENTER, be sure that something is selected
# otherwise you will run into unwanted behavior
+ snooze(1)
wantedItem = waitForObjectItem("{type='QTreeView' unnamed='1' visible='1'}", itemName)
doubleClick(wantedItem, 5, 5, 0, Qt.LeftButton)
@@ -176,21 +177,10 @@ def invokeMenuItem(menu, item, *subItems):
waitForObject(":Qt Creator.QtCreator.MenuBar_QMenuBar", 2000)
except:
nativeMouseClick(waitForObject(":Qt Creator_Core::Internal::MainWindow", 1000), 20, 20, 0, Qt.LeftButton)
- # HACK as Squish fails to provide a proper way to access the system menu
- if platform.system() == "Darwin":
- if menu == "Tools" and item == "Options...":
- #nativeType("<Command+,>")
- # the following is a pure HACK because using the default key sequence seems to be broken
- # when running from inside Squish
- menuBar = waitForObject(":Qt Creator.QtCreator.MenuBar_QMenuBar", 500)
- nativeMouseClick(menuBar, 75, 5, 0, Qt.LeftButton)
- for _ in range(3):
- nativeType("<Down>")
- nativeType("<Return>")
- return
- if menu == "File" and item == "Exit":
- nativeType("<Command+q>")
- return
+ # Use Locator for menu items which wouldn't work on macOS
+ if menu == "Tools" and item == "Options..." or menu == "File" and item == "Exit":
+ selectFromLocator("t %s" % item, item)
+ return
menuObject = waitForObjectItem(":Qt Creator.QtCreator.MenuBar_QMenuBar", menu)
snooze(1)
waitFor("menuObject.visible", 1000)
diff --git a/tests/system/suite_debugger/tst_debug_empty_main/test.py b/tests/system/suite_debugger/tst_debug_empty_main/test.py
index 230e3793a8..be7f15fc2f 100644
--- a/tests/system/suite_debugger/tst_debug_empty_main/test.py
+++ b/tests/system/suite_debugger/tst_debug_empty_main/test.py
@@ -97,13 +97,6 @@ def performDebugging(projectName, checkedTargets):
invokeMenuItem("Build", "Rebuild All")
waitForCompile()
isMsvc = isMsvcConfig(len(checkedTargets), kit)
- if platform.system() in ('Microsoft' 'Windows'):
- switchViewTo(ViewConstants.PROJECTS)
- switchToBuildOrRunSettingsFor(len(checkedTargets), kit, ProjectSettings.BUILD)
- buildDir = os.path.join(str(waitForObject(":Qt Creator_Utils::BuildDirectoryLineEdit").text),
- "debug")
- switchViewTo(ViewConstants.EDIT)
- allowAppThroughWinFW(buildDir, projectName, None)
clickButton(waitForObject(":*Qt Creator.Start Debugging_Core::Internal::FancyToolButton"))
handleDebuggerWarnings(config, isMsvc)
waitForObject(":Qt Creator.DebugModeWidget_QSplitter")
@@ -118,5 +111,3 @@ def performDebugging(projectName, checkedTargets):
clickButton(waitForObject(":*Qt Creator.Continue_Core::Internal::FancyToolButton"))
__handleAppOutputWaitForDebuggerFinish__()
removeOldBreakpoints()
- if platform.system() in ('Microsoft' 'Windows'):
- deleteAppFromWinFW(buildDir, projectName, None)
diff --git a/tests/system/suite_debugger/tst_qml_locals/test.py b/tests/system/suite_debugger/tst_qml_locals/test.py
index 8431558d02..d78e02d48f 100644
--- a/tests/system/suite_debugger/tst_qml_locals/test.py
+++ b/tests/system/suite_debugger/tst_qml_locals/test.py
@@ -60,14 +60,6 @@ def main():
ensureChecked("{container=':Qt Creator.scrollArea_QScrollArea' text='Enable QML' "
"type='QCheckBox' unnamed='1' visible='1'}")
switchViewTo(ViewConstants.EDIT)
- if platform.system() in ('Microsoft', 'Windows'):
- qmake = getQtInformationForQmlProject()
- if qmake == None:
- earlyExit("Could not figure out which qmake is used.")
- return
- qmlScenePath = os.path.abspath(os.path.dirname(qmake))
- qmlScene = "qmlscene.exe"
- allowAppThroughWinFW(qmlScenePath, qmlScene, None)
clickButton(fancyDebugButton)
locAndExprTV = waitForObject(":Locals and Expressions_Debugger::Internal::WatchTreeView")
# Locals and Expressions populates treeview only on demand - so the tree must be expanded
@@ -96,8 +88,6 @@ def main():
subItem = items
checkForExpectedValues(subItem, current[2], current[3])
clickButton(waitForObject(':Debugger Toolbar.Exit Debugger_QToolButton', 5000))
- if platform.system() in ('Microsoft', 'Windows'):
- deleteAppFromWinFW(qmlScenePath, qmlScene)
invokeMenuItem("File", "Exit")
def __unfoldTree__():
diff --git a/tests/system/suite_debugger/tst_simple_analyze/test.py b/tests/system/suite_debugger/tst_simple_analyze/test.py
index c366d535bc..c1578ee55d 100644
--- a/tests/system/suite_debugger/tst_simple_analyze/test.py
+++ b/tests/system/suite_debugger/tst_simple_analyze/test.py
@@ -67,7 +67,7 @@ def performTest(workingDir, projectName, targetCount, availableConfigs):
# switching from MSVC to MinGW build will fail on the clean step of 'Rebuild All' because
# of differences between MSVC's and MinGW's Makefile (so clean before switching kits)
invokeMenuItem('Build', 'Clean Project "%s"' % projectName)
- qtVersion = verifyBuildConfig(targetCount, kit, config, True, True, True)[0]
+ qtVersion = verifyBuildConfig(targetCount, kit, config, True, True, True)
test.log("Selected kit using Qt %s" % qtVersion)
# explicitly build before start debugging for adding the executable as allowed program to WinFW
invokeMenuItem("Build", "Rebuild All")
@@ -75,13 +75,6 @@ def performTest(workingDir, projectName, targetCount, availableConfigs):
if not checkCompile():
test.fatal("Compile had errors... Skipping current build config")
continue
- if platform.system() in ('Microsoft' 'Windows'):
- switchViewTo(ViewConstants.PROJECTS)
- switchToBuildOrRunSettingsFor(targetCount, kit, ProjectSettings.BUILD)
- buildDir = os.path.join(str(waitForObject(":Qt Creator_Utils::BuildDirectoryLineEdit").text),
- "debug")
- switchViewTo(ViewConstants.EDIT)
- allowAppThroughWinFW(buildDir, projectName, None)
switchViewTo(ViewConstants.DEBUG)
selectFromCombo(":Analyzer Toolbar.AnalyzerManagerToolBox_QComboBox", "QML Profiler")
recordButton = waitForObject("{container=':DebugModeWidget.Toolbar_QDockWidget' "
@@ -131,8 +124,6 @@ def performTest(workingDir, projectName, targetCount, availableConfigs):
elif str(model.index(row, colCalls).data()) == "2":
test.compare(model.index(row, colMedian).data(), model.index(row, colLongest).data(),
"For two calls, median and longest time must be the same.")
- if platform.system() in ('Microsoft' 'Windows'):
- deleteAppFromWinFW(buildDir, projectName, None)
progressBarWait(15000, False) # wait for "Build" progressbar to disappear
clickButton(waitForObject(":Analyzer Toolbar.Clear_QToolButton"))
test.verify(waitFor("model.rowCount() == 0", 3000), "Analyzer results cleared.")
diff --git a/tests/system/suite_general/tst_installed_languages/test.py b/tests/system/suite_general/tst_installed_languages/test.py
index d4869559e9..3ec32bf349 100644
--- a/tests/system/suite_general/tst_installed_languages/test.py
+++ b/tests/system/suite_general/tst_installed_languages/test.py
@@ -50,21 +50,10 @@ def main():
overrideStartApplication()
startApplication("qtcreator" + SettingsPath)
try:
- if platform.system() == 'Darwin':
- try:
- fileMenu = waitForObjectItem(":Qt Creator.QtCreator.MenuBar_QMenuBar",
- testData.field(lang, "File"))
- activateItem(fileMenu)
- obj = waitForObject("{type='QMenu' visible='1'}")
- test.compare(str(obj.objectName), 'QtCreator.Menu.File',
- "Creator was running in %s translation" % languageName)
- activateItem(fileMenu)
- except:
- test.fail("Creator seems to be missing %s translation" % languageName)
- nativeType("<Command+q>")
- else:
- invokeMenuItem(testData.field(lang, "File"), testData.field(lang, "Exit"))
- test.passes("Creator was running in %s translation." % languageName)
+ # Use Locator for menu items which wouldn't work on macOS
+ exitCommand = testData.field(lang, "Exit")
+ selectFromLocator("t %s" % exitCommand.rstrip("(X)"), exitCommand)
+ test.passes("Creator was running in %s translation." % languageName)
except:
test.fail("Creator seems to be missing %s translation" % languageName)
sendEvent("QCloseEvent", ":Qt Creator_Core::Internal::MainWindow")
diff --git a/tests/system/suite_general/tst_installed_languages/testdata/languages.tsv b/tests/system/suite_general/tst_installed_languages/testdata/languages.tsv
index 0ab6a81985..6de7b8fc23 100644
--- a/tests/system/suite_general/tst_installed_languages/testdata/languages.tsv
+++ b/tests/system/suite_general/tst_installed_languages/testdata/languages.tsv
@@ -1,12 +1,12 @@
-"language" "File" "Exit" "ISO"
-"Czech (CzechRepublic)" "Soubor" "Ukončit" "cs_CZ"
-"Danish (Denmark)" "Fil" "Afslut" "da_DK"
-"German (Germany)" "Datei" "Beenden" "de_DE"
-"French (France)" "Fichier" "Quitter" "fr_FR"
-"Japanese (Japan)" "ファイル(F)" "終了(X)" "ja_JP"
-"Polish (Poland)" "Plik" "Zakończ" "pl_PL"
-"Russian (%1)" "Файл" "Выход" "ru_RU"
-"Slovenian (Slovenia)" "Datoteka" "Končaj" "sl_SL"
-"Ukrainian (Ukraine)" "Файл" "Вийти" "uk_UA"
-"Chinese (China)" "文件(F)" "退出(X)" "zh_CN"
-"Chinese (Taiwan)" "檔案(F)" "離開(X)" "zh_TW"
+"language" "Exit" "ISO"
+"Czech (CzechRepublic)" "Ukončit" "cs_CZ"
+"Danish (Denmark)" "Afslut" "da_DK"
+"German (Germany)" "Beenden" "de_DE"
+"French (France)" "Quitter" "fr_FR"
+"Japanese (Japan)" "終了(X)" "ja_JP"
+"Polish (Poland)" "Zakończ" "pl_PL"
+"Russian (%1)" "Выход" "ru_RU"
+"Slovenian (Slovenia)" "Končaj" "sl_SL"
+"Ukrainian (Ukraine)" "Вийти" "uk_UA"
+"Chinese (China)" "退出(X)" "zh_CN"
+"Chinese (Taiwan)" "離開(X)" "zh_TW"