aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2017-08-17 17:29:25 +0200
committerEike Ziller <eike.ziller@qt.io>2017-08-17 17:29:25 +0200
commita0a42ff7bd862887bce281814f65179d88eb1de5 (patch)
treeb2182dcbbb1bef16fec1c600b8cae67e327e6ca8
parentcf1edc1fb536287c1cb9760014c5dab9690bbf6a (diff)
parenta951448c4dceca637992ea29df832de190f22130 (diff)
Merge remote-tracking branch 'origin/4.4'
Conflicts: src/plugins/debugger/gdb/gdbengine.cpp Change-Id: I8a7c8ca07d6d6005f5d39b8f1477ebbc7a299fbf
-rw-r--r--dist/changes-4.4.0.md34
-rw-r--r--doc/images/creator-uwp-kits.pngbin0 -> 139327 bytes
-rw-r--r--doc/images/creator-winrt-kits.pngbin62994 -> 0 bytes
-rw-r--r--doc/images/qtcreator-clang-static-analyzer.pngbin26939 -> 10550 bytes
-rw-r--r--doc/images/qtcreator-debugging-helper-options.pngbin0 -> 46233 bytes
-rw-r--r--doc/src/analyze/creator-clang-static-analyzer.qdoc7
-rw-r--r--doc/src/debugger/creator-debugger.qdoc41
-rw-r--r--doc/src/overview/creator-mobile-targets.qdoc11
-rw-r--r--doc/src/overview/creator-target-platforms.qdocinc4
-rw-r--r--doc/src/projects/creator-projects-builds-customizing.qdoc2
-rw-r--r--doc/src/qnx/creator-developing-qnx.qdoc2
-rw-r--r--doc/src/qtcreator-toc.qdoc2
-rw-r--r--doc/src/uwp/creator-uwp.qdoc (renamed from doc/src/winrt/creator-winrt.qdoc)26
-rw-r--r--share/qtcreator/debugger/lldbbridge.py2
-rw-r--r--share/qtcreator/debugger/personaltypes.py9
-rw-r--r--share/qtcreator/debugger/qttypes.py8
-rw-r--r--src/app/app_version_header.qbs4
-rw-r--r--src/libs/qmljs/qmljsmodelmanagerinterface.cpp10
-rw-r--r--src/libs/qmljs/qmljsmodelmanagerinterface.h2
-rw-r--r--src/libs/utils/treemodel.cpp7
-rw-r--r--src/libs/utils/treemodel.h11
-rw-r--r--src/plugins/android/androiddebugsupport.cpp1
-rw-r--r--src/plugins/android/androidmanager.cpp4
-rw-r--r--src/plugins/android/androidrunner.cpp11
-rw-r--r--src/plugins/android/androidrunner.h5
-rw-r--r--src/plugins/android/androidtoolchain.cpp3
-rw-r--r--src/plugins/clangcodemodel/clangdiagnosticfilter.cpp22
-rw-r--r--src/plugins/debugger/lldb/lldbengine.cpp1
-rw-r--r--src/plugins/debugger/qml/qmlengine.cpp2
-rw-r--r--src/plugins/projectexplorer/projectmodels.cpp23
-rw-r--r--src/plugins/qmlprofiler/qmlprofilerplugin.cpp5
-rw-r--r--src/plugins/qmlprofiler/qmlprofilerplugin.h5
-rw-r--r--src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp2
-rw-r--r--src/plugins/qtsupport/exampleslistmodel.cpp1
34 files changed, 198 insertions, 69 deletions
diff --git a/dist/changes-4.4.0.md b/dist/changes-4.4.0.md
index 73b84de482..57a34527b8 100644
--- a/dist/changes-4.4.0.md
+++ b/dist/changes-4.4.0.md
@@ -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
diff --git a/doc/images/creator-uwp-kits.png b/doc/images/creator-uwp-kits.png
new file mode 100644
index 0000000000..2c8c29560d
--- /dev/null
+++ b/doc/images/creator-uwp-kits.png
Binary files differ
diff --git a/doc/images/creator-winrt-kits.png b/doc/images/creator-winrt-kits.png
deleted file mode 100644
index 071c348a58..0000000000
--- a/doc/images/creator-winrt-kits.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-clang-static-analyzer.png b/doc/images/qtcreator-clang-static-analyzer.png
index 6d6eecbd4c..c9a1886ab0 100644
--- a/doc/images/qtcreator-clang-static-analyzer.png
+++ b/doc/images/qtcreator-clang-static-analyzer.png
Binary files differ
diff --git a/doc/images/qtcreator-debugging-helper-options.png b/doc/images/qtcreator-debugging-helper-options.png
new file mode 100644
index 0000000000..d4c635b0b8
--- /dev/null
+++ b/doc/images/qtcreator-debugging-helper-options.png
Binary files differ
diff --git a/doc/src/analyze/creator-clang-static-analyzer.qdoc b/doc/src/analyze/creator-clang-static-analyzer.qdoc
index 593664a123..2c09fa0a75 100644
--- a/doc/src/analyze/creator-clang-static-analyzer.qdoc
+++ b/doc/src/analyze/creator-clang-static-analyzer.qdoc
@@ -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
diff --git a/doc/src/debugger/creator-debugger.qdoc b/doc/src/debugger/creator-debugger.qdoc
index bc1ef9b3b3..8812b0a06c 100644
--- a/doc/src/debugger/creator-debugger.qdoc
+++ b/doc/src/debugger/creator-debugger.qdoc
@@ -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
diff --git a/doc/src/overview/creator-mobile-targets.qdoc b/doc/src/overview/creator-mobile-targets.qdoc
index a0ea95905d..680a9afd88 100644
--- a/doc/src/overview/creator-mobile-targets.qdoc
+++ b/doc/src/overview/creator-mobile-targets.qdoc
@@ -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
diff --git a/doc/src/overview/creator-target-platforms.qdocinc b/doc/src/overview/creator-target-platforms.qdocinc
index 4477590309..3e0153e09d 100644
--- a/doc/src/overview/creator-target-platforms.qdocinc
+++ b/doc/src/overview/creator-target-platforms.qdocinc
@@ -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
diff --git a/doc/src/projects/creator-projects-builds-customizing.qdoc b/doc/src/projects/creator-projects-builds-customizing.qdoc
index c006d586f2..456d056a9e 100644
--- a/doc/src/projects/creator-projects-builds-customizing.qdoc
+++ b/doc/src/projects/creator-projects-builds-customizing.qdoc
@@ -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
diff --git a/doc/src/qnx/creator-developing-qnx.qdoc b/doc/src/qnx/creator-developing-qnx.qdoc
index a42ba9932c..ede33e8715 100644
--- a/doc/src/qnx/creator-developing-qnx.qdoc
+++ b/doc/src/qnx/creator-developing-qnx.qdoc
@@ -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
diff --git a/doc/src/qtcreator-toc.qdoc b/doc/src/qtcreator-toc.qdoc
index 6329e57a3e..43fa9829b1 100644
--- a/doc/src/qtcreator-toc.qdoc
+++ b/doc/src/qtcreator-toc.qdoc
@@ -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
diff --git a/doc/src/winrt/creator-winrt.qdoc b/doc/src/uwp/creator-uwp.qdoc
index a4b0a7181c..0e10785a88 100644
--- a/doc/src/winrt/creator-winrt.qdoc
+++ b/doc/src/uwp/creator-uwp.qdoc
@@ -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
diff --git a/share/qtcreator/debugger/lldbbridge.py b/share/qtcreator/debugger/lldbbridge.py
index 800def2498..9c85907f9a 100644
--- a/share/qtcreator/debugger/lldbbridge.py
+++ b/share/qtcreator/debugger/lldbbridge.py
@@ -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),
diff --git a/share/qtcreator/debugger/personaltypes.py b/share/qtcreator/debugger/personaltypes.py
index 6169ee912a..b4d34db10c 100644
--- a/share/qtcreator/debugger/personaltypes.py
+++ b/share/qtcreator/debugger/personaltypes.py
@@ -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
diff --git a/share/qtcreator/debugger/qttypes.py b/share/qtcreator/debugger/qttypes.py
index 3bcd9afb77..221d28361d 100644
--- a/share/qtcreator/debugger/qttypes.py
+++ b/share/qtcreator/debugger/qttypes.py
@@ -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)
diff --git a/src/app/app_version_header.qbs b/src/app/app_version_header.qbs
index e6903d6cc5..fd55ba00c5 100644
--- a/src/app/app_version_header.qbs
+++ b/src/app/app_version_header.qbs
@@ -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);
diff --git a/src/libs/qmljs/qmljsmodelmanagerinterface.cpp b/src/libs/qmljs/qmljsmodelmanagerinterface.cpp
index e5506224bf..fbd2339105 100644
--- a/src/libs/qmljs/qmljsmodelmanagerinterface.cpp
+++ b/src/libs/qmljs/qmljsmodelmanagerinterface.cpp
@@ -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;
diff --git a/src/libs/qmljs/qmljsmodelmanagerinterface.h b/src/libs/qmljs/qmljsmodelmanagerinterface.h
index 98174de4f9..c86177d487 100644
--- a/src/libs/qmljs/qmljsmodelmanagerinterface.h
+++ b/src/libs/qmljs/qmljsmodelmanagerinterface.h
@@ -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);
diff --git a/src/libs/utils/treemodel.cpp b/src/libs/utils/treemodel.cpp
index b4684eedfe..2b94d56311 100644
--- a/src/libs/utils/treemodel.cpp
+++ b/src/libs/utils/treemodel.cpp
@@ -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);
diff --git a/src/libs/utils/treemodel.h b/src/libs/utils/treemodel.h
index 8e0c4407d2..63818b27c2 100644
--- a/src/libs/utils/treemodel.h
+++ b/src/libs/utils/treemodel.h
@@ -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
diff --git a/src/plugins/android/androiddebugsupport.cpp b/src/plugins/android/androiddebugsupport.cpp
index 92b80cf2cf..5bc850fe64 100644
--- a/src/plugins/android/androiddebugsupport.cpp
+++ b/src/plugins/android/androiddebugsupport.cpp
@@ -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);
diff --git a/src/plugins/android/androidmanager.cpp b/src/plugins/android/androidmanager.cpp
index ee57399060..54f2bdd482 100644
--- a/src/plugins/android/androidmanager.cpp
+++ b/src/plugins/android/androidmanager.cpp
@@ -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));
}
diff --git a/src/plugins/android/androidrunner.cpp b/src/plugins/android/androidrunner.cpp
index 8dcd133369..04d87284af 100644
--- a/src/plugins/android/androidrunner.cpp
+++ b/src/plugins/android/androidrunner.cpp
@@ -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();
}
diff --git a/src/plugins/android/androidrunner.h b/src/plugins/android/androidrunner.h
index 2efd52299c..6215cc49a5 100644
--- a/src/plugins/android/androidrunner.h
+++ b/src/plugins/android/androidrunner.h
@@ -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;
diff --git a/src/plugins/android/androidtoolchain.cpp b/src/plugins/android/androidtoolchain.cpp
index c8223dd81a..bb3b10ee92 100644
--- a/src/plugins/android/androidtoolchain.cpp
+++ b/src/plugins/android/androidtoolchain.cpp
@@ -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
diff --git a/src/plugins/clangcodemodel/clangdiagnosticfilter.cpp b/src/plugins/clangcodemodel/clangdiagnosticfilter.cpp
index 2a7d92b987..78126eea69 100644
--- a/src/plugins/clangcodemodel/clangdiagnosticfilter.cpp
+++ b/src/plugins/clangcodemodel/clangdiagnosticfilter.cpp
@@ -45,8 +45,8 @@ bool isWarningOrNote(ClangBackEnd::DiagnosticSeverity severity)
Q_UNREACHABLE();
}
-bool isBlackListedDiagnostic(const ClangBackEnd::DiagnosticContainer &diagnostic,
- bool isHeaderFile)
+bool isBlackListedHeaderDiagnostic(const ClangBackEnd::DiagnosticContainer &diagnostic,
+ bool isHeaderFile)
{
static const Utf8StringVector blackList{
Utf8StringLiteral("warning: #pragma once in main file"),
@@ -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;
};
diff --git a/src/plugins/debugger/lldb/lldbengine.cpp b/src/plugins/debugger/lldb/lldbengine.cpp
index 96f848fb19..a844d98248 100644
--- a/src/plugins/debugger/lldb/lldbengine.cpp
+++ b/src/plugins/debugger/lldb/lldbengine.cpp
@@ -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();
diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp
index 10e6d4f3b2..4dc8280851 100644
--- a/src/plugins/debugger/qml/qmlengine.cpp
+++ b/src/plugins/debugger/qml/qmlengine.cpp
@@ -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
diff --git a/src/plugins/projectexplorer/projectmodels.cpp b/src/plugins/projectexplorer/projectmodels.cpp
index c36f5c0297..74a600eb0a 100644
--- a/src/plugins/projectexplorer/projectmodels.cpp
+++ b/src/plugins/projectexplorer/projectmodels.cpp
@@ -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);
}
diff --git a/src/plugins/qmlprofiler/qmlprofilerplugin.cpp b/src/plugins/qmlprofiler/qmlprofilerplugin.cpp
index 78fe833f59..bcbb55c472 100644
--- a/src/plugins/qmlprofiler/qmlprofilerplugin.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilerplugin.cpp
@@ -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)
diff --git a/src/plugins/qmlprofiler/qmlprofilerplugin.h b/src/plugins/qmlprofiler/qmlprofilerplugin.h
index 3175fa917a..88b764e95a 100644
--- a/src/plugins/qmlprofiler/qmlprofilerplugin.h
+++ b/src/plugins/qmlprofiler/qmlprofilerplugin.h
@@ -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
diff --git a/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp b/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp
index 90608cbb1f..949eab3176 100644
--- a/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp
@@ -64,7 +64,7 @@ static QString QmlServerUrl = "QmlServerUrl";
class QmlProfilerRunner::QmlProfilerRunnerPrivate
{
public:
- QmlProfilerStateManager *m_profilerState = 0;
+ QPointer<QmlProfilerStateManager> m_profilerState;
};
//
diff --git a/src/plugins/qtsupport/exampleslistmodel.cpp b/src/plugins/qtsupport/exampleslistmodel.cpp
index 01a8b1e0a2..a9e4c208ac 100644
--- a/src/plugins/qtsupport/exampleslistmodel.cpp
+++ b/src/plugins/qtsupport/exampleslistmodel.cpp
@@ -709,6 +709,7 @@ void ExamplesListModelFilter::timerEvent(QTimerEvent *timerEvent)
{
if (m_timerId == timerEvent->timerId()) {
invalidateFilter();
+ emit layoutChanged();
killTimer(m_timerId);
m_timerId = 0;
}