forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.4'
Conflicts: src/plugins/debugger/gdb/gdbengine.cpp Change-Id: I8a7c8ca07d6d6005f5d39b8f1477ebbc7a299fbf
This commit is contained in:
34
dist/changes-4.4.0.md
vendored
34
dist/changes-4.4.0.md
vendored
@@ -16,7 +16,8 @@ General
|
||||
|
||||
Editing
|
||||
|
||||
* Added inline annotations for errors, warnings and bookmarks
|
||||
* Added optional inline annotations for Clang code model errors and warnings,
|
||||
and bookmarks
|
||||
* Added optional smooth scrolling when navigating within the same file
|
||||
(for example with Locator or `Follow Symbol Under Cursor`)
|
||||
* Added overridable `DeleteStartOfLine` and `DeleteEndOfLine` actions
|
||||
@@ -38,10 +39,13 @@ CMake Projects
|
||||
(QTCREATORBUG-17973)
|
||||
* Added warning when detecting `CMakeCache.txt` in source directory even though
|
||||
build is configured for out-of-source build (QTCREATORBUG-18381)
|
||||
* Fixed `CMake configuration has changed on disk` dialog (QTCREATORBUG-18292)
|
||||
* CMake >= 3.7
|
||||
* Improved handling of `CMAKE_RUNTIME_OUTPUT_DIRECTORY` (QTCREATORBUG-18158)
|
||||
* Removed `<Source Directory>` node from project tree
|
||||
* Fixed that headers from top level directory were not shown in project tree
|
||||
(QTCREATORBUG-17760)
|
||||
* Improved handling of `CMAKE_RUNTIME_OUTPUT_DIRECTORY` (QTCREATORBUG-18158)
|
||||
* Fixed progress information (QTCREATORBUG-18624)
|
||||
|
||||
Qbs Projects
|
||||
|
||||
@@ -58,6 +62,7 @@ C++ Support
|
||||
(QTCREATORBUG-2818, QTCREATORBUG-18004)
|
||||
* Fixed highlighting of raw string literals (QTCREATORBUG-17720)
|
||||
* Fixed `Add #include` refactoring action for static functions
|
||||
* Fixed crash when parsing invalid C++ code (QTCREATORBUG-18499)
|
||||
* Clang Code Model
|
||||
* Added highlighting of identifier under cursor, which was still
|
||||
delegated to built-in code model
|
||||
@@ -80,6 +85,8 @@ C++ Support
|
||||
QML Support
|
||||
|
||||
* Updated QML parser to newer QML version (QTCREATORBUG-17842)
|
||||
* Fixed crash in QML `Outline` pane
|
||||
* Fixed that auto-completion could overwrite text (QTCREATORBUG-18449)
|
||||
|
||||
Debugging
|
||||
|
||||
@@ -88,17 +95,24 @@ Debugging
|
||||
and `boost::variant`
|
||||
* Improved display of enum bitfields
|
||||
* Fixed support for `long double` (QTCREATORBUG-18023)
|
||||
* Fixed editing of strings (QTCREATORBUG-18681)
|
||||
* CDB
|
||||
* Added support for extra debugging helpers and debugging helper
|
||||
customization
|
||||
* Added warning if run configuration uses unsupported shell command
|
||||
|
||||
QML Profiler
|
||||
|
||||
* Fixed that timeline could stay empty after analyzing small range
|
||||
(QTCREATORBUG-18354)
|
||||
|
||||
Version Control Systems
|
||||
|
||||
* Fixed format of visual whitespace in blame, log and git rebase editors
|
||||
(QTCREATORBUG-17735)
|
||||
* Git
|
||||
* Improved branch listing in `Show` (QTCREATORBUG-16949)
|
||||
* Made `git grep` for file system search recurse into submodules
|
||||
* Gerrit
|
||||
* Added validation of server certificate when using REST API
|
||||
* Fixed that non-Gerrit remotes were shown in `Push to Gerrit` dialog
|
||||
@@ -108,6 +122,7 @@ Version Control Systems
|
||||
|
||||
Diff Viewer
|
||||
|
||||
* Improved performance
|
||||
* Fixed state of actions in `Edit` menu
|
||||
* Fixed that context information for chunks was not shown in side-by-side view
|
||||
(QTCREATORBUG-18289)
|
||||
@@ -118,6 +133,7 @@ Test Integration
|
||||
* Added view with complete, unprocessed test output
|
||||
* Made it possible to enable and disable all tests using a specific test
|
||||
framework
|
||||
* Fixed wrong location of results for tests with same name (QTCREATORBUG-18502)
|
||||
* QTest
|
||||
* Added option to run verbose and with logging of signals and slots
|
||||
(`-vb` and `-vs`)
|
||||
@@ -127,12 +143,22 @@ Beautifier
|
||||
* Added option for using a different AStyle configuration file
|
||||
* Added option for fallback style for `clang-format`
|
||||
|
||||
Model Editor
|
||||
|
||||
* Fixed crash with invalid files (QTCREATORBUG-18526)
|
||||
* Fixed crash when dropping package into itself (QTCREATORBUG-18262)
|
||||
|
||||
Platform Specific
|
||||
|
||||
Windows
|
||||
|
||||
* Removed support for Windows CE
|
||||
|
||||
macOS
|
||||
|
||||
* Fixed that some context menu items in Qt Quick Designer did nothing
|
||||
(QTCREATORBUG-18662)
|
||||
|
||||
Android
|
||||
|
||||
* Added option to run commands before app starts and after app stopped
|
||||
@@ -146,6 +172,10 @@ Remote Linux
|
||||
|
||||
* Added support for `ssh-agent` (QTCREATORBUG-16245)
|
||||
|
||||
Universal Windows Platform
|
||||
|
||||
* Fixed deployment to Windows 10 Mobile devices (QTCREATORBUG-18728)
|
||||
|
||||
Credits for these changes go to:
|
||||
Alessandro Portale
|
||||
Alexander Drozdov
|
||||
|
||||
BIN
doc/images/creator-uwp-kits.png
Normal file
BIN
doc/images/creator-uwp-kits.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 136 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 62 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 10 KiB |
BIN
doc/images/qtcreator-debugging-helper-options.png
Normal file
BIN
doc/images/qtcreator-debugging-helper-options.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 45 KiB |
@@ -43,14 +43,17 @@
|
||||
|
||||
\image qtcreator-clang-static-analyzer.png
|
||||
|
||||
Select the link in the \uicontrol Location column to move to the location
|
||||
where the issue appears in the code editor.
|
||||
|
||||
The Clang Static Analyzer runs with all the default checkers enabled. For
|
||||
more information about the checkers, see
|
||||
\l{http://clang-analyzer.llvm.org/available_checks.html}{Available Checkers}.
|
||||
|
||||
To suppress diagnostics, select \uicontrol {Suppress This Diagnostic} in the
|
||||
context menu. To view the suppression list for a project and to remove
|
||||
diagnostics from it, select \uicontrol {Clang Static Analyzer} in
|
||||
the \uicontrol Projects mode.
|
||||
diagnostics from it, select \uicontrol Projects >
|
||||
\uicontrol {Project Settings} > \uicontrol {Clang Static Analyzer}.
|
||||
|
||||
\section1 Supported Project Types and Tool Chains
|
||||
|
||||
|
||||
@@ -981,6 +981,8 @@
|
||||
Linux, LLDB on macOS, and CDB on Windows, or any other platform on which at
|
||||
least one of the three supported backends is available.
|
||||
|
||||
\section2 Adding Custom Debugging Helpers
|
||||
|
||||
To add debugging helpers for your own types, no compilation is required,
|
||||
just adding a few lines of Python. The scripts can address multiple versions
|
||||
of Qt, or of your own library, at the same time.
|
||||
@@ -991,6 +993,45 @@
|
||||
\uicontrol {Additional Startup Commands} in \uicontrol Tools >
|
||||
\uicontrol Options > \uicontrol Debugger > \uicontrol GDB.
|
||||
|
||||
To get started with implementing debugging helpers for your own data types,
|
||||
you can put their implementation into the file
|
||||
\c share/qtcreator/debugger/personaltypes.py in your \QC installation. The
|
||||
file contains one example implementation:
|
||||
|
||||
\quotefromfile ../../share/qtcreator/debugger/personaltypes.py
|
||||
\skipto qdump__
|
||||
\printuntil d.putItem
|
||||
|
||||
To add debugging helpers:
|
||||
|
||||
\list 1
|
||||
|
||||
\li Open the \c share/qtcreator/debugger/personaltypes.py file for
|
||||
editing. For example, if your Qt installation is located in the
|
||||
\c Qt5 directory on Windows, look in
|
||||
\c C:\Qt5\Tools\QtCreator\share\qtcreator\debugger.
|
||||
|
||||
\li Add your dumper implementation to the end of the \c personaltypes.py
|
||||
file. For more information about implementing debugging helpers,
|
||||
see the following sections.
|
||||
|
||||
\li To prevent \c personaltypes.py from being overwritten when you
|
||||
update your \QC installation (when updating your Qt installation,
|
||||
for example), copy it to a safe location outside the \QC
|
||||
installation in your file system and specify the location in
|
||||
\uicontrol Tools > \uicontrol Options > \uicontrol Debugger >
|
||||
\uicontrol {Locals & Expressions} >
|
||||
\uicontrol {Extra Debugging Helpers}.
|
||||
|
||||
\image qtcreator-debugging-helper-options.png
|
||||
|
||||
\endlist
|
||||
|
||||
The custom debugging helpers will be automatically picked up from
|
||||
\c personaltypes.py when you start a debugging session in \QC or select
|
||||
\uicontrol {Reload Debugging Helpers} from the context menu of the
|
||||
\uicontrol {Debugger Log} view.
|
||||
|
||||
\section2 Debugging Helper Overview
|
||||
|
||||
The implementation of a debugging helper typically consists of a single
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Copyright (C) 2017 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Qt Creator documentation.
|
||||
@@ -82,11 +82,12 @@
|
||||
supported for QNX Neutrino devices, and requires the QNX SDK to be
|
||||
installed on the development PC.
|
||||
|
||||
\li \l{Connecting Windows Runtime Devices}
|
||||
\li \l{Connecting UWP Devices}
|
||||
|
||||
You can build Windows Store Apps and run them on Windows Phones, the
|
||||
Windows Phone Emulator, or the Windows computer in Modern UI mode.
|
||||
You can install the necessary tool chains as part of Qt 5.3.
|
||||
You can build applications for the Universal Windows Platform (UWP)
|
||||
and run them on any Windows 10 devices, such as PC, tablet, or
|
||||
phone. You can install the necessary tool chains as part of Qt 5.9
|
||||
or later.
|
||||
|
||||
\endlist
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
\li QNX
|
||||
|
||||
\li Windows Runtime (including Windows Phone)
|
||||
\li Universal Windows Platform (UWP)
|
||||
|
||||
\endlist
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
\li \inlineimage ok
|
||||
*
|
||||
\row
|
||||
\li Windows Runtime
|
||||
\li UWP
|
||||
\li
|
||||
\li
|
||||
\li \image ok
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
/*!
|
||||
\contentspage {Qt Creator Manual}
|
||||
\previouspage creator-developing-winrt.html
|
||||
\previouspage creator-developing-uwp.html
|
||||
\page creator-build-process-customizing.html
|
||||
\nextpage creator-testing.html
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
\contentspage {Qt Creator Manual}
|
||||
\previouspage creator-developing-ios.html
|
||||
\page creator-developing-qnx.html
|
||||
\nextpage creator-developing-winrt.html
|
||||
\nextpage creator-developing-uwp.html
|
||||
|
||||
\title Connecting QNX Devices
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
\li \l{Connecting Embedded Linux Devices}
|
||||
\li \l{Connecting iOS Devices}
|
||||
\li \l{Connecting QNX Devices}
|
||||
\li \l{Connecting Windows Runtime Devices}
|
||||
\li \l{Connecting UWP Devices}
|
||||
\endlist
|
||||
\li \l{Customizing the Build Process}
|
||||
\endlist
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Copyright (C) 2017 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Qt Creator documentation.
|
||||
@@ -27,29 +27,30 @@
|
||||
|
||||
\contentspage {Qt Creator Manual}
|
||||
\previouspage creator-developing-qnx.html
|
||||
\page creator-developing-winrt.html
|
||||
\page creator-developing-uwp.html
|
||||
\nextpage creator-build-process-customizing.html
|
||||
|
||||
\title Connecting Windows Runtime Devices
|
||||
\title Connecting UWP Devices
|
||||
|
||||
You can build Windows Store Apps and run them on Windows Phones, Windows
|
||||
Phone Emulator, or the Windows computer in Modern UI mode.
|
||||
You can build applications for the Universal Windows Platform (UWP) and run
|
||||
them on any Windows 10 devices, such as PC, tablet, or phone.
|
||||
|
||||
\QC uses the integrated \c windeployqt and \c winrtrunner tools to deploy
|
||||
and run applications. You can also run the tools manually from the command
|
||||
line.
|
||||
|
||||
The Qt 5.3 installer adds Windows Runtime and Windows Phone Qt versions to
|
||||
\QC and creates the necessary kits.
|
||||
Since 5.3, the Qt installers add the Windows Runtime and Windows Phone Qt
|
||||
versions to \QC and create the necessary kits. In Qt 5.9, the packages were
|
||||
renamed as UWP packages.
|
||||
|
||||
\image creator-winrt-kits.png "WinRT kits"
|
||||
\image creator-uwp-kits.png "UWP kits"
|
||||
|
||||
To connect Windows Runtime devices:
|
||||
To connect UWP devices:
|
||||
|
||||
\list 1
|
||||
|
||||
\li Select \uicontrol Help > \uicontrol {About Plugins} > \uicontrol {Device Support} >
|
||||
\uicontrol WinRT to enable the experimental Windows Runtime plugin.
|
||||
\uicontrol WinRT to enable the experimental UWP plugin.
|
||||
|
||||
\li Restart \QC to be able to use the plugin.
|
||||
|
||||
@@ -61,9 +62,8 @@
|
||||
device.
|
||||
|
||||
\li Select \uicontrol Projects > \uicontrol {Build & Run} to
|
||||
enable a kit for building applications and running them on Windows
|
||||
Runtime devices (the local computer, for now), Windows Phones,
|
||||
or the Windows Phone emulator.
|
||||
enable a kit for building applications and running them on UWP
|
||||
devices.
|
||||
|
||||
\endlist
|
||||
|
||||
@@ -1649,7 +1649,7 @@ class Dumper(DumperBase):
|
||||
result += '{line="%s"' % lineNumber
|
||||
result += ',file="%s"' % fileName
|
||||
if 0 < lineNumber and lineNumber <= len(source):
|
||||
result += ',data="%s"' % source[lineNumber - 1]
|
||||
result += ',hexdata="%s"' % self.hexencode(source[lineNumber - 1])
|
||||
result += ',hunk="%s"}' % hunk
|
||||
result += '{address="%s"' % loadAddr
|
||||
result += ',data="%s %s"' % (insn.GetMnemonic(self.target),
|
||||
|
||||
@@ -24,16 +24,15 @@
|
||||
############################################################################
|
||||
|
||||
# This is a place to add your own dumpers for testing purposes.
|
||||
# Any contents here will be picked up by GDB and LLDB based
|
||||
# debugging in Qt Creator automatically. This code is not used
|
||||
# when debugging with CDB on Windows.
|
||||
# Any contents here will be picked up by GDB, LLDB, and CDB based
|
||||
# debugging in Qt Creator automatically.
|
||||
|
||||
# NOTE: This file will get overwritten when updating Qt Creator.
|
||||
#
|
||||
# To add dumpers that don't get overwritten, copy this file here
|
||||
# to a safe location outside the Qt Creator installation and
|
||||
# make this location known to Qt Creator using the Debugger /
|
||||
# GDB / Dumper customization / Additional file setting.
|
||||
# make this location known to Qt Creator using the Debugger >
|
||||
# Locals & Expressions > Extra Debugging Helpers setting.
|
||||
|
||||
# Example to display a simple type
|
||||
# template<typename U, typename V> struct MapNode
|
||||
|
||||
@@ -75,10 +75,7 @@ def qdump__QArrayData(d, value):
|
||||
d.check(alloc == 0 or (0 <= size and size <= alloc and alloc <= 100000000))
|
||||
d.putValue(d.readMemory(data, size), 'latin1')
|
||||
d.putNumChild(1)
|
||||
if d.isExpanded():
|
||||
with Children(d):
|
||||
d.putIntItem('size', size)
|
||||
d.putIntItem('alloc', alloc)
|
||||
d.putPlainChildren(value)
|
||||
|
||||
def qdump__QByteArrayData(d, value):
|
||||
qdump__QArrayData(d, value)
|
||||
@@ -1369,8 +1366,9 @@ def qdump__QStringData(d, value):
|
||||
(ref, size, alloc, pad, offset) = value.split('III@p')
|
||||
elided, shown = d.computeLimit(size, d.displayStringLimit)
|
||||
data = d.readMemory(value.address() + offset, shown * 2)
|
||||
d.putNumChild(0)
|
||||
d.putValue(data, 'utf16', elided=elided)
|
||||
d.putNumChild(1)
|
||||
d.putPlainChildren(value)
|
||||
|
||||
def qdump__QHashedString(d, value):
|
||||
qdump__QString(d, value)
|
||||
|
||||
@@ -42,8 +42,8 @@ Product {
|
||||
+ product.moduleProperty("qtc", "ide_version_minor") + "\n");
|
||||
content = content.replace(/(\n#define IDE_VERSION_RELEASE) .+\n/, "$1 "
|
||||
+ product.moduleProperty("qtc", "ide_version_release") + "\n");
|
||||
content = content.replace(/(\n#define IDE_COPYRIGHT_YEAR) .+\n/, "$1 "
|
||||
+ product.moduleProperty("qtc", "qtcreator_copyright_year") + "\n");
|
||||
content = content.replace("$${QTCREATOR_COPYRIGHT_YEAR}",
|
||||
product.moduleProperty("qtc", "qtcreator_copyright_year"));
|
||||
file = new TextFile(output.filePath, TextFile.WriteOnly);
|
||||
file.truncate();
|
||||
file.write(content);
|
||||
|
||||
@@ -1295,13 +1295,13 @@ bool rescanExports(const QString &fileName, FindExportedCppTypes &finder,
|
||||
return hasNewInfo;
|
||||
}
|
||||
|
||||
void ModelManagerInterface::updateCppQmlTypes(QFutureInterface<void> &interface,
|
||||
void ModelManagerInterface::updateCppQmlTypes(QFutureInterface<void> &futureInterface,
|
||||
ModelManagerInterface *qmlModelManager,
|
||||
CPlusPlus::Snapshot snapshot,
|
||||
QHash<QString, QPair<CPlusPlus::Document::Ptr, bool> > documents)
|
||||
{
|
||||
interface.setProgressRange(0, documents.size());
|
||||
interface.setProgressValue(0);
|
||||
futureInterface.setProgressRange(0, documents.size());
|
||||
futureInterface.setProgressValue(0);
|
||||
|
||||
CppDataHash newData;
|
||||
QHash<QString, QList<CPlusPlus::Document::Ptr> > newDeclarations;
|
||||
@@ -1316,9 +1316,9 @@ void ModelManagerInterface::updateCppQmlTypes(QFutureInterface<void> &interface,
|
||||
bool hasNewInfo = false;
|
||||
typedef QPair<CPlusPlus::Document::Ptr, bool> DocScanPair;
|
||||
foreach (const DocScanPair &pair, documents) {
|
||||
if (interface.isCanceled())
|
||||
if (futureInterface.isCanceled())
|
||||
return;
|
||||
interface.setProgressValue(interface.progressValue() + 1);
|
||||
futureInterface.setProgressValue(futureInterface.progressValue() + 1);
|
||||
|
||||
CPlusPlus::Document::Ptr doc = pair.first;
|
||||
const bool scan = pair.second;
|
||||
|
||||
@@ -242,7 +242,7 @@ protected:
|
||||
ModelManagerInterface *modelManager,
|
||||
QmlJS::Dialect mainLanguage,
|
||||
bool emitDocChangedOnDisk);
|
||||
static void updateCppQmlTypes(QFutureInterface<void> &interface,
|
||||
static void updateCppQmlTypes(QFutureInterface<void> &futureInterface,
|
||||
ModelManagerInterface *qmlModelManager,
|
||||
CPlusPlus::Snapshot snapshot,
|
||||
QHash<QString, QPair<CPlusPlus::Document::Ptr, bool> > documents);
|
||||
|
||||
@@ -689,6 +689,13 @@ void TreeItem::insertChild(int pos, TreeItem *item)
|
||||
}
|
||||
}
|
||||
|
||||
void TreeItem::insertOrderedChild(TreeItem *item,
|
||||
const std::function<bool (const TreeItem *, const TreeItem *)> &cmp)
|
||||
{
|
||||
auto where = std::lower_bound(begin(), end(), item, cmp);
|
||||
insertChild(int(where - begin()), item);
|
||||
}
|
||||
|
||||
void TreeItem::removeChildAt(int pos)
|
||||
{
|
||||
QTC_ASSERT(0 <= pos && pos < m_children.count(), return);
|
||||
|
||||
@@ -54,6 +54,9 @@ public:
|
||||
void prependChild(TreeItem *item);
|
||||
void appendChild(TreeItem *item);
|
||||
void insertChild(int pos, TreeItem *item);
|
||||
void insertOrderedChild(TreeItem *item,
|
||||
const std::function<bool(const TreeItem *, const TreeItem *)> &cmp);
|
||||
|
||||
void removeChildAt(int pos);
|
||||
void removeChildren();
|
||||
void sortChildren(const std::function<bool(const TreeItem *, const TreeItem *)> &cmp);
|
||||
@@ -135,6 +138,14 @@ public:
|
||||
ParentType *parent() const {
|
||||
return static_cast<ParentType *>(TreeItem::parent());
|
||||
}
|
||||
|
||||
void insertOrderedChild(ChildType *item, const std::function<bool(const ChildType *, const ChildType *)> &cmp)
|
||||
{
|
||||
const auto cmp0 = [cmp](const TreeItem *lhs, const TreeItem *rhs) {
|
||||
return cmp(static_cast<const ChildType *>(lhs), static_cast<const ChildType *>(rhs));
|
||||
};
|
||||
TreeItem::insertOrderedChild(item, cmp0);
|
||||
}
|
||||
};
|
||||
|
||||
class QTCREATOR_UTILS_EXPORT StaticTreeItem : public TreeItem
|
||||
|
||||
@@ -133,6 +133,7 @@ void AndroidDebugSupport::start()
|
||||
.appendPath(toNdkArch(AndroidManager::targetArch(target))).toString();
|
||||
}
|
||||
if (isQmlDebugging()) {
|
||||
params.qmlServer.host = m_runner->qmlServerHost();
|
||||
params.qmlServer.port = m_runner->qmlServerPort();
|
||||
//TODO: Not sure if these are the right paths.
|
||||
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(kit);
|
||||
|
||||
@@ -241,7 +241,7 @@ void AndroidManager::setDeviceSerialNumber(ProjectExplorer::Target *target, cons
|
||||
|
||||
QPair<int, int> AndroidManager::apiLevelRange()
|
||||
{
|
||||
return qMakePair(9, 23);
|
||||
return qMakePair(9, 26);
|
||||
}
|
||||
|
||||
QString AndroidManager::androidNameForApiLevel(int x)
|
||||
@@ -291,6 +291,8 @@ QString AndroidManager::androidNameForApiLevel(int x)
|
||||
return QLatin1String("Android 7.0");
|
||||
case 25:
|
||||
return QLatin1String("Android 7.1");
|
||||
case 26:
|
||||
return QLatin1String("Android 8.0");
|
||||
default:
|
||||
return tr("Unknown Android version. API Level: %1").arg(QString::number(x));
|
||||
}
|
||||
|
||||
@@ -226,7 +226,8 @@ public:
|
||||
Utils::Port localGdbServerPort() const { return m_localGdbServerPort; }
|
||||
|
||||
signals:
|
||||
void remoteProcessStarted(Utils::Port gdbServerPort, Utils::Port qmlServerPort, int pid);
|
||||
void remoteProcessStarted(Utils::Port gdbServerPort, Utils::Port qmlServerPort,
|
||||
QString qmlServerHost, int pid);
|
||||
void remoteProcessFinished(const QString &errString = QString());
|
||||
|
||||
void remoteOutput(const QString &output);
|
||||
@@ -257,6 +258,7 @@ private:
|
||||
bool m_useCppDebugger = false;
|
||||
QmlDebug::QmlDebugServicesPreset m_qmlDebugServices;
|
||||
Utils::Port m_localGdbServerPort; // Local end of forwarded debug socket.
|
||||
QString m_qmlServerHost;
|
||||
Utils::Port m_qmlPort;
|
||||
QString m_pingFile;
|
||||
QString m_pongFile;
|
||||
@@ -295,6 +297,7 @@ AndroidRunnerWorker::AndroidRunnerWorker(RunControl *runControl, const AndroidRu
|
||||
QTC_ASSERT(server.listen(QHostAddress::LocalHost)
|
||||
|| server.listen(QHostAddress::LocalHostIPv6),
|
||||
qDebug() << tr("No free ports available on host for QML debugging."));
|
||||
m_qmlServerHost = server.serverAddress().toString();
|
||||
m_qmlPort = Utils::Port(server.serverPort());
|
||||
} else {
|
||||
m_qmlPort = Utils::Port();
|
||||
@@ -638,7 +641,7 @@ void AndroidRunnerWorker::onProcessIdChanged(qint64 pid)
|
||||
} else {
|
||||
// In debugging cases this will be funneled to the engine to actually start
|
||||
// and attach gdb. Afterwards this ends up in handleRemoteDebuggerRunning() below.
|
||||
emit remoteProcessStarted(m_localGdbServerPort, m_qmlPort, m_processPID);
|
||||
emit remoteProcessStarted(m_localGdbServerPort, m_qmlPort, m_qmlServerHost, m_processPID);
|
||||
logcatReadStandardOutput();
|
||||
QTC_ASSERT(!m_psIsAlive, /**/);
|
||||
m_psIsAlive.reset(new QProcess);
|
||||
@@ -782,10 +785,12 @@ void AndroidRunner::remoteErrorOutput(const QString &output)
|
||||
m_outputParser.processOutput(output);
|
||||
}
|
||||
|
||||
void AndroidRunner::handleRemoteProcessStarted(Utils::Port gdbServerPort, Utils::Port qmlServerPort, int pid)
|
||||
void AndroidRunner::handleRemoteProcessStarted(Utils::Port gdbServerPort, Utils::Port qmlServerPort,
|
||||
QString qmlServerHost, int pid)
|
||||
{
|
||||
m_pid = ProcessHandle(pid);
|
||||
m_gdbServerPort = gdbServerPort;
|
||||
m_qmlServerHost = qmlServerHost;
|
||||
m_qmlServerPort = qmlServerPort;
|
||||
reportStarted();
|
||||
}
|
||||
|
||||
@@ -57,6 +57,7 @@ public:
|
||||
const AndroidRunnable &runnable() const { return m_androidRunnable; }
|
||||
|
||||
Utils::Port gdbServerPort() const { return m_gdbServerPort; }
|
||||
QString qmlServerHost() const { return m_qmlServerHost; }
|
||||
Utils::Port qmlServerPort() const { return m_qmlServerPort; }
|
||||
Utils::ProcessHandle pid() const { return m_pid; }
|
||||
|
||||
@@ -76,7 +77,8 @@ private:
|
||||
void remoteOutput(const QString &output);
|
||||
void remoteErrorOutput(const QString &output);
|
||||
void gotRemoteOutput(const QString &output);
|
||||
void handleRemoteProcessStarted(Utils::Port gdbServerPort, Utils::Port qmlServerPort, int pid);
|
||||
void handleRemoteProcessStarted(Utils::Port gdbServerPort, Utils::Port qmlServerPort,
|
||||
QString qmlServerHost, int pid);
|
||||
void handleRemoteProcessFinished(const QString &errString = QString());
|
||||
void checkAVD();
|
||||
void launchAVD();
|
||||
@@ -88,6 +90,7 @@ private:
|
||||
QScopedPointer<AndroidRunnerWorker> m_worker;
|
||||
QPointer<ProjectExplorer::Target> m_target;
|
||||
Utils::Port m_gdbServerPort;
|
||||
QString m_qmlServerHost;
|
||||
Utils::Port m_qmlServerPort;
|
||||
Utils::ProcessHandle m_pid;
|
||||
QmlDebug::QmlOutputParser m_outputParser;
|
||||
|
||||
@@ -203,7 +203,8 @@ bool AndroidToolChain::fromMap(const QVariantMap &data)
|
||||
|
||||
FileNameList AndroidToolChain::suggestedMkspecList() const
|
||||
{
|
||||
return FileNameList()<< FileName::fromLatin1("android-g++");
|
||||
return FileNameList() << FileName::fromLatin1("android-g++")
|
||||
<< FileName::fromLatin1("android-clang");
|
||||
}
|
||||
|
||||
QString AndroidToolChain::makeCommand(const Environment &env) const
|
||||
|
||||
@@ -45,7 +45,7 @@ bool isWarningOrNote(ClangBackEnd::DiagnosticSeverity severity)
|
||||
Q_UNREACHABLE();
|
||||
}
|
||||
|
||||
bool isBlackListedDiagnostic(const ClangBackEnd::DiagnosticContainer &diagnostic,
|
||||
bool isBlackListedHeaderDiagnostic(const ClangBackEnd::DiagnosticContainer &diagnostic,
|
||||
bool isHeaderFile)
|
||||
{
|
||||
static const Utf8StringVector blackList{
|
||||
@@ -56,6 +56,21 @@ bool isBlackListedDiagnostic(const ClangBackEnd::DiagnosticContainer &diagnostic
|
||||
return isHeaderFile && blackList.contains(diagnostic.text());
|
||||
}
|
||||
|
||||
bool isBlackListedQtDiagnostic(const ClangBackEnd::DiagnosticContainer &diagnostic)
|
||||
{
|
||||
static const Utf8StringVector blackList{
|
||||
// From Q_OBJECT:
|
||||
Utf8StringLiteral("warning: "
|
||||
"'metaObject' overrides a member function but is not marked 'override'"),
|
||||
Utf8StringLiteral("warning: "
|
||||
"'qt_metacast' overrides a member function but is not marked 'override'"),
|
||||
Utf8StringLiteral("warning: "
|
||||
"'qt_metacall' overrides a member function but is not marked 'override'"),
|
||||
};
|
||||
|
||||
return blackList.contains(diagnostic.text());
|
||||
}
|
||||
|
||||
template <class Condition>
|
||||
QVector<ClangBackEnd::DiagnosticContainer>
|
||||
filterDiagnostics(const QVector<ClangBackEnd::DiagnosticContainer> &diagnostics,
|
||||
@@ -97,7 +112,8 @@ void ClangDiagnosticFilter::filterDocumentRelatedWarnings(
|
||||
const auto isLocalWarning = [this, isHeaderFile]
|
||||
(const ClangBackEnd::DiagnosticContainer &diagnostic) {
|
||||
return isWarningOrNote(diagnostic.severity())
|
||||
&& !isBlackListedDiagnostic(diagnostic, isHeaderFile)
|
||||
&& !isBlackListedHeaderDiagnostic(diagnostic, isHeaderFile)
|
||||
&& !isBlackListedQtDiagnostic(diagnostic)
|
||||
&& diagnostic.location().filePath() == m_filePath;
|
||||
};
|
||||
|
||||
|
||||
@@ -1019,6 +1019,7 @@ void LldbEngine::fetchDisassembler(DisassemblerAgent *agent)
|
||||
dl.data = line["rawdata"].data();
|
||||
if (!dl.data.isEmpty())
|
||||
dl.data += QString(30 - dl.data.size(), QLatin1Char(' '));
|
||||
dl.data += fromHex(line["hexdata"].data());
|
||||
dl.data += line["data"].data();
|
||||
dl.offset = line["offset"].toInt();
|
||||
dl.lineNumber = line["line"].toInt();
|
||||
|
||||
@@ -427,7 +427,7 @@ void QmlEngine::beginConnection(Utils::Port port)
|
||||
QString host = runParameters().qmlServer.host;
|
||||
// Use localhost as default
|
||||
if (host.isEmpty())
|
||||
host = "localhost";
|
||||
host = QHostAddress(QHostAddress::LocalHost).toString();
|
||||
|
||||
/*
|
||||
* Let plugin-specific code override the port printed by the application. This is necessary
|
||||
|
||||
@@ -198,6 +198,16 @@ bool FlatModel::setData(const QModelIndex &index, const QVariant &value, int rol
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool compareProjectNames(const WrapperNode *lhs, const WrapperNode *rhs)
|
||||
{
|
||||
Node *p1 = lhs->m_node;
|
||||
Node *p2 = rhs->m_node;
|
||||
const int displayNameResult = caseFriendlyCompare(p1->displayName(), p2->displayName());
|
||||
if (displayNameResult != 0)
|
||||
return displayNameResult < 0;
|
||||
return p1 < p2; // sort by pointer value
|
||||
}
|
||||
|
||||
void FlatModel::addOrRebuildProjectModel(Project *project)
|
||||
{
|
||||
WrapperNode *container = nodeForProject(project);
|
||||
@@ -205,7 +215,7 @@ void FlatModel::addOrRebuildProjectModel(Project *project)
|
||||
container->removeChildren();
|
||||
} else {
|
||||
container = new WrapperNode(project->containerNode());
|
||||
rootItem()->appendChild(container);
|
||||
rootItem()->insertOrderedChild(container, &compareProjectNames);
|
||||
}
|
||||
|
||||
QSet<Node *> seen;
|
||||
@@ -260,16 +270,7 @@ void FlatModel::updateSubtree(FolderNode *node)
|
||||
|
||||
void FlatModel::rebuildModel()
|
||||
{
|
||||
QList<Project *> projects = SessionManager::projects();
|
||||
QTC_CHECK(projects.size() == rootItem()->childCount());
|
||||
|
||||
Utils::sort(projects, [](Project *p1, Project *p2) {
|
||||
const int displayNameResult = caseFriendlyCompare(p1->displayName(), p2->displayName());
|
||||
if (displayNameResult != 0)
|
||||
return displayNameResult < 0;
|
||||
return p1 < p2; // sort by pointer value
|
||||
});
|
||||
|
||||
const QList<Project *> projects = SessionManager::projects();
|
||||
for (Project *project : projects)
|
||||
addOrRebuildProjectModel(project);
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorS
|
||||
|
||||
void QmlProfilerPlugin::extensionsInitialized()
|
||||
{
|
||||
(void) new QmlProfilerTool(this);
|
||||
m_profilerTool = new QmlProfilerTool(this);
|
||||
|
||||
addAutoReleasedObject(new QmlProfilerOptionsPage);
|
||||
|
||||
@@ -112,6 +112,9 @@ void QmlProfilerPlugin::extensionsInitialized()
|
||||
|
||||
ExtensionSystem::IPlugin::ShutdownFlag QmlProfilerPlugin::aboutToShutdown()
|
||||
{
|
||||
delete m_profilerTool;
|
||||
m_profilerTool = nullptr;
|
||||
|
||||
// Save settings.
|
||||
// Disconnect from signals that are not needed during shutdown
|
||||
// Hide UI (if you add UI that is not in the main window directly)
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
namespace QmlProfiler {
|
||||
namespace Internal {
|
||||
|
||||
class QmlProfilerTool;
|
||||
|
||||
class QmlProfilerPlugin : public ExtensionSystem::IPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -47,6 +49,9 @@ public:
|
||||
static QmlProfilerSettings *globalSettings();
|
||||
|
||||
QList<QObject *> createTestObjects() const override;
|
||||
|
||||
private:
|
||||
QmlProfilerTool *m_profilerTool = nullptr;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -64,7 +64,7 @@ static QString QmlServerUrl = "QmlServerUrl";
|
||||
class QmlProfilerRunner::QmlProfilerRunnerPrivate
|
||||
{
|
||||
public:
|
||||
QmlProfilerStateManager *m_profilerState = 0;
|
||||
QPointer<QmlProfilerStateManager> m_profilerState;
|
||||
};
|
||||
|
||||
//
|
||||
|
||||
@@ -709,6 +709,7 @@ void ExamplesListModelFilter::timerEvent(QTimerEvent *timerEvent)
|
||||
{
|
||||
if (m_timerId == timerEvent->timerId()) {
|
||||
invalidateFilter();
|
||||
emit layoutChanged();
|
||||
killTimer(m_timerId);
|
||||
m_timerId = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user