Merge remote-tracking branch 'origin/4.11'

Conflicts:
	share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp

Change-Id: I5e424e34db619bb769c7abc1e8651b7b40210839
This commit is contained in:
Eike Ziller
2020-01-20 09:59:27 +01:00
12 changed files with 235 additions and 35 deletions

3
.gitattributes vendored
View File

@@ -1 +1,4 @@
dist/clang/patches/*.patch -diff -merge -text
.tag export-subst
.gitattributes export-ignore
.gitignore export-ignore

1
.tag Normal file
View File

@@ -0,0 +1 @@
$Format:%H$

View File

@@ -1,4 +1,5 @@
# Qt Creator 4.11.1
Qt Creator 4.11.1
=================
Qt Creator version 4.11.1 contains bug fixes.
@@ -9,7 +10,8 @@ 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/v4.11.0..v4.11.1
## Editing
Editing
-------
* Fixed `Visualize Whitespace` for editors without specialized highlighter definition
(QTCREATORBUG-23040)
@@ -18,29 +20,42 @@ you can check out from the public Git repository. For example:
* Fixed wrong warnings about C++98 incompatibility with MSVC (QTCREATORBUG-23118)
* Fixed accidentally added internal include paths from GCC (QTCREATORBUG-23330)
* Fixed `Convert to Stack Variable` and `Convert to Pointer` (QTCREATORBUG-23181)
### FakeVim
* Fixed goto next and previous split (QTCREATORBUG-22397)
* Fixed indentation of continuation lines (QTCREATORBUG-20876)
## Projects
Projects
--------
* Fixed crash when closing application output
* Fixed crash when compiler detection fails (QTCREATORBUG-23442)
### CMake
* Fixed subdirectory structure in project tree (QTCREATORBUG-23372)
## Qt Quick Designer
Debugging
---------
* Fixed crash with `Switch to previous mode on debugger exit` when debugging fails
(QTCREATORBUG-23415)
* Fixed high CPU usage with LLDB (QTCREATORBUG-23311)
Qt Quick Designer
-----------------
* Fixed removing single signals from Connection (QDS-1333)
## Test Integration
Test Integration
----------------
* Fixed stopping tests when debugging (QTCREATORBUG-23298)
## Platforms
Platforms
---------
### Windows
@@ -54,4 +69,30 @@ you can check out from the public Git repository. For example:
* Fixed deployment of Qt examples (QTCREATORBUG-22592)
## Credits for these changes go to:
Credits for these changes go to:
--------------------------------
Aleksei German
Alessandro Portale
Andre Hartmann
Andrzej Ostruszka
André Pönitz
BogDan Vatra
Christian Kandeler
Christian Stenger
Cristian Adam
David Schulz
Eike Ziller
Friedemann Kleint
Henning Gruendl
Jaroslaw Kobus
Leena Miettinen
Mahmoud Badri
Marius Sincovici
Miikka Heikkinen
Nikolai Kosjar
Richard Weickelt
Robert Löhning
Thomas Hartmann
Tim Jenssen
Tobias Hunger

View File

@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2019 The Qt Company Ltd.
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -37,6 +37,19 @@
\title Visualizing Chrome Trace Events
You can use \e {full stack tracing} to trace from the top level QML or
JavaScript down to the C++ and all the way to the kernel space. This
enables you to measure the performance of an application and to check
whether it is CPU or I/O bound or influenced by other applications
running on the same system. Tracing provides insight into what a system is
doing and why an application is performing in a particular way. It indicates
how the hardware is utilized and what the kernel and application are doing.
Tracing information can also provide you additional insight into the data
collected by \l{Profiling QML Applications}{QML Profiler}. For example, you
could check why a trivial binding evaluation is taking so long. This might
be caused by C++ being executed or the disk I/O being slow.
Several tracing tools (such as \c {chrome://about}) can generate information
about Chrome trace events in Chrome Trace Format (CTF). You can open CTF
files in \QC for viewing. This is especially useful when viewing trace files
@@ -110,4 +123,118 @@
stack (called \c self). This allows you to examine which functions you need
to optimize. A high number of occurrences might indicate that a function is
triggered unnecessarily or takes very long to execute.
\section1 Collecting LTTng Data
LTTng is a tracing toolkit for Linux that you can apply on embedded Linux
systems to find out how to optimize the startup time of an application.
Since Qt 5.13, Qt provides a set of kernel trace points and a tracing
subsystem for custom user space trace points.
\section2 Configuring the Kernel
To use LTTng, you have to set the following configuration options for the
kernel before building it:
\list
\li \c CONFIG_HIGH_RES_TIMERS
\li \c CONFIG_KALLSYMS
\li \c CONFIG_MODULES
\li \c CONFIG_TRACEPOINTS
\endlist
We recommend that you set the following additional options:
\list
\li \c CONFIG_EVENT_TRACING
\li \c CONFIG_HAVE_SYSCALL_TRACEPOINTS
\li \c CONFIG_KALLSYMS_ALL
\endlist
In Yocto, you can activate the above options in \uicontrol Menu >
\uicontrol Config > \uicontrol {Kernel Hacking} > \uicontrol Tracers.
\section2 Installing LTTng
After you build the kernel and deploy it on your device, you'll need to
install the following LTTng packages on your device:
\list
\li \c lttng-tools to control the tracing session
\li \c lttng-modules for kernel trace points
\li \c lttng-ust for user space trace points
\endlist
In Yocto, you just need to enable
\c {EXTRA_IMAGE_FEATURES += "tools profile"}.
\section2 Building Qt with Tracepoints
Trace points are continuously being added to Qt versions. To use them, you
need to build Qt yourself with the \c {configure -trace lttng} option.
\section2 Recording Events
To create a session, you call the \c {lttng create} command. Then you
call \c {lttng enable-channel kernel -k} to enable the kernel channel.
Within the kernel channel, you specify the appropriate trace points as
\c {kernel_events} and call \c {lttng enable-event} to enable them.
Finally, you call \c {lttng start} to start tracing.
You call \c {lttng stop} to stop tracing. You can use \c sleep to set the
length of the session. After stopping, you can call \c {lttng destroy} to
destroy the session.
You can write and run scripts that contain the above commands to start and
stop full-stack tracing. You can use \c systemd to execute the scripts.
\section2 Enabling Trace Points
Data is recorded according to the trace points that you enable in the LTTng
session. Usually, it is useful to enable scheduler switch, syscall, and Qt
trace points.
\section3 Scheduler Switch Trace Points
Scheduler switch trace points are reached when an application is switched
out due to predemption, for example, when another process gets the chance
to run on the CPU core. Enable scheduler schwitch trace points to record
the thread that is currently running and the process it belongs to, as
well as the time when the process started and stopped.
\section3 Syscall Trace Points
Syscall trace points help you to understand why a scheduler switch happened.
The following are examples of syscalls to trace:
\list
\li \c openat and \c close map file descriptors to file names
\li \c mmap maps page faults to files
\li \c read and \c write are triggered by I/O operations
\li \c nanosleep, \c futex, and \c poll explain scheduler switches
\li \c ioctl controls the GPU and display
\endlist
\section1 Converting LTTng Data to CTF
The \l{https://github.com/KDAB/ctf2ctf}{ctf2ctf} tool uses \c babeltrace to
parse binary Common Trace Format (CTF) and converts it to Chrome Trace
Format (CTF). It performs the following custom tasks to make the recording
more human-readable:
\list
\li Map file descriptors to file names
\li Map page faults to file names
\li Annotate interrupts and block devices with names
\li Convert UTF-16 QString data to UTF-8 strings
\li Count memory page allocations
\endlist
To generate JSON files that contain the trace data in Chrome Trace Format,
enter the following command on the command line:
\code
ctf2ctf -o trace.json path/to/lttng trace/
\endcode
*/

View File

@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2019 The Qt Company Ltd.
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -74,6 +74,11 @@
large, unexplained gaps in the timeline, check your custom QQuickItem
implementations. You can use \l{Using Valgrind Code Analysis Tools}
{Valgrind} or other general purpose profilers to analyze C++ code.
You can use \e {full stack tracing} to trace from the top level QML or
JavaScript down to the C++ and all the way to the kernel space. You can
view the collected data in the \l{Visualizing Chrome Trace Events}
{Chrome Trace Format Viewer}.
\endif
\section1 Using QML Profiler

View File

@@ -3400,7 +3400,7 @@ class DumperBase:
return res
return thing
if len(fields) != len(result):
error('STRUCT ERROR: %s %s' (fields, result))
error('STRUCT ERROR: %s %s' % (fields, result))
return tuple(map(structFixer, fields, result))
def checkPointer(self, p, align = 1):

View File

@@ -112,7 +112,7 @@ bool Qt5InformationNodeInstanceServer::eventFilter(QObject *, QEvent *event)
case QEvent::KeyPress: {
QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
QPair<int, int> data = {keyEvent->key(), keyEvent->modifiers()};
QPair<int, int> data = {keyEvent->key(), int(keyEvent->modifiers())};
nodeInstanceClient()->handlePuppetToCreatorCommand({PuppetToCreatorCommand::KeyPressed,
QVariant::fromValue(data)});
} break;

View File

@@ -141,7 +141,8 @@ AndroidDeployQtStep::AndroidDeployQtStep(BuildStepList *parent, Core::Id id)
: BuildStep(parent, id)
{
setImmutable(true);
m_uninstallPreviousPackage = QtSupport::QtKitAspect::qtVersion(target()->kit())->qtVersion() < QtSupport::QtVersionNumber(5, 4, 0);
const QtSupport::BaseQtVersion * const qt = QtSupport::QtKitAspect::qtVersion(target()->kit());
m_uninstallPreviousPackage = qt && qt->qtVersion() < QtSupport::QtVersionNumber(5, 4, 0);
//: AndroidDeployQtStep default display name
setDefaultDisplayName(tr("Deploy to Android device"));
@@ -161,6 +162,10 @@ Core::Id AndroidDeployQtStep::stepId()
bool AndroidDeployQtStep::init()
{
QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(target()->kit());
if (!version) // TODO: Add error message
return false;
m_androiddeployqtArgs = CommandLine();
m_androidABIs = AndroidManager::applicationAbis(target());
@@ -210,10 +215,6 @@ bool AndroidDeployQtStep::init()
emit addOutput(tr("Deploying to %1").arg(m_serialNumber), OutputFormat::Stdout);
QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(target()->kit());
if (!version)
return false;
m_uninstallPreviousPackageRun = m_uninstallPreviousPackage;
if (m_uninstallPreviousPackageRun)
m_manifestName = AndroidManager::manifestPath(target());
@@ -585,7 +586,8 @@ void AndroidDeployQtStep::setUninstallPreviousPackage(bool uninstall)
AndroidDeployQtStep::UninstallType AndroidDeployQtStep::uninstallPreviousPackage()
{
if (QtSupport::QtKitAspect::qtVersion(target()->kit())->qtVersion() < QtSupport::QtVersionNumber(5, 4, 0))
const QtSupport::BaseQtVersion * const qt = QtSupport::QtKitAspect::qtVersion(target()->kit());
if (qt && qt->qtVersion() < QtSupport::QtVersionNumber(5, 4, 0))
return ForceUnintall;
return m_uninstallPreviousPackage ? Uninstall : Keep;
}

View File

@@ -42,6 +42,16 @@
#include <IOKit/IOKitLib.h>
#include <IOKit/usb/IOUSBLib.h>
#include <CoreFoundation/CoreFoundation.h>
// Work around issue with not being able to retrieve USB serial number.
// See QTCREATORBUG-23460.
// For an unclear reason USBSpec.h in macOS SDK 10.15 uses a different value if
// MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_14, which just does not work.
#if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_14
#undef kUSBSerialNumberString
#define kUSBSerialNumberString "USB Serial Number"
#endif
#endif
#include <exception>
@@ -356,9 +366,14 @@ void deviceConnectedCallback(void *refCon, io_iterator_t iterator)
usbDevice,
CFSTR(kUSBSerialNumberString),
kCFAllocatorDefault, 0));
if (cfUid) {
QString uid = CFStringRef2QString(cfUid);
CFRelease(cfUid);
qCDebug(detectLog) << "device UID is" << uid;
IosDeviceManager::instance()->deviceConnected(uid, name);
} else {
qCDebug(detectLog) << "failed to retrieve device's UID";
}
// Done with this USB device; release the reference added by IOIteratorNext
kr = IOObjectRelease(usbDevice);
@@ -385,18 +400,22 @@ void deviceDisconnectedCallback(void *refCon, io_iterator_t iterator)
// Get the USB device's name.
kr = IORegistryEntryGetName(usbDevice, deviceName);
if (KERN_SUCCESS != kr)
deviceName[0] = '\0';
qCDebug(detectLog) << "ios device " << deviceName << " in deviceDisconnectedCallback";
QString name;
if (KERN_SUCCESS == kr)
name = QString::fromLocal8Bit(deviceName);
qCDebug(detectLog) << "ios device " << name << " in deviceDisconnectedCallback";
{
CFStringRef cfUid = static_cast<CFStringRef>(IORegistryEntryCreateCFProperty(
usbDevice,
CFStringRef cfUid = static_cast<CFStringRef>(
IORegistryEntryCreateCFProperty(usbDevice,
CFSTR(kUSBSerialNumberString),
kCFAllocatorDefault, 0));
kCFAllocatorDefault,
0));
if (cfUid) {
QString uid = CFStringRef2QString(cfUid);
CFRelease(cfUid);
IosDeviceManager::instance()->deviceDisconnected(uid);
} else {
qCDebug(detectLog) << "failed to retrieve device's UID";
}
// Done with this USB device; release the reference added by IOIteratorNext

View File

@@ -28,6 +28,7 @@
#include "idevice.h"
#include "../runcontrol.h"
#include <coreplugin/icore.h>
#include <ssh/sshconnection.h>
#include <ssh/sshconnectionmanager.h>
#include <ssh/sshremoteprocess.h>
@@ -201,6 +202,7 @@ void SshDeviceProcess::handleConnected()
connect(&d->consoleProcess, &ConsoleProcess::stubStopped,
this, [this] { handleProcessFinished(d->consoleProcess.errorString()); });
d->consoleProcess.setAbortOnMetaChars(false);
d->consoleProcess.setSettings(Core::ICore::settings());
d->consoleProcess.setCommand(d->process->fullLocalCommandLine());
d->consoleProcess.start();
} else {

View File

@@ -293,13 +293,13 @@ QVariantMap DefaultPropertyProvider::autoGeneratedProperties(const ProjectExplor
data.insert("Android.ndk.ndkDir", ndkDir);
}
}
data.remove(QBS_ARCHITECTURES);
data.remove(QBS_ARCHITECTURE);
QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(k);
if (qtVersion) {
data.remove(QBS_ARCHITECTURES);
data.remove(QBS_ARCHITECTURE);
QStringList abis;
for (const auto &abi : qtVersion->qtAbis())
abis << abi.param();
abis << architecture(abi);
if (abis.size() == 1)
data.insert(QLatin1String(QBS_ARCHITECTURE), abis.first());
else

View File

@@ -9,7 +9,7 @@
<description><![CDATA[Using Qt Creator to create a small Qt application, Text Finder.]]></description>
<tags>qt creator,qt designer,widgets,c++,text,help</tags>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/tutorialicon.png" difficulty="" docUrl="qthelp://org.qt-project.qtdoc/qtdoc/qtwidgets-tutorials-notepad-example.html" projectPath="" name="Help: Getting Started Programming with Qt Widgets">
<tutorial imageUrl=":qtsupport/images/icons/tutorialicon.png" difficulty="" docUrl="qthelp://org.qt-project.qtdoc/qtwidgets/qtwidgets-tutorials-notepad-example.html" projectPath="" name="Help: Getting Started Programming with Qt Widgets">
<description><![CDATA[Developing Qt applications using C++ and the Qt Widgets module.]]></description>
<tags>qt,qt creator,qt designer,widgets,c++,help</tags>
</tutorial>
@@ -21,9 +21,9 @@
<description><![CDATA[Developing Qt Quick applications for Android and iOS devices using Qt Quick Controls.]]></description>
<tags>qt creator,qt quick designer,qml,android,ios,controls,help</tags>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/tutorialicon.png" difficulty="" docUrl="qthelp://org.qt-project.qtdoc/qtdoc/gettingstartedqml.html" projectPath="" name="Help: Getting Started Programming with Qt Quick">
<description><![CDATA[Developing Qt Quick applications using QML and C++.]]></description>
<tags>qt quick,qml,c++,help</tags>
<tutorial imageUrl=":qtsupport/images/icons/tutorialicon.png" difficulty="" docUrl="qthelp://org.qt-project.qtdoc/qtdoc/qtdoc-tutorials-alarms-example.html" projectPath="" name="Help: Getting Started Programming with Qt Quick">
<description><![CDATA[Developing Qt Quick applications using Qt Quick and Qt Quick Controls.]]></description>
<tags>qt quick,controls,tumbler,help</tags>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/videotutorialicon.png" difficulty="" projectPath="" name="Online: Digital Instrument Cluster with Qt Quick Designer and Qt Safe Renderer" isVideo="true" videoUrl="https://www.youtube.com/watch?v=9RxxsOCeZHk" videoLength="4:06">