Commit 5e8e619d authored by Orgad Shaneh's avatar Orgad Shaneh

Merge remote-tracking branch 'origin/4.4' into 4.5

Change-Id: I9b7cb3d845628abf69a73a279f5a79202c0976c2
parents 2966b734 6afdb8bd
Qt Creator version 4.4.1 contains bug fixes.
The most important changes are listed in this document. For a complete
list of changes, see the Git log for the Qt Creator sources that
you can check out from the public Git repository. For example:
git clone git://code.qt.io/qt-creator/qt-creator.git
git log --cherry-pick --pretty=oneline v4.4.0..v4.4.1
FakeVim
* Fixed recognition of shortened `tabnext` and `tabprevious` commands
(QTCREATORBUG-18843)
All Projects
* Fixed `Add Existing Files` for top-level project nodes (QTCREATORBUG-18896)
C++ Support
* Improved handling of parsing failures (QTCREATORBUG-18864)
* Fixed crash with invalid raw string literal (QTCREATORBUG-18941)
* Fixed that code model did not use sysroot as reported from the build system
(QTCREATORBUG-18633)
* Fixed highlighting of `float` in C files (QTCREATORBUG-18879)
* Fixed `Convert to Camel Case` (QTCREATORBUG-18947)
Debugging
* Fixed that custom `solib-search-path` startup commands were ignored
(QTCREATORBUG-18812)
* Fixed `Run in terminal` when debugging external application
(QTCREATORBUG-18912)
* Fixed pretty printing of `CHAR` and `WCHAR`
Clang Static Analyzer
* Fixed options passed to analyzer on Windows
Qt Quick Designer
* Fixed usage of `shift` modifier when reparenting layouts
SCXML Editor
* Fixed eventless transitions (QTCREATORBUG-18345)
Test Integration
* Fixed test result output when debugging
Platform Specific
Windows
* Fixed auto-detection of CMake 3.9 and later
Android
* Fixed issues with new Android SDK (26.1.1) (QTCREATORBUG-18962)
* Fixed search path for QML modules when debugging
QNX
* Fixed debugging (QTCREATORBUG-18804, QTCREATORBUG-17901)
* Fixed QML profiler startup (QTCREATORBUG-18954)
......@@ -4,6 +4,8 @@ import qbs.FileInfo
Module {
Depends { name: "qtc" }
property bool priority: 1 // TODO: Remove declaration after 1.11 is out.
property bool enableUnitTests: false
property bool enableProjectFileUpdates: true
property bool installApiHeaders: false
......
......@@ -67,6 +67,7 @@ source_include_patterns = [
r"^doc/.*$", # include everything under doc/
r"^.*\.pri$", # .pri files in all directories that are looked into
r"^.*\.h$", # .h files in all directories that are looked into
r"^.*\.hpp$" # .hpp files in all directories that are looked into
]
build_include_patterns = [
......
......@@ -321,7 +321,7 @@ private:
inline int consumeToken() {
if (_index < int(_tokens.size()))
return _index++;
return _tokens.size() - 1;
return static_cast<int>(_tokens.size()) - 1;
}
inline const Token &tokenAt(int index) const {
if (index == 0)
......@@ -468,30 +468,30 @@ Parser::Parser(Engine *engine, const char *source, unsigned size, int variant)
switch (tk.kind) {
case T_LEFT_PAREN:
parenStack.push(_tokens.size());
parenStack.push(static_cast<int>(_tokens.size()));
break;
case T_LEFT_BRACKET:
bracketStack.push(_tokens.size());
bracketStack.push(static_cast<int>(_tokens.size()));
break;
case T_LEFT_BRACE:
braceStack.push(_tokens.size());
braceStack.push(static_cast<int>(_tokens.size()));
break;
case T_RIGHT_PAREN:
if (! parenStack.empty()) {
_tokens[parenStack.top()].matchingBrace = _tokens.size();
_tokens[parenStack.top()].matchingBrace = static_cast<int>(_tokens.size());
parenStack.pop();
}
break;
case T_RIGHT_BRACKET:
if (! bracketStack.empty()) {
_tokens[bracketStack.top()].matchingBrace = _tokens.size();
_tokens[bracketStack.top()].matchingBrace = static_cast<int>(_tokens.size());
bracketStack.pop();
}
break;
case T_RIGHT_BRACE:
if (! braceStack.empty()) {
_tokens[braceStack.top()].matchingBrace = _tokens.size();
_tokens[braceStack.top()].matchingBrace = static_cast<int>(_tokens.size());
braceStack.pop();
}
break;
......@@ -519,9 +519,13 @@ AST *Parser::parse(int startToken)
_recovered = false;
_tos = -1;
_startToken.kind = startToken;
int recoveryAttempts = 0;
do {
again:
recoveryAttempts = 0;
againAfterRecovery:
if (unsigned(++_tos) == _stateStack.size()) {
_stateStack.resize(_tos * 2);
_locationStack.resize(_tos * 2);
......@@ -564,6 +568,7 @@ AST *Parser::parse(int startToken)
reduce(ruleno);
action = nt_action(_stateStack[_tos], lhs[ruleno] - TERMINAL_COUNT);
} else if (action == 0) {
++recoveryAttempts;
const int line = _tokens[yyloc].line + 1;
QString message = QLatin1String("Syntax error");
if (yytoken != -1) {
......@@ -574,7 +579,7 @@ AST *Parser::parse(int startToken)
for (; _tos; --_tos) {
const int state = _stateStack[_tos];
static int tks[] = {
static int tks1[] = {
T_RIGHT_BRACE, T_RIGHT_PAREN, T_RIGHT_BRACKET,
T_SEMICOLON, T_COLON, T_COMMA,
T_NUMBER, T_TYPE_NAME, T_IDENTIFIER,
......@@ -582,6 +587,16 @@ AST *Parser::parse(int startToken)
T_WHILE,
0
};
static int tks2[] = {
T_RIGHT_BRACE, T_RIGHT_PAREN, T_RIGHT_BRACKET,
T_SEMICOLON, T_COLON, T_COMMA,
0
};
int *tks;
if (recoveryAttempts < 2)
tks = tks1;
else
tks = tks2; // Avoid running into an endless loop for e.g.: for(int x=0; x y
for (int *tptr = tks; *tptr; ++tptr) {
const int next = t_action(state, *tptr);
......@@ -604,7 +619,7 @@ AST *Parser::parse(int startToken)
yytoken = -1;
action = next;
goto again;
goto againAfterRecovery;
}
}
}
......
#line 423 "./glsl.g"
#line 413 "./glsl.g"
/****************************************************************************
**
......@@ -109,9 +109,13 @@ AST *Parser::parse(int startToken)
_recovered = false;
_tos = -1;
_startToken.kind = startToken;
int recoveryAttempts = 0;
do {
again:
recoveryAttempts = 0;
againAfterRecovery:
if (unsigned(++_tos) == _stateStack.size()) {
_stateStack.resize(_tos * 2);
_locationStack.resize(_tos * 2);
......@@ -154,6 +158,7 @@ AST *Parser::parse(int startToken)
reduce(ruleno);
action = nt_action(_stateStack[_tos], lhs[ruleno] - TERMINAL_COUNT);
} else if (action == 0) {
++recoveryAttempts;
const int line = _tokens[yyloc].line + 1;
QString message = QLatin1String("Syntax error");
if (yytoken != -1) {
......@@ -164,7 +169,7 @@ AST *Parser::parse(int startToken)
for (; _tos; --_tos) {
const int state = _stateStack[_tos];
static int tks[] = {
static int tks1[] = {
T_RIGHT_BRACE, T_RIGHT_PAREN, T_RIGHT_BRACKET,
T_SEMICOLON, T_COLON, T_COMMA,
T_NUMBER, T_TYPE_NAME, T_IDENTIFIER,
......@@ -172,6 +177,16 @@ AST *Parser::parse(int startToken)
T_WHILE,
0
};
static int tks2[] = {
T_RIGHT_BRACE, T_RIGHT_PAREN, T_RIGHT_BRACKET,
T_SEMICOLON, T_COLON, T_COMMA,
0
};
int *tks;
if (recoveryAttempts < 2)
tks = tks1;
else
tks = tks2; // Avoid running into an endless loop for e.g.: for(int x=0; x y
for (int *tptr = tks; *tptr; ++tptr) {
const int next = t_action(state, *tptr);
......@@ -194,7 +209,7 @@ AST *Parser::parse(int startToken)
yytoken = -1;
action = next;
goto again;
goto againAfterRecovery;
}
}
}
......
#line 215 "./glsl.g"
#line 210 "./glsl.g"
/****************************************************************************
**
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
......@@ -33,6 +33,7 @@
#include "utils/environment.h"
#include <QLoggingCategory>
#include <QRegularExpression>
#include <QSettings>
namespace {
......@@ -172,8 +173,9 @@ void SdkManagerOutputParser::parsePackageListing(const QString &output)
}
};
foreach (QString outputLine, output.split('\n')) {
MarkerTag marker = parseMarkers(outputLine);
QRegularExpression delimiters("[\n\r]");
foreach (QString outputLine, output.split(delimiters)) {
MarkerTag marker = parseMarkers(outputLine.trimmed());
if (marker & SectionMarkers) {
// Section marker found. Update the current section being parsed.
......
......@@ -112,17 +112,15 @@ QString BareMetalRunConfiguration::defaultDisplayName()
{
if (!m_projectFilePath.isEmpty())
//: %1 is the name of the project run via hardware debugger
return tr("%1 (via GDB server or hardware debugger)").arg(QFileInfo(m_projectFilePath).completeBaseName());
return tr("%1 (via GDB server or hardware debugger)").arg(QFileInfo(m_projectFilePath).fileName());
//: Bare Metal run configuration default run name
return tr("Run on GDB server or hardware debugger");
}
QString BareMetalRunConfiguration::localExecutableFilePath() const
{
const QString targetName = QFileInfo(m_projectFilePath).completeBaseName();
return target()->applicationTargets()
.targetFilePath(FileName::fromString(targetName).toString()).toString();
const QString targetName = QFileInfo(m_projectFilePath).fileName();
return target()->applicationTargets().targetFilePath(targetName).toString();
}
QString BareMetalRunConfiguration::arguments() const
......@@ -149,7 +147,7 @@ QString BareMetalRunConfiguration::buildSystemTarget() const
{
const BuildTargetInfoList targets = target()->applicationTargets();
const Utils::FileName projectFilePath = Utils::FileName::fromString(QFileInfo(m_projectFilePath).path());
const QString targetName = QFileInfo(m_projectFilePath).completeBaseName();
const QString targetName = QFileInfo(m_projectFilePath).fileName();
auto bst = std::find_if(targets.list.constBegin(), targets.list.constEnd(),
[&projectFilePath,&targetName](const BuildTargetInfo &bti) { return bti.projectFilePath == projectFilePath && bti.targetName == targetName; });
return (bst == targets.list.constEnd()) ? QString() : bst->targetName;
......
......@@ -60,7 +60,7 @@ bool BareMetalRunConfigurationFactory::canCreate(Target *parent, Core::Id id) co
{
if (!canHandle(parent))
return false;
const QString targetName = QFileInfo(pathFromId(id)).completeBaseName();
const QString targetName = QFileInfo(pathFromId(id)).fileName();
return id == BareMetalCustomRunConfiguration::runConfigId()
|| !parent->applicationTargets().targetFilePath(targetName).isEmpty();
}
......@@ -100,7 +100,7 @@ QString BareMetalRunConfigurationFactory::displayNameForId(Core::Id id) const
if (id == BareMetalCustomRunConfiguration::runConfigId())
return BareMetalCustomRunConfiguration::runConfigDefaultDisplayName();
return tr("%1 (on GDB server or hardware debugger)")
.arg(QFileInfo(pathFromId(id)).completeBaseName());
.arg(QFileInfo(pathFromId(id)).fileName());
}
RunConfiguration *BareMetalRunConfigurationFactory::doCreate(Target *parent, Core::Id id)
......
......@@ -254,6 +254,10 @@ QVariantMap DefaultPropertyProvider::autoGeneratedProperties(const ProjectExplor
auto archs = architectures(mainTc);
if (!archs.isEmpty())
data.insert(QLatin1String(QBS_ARCHITECTURES), archs);
if (mainTc->targetAbi() !=
ProjectExplorer::Abi::abiFromTargetTriplet(mainTc->originalTargetTriple())) {
data.insert(QLatin1String(QBS_ARCHITECTURE), architecture(mainTc->targetAbi()));
}
data.insert(QLatin1String(QBS_TARGETOS), targetOSList(targetAbi, k));
QStringList toolchain = toolchainList(mainTc);
......
......@@ -78,6 +78,7 @@ const char QBS_PRODUCT_OVERLAY_ICON[] = ":/qbsprojectmanager/images/productgear.
const char QBS_TARGETOS[] = "qbs.targetOS";
const char QBS_SYSROOT[] = "qbs.sysroot";
const char QBS_ARCHITECTURES[] = "qbs.architectures";
const char QBS_ARCHITECTURE[] = "qbs.architecture";
const char QBS_TOOLCHAIN[] = "qbs.toolchain";
const char CPP_TOOLCHAINPATH[] = "cpp.toolchainInstallPath";
const char CPP_TOOLCHAINPREFIX[] = "cpp.toolchainPrefix";
......
......@@ -36,76 +36,54 @@
#include <utils/qtcassert.h>
#include <utils/qtcprocess.h>
#include <qmldebug/qmldebugcommandlinearguments.h>
#include <qmldebug/qmloutputparser.h>
#include <ssh/sshconnection.h>
using namespace ProjectExplorer;
using namespace Utils;
namespace Qnx {
namespace Internal {
class QnxAnalyzeeRunner : public SimpleTargetRunner
{
public:
QnxAnalyzeeRunner(RunControl *runControl, PortsGatherer *portsGatherer)
: SimpleTargetRunner(runControl), m_portsGatherer(portsGatherer)
{
setDisplayName("QnxAnalyzeeRunner");
}
private:
void start() override
{
Utils::Port port = m_portsGatherer->findPort();
auto r = runnable().as<StandardRunnable>();
if (!r.commandLineArguments.isEmpty())
r.commandLineArguments += ' ';
r.commandLineArguments +=
QmlDebug::qmlDebugTcpArguments(QmlDebug::QmlProfilerServices, port);
setRunnable(r);
SimpleTargetRunner::start();
}
PortsGatherer *m_portsGatherer;
};
// QnxDebugSupport
QnxQmlProfilerSupport::QnxQmlProfilerSupport(RunControl *runControl)
: RunWorker(runControl)
: SimpleTargetRunner(runControl)
{
runControl->createWorker(runControl->runMode());
setDisplayName("QnxAnalyzeSupport");
setDisplayName("QnxQmlProfilerSupport");
appendMessage(tr("Preparing remote side..."), Utils::LogMessageFormat);
auto portsGatherer = new PortsGatherer(runControl);
auto debuggeeRunner = new QnxAnalyzeeRunner(runControl, portsGatherer);
debuggeeRunner->addStartDependency(portsGatherer);
m_portsGatherer = new PortsGatherer(runControl);
addStartDependency(m_portsGatherer);
auto slog2InfoRunner = new Slog2InfoRunner(runControl);
slog2InfoRunner->addStartDependency(debuggeeRunner);
addStartDependency(slog2InfoRunner);
// QmlDebug::QmlOutputParser m_outputParser;
// FIXME: m_outputParser needs to be fed with application output
// connect(&m_outputParser, &QmlDebug::QmlOutputParser::waitingForConnectionOnPort,
// this, &QnxAnalyzeSupport::remoteIsRunning);
// m_outputParser.processOutput(msg);
m_profiler = runControl->createWorker(runControl->runMode());
m_profiler->addStartDependency(this);
addStopDependency(m_profiler);
}
void QnxQmlProfilerSupport::start()
{
// runControl()->notifyRemoteSetupDone(m_qmlPort);
reportStarted();
Port qmlPort = m_portsGatherer->findPort();
QUrl serverUrl;
serverUrl.setHost(device()->sshParameters().host);
serverUrl.setPort(qmlPort.number());
serverUrl.setScheme("tcp");
m_profiler->recordData("QmlServerUrl", serverUrl);
QString args = QmlDebug::qmlDebugTcpArguments(QmlDebug::QmlProfilerServices, qmlPort);
auto r = runnable().as<StandardRunnable>();
if (!r.commandLineArguments.isEmpty())
r.commandLineArguments.append(' ');
r.commandLineArguments += args;
setRunnable(r);
SimpleTargetRunner::start();
}
} // namespace Internal
......
......@@ -25,12 +25,13 @@
#pragma once
#include <projectexplorer/devicesupport/deviceusedportsgatherer.h>
#include <projectexplorer/runconfiguration.h>
namespace Qnx {
namespace Internal {
class QnxQmlProfilerSupport : public ProjectExplorer::RunWorker
class QnxQmlProfilerSupport : public ProjectExplorer::SimpleTargetRunner
{
Q_OBJECT
......@@ -39,6 +40,9 @@ public:
private:
void start() override;
ProjectExplorer::PortsGatherer *m_portsGatherer;
ProjectExplorer::RunWorker *m_profiler;
};
} // namespace Internal
......
......@@ -161,6 +161,8 @@ void QnxDebugSupport::start()
setRemoteChannel(m_portsGatherer->gdbServerChannel());
setQmlServer(m_portsGatherer->qmlServer());
setSolibSearchPath(searchPaths(k));
if (auto qtVersion = dynamic_cast<QnxQtVersion *>(QtSupport::QtKitInformation::qtVersion(k)))
setSysRoot(qtVersion->qnxTarget());
setSymbolFile(runConfig->localExecutableFilePath());
DebuggerRunTool::start();
......@@ -296,6 +298,8 @@ void QnxAttachDebugSupport::showProcessesDialog()
// setRunControlName(tr("Remote: \"%1\" - Process %2").arg(remoteChannel).arg(m_process.pid));
debugger->setRunControlName(tr("Remote QNX process %1").arg(pid));
debugger->setSolibSearchPath(searchPaths(kit));
if (auto qtVersion = dynamic_cast<QnxQtVersion *>(QtSupport::QtKitInformation::qtVersion(kit)))
debugger->setSysRoot(qtVersion->qnxTarget());
debugger->setUseContinueInsteadOfRun(true);
ProjectExplorerPlugin::startRunControl(runControl);
......
......@@ -1274,6 +1274,11 @@ void TextEditorWidgetPrivate::editorContentsChange(int position, int charsRemove
// lines were inserted or removed from outside, keep viewport on same part of text
if (q->firstVisibleBlock().blockNumber() > posBlock.blockNumber())
q->verticalScrollBar()->setValue(q->verticalScrollBar()->value() + newBlockCount - m_blockCount);
if (m_inBlockSelectionMode) {
disableBlockSelection(CursorUpdateClearSelection);
q->viewport()->update();
}
}
m_blockCount = newBlockCount;
m_scrollBarUpdateTimer.start(500);
......
Subproject commit 7d85fed02c14d87fbea8a2573f947d2a1ce940a8
Subproject commit 83f43f57ac79fa673fda08805e29763a8303d5ea
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment