forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.15'
Change-Id: I3d3dfa04124eed14952294c2847b9851dcb1a5fd
This commit is contained in:
@@ -53,6 +53,12 @@ find_package(Qt5
|
|||||||
if (Qt5_VERSION VERSION_LESS 6.0.0)
|
if (Qt5_VERSION VERSION_LESS 6.0.0)
|
||||||
install(TARGETS Qt6Core5Compat EXPORT QtCreator)
|
install(TARGETS Qt6Core5Compat EXPORT QtCreator)
|
||||||
set(BUILD_WITH_PCH_DEFAULT ON)
|
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()
|
else()
|
||||||
set(BUILD_WITH_PCH_DEFAULT OFF)
|
set(BUILD_WITH_PCH_DEFAULT OFF)
|
||||||
endif()
|
endif()
|
||||||
@@ -88,11 +94,6 @@ endfunction()
|
|||||||
set_if_target(_has_svg_target Qt5::Svg)
|
set_if_target(_has_svg_target Qt5::Svg)
|
||||||
option(ENABLE_SVG_SUPPORT "Enable SVG support" "${_has_svg_target}")
|
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)
|
add_library(OptionalSvg INTERFACE)
|
||||||
if (TARGET Qt5::Svg AND ENABLE_SVG_SUPPORT)
|
if (TARGET Qt5::Svg AND ENABLE_SVG_SUPPORT)
|
||||||
target_link_libraries(OptionalSvg INTERFACE Qt5::Svg)
|
target_link_libraries(OptionalSvg INTERFACE Qt5::Svg)
|
||||||
|
@@ -298,10 +298,12 @@ function(add_qtc_depends target_name)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
foreach(obj_lib IN LISTS object_lib_depends)
|
foreach(obj_lib IN LISTS object_lib_depends)
|
||||||
|
target_compile_options(${target_name} PRIVATE $<TARGET_PROPERTY:${obj_lib},INTERFACE_COMPILE_OPTIONS>)
|
||||||
target_compile_definitions(${target_name} PRIVATE $<TARGET_PROPERTY:${obj_lib},INTERFACE_COMPILE_DEFINITIONS>)
|
target_compile_definitions(${target_name} PRIVATE $<TARGET_PROPERTY:${obj_lib},INTERFACE_COMPILE_DEFINITIONS>)
|
||||||
target_include_directories(${target_name} PRIVATE $<TARGET_PROPERTY:${obj_lib},INTERFACE_INCLUDE_DIRECTORIES>)
|
target_include_directories(${target_name} PRIVATE $<TARGET_PROPERTY:${obj_lib},INTERFACE_INCLUDE_DIRECTORIES>)
|
||||||
endforeach()
|
endforeach()
|
||||||
foreach(obj_lib IN LISTS object_public_depends)
|
foreach(obj_lib IN LISTS object_public_depends)
|
||||||
|
target_compile_options(${target_name} PUBLIC $<TARGET_PROPERTY:${obj_lib},INTERFACE_COMPILE_OPTIONS>)
|
||||||
target_compile_definitions(${target_name} PUBLIC $<TARGET_PROPERTY:${obj_lib},INTERFACE_COMPILE_DEFINITIONS>)
|
target_compile_definitions(${target_name} PUBLIC $<TARGET_PROPERTY:${obj_lib},INTERFACE_COMPILE_DEFINITIONS>)
|
||||||
target_include_directories(${target_name} PUBLIC $<TARGET_PROPERTY:${obj_lib},INTERFACE_INCLUDE_DIRECTORIES>)
|
target_include_directories(${target_name} PUBLIC $<TARGET_PROPERTY:${obj_lib},INTERFACE_INCLUDE_DIRECTORIES>)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
@@ -27,6 +27,12 @@ accept_configuration:
|
|||||||
property: host.os
|
property: host.os
|
||||||
equals_value: MacOS
|
equals_value: MacOS
|
||||||
|
|
||||||
|
machine_type:
|
||||||
|
Build:
|
||||||
|
cores: 8
|
||||||
|
Test:
|
||||||
|
cores: 8
|
||||||
|
|
||||||
run_license_check: &run_license_check
|
run_license_check: &run_license_check
|
||||||
type: Group
|
type: Group
|
||||||
enable_if:
|
enable_if:
|
||||||
|
@@ -541,7 +541,7 @@ int main(int argc, char **argv)
|
|||||||
if (!qEnvironmentVariableIsSet("QT_OPENGL"))
|
if (!qEnvironmentVariableIsSet("QT_OPENGL"))
|
||||||
QCoreApplication::setAttribute(Qt::AA_UseOpenGLES);
|
QCoreApplication::setAttribute(Qt::AA_UseOpenGLES);
|
||||||
#else
|
#else
|
||||||
qputenv("QT_QUICK_BACKEND", "opengl");
|
qputenv("QSG_RHI_BACKEND", "opengl");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (qEnvironmentVariableIsSet("QTCREATOR_DISABLE_NATIVE_MENUBAR")
|
if (qEnvironmentVariableIsSet("QTCREATOR_DISABLE_NATIVE_MENUBAR")
|
||||||
|
@@ -87,30 +87,30 @@ Engine::~Engine()
|
|||||||
|
|
||||||
const QString *Engine::identifier(const QString &s)
|
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)
|
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<QString> Engine::identifiers() const
|
std::unordered_set<QString> Engine::identifiers() const
|
||||||
{
|
{
|
||||||
return _identifiers;
|
return _identifiers;
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString *Engine::number(const QString &s)
|
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)
|
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<QString> Engine::numbers() const
|
std::unordered_set<QString> Engine::numbers() const
|
||||||
{
|
{
|
||||||
return _numbers;
|
return _numbers;
|
||||||
}
|
}
|
||||||
|
@@ -29,9 +29,10 @@
|
|||||||
#include "glslmemorypool.h"
|
#include "glslmemorypool.h"
|
||||||
#include "glsltypes.h"
|
#include "glsltypes.h"
|
||||||
#include <qstring.h>
|
#include <qstring.h>
|
||||||
#include <qset.h>
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
#include <unordered_set>
|
||||||
|
|
||||||
namespace GLSL {
|
namespace GLSL {
|
||||||
|
|
||||||
@@ -91,11 +92,11 @@ public:
|
|||||||
|
|
||||||
const QString *identifier(const QString &s);
|
const QString *identifier(const QString &s);
|
||||||
const QString *identifier(const char *s, int n);
|
const QString *identifier(const char *s, int n);
|
||||||
QSet<QString> identifiers() const;
|
std::unordered_set<QString> identifiers() const;
|
||||||
|
|
||||||
const QString *number(const QString &s);
|
const QString *number(const QString &s);
|
||||||
const QString *number(const char *s, int n);
|
const QString *number(const char *s, int n);
|
||||||
QSet<QString> numbers() const;
|
std::unordered_set<QString> numbers() const;
|
||||||
|
|
||||||
// types
|
// types
|
||||||
const UndefinedType *undefinedType();
|
const UndefinedType *undefinedType();
|
||||||
@@ -128,8 +129,8 @@ public:
|
|||||||
void error(int line, const QString &message);
|
void error(int line, const QString &message);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QSet<QString> _identifiers;
|
std::unordered_set<QString> _identifiers;
|
||||||
QSet<QString> _numbers;
|
std::unordered_set<QString> _numbers;
|
||||||
TypeTable<VectorType> _vectorTypes;
|
TypeTable<VectorType> _vectorTypes;
|
||||||
TypeTable<MatrixType> _matrixTypes;
|
TypeTable<MatrixType> _matrixTypes;
|
||||||
TypeTable<ArrayType> _arrayTypes;
|
TypeTable<ArrayType> _arrayTypes;
|
||||||
|
@@ -342,7 +342,10 @@ void ToolTip::showInternal(const QPoint &pos, const QVariant &content,
|
|||||||
|
|
||||||
void ToolTip::placeTip(const QPoint &pos)
|
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;
|
QPoint p = pos;
|
||||||
p += offsetFromPosition();
|
p += offsetFromPosition();
|
||||||
if (p.x() + m_tip->width() > screen.x() + screen.width())
|
if (p.x() + m_tip->width() > screen.x() + screen.width())
|
||||||
|
@@ -1019,10 +1019,12 @@ void AndroidSdkManagerPrivate::checkPendingLicense(SdkCmdFutureInterface &fi)
|
|||||||
AndroidSdkManager::OperationOutput result;
|
AndroidSdkManager::OperationOutput result;
|
||||||
result.type = AndroidSdkManager::LicenseCheck;
|
result.type = AndroidSdkManager::LicenseCheck;
|
||||||
const QStringList args = {"--licenses", sdkRootArg(m_config)};
|
const QStringList args = {"--licenses", sdkRootArg(m_config)};
|
||||||
if (!fi.isCanceled())
|
if (!fi.isCanceled()) {
|
||||||
sdkManagerCommand(m_config, args, m_sdkManager, fi, result, 100.0);
|
const int timeOutS = 4; // Short timeout as workaround for QTCREATORBUG-25667
|
||||||
else
|
sdkManagerCommand(m_config, args, m_sdkManager, fi, result, 100.0, true, timeOutS);
|
||||||
|
} else {
|
||||||
qCDebug(sdkManagerLog) << "Update: Operation cancelled before start";
|
qCDebug(sdkManagerLog) << "Update: Operation cancelled before start";
|
||||||
|
}
|
||||||
|
|
||||||
fi.reportResult(result);
|
fi.reportResult(result);
|
||||||
fi.setProgressValue(100);
|
fi.setProgressValue(100);
|
||||||
|
@@ -81,7 +81,8 @@ void CTestOutputReader::processOutputLine(const QByteArray &outputLine)
|
|||||||
static const QRegularExpression testProject("^Test project (.*)$");
|
static const QRegularExpression testProject("^Test project (.*)$");
|
||||||
static const QRegularExpression testCase("^(test \\d+)|( Start\\s+\\d+: .*)$");
|
static const QRegularExpression testCase("^(test \\d+)|( Start\\s+\\d+: .*)$");
|
||||||
static const QRegularExpression testResult("^\\s*\\d+/\\d+ Test\\s+#\\d+: (.*) (\\.+)\\s*"
|
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 "
|
static const QRegularExpression summary("^\\d+% tests passed, (\\d+) tests failed "
|
||||||
"out of (\\d+)");
|
"out of (\\d+)");
|
||||||
static const QRegularExpression summaryTime("^Total Test time .* =\\s+(.*) sec$");
|
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)) {
|
} else if (ExactMatch match = testResult.match(line)) {
|
||||||
m_description = match.captured();
|
m_description = match.captured();
|
||||||
m_testName = match.captured(1);
|
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)) {
|
} else if (ExactMatch match = summary.match(line)) {
|
||||||
if (!m_testName.isEmpty())
|
if (!m_testName.isEmpty())
|
||||||
sendCompleteInformation();
|
sendCompleteInformation();
|
||||||
|
@@ -1034,7 +1034,7 @@ const QList<BuildTargetInfo> CMakeBuildSystem::appTargets() const
|
|||||||
const bool forAndroid = DeviceTypeKitAspect::deviceTypeId(kit())
|
const bool forAndroid = DeviceTypeKitAspect::deviceTypeId(kit())
|
||||||
== Android::Constants::ANDROID_DEVICE_TYPE;
|
== Android::Constants::ANDROID_DEVICE_TYPE;
|
||||||
for (const CMakeBuildTarget &ct : m_buildTargets) {
|
for (const CMakeBuildTarget &ct : m_buildTargets) {
|
||||||
if (ct.targetType == UtilityType)
|
if (CMakeBuildSystem::filteredOutTarget(ct))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (ct.targetType == ExecutableType || (forAndroid && ct.targetType == DynamicLibraryType)) {
|
if (ct.targetType == ExecutableType || (forAndroid && ct.targetType == DynamicLibraryType)) {
|
||||||
@@ -1065,11 +1065,10 @@ const QList<BuildTargetInfo> CMakeBuildSystem::appTargets() const
|
|||||||
|
|
||||||
QStringList CMakeBuildSystem::buildTargetTitles() const
|
QStringList CMakeBuildSystem::buildTargetTitles() const
|
||||||
{
|
{
|
||||||
auto nonUtilityTargets = filtered(m_buildTargets, [this](const CMakeBuildTarget &target){
|
auto nonAutogenTargets = filtered(m_buildTargets, [this](const CMakeBuildTarget &target){
|
||||||
return target.targetType != UtilityType ||
|
return !CMakeBuildSystem::filteredOutTarget(target);
|
||||||
CMakeBuildStep::specialTargets(usesAllCapsTargets()).contains(target.title);
|
|
||||||
});
|
});
|
||||||
return transform(nonUtilityTargets, &CMakeBuildTarget::title);
|
return transform(nonAutogenTargets, &CMakeBuildTarget::title);
|
||||||
}
|
}
|
||||||
|
|
||||||
const QList<CMakeBuildTarget> &CMakeBuildSystem::buildTargets() const
|
const QList<CMakeBuildTarget> &CMakeBuildSystem::buildTargets() const
|
||||||
@@ -1091,6 +1090,12 @@ CMakeConfig CMakeBuildSystem::parseCMakeCacheDotTxt(const Utils::FilePath &cache
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CMakeBuildSystem::filteredOutTarget(const CMakeBuildTarget &target)
|
||||||
|
{
|
||||||
|
return target.title.endsWith("_autogen") ||
|
||||||
|
target.title.endsWith("_autogen_timestamp_deps");
|
||||||
|
}
|
||||||
|
|
||||||
bool CMakeBuildSystem::isMultiConfig() const
|
bool CMakeBuildSystem::isMultiConfig() const
|
||||||
{
|
{
|
||||||
return m_reader.isMultiConfig();
|
return m_reader.isMultiConfig();
|
||||||
|
@@ -98,6 +98,8 @@ public:
|
|||||||
static CMakeConfig parseCMakeCacheDotTxt(const Utils::FilePath &cacheFile,
|
static CMakeConfig parseCMakeCacheDotTxt(const Utils::FilePath &cacheFile,
|
||||||
QString *errorMessage);
|
QString *errorMessage);
|
||||||
|
|
||||||
|
static bool filteredOutTarget(const CMakeBuildTarget &target);
|
||||||
|
|
||||||
bool isMultiConfig() const;
|
bool isMultiConfig() const;
|
||||||
bool usesAllCapsTargets() const;
|
bool usesAllCapsTargets() const;
|
||||||
|
|
||||||
|
@@ -71,7 +71,7 @@ void CMakeTargetLocatorFilter::prepareSearch(const QString &entry)
|
|||||||
|
|
||||||
const QList<CMakeBuildTarget> buildTargets = bs->buildTargets();
|
const QList<CMakeBuildTarget> buildTargets = bs->buildTargets();
|
||||||
for (const CMakeBuildTarget &target : buildTargets) {
|
for (const CMakeBuildTarget &target : buildTargets) {
|
||||||
if (target.targetType == UtilityType && !CMakeBuildStep::specialTargets(bs->usesAllCapsTargets()).contains(target.title))
|
if (CMakeBuildSystem::filteredOutTarget(target))
|
||||||
continue;
|
continue;
|
||||||
const int index = target.title.indexOf(entry);
|
const int index = target.title.indexOf(entry);
|
||||||
if (index >= 0) {
|
if (index >= 0) {
|
||||||
|
@@ -160,7 +160,6 @@ extend_qtc_plugin(Core
|
|||||||
|
|
||||||
extend_qtc_plugin(Core
|
extend_qtc_plugin(Core
|
||||||
CONDITION WITH_TESTS
|
CONDITION WITH_TESTS
|
||||||
DEFINES SRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/locator"
|
|
||||||
SOURCES
|
SOURCES
|
||||||
locator/locator_test.cpp
|
locator/locator_test.cpp
|
||||||
locator/locatorfiltertest.cpp locator/locatorfiltertest.h
|
locator/locatorfiltertest.cpp locator/locatorfiltertest.h
|
||||||
|
@@ -276,7 +276,7 @@ Project {
|
|||||||
"locator/locator_test.cpp"
|
"locator/locator_test.cpp"
|
||||||
]
|
]
|
||||||
|
|
||||||
cpp.defines: outer.concat(['SRCDIR="' + path + "/locator" + '"'])
|
cpp.defines: outer.concat(['SRCDIR="' + path + '"'])
|
||||||
}
|
}
|
||||||
|
|
||||||
Group {
|
Group {
|
||||||
|
@@ -50,5 +50,5 @@ equals(TEST, 1) {
|
|||||||
SOURCES += \
|
SOURCES += \
|
||||||
$$PWD/locatorfiltertest.cpp \
|
$$PWD/locatorfiltertest.cpp \
|
||||||
$$PWD/locator_test.cpp
|
$$PWD/locator_test.cpp
|
||||||
DEFINES += SRCDIR=\\\"$$PWD\\\"
|
DEFINES += SRCDIR=\\\"$$PWD/..\\\"
|
||||||
}
|
}
|
||||||
|
@@ -40,7 +40,7 @@ using namespace Core::Tests;
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
QTC_DECLARE_MYTESTDATADIR("../../../../tests/locators/")
|
QTC_DECLARE_MYTESTDATADIR("../../../tests/locators/")
|
||||||
|
|
||||||
class MyBaseFileFilter : public Core::BaseFileFilter
|
class MyBaseFileFilter : public Core::BaseFileFilter
|
||||||
{
|
{
|
||||||
|
@@ -66,20 +66,20 @@ DebuggerOutputParser::DebuggerOutputParser(const QString &output)
|
|||||||
|
|
||||||
void DebuggerOutputParser::skipCommas()
|
void DebuggerOutputParser::skipCommas()
|
||||||
{
|
{
|
||||||
while (from != to && *from == ',')
|
while (from < to && *from == ',')
|
||||||
++from;
|
++from;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebuggerOutputParser::skipSpaces()
|
void DebuggerOutputParser::skipSpaces()
|
||||||
{
|
{
|
||||||
while (from != to && isspace(from->unicode()))
|
while (from < to && isspace(from->unicode()))
|
||||||
++from;
|
++from;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString DebuggerOutputParser::readString(const std::function<bool(char)> &isValidChar)
|
QString DebuggerOutputParser::readString(const std::function<bool(char)> &isValidChar)
|
||||||
{
|
{
|
||||||
QString res;
|
QString res;
|
||||||
while (from != to && isValidChar(from->unicode()))
|
while (from < to && isValidChar(from->unicode()))
|
||||||
res += *from++;
|
res += *from++;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@@ -87,7 +87,7 @@ QString DebuggerOutputParser::readString(const std::function<bool(char)> &isVali
|
|||||||
int DebuggerOutputParser::readInt()
|
int DebuggerOutputParser::readInt()
|
||||||
{
|
{
|
||||||
int res = 0;
|
int res = 0;
|
||||||
while (from != to && *from >= '0' && *from <= '9') {
|
while (from < to && *from >= '0' && *from <= '9') {
|
||||||
res *= 10;
|
res *= 10;
|
||||||
res += (*from++).unicode() - '0';
|
res += (*from++).unicode() - '0';
|
||||||
}
|
}
|
||||||
@@ -101,13 +101,16 @@ QChar DebuggerOutputParser::readChar()
|
|||||||
|
|
||||||
static bool isNameChar(char c)
|
static bool isNameChar(char c)
|
||||||
{
|
{
|
||||||
return c != '=' && c != ':' && !isspace(c);
|
return c != '=' && c != ':' && c != ']' && !isspace(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GdbMi::parseResultOrValue(DebuggerOutputParser &parser)
|
void GdbMi::parseResultOrValue(DebuggerOutputParser &parser)
|
||||||
{
|
{
|
||||||
parser.skipSpaces();
|
parser.skipSpaces();
|
||||||
|
|
||||||
|
if (parser.isAtEnd())
|
||||||
|
return;
|
||||||
|
|
||||||
//qDebug() << "parseResultOrValue: " << parser.buffer();
|
//qDebug() << "parseResultOrValue: " << parser.buffer();
|
||||||
parseValue(parser);
|
parseValue(parser);
|
||||||
parser.skipSpaces();
|
parser.skipSpaces();
|
||||||
@@ -115,8 +118,12 @@ void GdbMi::parseResultOrValue(DebuggerOutputParser &parser)
|
|||||||
//qDebug() << "no valid result in " << parser.buffer();
|
//qDebug() << "no valid result in " << parser.buffer();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (parser.isAtEnd() || parser.isCurrent('('))
|
if (parser.isAtEnd())
|
||||||
return;
|
return;
|
||||||
|
if (parser.isCurrent('(')) {
|
||||||
|
parser.advance();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
m_name = parser.readString(isNameChar);
|
m_name = parser.readString(isNameChar);
|
||||||
|
|
||||||
@@ -293,7 +300,8 @@ void GdbMi::parseList(DebuggerOutputParser &parser)
|
|||||||
parser.advance();
|
parser.advance();
|
||||||
m_type = List;
|
m_type = List;
|
||||||
parser.skipCommas();
|
parser.skipCommas();
|
||||||
while (!parser.isAtEnd()) {
|
while (true) {
|
||||||
|
QTC_ASSERT(!parser.isAtEnd(), break);
|
||||||
if (parser.isCurrent(']')) {
|
if (parser.isCurrent(']')) {
|
||||||
parser.advance();
|
parser.advance();
|
||||||
break;
|
break;
|
||||||
@@ -303,8 +311,6 @@ void GdbMi::parseList(DebuggerOutputParser &parser)
|
|||||||
if (child.isValid()) {
|
if (child.isValid()) {
|
||||||
m_children.push_back(child);
|
m_children.push_back(child);
|
||||||
parser.skipCommas();
|
parser.skipCommas();
|
||||||
} else {
|
|
||||||
parser.advance();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -131,7 +131,7 @@ public:
|
|||||||
|
|
||||||
QChar current() const { return *from; }
|
QChar current() const { return *from; }
|
||||||
bool isCurrent(QChar c) const { return *from == c; }
|
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() { ++from; }
|
||||||
void advance(int n) { from += n; }
|
void advance(int n) { from += n; }
|
||||||
|
@@ -1814,25 +1814,32 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
|
|||||||
return bc->environment().expandedValueForKey(var);
|
return bc->environment().expandedValueForKey(var);
|
||||||
return QString();
|
return QString();
|
||||||
}, false);
|
}, false);
|
||||||
expander->registerPrefix("CurrentDocument:Project:BuildConfig:Env",
|
const char currentBuildEnvVar[] = "CurrentDocument:Project:BuildConfig:Env";
|
||||||
BuildConfiguration::tr("Variables in the active build environment "
|
expander->registerPrefix(currentBuildEnvVar,
|
||||||
"of the project containing the currently open document."),
|
BuildConfiguration::tr(
|
||||||
|
"Variables in the active build environment "
|
||||||
|
"of the project containing the currently open document."),
|
||||||
[](const QString &var) {
|
[](const QString &var) {
|
||||||
if (BuildConfiguration *bc = currentBuildConfiguration())
|
if (BuildConfiguration *bc = currentBuildConfiguration())
|
||||||
return bc->environment().expandedValueForKey(var);
|
return bc->environment().expandedValueForKey(var);
|
||||||
return QString();
|
return QString();
|
||||||
});
|
});
|
||||||
Utils::EnvironmentProvider::addProvider(
|
Utils::EnvironmentProvider::addProvider(
|
||||||
{Constants::VAR_CURRENTBUILD_ENV, tr("Current Build Environment"), []() {
|
{currentBuildEnvVar, tr("Current Build Environment"), []() {
|
||||||
if (BuildConfiguration *bc = currentBuildConfiguration())
|
if (BuildConfiguration *bc = currentBuildConfiguration())
|
||||||
return bc->environment();
|
return bc->environment();
|
||||||
return Utils::Environment::systemEnvironment();
|
return Utils::Environment::systemEnvironment();
|
||||||
}});
|
}});
|
||||||
Utils::EnvironmentProvider::addProvider(
|
Utils::EnvironmentProvider::addProvider(
|
||||||
{"CurrentDocument:Project:BuildConfig:Env", tr("Current Build Environment"), []() {
|
{"CurrentDocument:Project:RunConfig:Env", tr("Current Run Environment"), []() {
|
||||||
if (BuildConfiguration *bc = currentBuildConfiguration())
|
const Project *const project = ProjectTree::currentProject();
|
||||||
return bc->environment();
|
const Target *const target = project ? project->activeTarget() : nullptr;
|
||||||
return Utils::Environment::systemEnvironment();
|
const RunConfiguration *const rc = target ? target->activeRunConfiguration() : nullptr;
|
||||||
|
if (rc) {
|
||||||
|
if (auto envAspect = rc->aspect<EnvironmentAspect>())
|
||||||
|
return envAspect->environment();
|
||||||
|
}
|
||||||
|
return Utils::Environment::systemEnvironment();
|
||||||
}});
|
}});
|
||||||
|
|
||||||
// Global variables for the active project.
|
// Global variables for the active project.
|
||||||
@@ -1884,9 +1891,9 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
|
|||||||
return bc->environment();
|
return bc->environment();
|
||||||
return Utils::Environment::systemEnvironment();
|
return Utils::Environment::systemEnvironment();
|
||||||
}});
|
}});
|
||||||
expander->registerPrefix("ActiveProject:BuildConfig:Env",
|
expander->registerPrefix(activeBuildEnvVar,
|
||||||
BuildConfiguration::tr("Variables in the active build environment "
|
BuildConfiguration::tr("Variables in the active build environment "
|
||||||
"of the active project."),
|
"of the active project."),
|
||||||
[](const QString &var) {
|
[](const QString &var) {
|
||||||
if (BuildConfiguration * const bc = activeBuildConfiguration())
|
if (BuildConfiguration * const bc = activeBuildConfiguration())
|
||||||
return bc->environment().expandedValueForKey(var);
|
return bc->environment().expandedValueForKey(var);
|
||||||
@@ -1907,7 +1914,17 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
|
|||||||
return rc->commandLine().executable().toString();
|
return rc->commandLine().executable().toString();
|
||||||
return QString();
|
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<EnvironmentAspect>())
|
||||||
|
return envAspect->environment();
|
||||||
|
}
|
||||||
|
return Utils::Environment::systemEnvironment();
|
||||||
|
}});
|
||||||
|
expander->registerPrefix(
|
||||||
|
activeRunEnvVar,
|
||||||
tr("Variables in the environment of the active project's active run configuration."),
|
tr("Variables in the environment of the active project's active run configuration."),
|
||||||
[](const QString &var) {
|
[](const QString &var) {
|
||||||
if (const RunConfiguration * const rc = activeRunConfiguration()) {
|
if (const RunConfiguration * const rc = activeRunConfiguration()) {
|
||||||
@@ -1915,7 +1932,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
|
|||||||
return envAspect->environment().expandedValueForKey(var);
|
return envAspect->environment().expandedValueForKey(var);
|
||||||
}
|
}
|
||||||
return QString();
|
return QString();
|
||||||
});
|
});
|
||||||
expander->registerVariable("ActiveProject:RunConfig:WorkingDir",
|
expander->registerVariable("ActiveProject:RunConfig:WorkingDir",
|
||||||
tr("The working directory of the active project's active run configuration."),
|
tr("The working directory of the active project's active run configuration."),
|
||||||
[] {
|
[] {
|
||||||
|
@@ -241,6 +241,12 @@ QVariant read(int variantType, const QString &str)
|
|||||||
|
|
||||||
bool conversionOk = true;
|
bool conversionOk = true;
|
||||||
switch (variantType) {
|
switch (variantType) {
|
||||||
|
case QMetaType::QVariant: {
|
||||||
|
auto tmp = QVariant(str);
|
||||||
|
value = QVariant(tmp);
|
||||||
|
conversionOk = tmp.isValid();
|
||||||
|
break;
|
||||||
|
}
|
||||||
case QMetaType::QPoint:
|
case QMetaType::QPoint:
|
||||||
value = pointFFromString(str, &conversionOk).toPoint();
|
value = pointFFromString(str, &conversionOk).toPoint();
|
||||||
break;
|
break;
|
||||||
|
@@ -33,6 +33,8 @@
|
|||||||
#include <QHash>
|
#include <QHash>
|
||||||
#include <QLibrary>
|
#include <QLibrary>
|
||||||
#include <QMultiHash>
|
#include <QMultiHash>
|
||||||
|
#include <QMutex>
|
||||||
|
#include <QMutexLocker>
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
#include <QRegularExpression>
|
#include <QRegularExpression>
|
||||||
#include <QRegularExpression>
|
#include <QRegularExpression>
|
||||||
|
@@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
#include <QRecursiveMutex>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QXmlStreamWriter>
|
#include <QXmlStreamWriter>
|
||||||
|
|
||||||
|
File diff suppressed because one or more lines are too long
@@ -2,16 +2,33 @@ import QtQuick 2.0
|
|||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
function foo() {
|
function foo() {
|
||||||
{} // 115 9 9
|
{ // 115 9 9
|
||||||
|
var x = 10
|
||||||
|
}
|
||||||
|
{
|
||||||
|
let x = 10
|
||||||
|
}
|
||||||
|
|
||||||
if (a) {}
|
if (a) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
onXChanged: {
|
onXChanged: {
|
||||||
{} // 115 9 9
|
{ // 115 9 9
|
||||||
|
var y = 11
|
||||||
|
}
|
||||||
|
{
|
||||||
|
let y = 11
|
||||||
|
}
|
||||||
|
|
||||||
while (A) {}
|
while (A) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
property int d: {
|
property int d: {
|
||||||
{} // 115 9 9
|
{ // 115 9 9
|
||||||
|
var z = 12
|
||||||
|
}
|
||||||
|
{
|
||||||
|
let y = 12
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user