Commit 3858c33d authored by Eike Ziller's avatar Eike Ziller
Browse files

Merge remote-tracking branch 'origin/3.4'

Change-Id: I35ba4cc7f7052699c3006545514c866be3cb5fdd
parents 03b92050 b8038191
Qt Creator version 3.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 v3.4.0..v3.4.1
General
* Fixed that disabling some plugins could disable the plugin
management UI for most plugins
* Fixed auto-expansion of first set of search results (QTCREATORBUG-14320)
Editing
* Fixed that CSS files were opened in C++ editor (QTCREATORBUG-14334)
* Fixed that the completion popup could become huge
(QTCREATORBUG-14331)
Project Management
* Fixed adding static libraries with `Add Library` wizard
(QTCREATORBUG-14382)
* Fixed broken documentation link in session manager
(QTCREATORBUG-14459)
CMake Projects
* Fixed parsing of C++ flags for Ninja projects
Debugging
* Fixed that executables starting with `lldb-platform-` were detected
as debugger (QTCREATORBUG-14309)
* Fixed attaching to running debug server when developing
cross-platform (QTCREATORBUG-14412)
* CDB
* Fixed that stepping into frame without source would step out
instead (QTCREATORBUG-9677)
QML Profiler
* Fixed that events with no duration were not visible
(QTCREATORBUG-14446)
C++ Support
* Added completion for `override` and `final` (QTCREATORBUG-11341)
* Fixed completion after comments starting with `///`
(QTCREATORBUG-8597)
QML Support
* Fixed completion for QtQml and QtQml.Models (QTCREATORBUG-13780)
Platform Specific
OS X
* Fixed broken library paths for qbs executables (QTCREATORBUG-14432)
BareMetal
* Fixed issues when moving from Qt Creator 3.3 to Qt Creator 3.4
......@@ -271,9 +271,19 @@
\li Some versions of Perf will not start recording unless given a
certain minimum sampling frequency. Try with a
\uicontrol {Sampling Frequency} of 1000.
\li On some devices, Perf support is not very stable and the Linux
kernel may randomly fail to record data after some time. Reboot the
device and try again.
\li On some devices, for example Boundary Devices i.MX6 Boards, the
Perf support is not very stable and the Linux kernel may randomly
fail to record data after some time. Perf can use different types
of events to trigger samples. You can get a list of available event
types by running \c {perf list} on the device and add
\c {-e <event type>} to the \uicontrol {Additional arguments} field
to change the event type to be used. The choice of event type
affects the performance and stability of the sampling.
\c {-e cpu-clock} is a safe but relatively slow option as it
does not use the hardware performance counters, but drives the
sampling from software. After the sampling has failed, reboot the
device. The kernel may have disabled important parts of the
performance counters system.
\endlist
Output from the helper program that processes the data is displayed in the
......
......@@ -83,6 +83,8 @@ if [ ! -d "$1/Contents/Frameworks/QtCore.framework" ]; then
qml2puppetArgument="-executable=$qml2puppetapp"
fi
qbsapp="$1/Contents/MacOS/qbs"
echo "- Running macdeployqt ($(which macdeployqt))"
macdeployqt "$1" \
......@@ -91,6 +93,14 @@ if [ ! -d "$1/Contents/Frameworks/QtCore.framework" ]; then
"-executable=$1/Contents/Resources/ios/iostool" \
"-executable=$1/Contents/Resources/ios/iossim" \
"-executable=$1/Contents/Resources/ios/iossim_1_8_2" \
"-executable=$1/Contents/MacOS/buildoutputparser" \
"-executable=$qbsapp" \
"-executable=$qbsapp-config" \
"-executable=$qbsapp-config-ui" \
"-executable=$qbsapp-qmltypes" \
"-executable=$qbsapp-setup-android" \
"-executable=$qbsapp-setup-qt" \
"-executable=$qbsapp-setup-toolchains" \
"$qmlpuppetArgument" "$qml2puppetArgument" || exit 1
fi
......@@ -16,7 +16,7 @@ while (my $line = <STDIN> ) {
chomp($line);
# --- extract file name based matching:
# c:\foo.cpp(395) : warning C4800: 'BOOL' : forcing value to bool 'true' or 'false' (performance warning)
if ($line =~ /^([^(]+)\((\d+)\) : warning (C\d+:.*)$/) {
if ($line =~ /^([^(]+)\((\d+)\) ?: warning (C\d+:.*)$/) {
my $fileName = $1;
my $lineNumber = $2;
my $text = $3;
......
......@@ -10190,14 +10190,6 @@ This feature is only available for GDB.</source>
<source>There is no CDB executable specified.</source>
<translation>Программа CDB не указана.</translation>
</message>
<message>
<source>CDB crashed</source>
<translation>CDB завершился крахом</translation>
</message>
<message>
<source>CDB exited (%1)</source>
<translation>CDB завершился (%1)</translation>
</message>
<message>
<source>Unable to add expression</source>
<translation>Не удалось добавить выражение</translation>
......@@ -19672,6 +19664,10 @@ Ids must begin with a lowercase letter.</source>
<source>CMake Project file</source>
<translation>Файл проекта CMake</translation>
</message>
<message>
<source>C source code</source>
<translation>Файл исходных текстов C</translation>
</message>
<message>
<source>C header</source>
<translation>Заголовочный файл C</translation>
......@@ -42,6 +42,7 @@
#define CPLUSPLUS_NO_DEBUG_RULE
#define MAX_EXPRESSION_DEPTH 100
#define MAX_STATEMENT_DEPTH 100
#define MAX_INITIALIZER_CLAUSE_DEPTH 2000
using namespace CPlusPlus;
......@@ -2785,6 +2786,8 @@ bool Parser::parseInitializerList0x(ExpressionListAST *&node)
ExpressionListAST **expression_list_ptr = &node;
ExpressionAST *expression = 0;
_initializerClauseDepth.push(1);
if (parseInitializerClause0x(expression)) {
*expression_list_ptr = new (_pool) ExpressionListAST;
(*expression_list_ptr)->value = expression;
......@@ -2793,7 +2796,11 @@ bool Parser::parseInitializerList0x(ExpressionListAST *&node)
if (_languageFeatures.cxx11Enabled && LA() == T_DOT_DOT_DOT && (LA(2) == T_COMMA || LA(2) == T_RBRACE || LA(2) == T_RPAREN))
consumeToken(); // ### create an argument pack
while (LA() == T_COMMA && LA(2) != T_RBRACE) {
for (++_initializerClauseDepth.top();
LA() == T_COMMA
&& LA(2) != T_RBRACE
&& _initializerClauseDepth.top() <= MAX_INITIALIZER_CLAUSE_DEPTH;
++_initializerClauseDepth.top()) {
consumeToken(); // consume T_COMMA
if (parseInitializerClause0x(expression)) {
......@@ -2808,7 +2815,11 @@ bool Parser::parseInitializerList0x(ExpressionListAST *&node)
}
}
return true;
const bool result = _initializerClauseDepth.top() <= MAX_INITIALIZER_CLAUSE_DEPTH;
_initializerClauseDepth.pop();
if (!result)
warning(cursor(), "Reached parse limit for initializer clause");
return result;
}
bool Parser::parseBracedInitList0x(ExpressionAST *&node)
......
......@@ -27,6 +27,7 @@
#include "TranslationUnit.h"
#include "MemoryPool.h"
#include <map>
#include <stack>
namespace CPlusPlus {
......@@ -321,6 +322,7 @@ private:
bool _inExpressionStatement: 1;
int _expressionDepth;
int _statementDepth;
std::stack<int> _initializerClauseDepth;
MemoryPool _expressionStatementTempPool;
std::map<unsigned, TemplateArgumentListEntry> _templateArgumentList;
......
......@@ -985,7 +985,7 @@ public:
const ASTObjectValue *asAstObjectValue() const Q_DECL_OVERRIDE;
bool getSourceLocation(QString *fileName, int *line, int *column) const;
bool getSourceLocation(QString *fileName, int *line, int *column) const Q_DECL_OVERRIDE;
void processMembers(MemberProcessor *processor) const Q_DECL_OVERRIDE;
QString defaultPropertyName() const;
......@@ -1059,7 +1059,7 @@ public:
virtual const Value *lookupMember(const QString &name, const Context *context,
const ObjectValue **foundInObject = 0,
bool examinePrototypes = true) const;
bool examinePrototypes = true) const Q_DECL_OVERRIDE;
void processMembers(MemberProcessor *processor) const Q_DECL_OVERRIDE;
const TypeScope *asTypeScope() const Q_DECL_OVERRIDE;
private:
......@@ -1073,7 +1073,7 @@ public:
virtual const Value *lookupMember(const QString &name, const Context *context,
const ObjectValue **foundInObject = 0,
bool examinePrototypes = true) const;
bool examinePrototypes = true) const Q_DECL_OVERRIDE;
void processMembers(MemberProcessor *processor) const Q_DECL_OVERRIDE;
const JSImportScope *asJSImportScope() const Q_DECL_OVERRIDE;
private:
......
......@@ -48,7 +48,7 @@ void main()
// Make very narrow events somewhat wider so that they don't collapse into 0 pixels
float scaledWidth = scale.x * rectSize.x;
float shift = sign(scaledWidth) * max(0.0, 3.0 - abs(scaledWidth)) * 0.0005;
float shift = sign(rectSize.x) * max(0.0, 3.0 - abs(scaledWidth)) * 0.0005;
gl_Position.x += shift;
// Ditto for events with very small height
......
......@@ -216,7 +216,7 @@ static void updateNodes(int from, int to, const TimelineModel *model,
for (int i = from; i < to; ++i) {
qint64 start = qMax(parentState->start(), model->startTime(i));
qint64 end = qMin(parentState->end(), model->startTime(i) + model->duration(i));
if (start >= end)
if (start > end)
continue;
float itemTop = (1.0 - model->relativeHeight(i)) * defaultRowHeight;
......@@ -244,7 +244,7 @@ static void updateNodes(int from, int to, const TimelineModel *model,
for (int i = from; i < to; ++i) {
qint64 start = qMax(parentState->start(), model->startTime(i));
qint64 end = qMin(parentState->end(), model->startTime(i) + model->duration(i));
if (start >= end)
if (start > end)
continue;
QColor color = model->color(i);
......@@ -252,7 +252,8 @@ static void updateNodes(int from, int to, const TimelineModel *model,
uchar green = color.green();
uchar blue = color.blue();
float itemWidth = (end - start) * parentState->scale();
float itemWidth = end > start ? (end - start) * parentState->scale() :
std::numeric_limits<float>::min();
float itemLeft = (start - parentState->start()) * parentState->scale();
// This has to be the exact same expression as above, to guarantee determinism.
......
......@@ -586,8 +586,10 @@ void TimelineModel::clear()
d->endTimes.clear();
if (hadRowHeights)
emit expandedRowHeightChanged(-1, -1);
if (!wasEmpty)
if (!wasEmpty) {
emit emptyChanged();
emit heightChanged();
}
}
int TimelineModel::nextItemBySelectionId(int selectionId, qint64 time, int currentItem) const
......
......@@ -209,17 +209,11 @@ void TimelineRenderer::TimelineRendererPrivate::manageClicked()
{
Q_Q(TimelineRenderer);
if (currentSelection.eventIndex != -1) {
if (currentSelection.eventIndex == selectedItem)
q->setSelectionLocked(!selectionLocked);
else
q->setSelectionLocked(true);
// itemPressed() will trigger an update of the events and JavaScript views. Make sure the
// correct event is already selected when that happens, to prevent confusion.
q->setSelectedItem(currentSelection.eventIndex);
emit q->itemPressed(currentSelection.eventIndex);
} else {
q->setSelectionLocked(false);
q->setSelectedItem(-1);
emit q->itemPressed(-1);
}
......
......@@ -85,7 +85,6 @@ public:
private:
QPoint m_startPos;
QWidget *m_inner;
TitleBarWidget *m_titleBar;
QTimer m_timer;
};
......@@ -245,7 +244,7 @@ public:
};
DockWidget::DockWidget(QWidget *inner, FancyMainWindow *parent)
: QDockWidget(parent), q(parent), m_inner(inner)
: QDockWidget(parent), q(parent)
{
setWidget(inner);
setFeatures(QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetClosable | QDockWidget::DockWidgetFloatable);
......@@ -288,7 +287,7 @@ bool DockWidget::eventFilter(QObject *, QEvent *event)
int y = me->pos().y();
int x = me->pos().x();
int h = m_titleBar->m_floatButton->height();
if (!isFloating() && 0 <= x && x < m_inner->width() && 0 <= y && y <= h) {
if (!isFloating() && widget() && 0 <= x && x < widget()->width() && 0 <= y && y <= h) {
m_timer.start();
m_startPos = mapToGlobal(me->pos());
}
......
......@@ -93,7 +93,7 @@ bool BeautifierPlugin::initialize(const QStringList &arguments, QString *errorSt
m_tools << new Uncrustify::Uncrustify(this);
Core::ActionContainer *menu = Core::ActionManager::createMenu(Constants::MENU_ID);
menu->menu()->setTitle(QLatin1String("Beautifier"));
menu->menu()->setTitle(QCoreApplication::translate("Beautifier", Constants::OPTION_TR_CATEGORY));
Core::ActionManager::actionContainer(Core::Constants::M_TOOLS)->addMenu(menu);
for (int i = 0, total = m_tools.count(); i < total; ++i) {
......
......@@ -53,7 +53,7 @@ QtcPlugin {
property string llvmIncludeDir: QtcProcessOutputReader.readOutput(llvmConfig, ["--includedir"])
property string llvmLibDir: QtcProcessOutputReader.readOutput(llvmConfig, ["--libdir"])
property string llvmVersion: QtcProcessOutputReader.readOutput(llvmConfig, ["--version"])
.replace(/(\d+\.\d+).*/, "$1")
.replace(/(\d+\.\d+\.\d+).*/, "$1")
cpp.includePaths: base.concat(llvmIncludeDir)
cpp.libraryPaths: base.concat(llvmLibDir)
......
......@@ -135,7 +135,13 @@ EditorView::EditorView(SplitterOrView *parentSplitterOrView, QWidget *parent) :
m_container->addWidget(empty);
m_widgetEditorMap.insert(empty, 0);
auto dropSupport = new FileDropSupport(this, [this](QDropEvent *event) {
auto dropSupport = new FileDropSupport(this, [this](QDropEvent *event) -> bool {
// do not accept move events except from other editor views (i.e. their tool bars)
// otherwise e.g. item views that support moving items within themselves would
// also "move" the item into the editor view, i.e. the item would be removed from the
// item view
if (!qobject_cast<EditorToolBar*>(event->source()))
event->setDropAction(Qt::CopyAction);
return event->source() != m_toolBar; // do not accept drops on ourselves
});
connect(dropSupport, &FileDropSupport::filesDropped,
......
......@@ -57,9 +57,21 @@ SearchResultTreeModel::~SearchResultTreeModel()
void SearchResultTreeModel::setShowReplaceUI(bool show)
{
beginResetModel();
m_showReplaceUI = show;
endResetModel();
// We cannot send dataChanged for the whole hierarchy in one go,
// because all items in a dataChanged must have the same parent.
// Send dataChanged for each parent of children individually...
QList<QModelIndex> changeQueue;
changeQueue.append(QModelIndex());
while (!changeQueue.isEmpty()) {
const QModelIndex current = changeQueue.takeFirst();
int childCount = rowCount(current);
if (childCount > 0) {
emit dataChanged(index(0, 0, current), index(childCount - 1, 0, current));
for (int r = 0; r < childCount; ++r)
changeQueue.append(index(r, 0, current));
}
}
}
void SearchResultTreeModel::setTextEditorFont(const QFont &font, const SearchResultColor &color)
......
......@@ -670,7 +670,8 @@ void MainWindow::registerDefaultActions()
// Show Sidebar Action
m_toggleSideBarAction = new QAction(QIcon(QLatin1String(Constants::ICON_TOGGLE_SIDEBAR)),
tr(Constants::TR_SHOW_SIDEBAR), this);
QCoreApplication::translate("Core", Constants::TR_SHOW_SIDEBAR),
this);
m_toggleSideBarAction->setCheckable(true);
cmd = ActionManager::registerAction(m_toggleSideBarAction, Constants::TOGGLE_SIDEBAR);
cmd->setAttribute(Command::CA_UpdateText);
......
......@@ -40,6 +40,7 @@
#include "id.h"
#include "imode.h"
#include <QCoreApplication>
#include <QDebug>
#include <QSettings>
......@@ -222,9 +223,9 @@ void NavigationWidget::updateToggleText()
d->m_toggleSideBarAction->setEnabled(haveData && NavigationWidgetPlaceHolder::m_current);
if (isShown())
d->m_toggleSideBarAction->setToolTip(tr(Constants::TR_HIDE_SIDEBAR));
d->m_toggleSideBarAction->setToolTip(QCoreApplication::translate("Core", Constants::TR_HIDE_SIDEBAR));
else
d->m_toggleSideBarAction->setToolTip(tr(Constants::TR_SHOW_SIDEBAR));
d->m_toggleSideBarAction->setToolTip(QCoreApplication::translate("Core", Constants::TR_SHOW_SIDEBAR));
}
void NavigationWidget::placeHolderChanged(NavigationWidgetPlaceHolder *holder)
......
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
<mime-type type="text/x-csrc">
<comment>C source code</comment>
<sub-class-of type="text/plain"/>
<alias type="text/x-c"/>
<glob pattern="*.c" case-sensitive="true"/>
</mime-type>
<mime-type type="text/vnd.nvidia.cuda.csrc">
<sub-class-of type="text/x-csrc"/>
<comment>NVIDIA CUDA C source code</comment>
......
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