Commit 07bec99e authored by Eike Ziller's avatar Eike Ziller

Merge remote-tracking branch 'origin/4.5'

 Conflicts:
	src/plugins/debugger/debuggerruncontrol.cpp
	src/plugins/projectexplorer/gcctoolchain.cpp

Change-Id: Iaad0659293681cce4266fc3e4ba2a4f2068de911
parents b1701ae9 86ff493b
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)
Qt Creator version 4.5 contains bug fixes and new features.
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 origin/4.4..v4.5.0
General
* Implemented "fuzzy" camel case lookup similar to code completion for locator
(QTCREATORBUG-3111)
* Changed `File System` pane to tree view with top level directory selectable
from `Computer`, `Home`, `Projects`, and individual project root directories
(QTCREATORBUG-8305)
Editing
* Added shortcut for sorting selected lines
All Projects
* Added progress indicator to project tree while project is parsed
* Added support for changing the maximum number of lines shown in compile output
(QTCREATORBUG-2200)
CMake Projects
* Added groups to CMake configuration UI
* Added option to change configuration variable types
* Fixed that value was removed when renaming configuration variable
(QTCREATORBUG-17926)
C++ Support
* Fixed lookup of functions that differ only in const-ness of arguments
(QTCREATORBUG-18475)
* Fixed detection of macros defined by tool chain for `C`
* Fixed that `Refactoring` context menu blocked UI while checking for available
actions
* Clang Code Model
* Added sanity check to `Clang Code Model Warnings` option
(QTCREATORBUG-18864)
* Fixed completion in `std::make_unique` and `std::make_shared` constructors
(QTCREATORBUG-18615)
* Fixed that function argument completion switched selected overload back to
default after typing comma (QTCREATORBUG-11688)
* GCC
* Improved auto-detection to include versioned binaries and cross-compilers
QML Support
* Added wizards with different starting UI layouts
Python Support
* Added simple code folding
Debugging
* Changed pretty printing of `QFlags` and bitfields to hexadecimal
* Fixed `Run in terminal` for debugging external application
(QTCREATORBUG-18912)
* LLDB / macOS
* Added pretty printing of Core Foundation and Foundation string-like types
(QTCREATORBUG-18638)
QML Profiler
* Improved robustness when faced with invalid data
Qt Quick Designer
* Added option to only show visible items in navigator
Version Control Systems
* Added query for saving modified files before opening commit editor
(QTCREATORBUG-3857)
Beautifier
* Clang Format
* Added action `Disable Formatting for Selected Text`
* Changed formatting without selection to format the syntactic entity
around the cursor
Model Editor
* Added support for custom relations
SCXML Editor
* Fixed crash after warnings are removed
Platform Specific
Windows
* Fixed that environment variable keys were converted to upper case in build
and run configurations (QTCREATORBUG-18915)
macOS
* Fixed several issues when using case sensitive file systems while `File system
case sensitivity` is set to `Case Insensitive` (QTCREATORBUG-17929,
QTCREATORBUG-18672, QTCREATORBUG-18678)
Android
* Removed support for local deployment (QTBUG-62995)
* Removed support for Ant
* Improved checks for minimum requirements of Android tools (QTCREATORBUG-18837)
Universal Windows Platform
* Fixed deployment on Windows 10 Phone emulator
Credits for these changes go to:
Alessandro Portale
Alexander Volkov
Andre Hartmann
André Pönitz
Christian Kandeler
Christian Stenger
Claus Steuer
Daniel Trevitz
David Schulz
Eike Ziller
Friedemann Kleint
Ivan Donchevskii
Jake Petroules
Jaroslaw Kobus
Jochen Becher
Knud Dollereder
Laurent Montel
Marco Benelli
Marco Bubke
Mitch Curtis
Nikita Baryshnikov
Nikolai Kosjar
Oliver Wolff
Orgad Shaneh
Robert Löhning
Ryuji Kakemizu
Samuel Gaist
Serhii Moroz
Thiago Macieira
Thomas Hartmann
Tim Jenssen
Tobias Hunger
Ulf Hermann
Vikas Pachdha
var Environment = loadExtension("qbs.Environment")
var File = loadExtension("qbs.File")
var FileInfo = loadExtension("qbs.FileInfo")
var Environment = require("qbs.Environment")
var File = require("qbs.File")
var FileInfo = require("qbs.FileInfo")
var MinimumLLVMVersion = "3.9.0"
var Process = loadExtension("qbs.Process")
var Process = require("qbs.Process")
function readOutput(executable, args)
{
......
......@@ -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
......
var File = loadExtension("qbs.File");
var FileInfo = loadExtension("qbs.FileInfo");
var TextFile = loadExtension("qbs.TextFile");
var File = require("qbs.File");
var FileInfo = require("qbs.FileInfo");
var TextFile = require("qbs.TextFile");
function getExportBlock(productFile)
{
......
......@@ -4,7 +4,7 @@ import qbs.FileInfo
Project {
name: "Qt Creator"
minimumQbsVersion: "1.7.0"
minimumQbsVersion: "1.8.0"
property string minimumMacosVersion: "10.8"
property bool withAutotests: qbs.buildVariant === "debug"
property path ide_source_tree: path
......
......@@ -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,13 @@ namespace Utils {
Benchmarker::Benchmarker(const QString &testsuite, const QString &testcase,
const QString &tagData) :
Benchmarker(benchmarksLog(), testsuite, testcase, tagData)
{ }
Benchmarker::Benchmarker(const QLoggingCategory &cat,
const QString &testsuite, const QString &testcase,
const QString &tagData) :
m_category(cat),
m_tagData(tagData),
m_testsuite(testsuite),
m_testcase(testcase)
......@@ -49,17 +56,23 @@ Benchmarker::~Benchmarker()
void Benchmarker::report(qint64 ms)
{
m_timer.invalidate();
report(m_testsuite, m_testcase, ms, m_tagData);
report(m_category, m_testsuite, m_testcase, ms, m_tagData);
}
void Benchmarker::report(const QString &testsuite,
const QString &testcase, qint64 ms, const QString &tags)
{
report(benchmarksLog(), testsuite, testcase, ms, tags);
}
void Benchmarker::report(const QString &testsuite, const QString &testcase, qint64 ms,
const QString &tags)
void Benchmarker::report(const QLoggingCategory &cat, const QString &testsuite, const QString &testcase,
qint64 ms, const QString &tags)
{
QString t = "unit=ms";
if (!tags.isEmpty())
t += "," + tags;
qCDebug(benchmarksLog, "%s::%s: %lld { %s }",
qCDebug(cat, "%s::%s: %lld { %s }",
testsuite.toUtf8().data(), testcase.toUtf8().data(), ms, t.toUtf8().data());
}
......
......@@ -30,20 +30,30 @@
#include <QString>
#include <QElapsedTimer>
QT_BEGIN_NAMESPACE
class QLoggingCategory;
QT_END_NAMESPACE
namespace Utils {
class QTCREATOR_UTILS_EXPORT Benchmarker
{
public:
Benchmarker(const QString &testsuite, const QString &testcase,
const QString &tags = QString());
const QString &tagData = QString());
Benchmarker(const QLoggingCategory &cat, const QString &testsuite, const QString &testcase,
const QString &tagData = QString());
~Benchmarker();
void report(qint64 ms);
static void report(const QString &testsuite, const QString &testcase, qint64 ms,
const QString &tags = QString());
static void report(const QString &testsuite, const QString &testcase,
qint64 ms, const QString &tags = QString());
static void report(const QLoggingCategory &cat,
const QString &testsuite, const QString &testcase,
qint64 ms, const QString &tags = QString());
private:
const QLoggingCategory &m_category;
QElapsedTimer m_timer;
QString m_tagData;
QString m_testsuite;
......
......@@ -65,6 +65,7 @@ QRegularExpression CamelHumpMatcher::createCamelHumpRegExp(
*/
QString keyRegExp;
QString plainRegExp;
bool first = true;
const QChar asterisk = '*';
const QChar question = '?';
......@@ -76,27 +77,33 @@ QRegularExpression CamelHumpMatcher::createCamelHumpRegExp(
keyRegExp += "(?:";
for (const QChar &c : pattern) {
if (!c.isLetter()) {
if (c == question)
if (c == question) {
keyRegExp += '.';
else if (c == asterisk)
plainRegExp += '.';
} else if (c == asterisk) {
keyRegExp += ".*";
else
keyRegExp += '(' + QRegularExpression::escape(c) + ')';
plainRegExp += ".*";
} else {
const QString escaped = QRegularExpression::escape(c);
keyRegExp += '(' + escaped + ')';
plainRegExp += escaped;
}
} else if (caseSensitivity == CaseSensitivity::CaseInsensitive ||
(caseSensitivity == CaseSensitivity::FirstLetterCaseSensitive && !first)) {
const QString upper = QRegularExpression::escape(c.toUpper());
const QString lower = QRegularExpression::escape(c.toLower());
keyRegExp += "(?:";
keyRegExp += first ? uppercaseWordFirst : uppercaseWordContinuation;
keyRegExp += '(' + QRegularExpression::escape(c.toUpper());
keyRegExp += '(' + upper + ')';
if (first) {
keyRegExp += '|' + lowercaseWordFirst + QRegularExpression::escape(c.toLower()) + ')';
keyRegExp += '|' + lowercaseWordFirst + '(' + lower + ')';
} else {
keyRegExp += ")|" + lowercaseWordContinuation;
keyRegExp += '(' + QRegularExpression::escape(c.toLower()) + ")|";
keyRegExp += upperSnakeWordContinuation;
keyRegExp += '(' + QRegularExpression::escape(c.toUpper()) + ')';
keyRegExp += '|' + lowercaseWordContinuation + '(' + lower + ')';
keyRegExp += '|' + upperSnakeWordContinuation + '(' + upper + ')';
}
keyRegExp += ')';
plainRegExp += '[' + upper + lower + ']';
} else {
if (!first) {
if (c.isUpper())
......@@ -104,12 +111,14 @@ QRegularExpression CamelHumpMatcher::createCamelHumpRegExp(
else
keyRegExp += lowercaseWordContinuation;
}
keyRegExp += QRegularExpression::escape(c);
const QString escaped = QRegularExpression::escape(c);
keyRegExp += escaped;
plainRegExp += escaped;
}
first = false;