diff --git a/CMakeLists.txt b/CMakeLists.txt index f0caf09b250..0e7aa764b2e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,6 +53,12 @@ find_package(Qt5 if (Qt5_VERSION VERSION_LESS 6.0.0) install(TARGETS Qt6Core5Compat EXPORT QtCreator) set(BUILD_WITH_PCH_DEFAULT ON) + + # Specify standards conformance mode to MSVC 2017 and later + # Qt6 has the values as part of the Qt6::Platform target interface + if (MSVC AND MSVC_VERSION GREATER_EQUAL 1910) + add_compile_options(/permissive- /Zc:__cplusplus) + endif() else() set(BUILD_WITH_PCH_DEFAULT OFF) endif() @@ -88,11 +94,6 @@ endfunction() set_if_target(_has_svg_target Qt5::Svg) option(ENABLE_SVG_SUPPORT "Enable SVG support" "${_has_svg_target}") -# specify standards conformance mode to MSVC 2017 and later -if (MSVC AND MSVC_VERSION GREATER_EQUAL 1910) - add_compile_options(/permissive-) -endif() - add_library(OptionalSvg INTERFACE) if (TARGET Qt5::Svg AND ENABLE_SVG_SUPPORT) target_link_libraries(OptionalSvg INTERFACE Qt5::Svg) diff --git a/cmake/QtCreatorAPIInternal.cmake b/cmake/QtCreatorAPIInternal.cmake index 4c32dca5090..937ff17a9bd 100644 --- a/cmake/QtCreatorAPIInternal.cmake +++ b/cmake/QtCreatorAPIInternal.cmake @@ -298,10 +298,12 @@ function(add_qtc_depends target_name) endif() foreach(obj_lib IN LISTS object_lib_depends) + target_compile_options(${target_name} PRIVATE $) target_compile_definitions(${target_name} PRIVATE $) target_include_directories(${target_name} PRIVATE $) endforeach() foreach(obj_lib IN LISTS object_public_depends) + target_compile_options(${target_name} PUBLIC $) target_compile_definitions(${target_name} PUBLIC $) target_include_directories(${target_name} PUBLIC $) endforeach() diff --git a/coin/module_config.yaml b/coin/module_config.yaml index 0692ac7cd39..05175f38cd1 100644 --- a/coin/module_config.yaml +++ b/coin/module_config.yaml @@ -27,6 +27,12 @@ accept_configuration: property: host.os equals_value: MacOS +machine_type: + Build: + cores: 8 + Test: + cores: 8 + run_license_check: &run_license_check type: Group enable_if: diff --git a/src/app/main.cpp b/src/app/main.cpp index bc5e61c7840..248fa8efef5 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -541,7 +541,7 @@ int main(int argc, char **argv) if (!qEnvironmentVariableIsSet("QT_OPENGL")) QCoreApplication::setAttribute(Qt::AA_UseOpenGLES); #else - qputenv("QT_QUICK_BACKEND", "opengl"); + qputenv("QSG_RHI_BACKEND", "opengl"); #endif if (qEnvironmentVariableIsSet("QTCREATOR_DISABLE_NATIVE_MENUBAR") diff --git a/src/libs/glsl/glslengine.cpp b/src/libs/glsl/glslengine.cpp index 8c03b69d792..9e305f07f2b 100644 --- a/src/libs/glsl/glslengine.cpp +++ b/src/libs/glsl/glslengine.cpp @@ -87,30 +87,30 @@ Engine::~Engine() const QString *Engine::identifier(const QString &s) { - return &(*_identifiers.insert(s)); + return &(*_identifiers.insert(s).first); } const QString *Engine::identifier(const char *s, int n) { - return &(*_identifiers.insert(QString::fromLatin1(s, n))); + return &(*_identifiers.insert(QString::fromLatin1(s, n)).first); } -QSet Engine::identifiers() const +std::unordered_set Engine::identifiers() const { return _identifiers; } const QString *Engine::number(const QString &s) { - return &(*_numbers.insert(s)); + return &(*_numbers.insert(s).first); } const QString *Engine::number(const char *s, int n) { - return &(*_numbers.insert(QString::fromLatin1(s, n))); + return &(*_numbers.insert(QString::fromLatin1(s, n)).first); } -QSet Engine::numbers() const +std::unordered_set Engine::numbers() const { return _numbers; } diff --git a/src/libs/glsl/glslengine.h b/src/libs/glsl/glslengine.h index 0942d5ef575..1444867131d 100644 --- a/src/libs/glsl/glslengine.h +++ b/src/libs/glsl/glslengine.h @@ -29,9 +29,10 @@ #include "glslmemorypool.h" #include "glsltypes.h" #include -#include + #include #include +#include namespace GLSL { @@ -91,11 +92,11 @@ public: const QString *identifier(const QString &s); const QString *identifier(const char *s, int n); - QSet identifiers() const; + std::unordered_set identifiers() const; const QString *number(const QString &s); const QString *number(const char *s, int n); - QSet numbers() const; + std::unordered_set numbers() const; // types const UndefinedType *undefinedType(); @@ -128,8 +129,8 @@ public: void error(int line, const QString &message); private: - QSet _identifiers; - QSet _numbers; + std::unordered_set _identifiers; + std::unordered_set _numbers; TypeTable _vectorTypes; TypeTable _matrixTypes; TypeTable _arrayTypes; diff --git a/src/libs/utils/tooltip/tooltip.cpp b/src/libs/utils/tooltip/tooltip.cpp index b665cc39423..94d8a4c1643 100644 --- a/src/libs/utils/tooltip/tooltip.cpp +++ b/src/libs/utils/tooltip/tooltip.cpp @@ -342,7 +342,10 @@ void ToolTip::showInternal(const QPoint &pos, const QVariant &content, void ToolTip::placeTip(const QPoint &pos) { - QRect screen = QGuiApplication::screenAt(pos)->availableGeometry(); + QScreen *qscreen = QGuiApplication::screenAt(pos); + if (!qscreen) + qscreen = QGuiApplication::primaryScreen(); + const QRect screen = qscreen->availableGeometry(); QPoint p = pos; p += offsetFromPosition(); if (p.x() + m_tip->width() > screen.x() + screen.width()) diff --git a/src/plugins/android/androidsdkmanager.cpp b/src/plugins/android/androidsdkmanager.cpp index d42c83587d2..ae0dd0dd5c5 100644 --- a/src/plugins/android/androidsdkmanager.cpp +++ b/src/plugins/android/androidsdkmanager.cpp @@ -1019,10 +1019,12 @@ void AndroidSdkManagerPrivate::checkPendingLicense(SdkCmdFutureInterface &fi) AndroidSdkManager::OperationOutput result; result.type = AndroidSdkManager::LicenseCheck; const QStringList args = {"--licenses", sdkRootArg(m_config)}; - if (!fi.isCanceled()) - sdkManagerCommand(m_config, args, m_sdkManager, fi, result, 100.0); - else + if (!fi.isCanceled()) { + const int timeOutS = 4; // Short timeout as workaround for QTCREATORBUG-25667 + sdkManagerCommand(m_config, args, m_sdkManager, fi, result, 100.0, true, timeOutS); + } else { qCDebug(sdkManagerLog) << "Update: Operation cancelled before start"; + } fi.reportResult(result); fi.setProgressValue(100); diff --git a/src/plugins/autotest/ctest/ctestoutputreader.cpp b/src/plugins/autotest/ctest/ctestoutputreader.cpp index 0784a88b4ee..8722e2d9a6d 100644 --- a/src/plugins/autotest/ctest/ctestoutputreader.cpp +++ b/src/plugins/autotest/ctest/ctestoutputreader.cpp @@ -81,7 +81,8 @@ void CTestOutputReader::processOutputLine(const QByteArray &outputLine) static const QRegularExpression testProject("^Test project (.*)$"); static const QRegularExpression testCase("^(test \\d+)|( Start\\s+\\d+: .*)$"); static const QRegularExpression testResult("^\\s*\\d+/\\d+ Test\\s+#\\d+: (.*) (\\.+)\\s*" - "(Passed|\\*\\*\\*Failed)\\s+(.*) sec$"); + "(Passed|\\*\\*\\*Failed|\\*\\*\\*Not Run|" + ".*\\*\\*\\*Exception:.*)\\s+(.*) sec$"); static const QRegularExpression summary("^\\d+% tests passed, (\\d+) tests failed " "out of (\\d+)"); static const QRegularExpression summaryTime("^Total Test time .* =\\s+(.*) sec$"); @@ -110,7 +111,13 @@ void CTestOutputReader::processOutputLine(const QByteArray &outputLine) } else if (ExactMatch match = testResult.match(line)) { m_description = match.captured(); m_testName = match.captured(1); - m_result = (match.captured(3) == "Passed") ? ResultType::Pass : ResultType::Fail; + const QString resultType = match.captured(3); + if (resultType == "Passed") + m_result = ResultType::Pass; + else if (resultType == "***Failed" || resultType == "***Not Run") + m_result = ResultType::Fail; + else + m_result = ResultType::MessageFatal; } else if (ExactMatch match = summary.match(line)) { if (!m_testName.isEmpty()) sendCompleteInformation(); diff --git a/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp b/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp index d0b3db53009..e4ae7e2dc99 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp @@ -1034,7 +1034,7 @@ const QList CMakeBuildSystem::appTargets() const const bool forAndroid = DeviceTypeKitAspect::deviceTypeId(kit()) == Android::Constants::ANDROID_DEVICE_TYPE; for (const CMakeBuildTarget &ct : m_buildTargets) { - if (ct.targetType == UtilityType) + if (CMakeBuildSystem::filteredOutTarget(ct)) continue; if (ct.targetType == ExecutableType || (forAndroid && ct.targetType == DynamicLibraryType)) { @@ -1065,11 +1065,10 @@ const QList CMakeBuildSystem::appTargets() const QStringList CMakeBuildSystem::buildTargetTitles() const { - auto nonUtilityTargets = filtered(m_buildTargets, [this](const CMakeBuildTarget &target){ - return target.targetType != UtilityType || - CMakeBuildStep::specialTargets(usesAllCapsTargets()).contains(target.title); + auto nonAutogenTargets = filtered(m_buildTargets, [this](const CMakeBuildTarget &target){ + return !CMakeBuildSystem::filteredOutTarget(target); }); - return transform(nonUtilityTargets, &CMakeBuildTarget::title); + return transform(nonAutogenTargets, &CMakeBuildTarget::title); } const QList &CMakeBuildSystem::buildTargets() const @@ -1091,6 +1090,12 @@ CMakeConfig CMakeBuildSystem::parseCMakeCacheDotTxt(const Utils::FilePath &cache return result; } +bool CMakeBuildSystem::filteredOutTarget(const CMakeBuildTarget &target) +{ + return target.title.endsWith("_autogen") || + target.title.endsWith("_autogen_timestamp_deps"); +} + bool CMakeBuildSystem::isMultiConfig() const { return m_reader.isMultiConfig(); diff --git a/src/plugins/cmakeprojectmanager/cmakebuildsystem.h b/src/plugins/cmakeprojectmanager/cmakebuildsystem.h index 097d74542d7..39e849830e6 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildsystem.h +++ b/src/plugins/cmakeprojectmanager/cmakebuildsystem.h @@ -98,6 +98,8 @@ public: static CMakeConfig parseCMakeCacheDotTxt(const Utils::FilePath &cacheFile, QString *errorMessage); + static bool filteredOutTarget(const CMakeBuildTarget &target); + bool isMultiConfig() const; bool usesAllCapsTargets() const; diff --git a/src/plugins/cmakeprojectmanager/cmakelocatorfilter.cpp b/src/plugins/cmakeprojectmanager/cmakelocatorfilter.cpp index 1db3ab929b5..d9cf133fea5 100644 --- a/src/plugins/cmakeprojectmanager/cmakelocatorfilter.cpp +++ b/src/plugins/cmakeprojectmanager/cmakelocatorfilter.cpp @@ -71,7 +71,7 @@ void CMakeTargetLocatorFilter::prepareSearch(const QString &entry) const QList buildTargets = bs->buildTargets(); for (const CMakeBuildTarget &target : buildTargets) { - if (target.targetType == UtilityType && !CMakeBuildStep::specialTargets(bs->usesAllCapsTargets()).contains(target.title)) + if (CMakeBuildSystem::filteredOutTarget(target)) continue; const int index = target.title.indexOf(entry); if (index >= 0) { diff --git a/src/plugins/coreplugin/CMakeLists.txt b/src/plugins/coreplugin/CMakeLists.txt index 8c24055b61a..5c04a179e84 100644 --- a/src/plugins/coreplugin/CMakeLists.txt +++ b/src/plugins/coreplugin/CMakeLists.txt @@ -160,7 +160,6 @@ extend_qtc_plugin(Core extend_qtc_plugin(Core CONDITION WITH_TESTS - DEFINES SRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/locator" SOURCES locator/locator_test.cpp locator/locatorfiltertest.cpp locator/locatorfiltertest.h diff --git a/src/plugins/coreplugin/coreplugin.qbs b/src/plugins/coreplugin/coreplugin.qbs index f4f583ab49a..3acda9e1a17 100644 --- a/src/plugins/coreplugin/coreplugin.qbs +++ b/src/plugins/coreplugin/coreplugin.qbs @@ -276,7 +276,7 @@ Project { "locator/locator_test.cpp" ] - cpp.defines: outer.concat(['SRCDIR="' + path + "/locator" + '"']) + cpp.defines: outer.concat(['SRCDIR="' + path + '"']) } Group { diff --git a/src/plugins/coreplugin/locator/locator.pri b/src/plugins/coreplugin/locator/locator.pri index 945cf059f6e..1fe7fcfc7c3 100644 --- a/src/plugins/coreplugin/locator/locator.pri +++ b/src/plugins/coreplugin/locator/locator.pri @@ -50,5 +50,5 @@ equals(TEST, 1) { SOURCES += \ $$PWD/locatorfiltertest.cpp \ $$PWD/locator_test.cpp - DEFINES += SRCDIR=\\\"$$PWD\\\" + DEFINES += SRCDIR=\\\"$$PWD/..\\\" } diff --git a/src/plugins/coreplugin/locator/locator_test.cpp b/src/plugins/coreplugin/locator/locator_test.cpp index ac9eaf3421b..afe04a39aeb 100644 --- a/src/plugins/coreplugin/locator/locator_test.cpp +++ b/src/plugins/coreplugin/locator/locator_test.cpp @@ -40,7 +40,7 @@ using namespace Core::Tests; namespace { -QTC_DECLARE_MYTESTDATADIR("../../../../tests/locators/") +QTC_DECLARE_MYTESTDATADIR("../../../tests/locators/") class MyBaseFileFilter : public Core::BaseFileFilter { diff --git a/src/plugins/debugger/debuggerprotocol.cpp b/src/plugins/debugger/debuggerprotocol.cpp index c9ffcde22aa..6dc856324da 100644 --- a/src/plugins/debugger/debuggerprotocol.cpp +++ b/src/plugins/debugger/debuggerprotocol.cpp @@ -66,20 +66,20 @@ DebuggerOutputParser::DebuggerOutputParser(const QString &output) void DebuggerOutputParser::skipCommas() { - while (from != to && *from == ',') + while (from < to && *from == ',') ++from; } void DebuggerOutputParser::skipSpaces() { - while (from != to && isspace(from->unicode())) + while (from < to && isspace(from->unicode())) ++from; } QString DebuggerOutputParser::readString(const std::function &isValidChar) { QString res; - while (from != to && isValidChar(from->unicode())) + while (from < to && isValidChar(from->unicode())) res += *from++; return res; } @@ -87,7 +87,7 @@ QString DebuggerOutputParser::readString(const std::function &isVali int DebuggerOutputParser::readInt() { int res = 0; - while (from != to && *from >= '0' && *from <= '9') { + while (from < to && *from >= '0' && *from <= '9') { res *= 10; res += (*from++).unicode() - '0'; } @@ -101,13 +101,16 @@ QChar DebuggerOutputParser::readChar() static bool isNameChar(char c) { - return c != '=' && c != ':' && !isspace(c); + return c != '=' && c != ':' && c != ']' && !isspace(c); } void GdbMi::parseResultOrValue(DebuggerOutputParser &parser) { parser.skipSpaces(); + if (parser.isAtEnd()) + return; + //qDebug() << "parseResultOrValue: " << parser.buffer(); parseValue(parser); parser.skipSpaces(); @@ -115,8 +118,12 @@ void GdbMi::parseResultOrValue(DebuggerOutputParser &parser) //qDebug() << "no valid result in " << parser.buffer(); return; } - if (parser.isAtEnd() || parser.isCurrent('(')) + if (parser.isAtEnd()) return; + if (parser.isCurrent('(')) { + parser.advance(); + return; + } m_name = parser.readString(isNameChar); @@ -293,7 +300,8 @@ void GdbMi::parseList(DebuggerOutputParser &parser) parser.advance(); m_type = List; parser.skipCommas(); - while (!parser.isAtEnd()) { + while (true) { + QTC_ASSERT(!parser.isAtEnd(), break); if (parser.isCurrent(']')) { parser.advance(); break; @@ -303,8 +311,6 @@ void GdbMi::parseList(DebuggerOutputParser &parser) if (child.isValid()) { m_children.push_back(child); parser.skipCommas(); - } else { - parser.advance(); } } } diff --git a/src/plugins/debugger/debuggerprotocol.h b/src/plugins/debugger/debuggerprotocol.h index 3154688c56e..7038097619a 100644 --- a/src/plugins/debugger/debuggerprotocol.h +++ b/src/plugins/debugger/debuggerprotocol.h @@ -131,7 +131,7 @@ public: QChar current() const { return *from; } bool isCurrent(QChar c) const { return *from == c; } - bool isAtEnd() const { return from == to; } + bool isAtEnd() const { return from >= to; } void advance() { ++from; } void advance(int n) { from += n; } diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index e41c7300511..5c7c3a03df0 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -1814,25 +1814,32 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er return bc->environment().expandedValueForKey(var); return QString(); }, false); - expander->registerPrefix("CurrentDocument:Project:BuildConfig:Env", - BuildConfiguration::tr("Variables in the active build environment " - "of the project containing the currently open document."), + const char currentBuildEnvVar[] = "CurrentDocument:Project:BuildConfig:Env"; + expander->registerPrefix(currentBuildEnvVar, + BuildConfiguration::tr( + "Variables in the active build environment " + "of the project containing the currently open document."), [](const QString &var) { if (BuildConfiguration *bc = currentBuildConfiguration()) return bc->environment().expandedValueForKey(var); return QString(); }); Utils::EnvironmentProvider::addProvider( - {Constants::VAR_CURRENTBUILD_ENV, tr("Current Build Environment"), []() { + {currentBuildEnvVar, tr("Current Build Environment"), []() { if (BuildConfiguration *bc = currentBuildConfiguration()) return bc->environment(); return Utils::Environment::systemEnvironment(); }}); Utils::EnvironmentProvider::addProvider( - {"CurrentDocument:Project:BuildConfig:Env", tr("Current Build Environment"), []() { - if (BuildConfiguration *bc = currentBuildConfiguration()) - return bc->environment(); - return Utils::Environment::systemEnvironment(); + {"CurrentDocument:Project:RunConfig:Env", tr("Current Run Environment"), []() { + const Project *const project = ProjectTree::currentProject(); + const Target *const target = project ? project->activeTarget() : nullptr; + const RunConfiguration *const rc = target ? target->activeRunConfiguration() : nullptr; + if (rc) { + if (auto envAspect = rc->aspect()) + return envAspect->environment(); + } + return Utils::Environment::systemEnvironment(); }}); // Global variables for the active project. @@ -1884,9 +1891,9 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er return bc->environment(); return Utils::Environment::systemEnvironment(); }}); - expander->registerPrefix("ActiveProject:BuildConfig:Env", + expander->registerPrefix(activeBuildEnvVar, BuildConfiguration::tr("Variables in the active build environment " - "of the active project."), + "of the active project."), [](const QString &var) { if (BuildConfiguration * const bc = activeBuildConfiguration()) return bc->environment().expandedValueForKey(var); @@ -1907,7 +1914,17 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er return rc->commandLine().executable().toString(); return QString(); }); - expander->registerPrefix("ActiveProject:RunConfig:Env", + const char activeRunEnvVar[] = "ActiveProject:RunConfig:Env"; + Utils::EnvironmentProvider::addProvider( + {activeRunEnvVar, tr("Active run environment of the active project."), [] { + if (const RunConfiguration *const rc = activeRunConfiguration()) { + if (auto envAspect = rc->aspect()) + return envAspect->environment(); + } + return Utils::Environment::systemEnvironment(); + }}); + expander->registerPrefix( + activeRunEnvVar, tr("Variables in the environment of the active project's active run configuration."), [](const QString &var) { if (const RunConfiguration * const rc = activeRunConfiguration()) { @@ -1915,7 +1932,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er return envAspect->environment().expandedValueForKey(var); } return QString(); - }); + }); expander->registerVariable("ActiveProject:RunConfig:WorkingDir", tr("The working directory of the active project's active run configuration."), [] { diff --git a/src/plugins/qmldesigner/designercore/model/propertyparser.cpp b/src/plugins/qmldesigner/designercore/model/propertyparser.cpp index b58b3eb2bdb..3c7b498a929 100644 --- a/src/plugins/qmldesigner/designercore/model/propertyparser.cpp +++ b/src/plugins/qmldesigner/designercore/model/propertyparser.cpp @@ -241,6 +241,12 @@ QVariant read(int variantType, const QString &str) bool conversionOk = true; switch (variantType) { + case QMetaType::QVariant: { + auto tmp = QVariant(str); + value = QVariant(tmp); + conversionOk = tmp.isValid(); + break; + } case QMetaType::QPoint: value = pointFFromString(str, &conversionOk).toPoint(); break; diff --git a/src/tools/iostool/iosdevicemanager.cpp b/src/tools/iostool/iosdevicemanager.cpp index cab1d69ed3f..0f24d58868f 100644 --- a/src/tools/iostool/iosdevicemanager.cpp +++ b/src/tools/iostool/iosdevicemanager.cpp @@ -33,6 +33,8 @@ #include #include #include +#include +#include #include #include #include diff --git a/src/tools/iostool/iostool.h b/src/tools/iostool/iostool.h index a2fd1f040e4..6aa85216ca0 100644 --- a/src/tools/iostool/iostool.h +++ b/src/tools/iostool/iostool.h @@ -29,6 +29,7 @@ #include #include +#include #include #include diff --git a/tests/auto/debugger/tst_protocol.cpp b/tests/auto/debugger/tst_protocol.cpp index 31f6423c43c..d3258ff5925 100644 --- a/tests/auto/debugger/tst_protocol.cpp +++ b/tests/auto/debugger/tst_protocol.cpp @@ -39,6 +39,8 @@ public: private slots: void parseCString(); void parseCString_data(); + void gdbmiFromString(); + void gdbmiFromString_data(); }; void tst_protocol::parseCString() @@ -85,6 +87,28 @@ void tst_protocol::parseCString_data() << R"(abcäédefñ)"; } +void tst_protocol::gdbmiFromString() +{ + QFETCH(QString, input); + + Debugger::Internal::GdbMi gdbmi; + gdbmi.fromString(input); +} + +void tst_protocol::gdbmiFromString_data() +{ + QTest::addColumn("input"); + + const QString testData = R"([Thread 0x7fffa2ffd640 (LWP 263820) exited] +[Thread 0x7fffa1ffb640 (LWP 263815) exited] +[Thread 0x7fffa27fc640 (LWP 263802) exited] +[Thread 0x7fff7ffff640 (LWP 263826) exited] +result={token="0",data=[{iname="local.this",name="this",origaddr="0x7fffffffa3c8",address="0x122c660",autoderefcount="1",address="0x122c660",numchild="1",type="Git::Internal::GitClient",value="",},{iname="local.workingDirectory",name="workingDirectory",numchild="1",address="0x7fffffffa598",type="QString &",valueencoded="utf16",value="2F0068006F006D0065002F006A006100720065006B002F006400650076002F00630072006500610074006F0072002D006D0061007300740065007200",},{iname="local.fileName",name="fileName",numchild="1",address="0x7fffffffa590",type="QString &",valueencoded="utf16",value="7300720063002F006C006900620073002F007500740069006C0073002F007300680065006C006C0063006F006D006D0061006E0064002E00630070007000",},{iname="local.enableAnnotationContextMenu",name="enableAnnotationContextMenu",address="0x7fffffffa3b4",numchild="0",type="bool",value="1",},{iname="local.args",name="args",numchild="0",address="0x7fffffffa588",type="QStringList &",valueencoded="itemcount",value="0",},{iname="local.msgArg",name="msgArg",numchild="1",address="0x7fffffffa408",type="QString",valueencoded="utf16",value="7300720063002F006C006900620073002F007500740069006C0073002F007300680065006C006C0063006F006D006D0061006E0064002E00630070007000",},{iname="local.workingDir",name="workingDir",numchild="1",address="0x7fffffffa400",type="QString",valueencoded="utf16",value="2F0068006F006D0065002F006A006100720065006B002F006400650076002F00630072006500610074006F0072002D006D0061007300740065007200",},{iname="local.title",name="title",numchild="1",address="0x7fffffffa3f8",type="QString",valueencoded="utf16",value="47006900740020004C006F006700200022007300720063002F006C006900620073002F007500740069006C0073002F007300680065006C006C0063006F006D006D0061006E0064002E006300700070002200",},{iname="local.editorId",name="editorId",numchild="1",address="0x7fffffffa3f0",type="Utils::Id",valueencoded="latin1",value="476974204C6F6720456469746F72",},{iname="local.sourceFile",name="sourceFile",numchild="1",address="0x7fffffffa3e8",type="QString",valueencoded="utf16",value="2F0068006F006D0065002F006A006100720065006B002F006400650076002F00630072006500610074006F0072002D006D00610073007400650072002F007300720063002F006C006900620073002F007500740069006C0073002F007300680065006C006C0063006F006D006D0061006E0064002E00630070007000",},{iname="local.editor",name="editor",origaddr="0x7fffffffa520",address="0x27ff400",numchild="1",type="Git::Internal::GitEditorWidget*",value="0x27ff400",},{iname="local.argWidget",name="argWidget",address="0x1fe47c0",numchild="1",type="Git::Internal::GitLogArgumentsWidget*",value="0x1fe47c0",},{iname="local.arguments",name="arguments",numchild="11",address="0x7fffffffa3e0",type="QStringList",valueencoded="itemcount",value="11",},{iname="local.logCount",name="logCount",address="0x7fffffffa51c",numchild="0",type="int",value="100",},{iname="local.grepValue",name="grepValue",address="0x7fffffffa3d8",type="QString",valueencoded="utf16",value="",},{iname="local.pickaxeValue",name="pickaxeValue",address="0x7fffffffa3d0",type="QString",valueencoded="utf16",value="",},{iname="watch.0",wname="266D5F6D75746578",numchild="0",type=" ",value="",},{iname="watch.1",wname="266D6F64656C4D616E616765722D3E6D5F6D75746578",numchild="0",type=" ",value="",},{iname="watch.2",wname="62696E64696E672D3E73796D626F6C732829",numchild="0",type=" ",value="",},{iname="watch.3",wname="64",origaddr="0x7fffc5c0e630",address="0xfe5100",numchild="1",type="VcsBase::VcsOutputWindowPrivate*",value="0xfe5100",},{iname="watch.4",wname="642D3E636F6E74656E7473",numchild="0",type=" ",value="",},{iname="watch.5",wname="642D3E64697361626C65436F6465506172736572",numchild="0",type=" ",value="",},{iname="watch.6",wname="642D3E6D5F63757272656E74456469746F72",numchild="0",type=" ",value="",},{iname="watch.7",wname="642D3E6D5F6578747261456469746F72537570706F727473",numchild="0",type=" ",value="",},{iname="watch.8",wname="642D3E6D5F6C6F6164696E6753657373696F6E",numchild="0",type=" ",value="",},{iname="watch.9",wname="64656C61796564496E697469616C697A655175657565",numchild="0",type=" ",value="",},{iname="watch.10",wname="66756E6374696F6E",numchild="0",type=" ",value="",},{iname="watch.11",wname="69636F6E54797065",numchild="0",type=" ",value="",},{iname="watch.12",wname="6974656D416464",numchild="0",type=" ",value="",},{iname="watch.13",wname="6D5F616363657074",numchild="0",type=" ",value="",},{iname="watch.14",wname="6D5F6461746143616C6C6261636B",numchild="0",type=" ",value="",},{iname="watch.15",wname="6D5F67656E65726174656446696C654E616D65",numchild="0",type=" ",value="",},{iname="watch.16",wname="6D5F6E65656473557064617465",numchild="0",type=" ",value="",},{iname="watch.17",wname="6D5F717263436F6E74656E7473",numchild="0",type=" ",value="",},{iname="watch.18",wname="6D6F64656C4D616E61676572",numchild="0",type=" ",value="",},{iname="watch.19",wname="6E616D65",numchild="0",type=" ",value="",},{iname="watch.20",wname="706172736572",numchild="0",type=" ",value="",},{iname="watch.21",wname="7061727365722E746F",numchild="0",type=" ",value="",},{iname="watch.22",wname="7265736F6C7665546172676574",numchild="0",type=" ",value="",},{iname="watch.23",wname="73796D626F6C2D3E656E636C6F73696E6753636F70652829",numchild="0",type=" ",value="",},{iname="watch.24",wname="7461675F6E616D65",numchild="0",type=" ",value="",},{iname="watch.25",wname="74797065",numchild="0",type=" ",value="",},],typeinfo=[],partial="0",counts={},timings=[]} )"; + + QTest::newRow("with_thread_finished") + << testData; +} + QTEST_APPLESS_MAIN(tst_protocol); #include "tst_protocol.moc" diff --git a/tests/auto/qml/codemodel/check/useless-blocks.qml b/tests/auto/qml/codemodel/check/useless-blocks.qml index fc1c1e116b7..9fa0700c6a4 100644 --- a/tests/auto/qml/codemodel/check/useless-blocks.qml +++ b/tests/auto/qml/codemodel/check/useless-blocks.qml @@ -2,16 +2,33 @@ import QtQuick 2.0 Rectangle { function foo() { - {} // 115 9 9 + { // 115 9 9 + var x = 10 + } + { + let x = 10 + } + if (a) {} } onXChanged: { - {} // 115 9 9 + { // 115 9 9 + var y = 11 + } + { + let y = 11 + } + while (A) {} } property int d: { - {} // 115 9 9 + { // 115 9 9 + var z = 12 + } + { + let y = 12 + } } }