Merge remote-tracking branch 'origin/4.7'

Change-Id: I9d433fa6ce4f60a2acfbdb21da9f727cac8d7526
This commit is contained in:
Eike Ziller
2018-05-14 09:52:58 +02:00
22 changed files with 102 additions and 185 deletions

View File

@@ -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)

View File

@@ -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> &)

View File

@@ -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)

View File

@@ -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;

View File

@@ -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();
}

View File

@@ -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;

View File

@@ -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

View File

@@ -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();

View File

@@ -109,6 +109,8 @@ void QbsBuildConfiguration::initialize(const BuildInfo *info)
BuildStepList *buildSteps = stepList(ProjectExplorer::Constants::BUILDSTEPS_BUILD);
auto bs = new QbsBuildStep(buildSteps);
if (info->buildType == Release)
bs->setQmlDebuggingEnabled(false);
bs->setQbsConfiguration(bd);
buildSteps->appendStep(bs);

View File

@@ -35,9 +35,7 @@ namespace QmlDesigner {
class ComponentsPlugin : public QObject, QmlDesigner::IWidgetPlugin
{
Q_OBJECT
#if QT_VERSION >= 0x050000
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QmlDesignerPlugin" FILE "componentsplugin.json")
#endif
Q_DISABLE_COPY(ComponentsPlugin)
Q_INTERFACES(QmlDesigner::IWidgetPlugin)
public:

View File

@@ -35,9 +35,7 @@ namespace QmlDesigner {
class QtQuickPlugin : public QObject, QmlDesigner::IWidgetPlugin
{
Q_OBJECT
#if QT_VERSION >= 0x050000
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QmlDesignerPlugin" FILE "qtquickplugin.json")
#endif
Q_DISABLE_COPY(QtQuickPlugin)
Q_INTERFACES(QmlDesigner::IWidgetPlugin)
public:

View File

@@ -577,9 +577,8 @@ QVariant QmlProfilerStatisticsRelativesModel::dataForMainEntry(qint64 totalDurat
case RelativeCallCount: return 1;
case RelativeDetails: return tr("Main Program");
}
default:
return QVariant();
}
return QVariant();
}
QVariant QmlProfilerStatisticsRelativesModel::data(const QModelIndex &index, int role) const

View File

@@ -64,14 +64,6 @@
#include <QPlainTextEdit>
#if QT_VERSION >= 0x050000
#define MSKIP_SINGLE(x) QSKIP(x)
#define MSKIP_ALL(x) QSKIP(x);
#else
#define MSKIP_SINGLE(x) QSKIP(x, SkipSingle)
#define MSKIP_ALL(x) QSKIP(x, SkipAll)
#endif
//TESTED_COMPONENT=src/plugins/qmldesigner/designercore
using namespace QmlDesigner;
@@ -1392,7 +1384,7 @@ void tst_TestCore::testBasicStatesQtQuick20()
qDebug() << rootModelNode.nodeListProperty("states").toModelNodeList().first().metaInfo().majorVersion();
qDebug() << rootModelNode.nodeListProperty("states").toModelNodeList().first().metaInfo().typeName();
MSKIP_ALL("No qml2puppet");
QSKIP("No qml2puppet");
QScopedPointer<TestView> view(new TestView(model.data()));
QVERIFY(view.data());
@@ -8013,7 +8005,7 @@ void tst_TestCore::loadTestFiles()
QCOMPARE(rootModelNode.nodeListProperty("states").toModelNodeList().count(), 2);
}
MSKIP_ALL("Fails because the text editor model doesn't know about components");
QSKIP("Fails because the text editor model doesn't know about components");
{ //usingbutton.qml
QFile file(":/fx/usingbutton.qml");
QVERIFY(file.open(QIODevice::ReadOnly | QIODevice::Text));

View File

@@ -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:

View File

@@ -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

View File

@@ -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:

View File

@@ -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)

View File

@@ -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)

View File

@@ -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__():

View File

@@ -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.")

View File

@@ -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")

View File

@@ -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"
1 language File Exit ISO
2 Czech (CzechRepublic) Soubor Ukončit cs_CZ
3 Danish (Denmark) Fil Afslut da_DK
4 German (Germany) Datei Beenden de_DE
5 French (France) Fichier Quitter fr_FR
6 Japanese (Japan) ファイル(F) 終了(X) ja_JP
7 Polish (Poland) Plik Zakończ pl_PL
8 Russian (%1) Файл Выход ru_RU
9 Slovenian (Slovenia) Datoteka Končaj sl_SL
10 Ukrainian (Ukraine) Файл Вийти uk_UA
11 Chinese (China) 文件(F) 退出(X) zh_CN
12 Chinese (Taiwan) 檔案(F) 離開(X) zh_TW