forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.9'
Conflicts: src/plugins/qmldesigner/components/propertyeditor/gradientmodel.cpp Change-Id: I170de608eaae795133105dedb76ae6f93f6e0d92
This commit is contained in:
17
dist/changes-4.9.0.md
vendored
17
dist/changes-4.9.0.md
vendored
@@ -20,7 +20,8 @@ Editing
|
|||||||
|
|
||||||
* Language Client
|
* Language Client
|
||||||
* Added support for document outline (QTCREATORBUG-21573)
|
* Added support for document outline (QTCREATORBUG-21573)
|
||||||
* Added support for `Find Usages` (QTCREATORBUG-21577)
|
* Added support for `Find References to Symbol Under Cursor`
|
||||||
|
(QTCREATORBUG-21577)
|
||||||
* Added support for code actions
|
* Added support for code actions
|
||||||
* Highlighter
|
* Highlighter
|
||||||
* Replaced custom highlighting file parser with `KSyntaxHighlighting`
|
* Replaced custom highlighting file parser with `KSyntaxHighlighting`
|
||||||
@@ -75,6 +76,11 @@ Generic Projects
|
|||||||
files (QTCREATORBUG-19668)
|
files (QTCREATORBUG-19668)
|
||||||
* Fixed `Apply Filter` when editing file list (QTCREATORBUG-16237)
|
* Fixed `Apply Filter` when editing file list (QTCREATORBUG-16237)
|
||||||
|
|
||||||
|
Compilation Database Projects
|
||||||
|
|
||||||
|
* Fixed that project tree was not updated when database changes on disk
|
||||||
|
(QTCREATORBUG-21733)
|
||||||
|
|
||||||
C++ Support
|
C++ Support
|
||||||
|
|
||||||
* Added code snippet for range-based `for` loops
|
* Added code snippet for range-based `for` loops
|
||||||
@@ -85,8 +91,11 @@ C++ Support
|
|||||||
* Fixed issue with high memory consumption (QTCREATORBUG-19543)
|
* Fixed issue with high memory consumption (QTCREATORBUG-19543)
|
||||||
* Fixed inconsistency between `Follow Symbol` and `Ctrl + Click`
|
* Fixed inconsistency between `Follow Symbol` and `Ctrl + Click`
|
||||||
(QTCREATORBUG-21637)
|
(QTCREATORBUG-21637)
|
||||||
|
* Fixed that global completion was shown after comma (QTCREATORBUG-21624)
|
||||||
* Clang Format
|
* Clang Format
|
||||||
* Added option to format code instead of only indenting code
|
* Added option to format code instead of only indenting code
|
||||||
|
* Added `Open Used .clang-format Configuration File` to editor's
|
||||||
|
context menu
|
||||||
|
|
||||||
QML Support
|
QML Support
|
||||||
|
|
||||||
@@ -108,6 +117,8 @@ Debugging
|
|||||||
* Fixed that debugger toolbar could force large minimum window size
|
* Fixed that debugger toolbar could force large minimum window size
|
||||||
(QTCREATORBUG-21885)
|
(QTCREATORBUG-21885)
|
||||||
* Added pretty printing of `QSizePolicy`
|
* Added pretty printing of `QSizePolicy`
|
||||||
|
* Fixed pretty printing of standard maps and sets from `libc++`
|
||||||
|
(QTCREATORBUG-18536)
|
||||||
* GDB
|
* GDB
|
||||||
* Added support for rvalue references in function arguments
|
* Added support for rvalue references in function arguments
|
||||||
* LLDB
|
* LLDB
|
||||||
@@ -130,6 +141,7 @@ Perf Profiler
|
|||||||
Qt Quick Designer
|
Qt Quick Designer
|
||||||
|
|
||||||
* Made QML Live Preview integration opensource
|
* Made QML Live Preview integration opensource
|
||||||
|
* Added support for `Dialog` (QTCREATORBUG-22120)
|
||||||
|
|
||||||
Version Control Systems
|
Version Control Systems
|
||||||
|
|
||||||
@@ -178,6 +190,8 @@ Windows
|
|||||||
* Changed toolchain detection to use `vswhere` by default, which is recommended
|
* Changed toolchain detection to use `vswhere` by default, which is recommended
|
||||||
by Microsoft
|
by Microsoft
|
||||||
* Fixed issue with UNC paths in `.pro` files (QTCREATORBUG-21881)
|
* Fixed issue with UNC paths in `.pro` files (QTCREATORBUG-21881)
|
||||||
|
* Fixed language version detections with MSVC and precompiled headers
|
||||||
|
(QTCREATORBUG-21860)
|
||||||
|
|
||||||
Linux
|
Linux
|
||||||
|
|
||||||
@@ -189,6 +203,7 @@ Android
|
|||||||
|
|
||||||
* Removed separate `QmakeAndroidSupport` plugin and merged functionality into
|
* Removed separate `QmakeAndroidSupport` plugin and merged functionality into
|
||||||
other plugins
|
other plugins
|
||||||
|
* Fixed debugging for API level 22 (QTCREATORBUG-22098)
|
||||||
|
|
||||||
Remote Linux
|
Remote Linux
|
||||||
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 5.2 KiB |
BIN
doc/images/qtcreator-debug-button.png
Normal file
BIN
doc/images/qtcreator-debug-button.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 235 B |
BIN
doc/images/qtcreator-typo-clang.png
Normal file
BIN
doc/images/qtcreator-typo-clang.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 52 KiB |
@@ -53,7 +53,7 @@
|
|||||||
\image qtcreator-setting-breakpoint1.png
|
\image qtcreator-setting-breakpoint1.png
|
||||||
|
|
||||||
\li Select \uicontrol Debug > \uicontrol {Start Debugging} >
|
\li Select \uicontrol Debug > \uicontrol {Start Debugging} >
|
||||||
\uicontrol {Start Debugging} or press \key F5.
|
\uicontrol {Start Debugging of Startup Project} or press \key F5.
|
||||||
|
|
||||||
\li To view information about the breakpoint, go to the
|
\li To view information about the breakpoint, go to the
|
||||||
\uicontrol Breakpoints view.
|
\uicontrol Breakpoints view.
|
||||||
|
@@ -54,10 +54,10 @@
|
|||||||
\li \l{Launching the Debugger}
|
\li \l{Launching the Debugger}
|
||||||
|
|
||||||
To start an application from an open project under the control
|
To start an application from an open project under the control
|
||||||
of a debugger, press the Debug button in the lower left corner
|
of a debugger, select the \inlineimage qtcreator-debug-button.png
|
||||||
of the main view, or press \key F5. Other, less common start
|
(\uicontrol {Start Debugging of Startup Project}) button or press
|
||||||
options are available in the \uicontrol Debug >
|
\key F5. Other, less common start options are available in the
|
||||||
\uicontrol {Start Debugging} menu.
|
\uicontrol Debug > \uicontrol {Start Debugging} menu.
|
||||||
|
|
||||||
\li \l{Interacting with the Debugger}
|
\li \l{Interacting with the Debugger}
|
||||||
|
|
||||||
@@ -106,13 +106,15 @@
|
|||||||
\title Launching the Debugger
|
\title Launching the Debugger
|
||||||
|
|
||||||
To start an application from an open project under the control of a
|
To start an application from an open project under the control of a
|
||||||
debugger, press the \uicontrol Debug button in the lower left corner
|
debugger, select the \inlineimage qtcreator-debug-button.png
|
||||||
of the main view, or press \key F5.
|
(\uicontrol {Start Debugging of Startup Project}) button or press \key F5.
|
||||||
|
|
||||||
\QC checks whether the compiled program is up-to-date, and rebuilds and
|
\QC checks whether the compiled program is up-to-date, and rebuilds and
|
||||||
deploys it if the \uicontrol {Always build project before deploying it} and
|
deploys it if the \uicontrol {Always build project before deploying it} and
|
||||||
\uicontrol {Always deploy before running} options are selected in the
|
\uicontrol {Always deploy before running} options are selected in the
|
||||||
\uicontrol {Build and Run} options.
|
\uicontrol {Build and Run} options. To debug the program without deploying
|
||||||
|
it, select \uicontrol Debug > \uicontrol {Start Debugging} >
|
||||||
|
\uicontrol {Start Debugging Without Deployment}.
|
||||||
|
|
||||||
The debugger then takes over and starts the program with suitable
|
The debugger then takes over and starts the program with suitable
|
||||||
parameters.
|
parameters.
|
||||||
@@ -127,7 +129,8 @@
|
|||||||
depending on where and how the debugged process is started and run. Some of
|
depending on where and how the debugged process is started and run. Some of
|
||||||
the modes are only available for a particular operating system or platform.
|
the modes are only available for a particular operating system or platform.
|
||||||
|
|
||||||
In general, the \key F5 and the \uicontrol Debug button are set up in a
|
In general, \key F5 and the \uicontrol {Start Debugging of Startup Project}
|
||||||
|
button are set up in a
|
||||||
way to start the operating mode that is commonly used in a given context. So
|
way to start the operating mode that is commonly used in a given context. So
|
||||||
if the current project is set up as a C++ application using the MinGW
|
if the current project is set up as a C++ application using the MinGW
|
||||||
toolchain targeting desktop Windows, the GDB engine will be started in Start
|
toolchain targeting desktop Windows, the GDB engine will be started in Start
|
||||||
@@ -137,7 +140,7 @@
|
|||||||
|
|
||||||
Change the run configuration parameters (such as
|
Change the run configuration parameters (such as
|
||||||
\uicontrol {Run in Terminal}) in the run settings of the project, or select
|
\uicontrol {Run in Terminal}) in the run settings of the project, or select
|
||||||
options from the \uicontrol Debug > \uicontrol {Start Debugging} menu to
|
options from the \uicontrol Debug > \uicontrol {Start Debugging} menu to
|
||||||
select other modes of operation.
|
select other modes of operation.
|
||||||
|
|
||||||
The debugger can run in the following modes:
|
The debugger can run in the following modes:
|
||||||
|
@@ -65,7 +65,8 @@
|
|||||||
The red circle indicates that a breakpoint is now set on that line
|
The red circle indicates that a breakpoint is now set on that line
|
||||||
number.
|
number.
|
||||||
|
|
||||||
\li Select \uicontrol {Debug > Start Debugging > Start Debugging} or press
|
\li Select \uicontrol Debug > \uicontrol {Start Debugging} >
|
||||||
|
\uicontrol {Start Debugging of Startup Project} or press
|
||||||
\key{F5}.
|
\key{F5}.
|
||||||
|
|
||||||
\li Once the Same Game application starts, select \uicontrol {Puzzle}
|
\li Once the Same Game application starts, select \uicontrol {Puzzle}
|
||||||
@@ -97,7 +98,7 @@
|
|||||||
\image qtquick-example-setting-breakpoint3.png
|
\image qtquick-example-setting-breakpoint3.png
|
||||||
|
|
||||||
\li To execute JavaScript commands in the current context, open the
|
\li To execute JavaScript commands in the current context, open the
|
||||||
\uicontrol {Debugger Console} output pane.
|
\uicontrol {QML Debugger Console} output pane.
|
||||||
|
|
||||||
\image qml-script-console.png
|
\image qml-script-console.png
|
||||||
|
|
||||||
|
@@ -101,9 +101,10 @@
|
|||||||
|
|
||||||
\section1 Starting QML Debugging
|
\section1 Starting QML Debugging
|
||||||
|
|
||||||
To start the application, choose \uicontrol {Debug > Start Debugging >
|
To start the application, choose \uicontrol Debug > \uicontrol {Start Debugging}
|
||||||
Start Debugging} or press \key F5. Once the application starts running, it
|
> \uicontrol {Start Debugging of Startup Project} or press \key F5. Once the
|
||||||
behaves and performs as usual. You can then perform the following tasks:
|
application starts running, it behaves and performs as usual. You can then
|
||||||
|
perform the following tasks:
|
||||||
|
|
||||||
\list
|
\list
|
||||||
|
|
||||||
@@ -227,11 +228,11 @@
|
|||||||
\section1 Executing JavaScript Expressions
|
\section1 Executing JavaScript Expressions
|
||||||
|
|
||||||
When the application is interrupted by a breakpoint, you can use the
|
When the application is interrupted by a breakpoint, you can use the
|
||||||
\uicontrol {Debugger Console} to execute JavaScript expressions in the
|
\uicontrol {QML Debugger Console} to execute JavaScript expressions in the
|
||||||
current context. To open it, choose \uicontrol Window >
|
current context. To open it, choose \uicontrol Window >
|
||||||
\uicontrol {Output Panes} > \uicontrol {Debugger Console}.
|
\uicontrol {Output Panes} > \uicontrol {QML Debugger Console}.
|
||||||
|
|
||||||
\image qml-script-console.png "Debugger Console"
|
\image qml-script-console.png "QML Debugger Console"
|
||||||
|
|
||||||
You can change property values temporarily, without editing the source, and
|
You can change property values temporarily, without editing the source, and
|
||||||
view the results in the running application. You can change the property
|
view the results in the running application. You can change the property
|
||||||
@@ -239,7 +240,7 @@
|
|||||||
|
|
||||||
\section1 Applying QML Changes at Runtime
|
\section1 Applying QML Changes at Runtime
|
||||||
|
|
||||||
When you change property values in the \uicontrol {Debugger Console} or in
|
When you change property values in the \uicontrol {QML Debugger Console} or
|
||||||
the \uicontrol Locals or \uicontrol Expression view, they are immediately
|
in the \uicontrol Locals or \uicontrol Expression view, they are immediately
|
||||||
updated in the running application, but not in the source code.
|
updated in the running application, but not in the source code.
|
||||||
*/
|
*/
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2018 The Qt Company Ltd.
|
** Copyright (C) 2019 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of the Qt Creator documentation.
|
** This file is part of the Qt Creator documentation.
|
||||||
@@ -41,27 +41,38 @@
|
|||||||
\list
|
\list
|
||||||
\li Syntax errors are underlined in red.
|
\li Syntax errors are underlined in red.
|
||||||
|
|
||||||
In the following figure, a semicolon is missing at the end of the
|
In the following screenshot, a semicolon is missing at the end
|
||||||
line.
|
of the line.
|
||||||
\image qtcreator-syntaxerror.png
|
\image qtcreator-syntaxerror.png
|
||||||
\li Semantic errors and warnings are underlined in olive.
|
\li Semantic errors and warnings are underlined in olive.
|
||||||
|
|
||||||
In the following figure, the variable is not used.
|
In the following screenshot, the variable is not used.
|
||||||
\image qtcreator-semanticerror.png
|
\image qtcreator-semanticerror.png
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
|
\section1 Viewing Annotations
|
||||||
|
|
||||||
When using the Clang code model, errors and warnings are additionally marked
|
When using the Clang code model, errors and warnings are additionally marked
|
||||||
with icons and annotated. If a \l{http://clang.llvm.org/diagnostics.html}
|
with icons and annotated. If a \l{http://clang.llvm.org/diagnostics.html}
|
||||||
{Clang fix-it} is available, you can execute it by clicking the
|
{Clang fix-it} is available, you can execute it by clicking the
|
||||||
\inlineimage refactormarker.png
|
\inlineimage refactormarker.png
|
||||||
icon and pressing \key Enter.
|
icon and pressing \key Enter.
|
||||||
|
|
||||||
In the following figure, a semicolon is missing at the end of the
|
In the following screenshot, a Qt class name contains a typo:
|
||||||
|
|
||||||
|
\image qtcreator-typo-clang.png
|
||||||
|
|
||||||
|
You can use the icons in the tooltip popup to copy the error or
|
||||||
|
warning message to the clipboard or to ignore and hide it. Select
|
||||||
|
the \uicontrol {Annotation Settings} link to specify the position
|
||||||
|
of the line annotations.
|
||||||
|
|
||||||
|
In the following screenshot, a semicolon is missing at the end of the
|
||||||
line.
|
line.
|
||||||
|
|
||||||
\image qtcreator-syntaxerror-clang.png
|
\image qtcreator-syntaxerror-clang.png
|
||||||
|
|
||||||
In the following figure, the variable is not used.
|
In the following screenshot, the variable is not used.
|
||||||
|
|
||||||
\image qtcreator-semanticerror-clang.png
|
\image qtcreator-semanticerror-clang.png
|
||||||
|
|
||||||
@@ -74,6 +85,8 @@
|
|||||||
|
|
||||||
\image qml-syntax-check.png
|
\image qml-syntax-check.png
|
||||||
|
|
||||||
|
\section2 Specifying Line Annotation Positions
|
||||||
|
|
||||||
To specify the position where the annotations are displayed, select
|
To specify the position where the annotations are displayed, select
|
||||||
\uicontrol Tools > \uicontrol Options > \uicontrol {Text Editor} >
|
\uicontrol Tools > \uicontrol Options > \uicontrol {Text Editor} >
|
||||||
\uicontrol Display > \uicontrol {Line annotations}, and then select
|
\uicontrol Display > \uicontrol {Line annotations}, and then select
|
||||||
|
@@ -52,7 +52,8 @@
|
|||||||
{following symbols}, and so on
|
{following symbols}, and so on
|
||||||
|
|
||||||
\li Inspecting code by using the \l{Browsing Project Contents}
|
\li Inspecting code by using the \l{Browsing Project Contents}
|
||||||
{class browser}, the \l{Viewing QML Types}{outline}, and so on
|
{class browser}, the \l{Viewing Defined Types and Symbols}
|
||||||
|
{outline}, and so on
|
||||||
|
|
||||||
\li Diagnostics
|
\li Diagnostics
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2018 The Qt Company Ltd.
|
** Copyright (C) 2019 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of the Qt Creator documentation.
|
** This file is part of the Qt Creator documentation.
|
||||||
@@ -34,9 +34,19 @@
|
|||||||
For several programming languages, a \e {language server} is available
|
For several programming languages, a \e {language server} is available
|
||||||
that provides information about the code to IDEs as long as they support
|
that provides information about the code to IDEs as long as they support
|
||||||
communication via the language server protocol (LSP). This enables the
|
communication via the language server protocol (LSP). This enables the
|
||||||
IDE to provide code completion, highlighting of the symbol under cursor,
|
IDE to provide the following services:
|
||||||
and jumping to the symbol definition, as well as to integrate diagnostics
|
|
||||||
from the language server.
|
\list
|
||||||
|
\li \l{Completing Code}{Code completion}
|
||||||
|
\li Highlighting the symbol under cursor
|
||||||
|
\li \l{Moving to Symbol Definition or Declaration}
|
||||||
|
{Moving to the symbol definition}
|
||||||
|
\li Inspecting code by viewing the document
|
||||||
|
\l{Viewing Defined Types and Symbols}{outline}
|
||||||
|
\li \l{Finding Symbols}{Finding references to symbols}
|
||||||
|
\li Code actions
|
||||||
|
\li Integrating diagnostics from the language server
|
||||||
|
\endlist
|
||||||
|
|
||||||
By providing a client for the language server protocol, \QC can support
|
By providing a client for the language server protocol, \QC can support
|
||||||
the above features for several other programming languages besides C++.
|
the above features for several other programming languages besides C++.
|
||||||
|
@@ -137,7 +137,7 @@
|
|||||||
|
|
||||||
\li \uicontrol{Compile Output}
|
\li \uicontrol{Compile Output}
|
||||||
|
|
||||||
\li \uicontrol {Debugger Console}
|
\li \uicontrol {QML Debugger Console}
|
||||||
|
|
||||||
\li \uicontrol {To-Do Entries}
|
\li \uicontrol {To-Do Entries}
|
||||||
|
|
||||||
@@ -164,7 +164,7 @@
|
|||||||
\uicontrol {Window > Output Panes}. To display the \uicontrol {To-Do Entries} pane,
|
\uicontrol {Window > Output Panes}. To display the \uicontrol {To-Do Entries} pane,
|
||||||
enable the Todo plugin.
|
enable the Todo plugin.
|
||||||
|
|
||||||
For more information about the \uicontrol {Debugger Console} view, see
|
For more information about the \uicontrol {QML Debugger Console} view, see
|
||||||
\l{Executing JavaScript Expressions}.
|
\l{Executing JavaScript Expressions}.
|
||||||
|
|
||||||
\section2 Issues
|
\section2 Issues
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2018 The Qt Company Ltd.
|
** Copyright (C) 2019 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of the Qt Creator documentation.
|
** This file is part of the Qt Creator documentation.
|
||||||
@@ -268,14 +268,15 @@
|
|||||||
|
|
||||||
//! [outline view]
|
//! [outline view]
|
||||||
|
|
||||||
\section2 Viewing QML Types
|
\section2 Viewing Defined Types and Symbols
|
||||||
|
|
||||||
The \uicontrol Outline view shows the type hierarchy in a QML file.
|
The \uicontrol Outline view shows an overview of defined types and other
|
||||||
|
symbols, as well as their properties and hierarchy in a source file.
|
||||||
|
|
||||||
\list
|
\list
|
||||||
\li To see a complete list of all bindings, select
|
\li To see a complete list of all bindings, select
|
||||||
\uicontrol {Filter Tree} > \uicontrol {Show All Bindings}.
|
\uicontrol {Filter Tree} > \uicontrol {Show All Bindings}.
|
||||||
\li To stop the synchronization with the QML type selected in the
|
\li To stop the synchronization with the type or symbol selected in the
|
||||||
editor, deselect \uicontrol {Synchronize with Editor}.
|
editor, deselect \uicontrol {Synchronize with Editor}.
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
|
@@ -99,14 +99,14 @@ static bool isTimedOut(const chrono::high_resolution_clock::time_point &start,
|
|||||||
return timedOut;
|
return timedOut;
|
||||||
}
|
}
|
||||||
|
|
||||||
static qint64 extractPID(const QString &output, const QString &packageName)
|
static qint64 extractPID(const QByteArray &output, const QString &packageName)
|
||||||
{
|
{
|
||||||
qint64 pid = -1;
|
qint64 pid = -1;
|
||||||
foreach (auto tuple, output.split('\n')) {
|
foreach (auto tuple, output.split('\n')) {
|
||||||
tuple = tuple.simplified();
|
tuple = tuple.simplified();
|
||||||
if (!tuple.isEmpty()) {
|
if (!tuple.isEmpty()) {
|
||||||
auto parts = tuple.split(':');
|
auto parts = tuple.split(':');
|
||||||
QString commandName = parts.first();
|
QString commandName = QString::fromLocal8Bit(parts.first());
|
||||||
if (parts.length() == 2 && commandName == packageName) {
|
if (parts.length() == 2 && commandName == packageName) {
|
||||||
pid = parts.last().toLongLong();
|
pid = parts.last().toLongLong();
|
||||||
break;
|
break;
|
||||||
@@ -125,18 +125,17 @@ static void findProcessPID(QFutureInterface<qint64> &fi, QStringList selector,
|
|||||||
|
|
||||||
qint64 processPID = -1;
|
qint64 processPID = -1;
|
||||||
chrono::high_resolution_clock::time_point start = chrono::high_resolution_clock::now();
|
chrono::high_resolution_clock::time_point start = chrono::high_resolution_clock::now();
|
||||||
|
|
||||||
selector.append("shell");
|
|
||||||
selector.append(preNougat ? pidScriptPreNougat : pidScript.arg(packageName));
|
|
||||||
|
|
||||||
do {
|
do {
|
||||||
QThread::msleep(200);
|
QThread::msleep(200);
|
||||||
SdkToolResult result = AndroidManager::runAdbCommand(selector);
|
QString adbPath = AndroidConfigurations::currentConfig().adbToolPath().toString();
|
||||||
|
selector.append("shell");
|
||||||
|
selector.append(preNougat ? pidScriptPreNougat : pidScript.arg(packageName));
|
||||||
|
const auto out = Utils::SynchronousProcess().runBlocking(adbPath, selector).allRawOutput();
|
||||||
if (preNougat) {
|
if (preNougat) {
|
||||||
processPID = extractPID(result.stdOut(), packageName);
|
processPID = extractPID(out, packageName);
|
||||||
} else {
|
} else {
|
||||||
if (!result.stdOut().isEmpty())
|
if (!out.isEmpty())
|
||||||
processPID = result.stdOut().trimmed().toLongLong();
|
processPID = out.trimmed().toLongLong();
|
||||||
}
|
}
|
||||||
} while (processPID == -1 && !isTimedOut(start) && !fi.isCanceled());
|
} while (processPID == -1 && !isTimedOut(start) && !fi.isCanceled());
|
||||||
|
|
||||||
@@ -325,11 +324,8 @@ void AndroidRunnerWorker::forceStop()
|
|||||||
runAdb({"shell", "am", "force-stop", m_packageName});
|
runAdb({"shell", "am", "force-stop", m_packageName});
|
||||||
|
|
||||||
// try killing it via kill -9
|
// try killing it via kill -9
|
||||||
QString out;
|
if (m_processPID != -1)
|
||||||
runAdb({"shell", pidScriptPreNougat}, &out);
|
adbKill(m_processPID);
|
||||||
qint64 pid = extractPID(out.simplified(), m_packageName);
|
|
||||||
if (pid != -1)
|
|
||||||
adbKill(pid);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AndroidRunnerWorker::logcatReadStandardError()
|
void AndroidRunnerWorker::logcatReadStandardError()
|
||||||
|
@@ -272,8 +272,6 @@ void EditorToolBar::addEditor(IEditor *editor)
|
|||||||
|
|
||||||
if (toolBar && !d->m_isStandalone)
|
if (toolBar && !d->m_isStandalone)
|
||||||
addCenterToolBar(toolBar);
|
addCenterToolBar(toolBar);
|
||||||
|
|
||||||
updateDocumentStatus(editor->document());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditorToolBar::addCenterToolBar(QWidget *toolBar)
|
void EditorToolBar::addCenterToolBar(QWidget *toolBar)
|
||||||
@@ -408,10 +406,6 @@ void EditorToolBar::updateDocumentStatus(IDocument *document)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Utils::optional<int> index = DocumentModel::rowOfDocument(document);
|
|
||||||
if (QTC_GUARD(index))
|
|
||||||
d->m_editorList->setCurrentIndex(*index);
|
|
||||||
|
|
||||||
if (document->filePath().isEmpty()) {
|
if (document->filePath().isEmpty()) {
|
||||||
d->m_lockButton->setIcon(QIcon());
|
d->m_lockButton->setIcon(QIcon());
|
||||||
d->m_lockButton->setEnabled(false);
|
d->m_lockButton->setEnabled(false);
|
||||||
|
@@ -73,6 +73,7 @@ class StartApplicationDialogPrivate
|
|||||||
public:
|
public:
|
||||||
KitChooser *kitChooser;
|
KitChooser *kitChooser;
|
||||||
QLabel *serverPortLabel;
|
QLabel *serverPortLabel;
|
||||||
|
QLabel *channelOverrideHintLabel;
|
||||||
QLabel *channelOverrideLabel;
|
QLabel *channelOverrideLabel;
|
||||||
QLineEdit *channelOverrideEdit;
|
QLineEdit *channelOverrideEdit;
|
||||||
QSpinBox *serverPortSpinBox;
|
QSpinBox *serverPortSpinBox;
|
||||||
@@ -237,6 +238,12 @@ StartApplicationDialog::StartApplicationDialog(QWidget *parent)
|
|||||||
d->serverPortSpinBox = new QSpinBox(this);
|
d->serverPortSpinBox = new QSpinBox(this);
|
||||||
d->serverPortSpinBox->setRange(1, 65535);
|
d->serverPortSpinBox->setRange(1, 65535);
|
||||||
|
|
||||||
|
d->channelOverrideHintLabel =
|
||||||
|
new QLabel(tr("Normally, the running server is identified by the IP of the "
|
||||||
|
"device in the kit and the server port selected above.\n"
|
||||||
|
"You can choose another communication channel here, such as "
|
||||||
|
"a serial line or custom ip:port."));
|
||||||
|
|
||||||
d->channelOverrideLabel = new QLabel(tr("Override server channel:"), this);
|
d->channelOverrideLabel = new QLabel(tr("Override server channel:"), this);
|
||||||
d->channelOverrideEdit = new QLineEdit(this);
|
d->channelOverrideEdit = new QLineEdit(this);
|
||||||
//: "For example, /dev/ttyS0, COM1, 127.0.0.1:1234"
|
//: "For example, /dev/ttyS0, COM1, 127.0.0.1:1234"
|
||||||
@@ -304,10 +311,7 @@ StartApplicationDialog::StartApplicationDialog(QWidget *parent)
|
|||||||
formLayout->addRow(tr("Break at \"&main\":"), d->breakAtMainCheckBox);
|
formLayout->addRow(tr("Break at \"&main\":"), d->breakAtMainCheckBox);
|
||||||
formLayout->addRow(d->serverStartScriptLabel, d->serverStartScriptPathChooser);
|
formLayout->addRow(d->serverStartScriptLabel, d->serverStartScriptPathChooser);
|
||||||
formLayout->addRow(tr("Debug &information:"), d->debuginfoPathChooser);
|
formLayout->addRow(tr("Debug &information:"), d->debuginfoPathChooser);
|
||||||
formLayout->addRow(new QLabel(tr("Normally, the running server is identified by the IP of the "
|
formLayout->addRow(d->channelOverrideHintLabel);
|
||||||
"device in the kit and the server port selected above.\n"
|
|
||||||
"You can choose another communication channel here, such as "
|
|
||||||
"a serial line or custom ip:port.")));
|
|
||||||
formLayout->addRow(d->channelOverrideLabel, d->channelOverrideEdit);
|
formLayout->addRow(d->channelOverrideLabel, d->channelOverrideEdit);
|
||||||
formLayout->addRow(line2);
|
formLayout->addRow(line2);
|
||||||
formLayout->addRow(tr("&Recent:"), d->historyComboBox);
|
formLayout->addRow(tr("&Recent:"), d->historyComboBox);
|
||||||
@@ -396,6 +400,7 @@ void StartApplicationDialog::run(bool attachRemote)
|
|||||||
dialog.d->serverStartScriptLabel->setVisible(false);
|
dialog.d->serverStartScriptLabel->setVisible(false);
|
||||||
dialog.d->serverPortSpinBox->setVisible(false);
|
dialog.d->serverPortSpinBox->setVisible(false);
|
||||||
dialog.d->serverPortLabel->setVisible(false);
|
dialog.d->serverPortLabel->setVisible(false);
|
||||||
|
dialog.d->channelOverrideHintLabel->setVisible(false);
|
||||||
dialog.d->channelOverrideLabel->setVisible(false);
|
dialog.d->channelOverrideLabel->setVisible(false);
|
||||||
dialog.d->channelOverrideEdit->setVisible(false);
|
dialog.d->channelOverrideEdit->setVisible(false);
|
||||||
}
|
}
|
||||||
|
@@ -160,6 +160,10 @@ void PerfConfigWidget::setTarget(ProjectExplorer::Target *target)
|
|||||||
QTC_CHECK(!m_process || m_process->state() == QProcess::NotRunning);
|
QTC_CHECK(!m_process || m_process->state() == QProcess::NotRunning);
|
||||||
|
|
||||||
m_process.reset(device->createProcess(nullptr));
|
m_process.reset(device->createProcess(nullptr));
|
||||||
|
if (!m_process) {
|
||||||
|
m_ui->useTracePointsButton->setEnabled(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
connect(m_process.get(), &ProjectExplorer::DeviceProcess::finished,
|
connect(m_process.get(), &ProjectExplorer::DeviceProcess::finished,
|
||||||
this, &PerfConfigWidget::handleProcessFinished);
|
this, &PerfConfigWidget::handleProcessFinished);
|
||||||
|
@@ -38,6 +38,8 @@
|
|||||||
|
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
|
||||||
|
#include <QTimer>
|
||||||
|
|
||||||
GradientModel::GradientModel(QObject *parent) :
|
GradientModel::GradientModel(QObject *parent) :
|
||||||
QAbstractListModel(parent)
|
QAbstractListModel(parent)
|
||||||
{
|
{
|
||||||
@@ -150,6 +152,9 @@ void GradientModel::addGradient()
|
|||||||
if (!color.isValid())
|
if (!color.isValid())
|
||||||
color = QColor(Qt::white);
|
color = QColor(Qt::white);
|
||||||
|
|
||||||
|
if (m_gradientTypeName != "Gradient")
|
||||||
|
ensureShapesImport();
|
||||||
|
|
||||||
QmlDesigner::RewriterTransaction transaction = view()->beginRewriterTransaction(QByteArrayLiteral("GradientModel::addGradient"));
|
QmlDesigner::RewriterTransaction transaction = view()->beginRewriterTransaction(QByteArrayLiteral("GradientModel::addGradient"));
|
||||||
|
|
||||||
QmlDesigner::ModelNode gradientNode = createGradientNode();
|
QmlDesigner::ModelNode gradientNode = createGradientNode();
|
||||||
@@ -173,6 +178,8 @@ void GradientModel::addGradient()
|
|||||||
}
|
}
|
||||||
setupModel();
|
setupModel();
|
||||||
|
|
||||||
|
if (m_gradientTypeName != "Gradient")
|
||||||
|
QTimer::singleShot(100, [this](){ view()->resetPuppet(); }); /*Unfortunately required */
|
||||||
emit hasGradientChanged();
|
emit hasGradientChanged();
|
||||||
emit gradientTypeChanged();
|
emit gradientTypeChanged();
|
||||||
}
|
}
|
||||||
@@ -321,7 +328,7 @@ void GradientModel::setAnchorBackend(const QVariant &anchorBackend)
|
|||||||
m_itemNode = backendCasted->getItemNode();
|
m_itemNode = backendCasted->getItemNode();
|
||||||
|
|
||||||
if (m_itemNode.isValid()
|
if (m_itemNode.isValid()
|
||||||
&& m_itemNode.modelNode().hasProperty(gradientPropertyName().toUtf8()))
|
&& m_itemNode.modelNode().hasNodeProperty(gradientPropertyName().toUtf8()))
|
||||||
m_gradientTypeName = m_itemNode.modelNode().nodeProperty(gradientPropertyName().toUtf8()).modelNode().simplifiedTypeName();
|
m_gradientTypeName = m_itemNode.modelNode().nodeProperty(gradientPropertyName().toUtf8()).modelNode().simplifiedTypeName();
|
||||||
|
|
||||||
setupModel();
|
setupModel();
|
||||||
@@ -445,7 +452,6 @@ QmlDesigner::ModelNode GradientModel::createGradientNode()
|
|||||||
fullTypeName.prepend("QtQuick.");
|
fullTypeName.prepend("QtQuick.");
|
||||||
} else {
|
} else {
|
||||||
fullTypeName.prepend("QtQuick.Shapes.");
|
fullTypeName.prepend("QtQuick.Shapes.");
|
||||||
ensureShapesImport();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
auto metaInfo = model()->metaInfo(fullTypeName);
|
auto metaInfo = model()->metaInfo(fullTypeName);
|
||||||
|
@@ -85,7 +85,7 @@ static TypeName resolveTypeName(const ASTPropertyReference *ref, const ContextPt
|
|||||||
{
|
{
|
||||||
TypeName type = "unknown";
|
TypeName type = "unknown";
|
||||||
|
|
||||||
if (ref->ast()->defaultToken.isValid()) {
|
if (ref->ast()->propertyToken.isValid()) {
|
||||||
type = ref->ast()->memberType->name.toUtf8();
|
type = ref->ast()->memberType->name.toUtf8();
|
||||||
|
|
||||||
if (type == "alias") {
|
if (type == "alias") {
|
||||||
|
@@ -60,7 +60,7 @@ QStringList filterExistingFiles(QStringList &&filePaths)
|
|||||||
|
|
||||||
filePaths.erase(startOfNonExistingFilePaths, filePaths.end());
|
filePaths.erase(startOfNonExistingFilePaths, filePaths.end());
|
||||||
|
|
||||||
return filePaths;
|
return std::move(filePaths);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -78,7 +78,10 @@ def menuVisibleAtEditor(editor, menuInList):
|
|||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
menu = waitForObject("{type='QMenu' unnamed='1' visible='1'}", 500)
|
menu = waitForObject("{type='QMenu' unnamed='1' visible='1'}", 500)
|
||||||
success = menu.visible and widgetContainsPoint(editor, menu.mapToGlobal(QPoint(0, 0)))
|
topLeft = menu.mapToGlobal(QPoint(0, 0))
|
||||||
|
bottomLeft = menu.mapToGlobal(QPoint(0, menu.height))
|
||||||
|
success = menu.visible and (widgetContainsPoint(editor, topLeft)
|
||||||
|
or widgetContainsPoint(editor, bottomLeft))
|
||||||
if success:
|
if success:
|
||||||
menuInList[0] = menu
|
menuInList[0] = menu
|
||||||
return success
|
return success
|
||||||
|
Reference in New Issue
Block a user