forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.9'
Change-Id: If36258b8e572b5c7875433a31a836e4f06e27286
This commit is contained in:
1
dist/changes-4.9.0.md
vendored
1
dist/changes-4.9.0.md
vendored
@@ -14,6 +14,7 @@ General
|
|||||||
* Added option to run external tools in build or run environment of
|
* Added option to run external tools in build or run environment of
|
||||||
active project (QTCREATORBUG-18394, QTCREATORBUG-19892)
|
active project (QTCREATORBUG-18394, QTCREATORBUG-19892)
|
||||||
* Improved selection colors in dark themes (QTCREATORBUG-18888)
|
* Improved selection colors in dark themes (QTCREATORBUG-18888)
|
||||||
|
* Added -temporarycleansettings (alias -tcs) command line option
|
||||||
|
|
||||||
Editing
|
Editing
|
||||||
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 106 KiB |
BIN
doc/images/qtcreator-code-style-clang-format.png
Normal file
BIN
doc/images/qtcreator-code-style-clang-format.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 60 KiB |
@@ -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.
|
||||||
@@ -26,29 +26,56 @@
|
|||||||
/*!
|
/*!
|
||||||
//! [clang format]
|
//! [clang format]
|
||||||
|
|
||||||
\section2 Automatic Indentation
|
\section2 Automatic Formatting and Indentation
|
||||||
|
|
||||||
The experimental Clang Format plugin uses the
|
The experimental Clang Format plugin uses the
|
||||||
\l{https://clang.llvm.org/docs/LibFormat.html}{LibFormat}
|
\l{https://clang.llvm.org/docs/LibFormat.html}{LibFormat}
|
||||||
library for automatic indentation.
|
library for automatic formatting and indentation.
|
||||||
|
|
||||||
To enable the plugin, select \uicontrol Help > \uicontrol {About Plugins} >
|
To enable the plugin, select \uicontrol Help > \uicontrol {About Plugins} >
|
||||||
\uicontrol {C++} > \uicontrol {ClangFormat}. Then restart \QC to load the
|
\uicontrol {C++} > \uicontrol {ClangFormat}. Then restart \QC to load the
|
||||||
plugin.
|
plugin.
|
||||||
|
|
||||||
To specify global settings for Clang Format:
|
\note If you enable the plugin, do not use the \l{Beautifying Source Code}
|
||||||
|
{Beautifier}, because combining the two can provide unexpected results.
|
||||||
|
|
||||||
|
You can use Clang Format to enforce a coding style for a project or the
|
||||||
|
whole organization. Create a \c {.clang-format} file that contains the
|
||||||
|
\l{https://clang.llvm.org/docs/ClangFormatStyleOptions.html}
|
||||||
|
{Clang Format Style Options} to use and save it in the root folder of the
|
||||||
|
project or one of its parent folders. The plugin searches for the Clang
|
||||||
|
format file recursively from the directory that contains the source file
|
||||||
|
up to the file system root.
|
||||||
|
|
||||||
|
To specify settings for automatic formatting and indentation:
|
||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
\li Select \uicontrol Tools > \uicontrol Options > \uicontrol {C++} >
|
\li Select \uicontrol Tools > \uicontrol Options > \uicontrol {C++}.
|
||||||
\uicontrol {Clang Format}.
|
|
||||||
\image qtcreator-clang-format-options.png "C++ Clang Format options"
|
\image qtcreator-clang-format-options.png "C++ Clang Format options"
|
||||||
\li Double-click a value to modify it.
|
\li Select the \uicontrol {Format instead of indenting} check box to
|
||||||
|
use the \key {Ctrl+I} keyboard shortcut to format code instead of
|
||||||
|
indenting it.
|
||||||
|
\li Select the \uicontrol {Format while typing} check box to apply the
|
||||||
|
formatting while you type code.
|
||||||
|
\li Select the \uicontrol {Format edited code on file save} check box
|
||||||
|
to apply the formatting to the edited code when you save the file.
|
||||||
|
\li Select the \uicontrol {Override Clang Format configuration file}
|
||||||
|
check box to create a local configuration file that overrides the
|
||||||
|
one stored in the file system.
|
||||||
|
\note This is not recommended, because it defeats the purpose of
|
||||||
|
a Clang format file.
|
||||||
|
\li To modify the values in the file, select them in the left-side
|
||||||
|
column and enter the new values.
|
||||||
|
\li To view examples of the new values in the right-hand column, select
|
||||||
|
\uicontrol Apply.
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
You can also specify formatting separately for each project.
|
To override the \c {.clang-format} file for a project, select
|
||||||
Create a \c {.clang-format} file that contains the
|
\uicontrol Projects > \uicontrol {Project Settings} >
|
||||||
\l{https://clang.llvm.org/docs/ClangFormatStyleOptions.html}
|
\uicontrol {Code Style} >
|
||||||
{Clang Format Style Options} to use and save it in the project directory.
|
\uicontrol {Override Clang Format configuration file}.
|
||||||
|
|
||||||
|
\image qtcreator-code-style-clang-format.png
|
||||||
|
|
||||||
You can create \c {.clang-format} files that contain the configuration
|
You can create \c {.clang-format} files that contain the configuration
|
||||||
options of a certain predefined style from the command line. For example,
|
options of a certain predefined style from the command line. For example,
|
||||||
@@ -58,9 +85,5 @@
|
|||||||
clang-format -style=llvm -dump-config > .clang-format
|
clang-format -style=llvm -dump-config > .clang-format
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
To view the \c {.clang-format} file for a project, select
|
|
||||||
\uicontrol Projects > \uicontrol {Project Settings} >
|
|
||||||
\uicontrol {Clang Format}.
|
|
||||||
|
|
||||||
//! [clang format]
|
//! [clang format]
|
||||||
*/
|
*/
|
||||||
|
@@ -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.
|
||||||
@@ -49,7 +49,8 @@
|
|||||||
|
|
||||||
To find instances of a specific symbol in your Qt C++ project, place the
|
To find instances of a specific symbol in your Qt C++ project, place the
|
||||||
cursor on the symbol in the editor and select \uicontrol Tools >
|
cursor on the symbol in the editor and select \uicontrol Tools >
|
||||||
\uicontrol {C++} > \uicontrol {Find Usages} or press \key {Ctrl+Shift+U}.
|
\uicontrol {C++} > \uicontrol {Find References to Symbol Under Cursor} or
|
||||||
|
press \key {Ctrl+Shift+U}.
|
||||||
|
|
||||||
\note You can also select \uicontrol Edit > \uicontrol {Find/Replace} >
|
\note You can also select \uicontrol Edit > \uicontrol {Find/Replace} >
|
||||||
\uicontrol {Advanced Find} > \uicontrol {C++ Symbols} to search for
|
\uicontrol {Advanced Find} > \uicontrol {C++ Symbols} to search for
|
||||||
@@ -63,7 +64,8 @@
|
|||||||
|
|
||||||
To find instances of a specific QML type in a project, place the cursor on
|
To find instances of a specific QML type in a project, place the cursor on
|
||||||
the type and select \uicontrol Tools > \uicontrol {QML/JS} >
|
the type and select \uicontrol Tools > \uicontrol {QML/JS} >
|
||||||
\uicontrol {Find Usages} or press \key {Ctrl+Shift+U}.
|
\uicontrol {Find References to Symbol Under Cursor} or press
|
||||||
|
\key {Ctrl+Shift+U}.
|
||||||
|
|
||||||
\section1 Viewing Search Results
|
\section1 Viewing Search Results
|
||||||
|
|
||||||
|
@@ -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.
|
||||||
@@ -192,16 +192,25 @@
|
|||||||
\uicontrol Options > \uicontrol {Text Editor} > \uicontrol Behavior >
|
\uicontrol Options > \uicontrol {Text Editor} > \uicontrol Behavior >
|
||||||
\uicontrol {Enable mouse navigation}.
|
\uicontrol {Enable mouse navigation}.
|
||||||
|
|
||||||
You can also select the symbol and press \key F2, or right-click the symbol
|
There are several additional ways of moving between symbol definitions and
|
||||||
|
declarations. All the functions described below are also available from the
|
||||||
|
\uicontrol Tools > \uicontrol C++ menu. The functions supported for QML and
|
||||||
|
JavaScript code are available from the \uicontrol Tools > \uicontrol QML/JS
|
||||||
|
menu.
|
||||||
|
|
||||||
|
You can select the symbol and press \key F2, or right-click the symbol
|
||||||
and select \uicontrol {Follow Symbol Under Cursor} to move to its definition
|
and select \uicontrol {Follow Symbol Under Cursor} to move to its definition
|
||||||
or declaration. This feature is supported for namespaces, classes,
|
or declaration. To follow the symbol in the next split, select
|
||||||
functions, variables, include statements, and macros.
|
\uicontrol {Follow Symbol Under Cursor in Next Split}. Following symbols is
|
||||||
|
supported for namespaces, classes, functions, variables, include statements,
|
||||||
|
and macros.
|
||||||
|
|
||||||
To switch between the definition and declaration of a function, place the
|
To switch between the definition and declaration of a function, place the
|
||||||
cursor on either and press \key {Shift+F2} or right-click and select
|
cursor on either and press \key {Shift+F2} or right-click and select
|
||||||
\uicontrol {Switch Between Function Declaration/Definition}. For example,
|
\uicontrol {Switch Between Function Declaration/Definition} or
|
||||||
this allows you to navigate from anywhere within a function body directly to
|
\uicontrol {Open Function Declaration/Definition in Next Split}.
|
||||||
the function declaration.
|
For example, this allows you to navigate from anywhere within a function
|
||||||
|
body directly to the function declaration.
|
||||||
|
|
||||||
Links are opened in the same split by default. To open links in the next
|
Links are opened in the same split by default. To open links in the next
|
||||||
split, prepend \key {Ctrl+E} to the shortcut. For example, press
|
split, prepend \key {Ctrl+E} to the shortcut. For example, press
|
||||||
@@ -214,6 +223,11 @@
|
|||||||
another split. If you change the default behavior, the shortcuts for opening
|
another split. If you change the default behavior, the shortcuts for opening
|
||||||
link targets in the next split are used to open them in the current split.
|
link targets in the next split are used to open them in the current split.
|
||||||
|
|
||||||
|
To switch between C++ header and source files, right-click anywhere in a
|
||||||
|
file and select \uicontrol {Switch Header/Source} or
|
||||||
|
\uicontrol {Open Corresponding Header/Source in Next Split}. You can also
|
||||||
|
press \key F4 or \key {Ctrl+E,F4}, respectively.
|
||||||
|
|
||||||
\section1 Reparsing Externally Changed Files
|
\section1 Reparsing Externally Changed Files
|
||||||
|
|
||||||
If source files are modified from outside \QC, the opened files will be
|
If source files are modified from outside \QC, the opened files will be
|
||||||
|
@@ -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.
|
||||||
@@ -427,7 +427,7 @@
|
|||||||
\li Alt+C, Alt+P
|
\li Alt+C, Alt+P
|
||||||
\endif
|
\endif
|
||||||
\row
|
\row
|
||||||
\li Find usages
|
\li Find references to symbol under cursor
|
||||||
\li Ctrl+Shift+U
|
\li Ctrl+Shift+U
|
||||||
\row
|
\row
|
||||||
\li Follow symbol under cursor
|
\li Follow symbol under cursor
|
||||||
|
@@ -151,6 +151,11 @@
|
|||||||
\li Override the default path from where user-independent settings are read
|
\li Override the default path from where user-independent settings are read
|
||||||
(for example written by the installer).
|
(for example written by the installer).
|
||||||
|
|
||||||
|
\row
|
||||||
|
\li -temporarycleansettings
|
||||||
|
\li Use clean settings for debug or testing reasons. The settings
|
||||||
|
will be deleted when \QC exits.
|
||||||
|
|
||||||
\row
|
\row
|
||||||
\li -color <color>
|
\li -color <color>
|
||||||
\li Core plugin: override the selected UI color.
|
\li Core plugin: override the selected UI color.
|
||||||
@@ -165,6 +170,10 @@
|
|||||||
\li Core plugin: apply a dark color theme to \QC, without using
|
\li Core plugin: apply a dark color theme to \QC, without using
|
||||||
stylesheets.
|
stylesheets.
|
||||||
|
|
||||||
|
\row
|
||||||
|
\li -notour
|
||||||
|
\li Welcome plugin: Skip the UI tour on startup.
|
||||||
|
|
||||||
\row
|
\row
|
||||||
\li -debug <pid>
|
\li -debug <pid>
|
||||||
\li Debugger plugin: attach to the process with the given process
|
\li Debugger plugin: attach to the process with the given process
|
||||||
|
@@ -255,6 +255,11 @@
|
|||||||
|
|
||||||
\image qtcreator-application-output.png
|
\image qtcreator-application-output.png
|
||||||
|
|
||||||
|
If you specify command line arguments in the run settings that are passed
|
||||||
|
to the application when running it, they are displayed as a part of the
|
||||||
|
application output. For more information, see
|
||||||
|
\l{Specifying Run Settings for Desktop Device Types}.
|
||||||
|
|
||||||
Select toolbar buttons to run applications, to attach the debugger to the
|
Select toolbar buttons to run applications, to attach the debugger to the
|
||||||
running application, and to stop running or debugging.
|
running application, and to stop running or debugging.
|
||||||
|
|
||||||
|
@@ -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.
|
||||||
@@ -327,8 +327,8 @@
|
|||||||
|
|
||||||
Typically, users also work on multiple classes or functions that are
|
Typically, users also work on multiple classes or functions that are
|
||||||
related, even though they are defined or declared in different files.
|
related, even though they are defined or declared in different files.
|
||||||
\QC provides two shortcuts for that: \key F2 to follow the symbol
|
\QC provides two shortcuts for that: \key F2 to follow the symbol under
|
||||||
and \key Ctrl+Shift+U to find usages.
|
cursor and \key Ctrl+Shift+U to find references to it.
|
||||||
|
|
||||||
In addition, developers can:
|
In addition, developers can:
|
||||||
|
|
||||||
|
@@ -182,6 +182,9 @@
|
|||||||
\li Add and remove subprojects.
|
\li Add and remove subprojects.
|
||||||
\endif
|
\endif
|
||||||
\li Search from the selected directory.
|
\li Search from the selected directory.
|
||||||
|
\li Expand or collapse the tree view to show or hide all files and
|
||||||
|
folders.
|
||||||
|
\li Close all files in a project.
|
||||||
\li Close projects.
|
\li Close projects.
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
@@ -312,5 +315,8 @@
|
|||||||
the current file, right-click in the editor and select
|
the current file, right-click in the editor and select
|
||||||
\uicontrol {Open Include Hierarchy} or press \key {Ctrl+Shift+I}.
|
\uicontrol {Open Include Hierarchy} or press \key {Ctrl+Shift+I}.
|
||||||
|
|
||||||
|
To keep the view synchronized with the file currently opened in the editor,
|
||||||
|
select \uicontrol {Synchronize with Editor}.
|
||||||
|
|
||||||
//! [include hierarchy view]
|
//! [include hierarchy view]
|
||||||
*/
|
*/
|
||||||
|
@@ -71,6 +71,10 @@
|
|||||||
|
|
||||||
\li .creator
|
\li .creator
|
||||||
|
|
||||||
|
\li \l{Forwarding Flags to Clang Code Model}{.cflags}
|
||||||
|
|
||||||
|
\li \l{Forwarding Flags to Clang Code Model}{.cxxflags}
|
||||||
|
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
\endlist
|
\endlist
|
||||||
@@ -126,6 +130,14 @@
|
|||||||
#define NAME value
|
#define NAME value
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
|
\section1 Forwarding Flags to Clang Code Model
|
||||||
|
|
||||||
|
The \c {.cxxflags} and \c {.cflags} files contain command line flags for the
|
||||||
|
Clang code model, one flag per line.
|
||||||
|
|
||||||
|
For example, specify the \c {-std=c++11} to set the language version
|
||||||
|
for parsing as C++11.
|
||||||
|
|
||||||
\section1 Providing Deployment Information
|
\section1 Providing Deployment Information
|
||||||
|
|
||||||
If you want to run your application on an embedded Linux device, you first need to
|
If you want to run your application on an embedded Linux device, you first need to
|
||||||
|
@@ -141,7 +141,8 @@ class PlainDumper:
|
|||||||
d.putType(value.nativeValue.type.name)
|
d.putType(value.nativeValue.type.name)
|
||||||
val = printer.to_string()
|
val = printer.to_string()
|
||||||
if isinstance(val, str):
|
if isinstance(val, str):
|
||||||
d.putValue(val)
|
# encode and avoid extra quotes ('"') at beginning and end
|
||||||
|
d.putValue(d.hexencode(val), 'utf8:1:0')
|
||||||
elif sys.version_info[0] <= 2 and isinstance(val, unicode):
|
elif sys.version_info[0] <= 2 and isinstance(val, unicode):
|
||||||
d.putValue(val)
|
d.putValue(val)
|
||||||
else: # Assuming LazyString
|
else: # Assuming LazyString
|
||||||
|
51
share/qtcreator/qml/qmlpuppet/mockfiles/Dialog.qml
Normal file
51
share/qtcreator/qml/qmlpuppet/mockfiles/Dialog.qml
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
**
|
||||||
|
** Copyright (C) 2016 The Qt Company Ltd.
|
||||||
|
** Contact: https://www.qt.io/licensing/
|
||||||
|
**
|
||||||
|
** This file is part of Qt Creator.
|
||||||
|
**
|
||||||
|
** Commercial License Usage
|
||||||
|
** Licensees holding valid commercial Qt licenses may use this file in
|
||||||
|
** accordance with the commercial license agreement provided with the
|
||||||
|
** Software or, alternatively, in accordance with the terms contained in
|
||||||
|
** a written agreement between you and The Qt Company. For licensing terms
|
||||||
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||||
|
** information use the contact form at https://www.qt.io/contact-us.
|
||||||
|
**
|
||||||
|
** GNU General Public License Usage
|
||||||
|
** Alternatively, this file may be used under the terms of the GNU
|
||||||
|
** General Public License version 3 as published by the Free Software
|
||||||
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||||
|
** included in the packaging of this file. Please review the following
|
||||||
|
** information to ensure the GNU General Public License requirements will
|
||||||
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
import QtQuick 2.1
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
property string title
|
||||||
|
|
||||||
|
property var clickedButton
|
||||||
|
|
||||||
|
property var modality
|
||||||
|
property var standardButtons
|
||||||
|
|
||||||
|
property alias contentItem: contentArea
|
||||||
|
|
||||||
|
property int maximumWidth: 0
|
||||||
|
property int minimumWidth: 0
|
||||||
|
|
||||||
|
property int maximumHeight: 0
|
||||||
|
property int minimumHeight: 0
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: contentArea
|
||||||
|
anchors.top: parent.bottom
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.bottom: parent.top
|
||||||
|
}
|
||||||
|
}
|
@@ -622,10 +622,12 @@ QObject *ObjectNodeInstance::createPrimitive(const QString &typeName, int majorN
|
|||||||
|| typeName == "QtQuick.Controls/Drawer"
|
|| typeName == "QtQuick.Controls/Drawer"
|
||||||
|| typeName == "QtQuick.Controls/Dialog"
|
|| typeName == "QtQuick.Controls/Dialog"
|
||||||
|| typeName == "QtQuick.Controls/Menu"
|
|| typeName == "QtQuick.Controls/Menu"
|
||||||
|
|| typeName == "QtQuick.Controls/Pane"
|
||||||
|| typeName == "QtQuick.Controls/ToolTip")
|
|| typeName == "QtQuick.Controls/ToolTip")
|
||||||
polishTypeName = "QtQuick/Item";
|
polishTypeName = "QtQuick/Item";
|
||||||
|
|
||||||
const QHash<QString, QString> mockHash = {{"QtQuick.Controls/SwipeView","qrc:/qtquickplugin/mockfiles/SwipeView.qml"}};
|
const QHash<QString, QString> mockHash = {{"QtQuick.Controls/SwipeView","qrc:/qtquickplugin/mockfiles/SwipeView.qml"},
|
||||||
|
{"QtQuick.Dialogs/Dialog","qrc:/qtquickplugin/mockfiles/Dialog.qml"}};
|
||||||
|
|
||||||
QObject *object = nullptr;
|
QObject *object = nullptr;
|
||||||
|
|
||||||
|
@@ -6,5 +6,6 @@
|
|||||||
<file>mockfiles/Window.qml</file>
|
<file>mockfiles/Window.qml</file>
|
||||||
<file>mockfiles/SwipeView.qml</file>
|
<file>mockfiles/SwipeView.qml</file>
|
||||||
<file>mockfiles/GenericBackend.qml</file>
|
<file>mockfiles/GenericBackend.qml</file>
|
||||||
|
<file>mockfiles/Dialog.qml</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
@@ -154,11 +154,17 @@ Rectangle {
|
|||||||
__panel.visible = false
|
__panel.visible = false
|
||||||
}
|
}
|
||||||
|
|
||||||
onEditingFinished: {
|
property string oldValue
|
||||||
if (text != delegateStateName)
|
|
||||||
statesEditorModel.renameState(internalNodeId, text)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
onEditingFinished: {
|
||||||
|
if (stateNameField.oldValue === stateNameField.text)
|
||||||
|
return
|
||||||
|
|
||||||
|
stateNameField.oldValue = stateNameField.text
|
||||||
|
|
||||||
|
if (stateNameField.text != delegateStateName)
|
||||||
|
statesEditorModel.renameState(internalNodeId, stateNameField.text)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -81,6 +81,7 @@ const char fixedOptionsC[] =
|
|||||||
" -client Attempt to connect to already running first instance\n"
|
" -client Attempt to connect to already running first instance\n"
|
||||||
" -settingspath <path> Override the default path where user settings are stored\n"
|
" -settingspath <path> Override the default path where user settings are stored\n"
|
||||||
" -installsettingspath <path> Override the default path from where user-independent settings are read\n"
|
" -installsettingspath <path> Override the default path from where user-independent settings are read\n"
|
||||||
|
" -temporarycleansettings Use clean settings for debug or testing reasons\n"
|
||||||
" -pid <pid> Attempt to connect to instance given by pid\n"
|
" -pid <pid> Attempt to connect to instance given by pid\n"
|
||||||
" -block Block until editor is closed\n"
|
" -block Block until editor is closed\n"
|
||||||
" -pluginpath <path> Add a custom search path for plugins\n";
|
" -pluginpath <path> Add a custom search path for plugins\n";
|
||||||
@@ -94,6 +95,8 @@ const char CLIENT_OPTION[] = "-client";
|
|||||||
const char SETTINGS_OPTION[] = "-settingspath";
|
const char SETTINGS_OPTION[] = "-settingspath";
|
||||||
const char INSTALL_SETTINGS_OPTION[] = "-installsettingspath";
|
const char INSTALL_SETTINGS_OPTION[] = "-installsettingspath";
|
||||||
const char TEST_OPTION[] = "-test";
|
const char TEST_OPTION[] = "-test";
|
||||||
|
const char TEMPORARY_CLEAN_SETTINGS1[] = "-temporarycleansettings";
|
||||||
|
const char TEMPORARY_CLEAN_SETTINGS2[] = "-tcs";
|
||||||
const char PID_OPTION[] = "-pid";
|
const char PID_OPTION[] = "-pid";
|
||||||
const char BLOCK_OPTION[] = "-block";
|
const char BLOCK_OPTION[] = "-block";
|
||||||
const char PLUGINPATH_OPTION[] = "-pluginpath";
|
const char PLUGINPATH_OPTION[] = "-pluginpath";
|
||||||
@@ -348,6 +351,7 @@ struct Options
|
|||||||
std::vector<char *> appArguments;
|
std::vector<char *> appArguments;
|
||||||
Utils::optional<QString> userLibraryPath;
|
Utils::optional<QString> userLibraryPath;
|
||||||
bool hasTestOption = false;
|
bool hasTestOption = false;
|
||||||
|
bool wantsCleanSettings = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
Options parseCommandLine(int argc, char *argv[])
|
Options parseCommandLine(int argc, char *argv[])
|
||||||
@@ -372,6 +376,8 @@ Options parseCommandLine(int argc, char *argv[])
|
|||||||
} else if (arg == USER_LIBRARY_PATH_OPTION && hasNext) {
|
} else if (arg == USER_LIBRARY_PATH_OPTION && hasNext) {
|
||||||
++it;
|
++it;
|
||||||
options.userLibraryPath = nextArg;
|
options.userLibraryPath = nextArg;
|
||||||
|
} else if (arg == TEMPORARY_CLEAN_SETTINGS1 || arg == TEMPORARY_CLEAN_SETTINGS2) {
|
||||||
|
options.wantsCleanSettings = true;
|
||||||
} else { // arguments that are still passed on to the application
|
} else { // arguments that are still passed on to the application
|
||||||
if (arg == TEST_OPTION)
|
if (arg == TEST_OPTION)
|
||||||
options.hasTestOption = true;
|
options.hasTestOption = true;
|
||||||
@@ -424,7 +430,7 @@ int main(int argc, char **argv)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
QScopedPointer<Utils::TemporaryDirectory> temporaryCleanSettingsDir;
|
QScopedPointer<Utils::TemporaryDirectory> temporaryCleanSettingsDir;
|
||||||
if (options.settingsPath.isEmpty() && options.hasTestOption) {
|
if (options.settingsPath.isEmpty() && (options.hasTestOption || options.wantsCleanSettings)) {
|
||||||
temporaryCleanSettingsDir.reset(new Utils::TemporaryDirectory("qtc-test-settings"));
|
temporaryCleanSettingsDir.reset(new Utils::TemporaryDirectory("qtc-test-settings"));
|
||||||
if (!temporaryCleanSettingsDir->isValid())
|
if (!temporaryCleanSettingsDir->isValid())
|
||||||
return 1;
|
return 1;
|
||||||
|
@@ -131,7 +131,7 @@ public:
|
|||||||
palette.setCurrentColorGroup(QPalette::Active);
|
palette.setCurrentColorGroup(QPalette::Active);
|
||||||
bool selected = opt.state & QStyle::State_Selected;
|
bool selected = opt.state & QStyle::State_Selected;
|
||||||
QColor backgroundColor = selected ? palette.highlight().color()
|
QColor backgroundColor = selected ? palette.highlight().color()
|
||||||
: palette.background().color();
|
: palette.window().color();
|
||||||
painter->setBrush(backgroundColor);
|
painter->setBrush(backgroundColor);
|
||||||
|
|
||||||
painter->drawRect(0, opt.rect.top(), opt.rect.width() + opt.rect.left(), opt.rect.height());
|
painter->drawRect(0, opt.rect.top(), opt.rect.width() + opt.rect.left(), opt.rect.height());
|
||||||
|
@@ -408,14 +408,29 @@ CompilationDatabaseProject::CompilationDatabaseProject(const Utils::FileName &pr
|
|||||||
|
|
||||||
m_kit.reset(KitManager::defaultKit()->clone());
|
m_kit.reset(KitManager::defaultKit()->clone());
|
||||||
|
|
||||||
connect(this, &CompilationDatabaseProject::parsingFinished,
|
connect(this, &CompilationDatabaseProject::parsingFinished, this, [this]() {
|
||||||
this, [this]() { addTarget(createTarget(m_kit.get())); });
|
if (!m_hasTarget) {
|
||||||
|
addTarget(createTarget(m_kit.get()));
|
||||||
emitParsingStarted();
|
m_hasTarget = true;
|
||||||
|
}
|
||||||
const QFuture<void> future = ::Utils::runAsync([this, projectFile](){
|
|
||||||
buildTreeAndProjectParts(projectFile);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
reparseProject(projectFile);
|
||||||
|
|
||||||
|
m_fileSystemWatcher.addFile(projectFile.toString(), Utils::FileSystemWatcher::WatchModifiedDate);
|
||||||
|
connect(&m_fileSystemWatcher,
|
||||||
|
&Utils::FileSystemWatcher::fileChanged,
|
||||||
|
this,
|
||||||
|
[this](const QString &projectFile) {
|
||||||
|
reparseProject(Utils::FileName::fromString(projectFile));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void CompilationDatabaseProject::reparseProject(const Utils::FileName &projectFile)
|
||||||
|
{
|
||||||
|
emitParsingStarted();
|
||||||
|
const QFuture<void> future = ::Utils::runAsync(
|
||||||
|
[this, projectFile]() { buildTreeAndProjectParts(projectFile); });
|
||||||
m_parserWatcher.setFuture(future);
|
m_parserWatcher.setFuture(future);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -26,8 +26,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <projectexplorer/project.h>
|
#include <projectexplorer/project.h>
|
||||||
|
|
||||||
#include <texteditor/texteditor.h>
|
#include <texteditor/texteditor.h>
|
||||||
|
#include <utils/filesystemwatcher.h>
|
||||||
|
|
||||||
#include <QFutureWatcher>
|
#include <QFutureWatcher>
|
||||||
|
|
||||||
@@ -51,11 +51,14 @@ public:
|
|||||||
bool needsBuildConfigurations() const override { return false; }
|
bool needsBuildConfigurations() const override { return false; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void reparseProject(const Utils::FileName &projectFile);
|
||||||
void buildTreeAndProjectParts(const Utils::FileName &projectFile);
|
void buildTreeAndProjectParts(const Utils::FileName &projectFile);
|
||||||
|
|
||||||
QFutureWatcher<void> m_parserWatcher;
|
QFutureWatcher<void> m_parserWatcher;
|
||||||
std::unique_ptr<CppTools::CppProjectUpdater> m_cppCodeModelUpdater;
|
std::unique_ptr<CppTools::CppProjectUpdater> m_cppCodeModelUpdater;
|
||||||
std::unique_ptr<ProjectExplorer::Kit> m_kit;
|
std::unique_ptr<ProjectExplorer::Kit> m_kit;
|
||||||
|
Utils::FileSystemWatcher m_fileSystemWatcher;
|
||||||
|
bool m_hasTarget = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CompilationDatabaseEditorFactory : public TextEditor::TextEditorFactory
|
class CompilationDatabaseEditorFactory : public TextEditor::TextEditorFactory
|
||||||
|
@@ -475,7 +475,7 @@ bool CppEditorDocument::save(QString *errorString, const QString &fileName, bool
|
|||||||
|
|
||||||
if (!editedRanges.empty()) {
|
if (!editedRanges.empty()) {
|
||||||
QTextCursor cursor(document());
|
QTextCursor cursor(document());
|
||||||
cursor.joinPreviousEditBlock();
|
cursor.beginEditBlock();
|
||||||
indenter()->format(editedRanges);
|
indenter()->format(editedRanges);
|
||||||
cursor.endEditBlock();
|
cursor.endEditBlock();
|
||||||
}
|
}
|
||||||
|
@@ -553,7 +553,7 @@ void DebuggerEnginePrivate::setupViews()
|
|||||||
|
|
||||||
QTC_CHECK(!m_perspective);
|
QTC_CHECK(!m_perspective);
|
||||||
|
|
||||||
m_perspective = new Perspective("Debugger.Perspective." + m_runId,
|
m_perspective = new Perspective("Debugger.Perspective." + m_runId + '.' + m_debuggerName,
|
||||||
m_engine->displayName(),
|
m_engine->displayName(),
|
||||||
Debugger::Constants::PRESET_PERSPECTIVE_ID,
|
Debugger::Constants::PRESET_PERSPECTIVE_ID,
|
||||||
m_debuggerName);
|
m_debuggerName);
|
||||||
|
@@ -306,9 +306,8 @@ void DebuggerMainWindow::showStatusMessage(const QString &message, int timeoutMS
|
|||||||
theMainWindow->d->m_statusLabel->showStatusMessage(message, timeoutMS);
|
theMainWindow->d->m_statusLabel->showStatusMessage(message, timeoutMS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebuggerMainWindow::onModeChanged(Core::Id mode)
|
void DebuggerMainWindow::enterDebugMode()
|
||||||
{
|
{
|
||||||
if (mode == Debugger::Constants::MODE_DEBUG) {
|
|
||||||
theMainWindow->setDockActionsVisible(true);
|
theMainWindow->setDockActionsVisible(true);
|
||||||
Perspective *perspective = theMainWindow->d->m_currentPerspective;
|
Perspective *perspective = theMainWindow->d->m_currentPerspective;
|
||||||
if (!perspective) {
|
if (!perspective) {
|
||||||
@@ -324,7 +323,10 @@ void DebuggerMainWindow::onModeChanged(Core::Id mode)
|
|||||||
// There's at least the debugger preset perspective that should be found above.
|
// There's at least the debugger preset perspective that should be found above.
|
||||||
QTC_ASSERT(perspective, return);
|
QTC_ASSERT(perspective, return);
|
||||||
perspective->select();
|
perspective->select();
|
||||||
} else {
|
}
|
||||||
|
|
||||||
|
void DebuggerMainWindow::leaveDebugMode()
|
||||||
|
{
|
||||||
if (Perspective *perspective = theMainWindow->d->m_currentPerspective)
|
if (Perspective *perspective = theMainWindow->d->m_currentPerspective)
|
||||||
perspective->d->saveLayout();
|
perspective->d->saveLayout();
|
||||||
|
|
||||||
@@ -336,7 +338,6 @@ void DebuggerMainWindow::onModeChanged(Core::Id mode)
|
|||||||
dockWidget->hide();
|
dockWidget->hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
QWidget *DebuggerMainWindow::centralWidgetStack()
|
QWidget *DebuggerMainWindow::centralWidgetStack()
|
||||||
{
|
{
|
||||||
|
@@ -126,7 +126,8 @@ public:
|
|||||||
static void doShutdown();
|
static void doShutdown();
|
||||||
|
|
||||||
static void showStatusMessage(const QString &message, int timeoutMS);
|
static void showStatusMessage(const QString &message, int timeoutMS);
|
||||||
static void onModeChanged(Core::Id mode);
|
static void enterDebugMode();
|
||||||
|
static void leaveDebugMode();
|
||||||
|
|
||||||
static QWidget *centralWidgetStack();
|
static QWidget *centralWidgetStack();
|
||||||
void addSubPerspectiveSwitcher(QWidget *widget);
|
void addSubPerspectiveSwitcher(QWidget *widget);
|
||||||
|
@@ -700,7 +700,6 @@ public:
|
|||||||
int lineNumber, QMenu *menu);
|
int lineNumber, QMenu *menu);
|
||||||
|
|
||||||
void toggleBreakpointHelper();
|
void toggleBreakpointHelper();
|
||||||
void onModeChanged(Id mode);
|
|
||||||
void updateDebugWithoutDeployMenu();
|
void updateDebugWithoutDeployMenu();
|
||||||
|
|
||||||
void startRemoteCdbSession();
|
void startRemoteCdbSession();
|
||||||
@@ -1360,8 +1359,19 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments,
|
|||||||
addCdbOptionPages(&m_optionPages);
|
addCdbOptionPages(&m_optionPages);
|
||||||
m_optionPages.append(new LocalsAndExpressionsOptionsPage);
|
m_optionPages.append(new LocalsAndExpressionsOptionsPage);
|
||||||
|
|
||||||
connect(ModeManager::instance(), &ModeManager::currentModeChanged,
|
connect(ModeManager::instance(), &ModeManager::currentModeAboutToChange, this, [] {
|
||||||
this, &DebuggerPluginPrivate::onModeChanged);
|
if (ModeManager::currentModeId() == MODE_DEBUG)
|
||||||
|
DebuggerMainWindow::leaveDebugMode();
|
||||||
|
});
|
||||||
|
|
||||||
|
connect(ModeManager::instance(), &ModeManager::currentModeChanged, this, [](Id mode) {
|
||||||
|
if (mode == MODE_DEBUG) {
|
||||||
|
DebuggerMainWindow::enterDebugMode();
|
||||||
|
if (IEditor *editor = EditorManager::currentEditor())
|
||||||
|
editor->widget()->setFocus();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::settingsChanged,
|
connect(ProjectExplorerPlugin::instance(), &ProjectExplorerPlugin::settingsChanged,
|
||||||
this, &DebuggerPluginPrivate::updateDebugWithoutDeployMenu);
|
this, &DebuggerPluginPrivate::updateDebugWithoutDeployMenu);
|
||||||
|
|
||||||
@@ -2287,19 +2297,6 @@ void DebuggerPlugin::extensionsInitialized()
|
|||||||
dd->extensionsInitialized();
|
dd->extensionsInitialized();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebuggerPluginPrivate::onModeChanged(Id mode)
|
|
||||||
{
|
|
||||||
DebuggerMainWindow::onModeChanged(mode);
|
|
||||||
// FIXME: This one gets always called, even if switching between modes
|
|
||||||
// different then the debugger mode. E.g. Welcome and Help mode and
|
|
||||||
// also on shutdown.
|
|
||||||
|
|
||||||
if (mode == MODE_DEBUG) {
|
|
||||||
if (IEditor *editor = EditorManager::currentEditor())
|
|
||||||
editor->widget()->setFocus();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|
||||||
static bool buildTypeAccepted(QFlags<ToolMode> toolMode, BuildConfiguration::BuildType buildType)
|
static bool buildTypeAccepted(QFlags<ToolMode> toolMode, BuildConfiguration::BuildType buildType)
|
||||||
|
@@ -813,11 +813,13 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
|
|||||||
mfileContextMenu->appendGroup(Constants::G_PROJECT_TREE);
|
mfileContextMenu->appendGroup(Constants::G_PROJECT_TREE);
|
||||||
|
|
||||||
// Open Terminal submenu
|
// Open Terminal submenu
|
||||||
|
#if !defined(Q_OS_UNIX) || QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||||
ActionContainer * const openTerminal =
|
ActionContainer * const openTerminal =
|
||||||
ActionManager::createMenu(ProjectExplorer::Constants::M_OPENTERMINALCONTEXT);
|
ActionManager::createMenu(ProjectExplorer::Constants::M_OPENTERMINALCONTEXT);
|
||||||
openTerminal->setOnAllDisabledBehavior(ActionContainer::Show);
|
openTerminal->setOnAllDisabledBehavior(ActionContainer::Show);
|
||||||
dd->m_openTerminalMenu = openTerminal->menu();
|
dd->m_openTerminalMenu = openTerminal->menu();
|
||||||
dd->m_openTerminalMenu->setTitle(FileUtils::msgTerminalAction());
|
dd->m_openTerminalMenu->setTitle(FileUtils::msgTerminalAction());
|
||||||
|
#endif
|
||||||
|
|
||||||
// "open with" submenu
|
// "open with" submenu
|
||||||
ActionContainer * const openWith =
|
ActionContainer * const openWith =
|
||||||
@@ -885,6 +887,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
|
|||||||
mfileContextMenu->addAction(cmd, Constants::G_FILE_OPEN);
|
mfileContextMenu->addAction(cmd, Constants::G_FILE_OPEN);
|
||||||
mfolderContextMenu->addAction(cmd, Constants::G_FOLDER_FILES);
|
mfolderContextMenu->addAction(cmd, Constants::G_FOLDER_FILES);
|
||||||
|
|
||||||
|
#if !defined(Q_OS_UNIX) || QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||||
// Open Terminal Here menu
|
// Open Terminal Here menu
|
||||||
mfileContextMenu->addMenu(openTerminal, Constants::G_FILE_OPEN);
|
mfileContextMenu->addMenu(openTerminal, Constants::G_FILE_OPEN);
|
||||||
mfolderContextMenu->addMenu(openTerminal, Constants::G_FOLDER_FILES);
|
mfolderContextMenu->addMenu(openTerminal, Constants::G_FOLDER_FILES);
|
||||||
@@ -893,6 +896,14 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
|
|||||||
cmd = ActionManager::registerAction(dd->m_openTerminalHere, Constants::OPENTERMINALHERE,
|
cmd = ActionManager::registerAction(dd->m_openTerminalHere, Constants::OPENTERMINALHERE,
|
||||||
projecTreeContext);
|
projecTreeContext);
|
||||||
dd->m_openTerminalMenu->addAction(dd->m_openTerminalHere);
|
dd->m_openTerminalMenu->addAction(dd->m_openTerminalHere);
|
||||||
|
#else
|
||||||
|
dd->m_openTerminalHere = new QAction(FileUtils::msgTerminalAction(), this);
|
||||||
|
cmd = ActionManager::registerAction(dd->m_openTerminalHere, Constants::OPENTERMINALHERE,
|
||||||
|
projecTreeContext);
|
||||||
|
|
||||||
|
mfileContextMenu->addAction(cmd, Constants::G_FILE_OPEN);
|
||||||
|
mfolderContextMenu->addAction(cmd, Constants::G_FOLDER_FILES);
|
||||||
|
#endif
|
||||||
|
|
||||||
dd->m_openTerminalHereBuildEnv = new QAction(tr("Build Environment"), this);
|
dd->m_openTerminalHereBuildEnv = new QAction(tr("Build Environment"), this);
|
||||||
dd->m_openTerminalHereRunEnv = new QAction(tr("Run Environment"), this);
|
dd->m_openTerminalHereRunEnv = new QAction(tr("Run Environment"), this);
|
||||||
|
@@ -71,7 +71,7 @@ static FileName defaultBuildDirectory(const QString &projectFilePath, const Kit
|
|||||||
const QString projectName = QFileInfo(projectFilePath).completeBaseName();
|
const QString projectName = QFileInfo(projectFilePath).completeBaseName();
|
||||||
ProjectMacroExpander expander(projectFilePath, projectName, k, bcName, buildType);
|
ProjectMacroExpander expander(projectFilePath, projectName, k, bcName, buildType);
|
||||||
QString projectDir = Project::projectDirectory(FileName::fromString(projectFilePath)).toString();
|
QString projectDir = Project::projectDirectory(FileName::fromString(projectFilePath)).toString();
|
||||||
QString buildPath = expander.expand(ProjectExplorerPlugin::defaultBuildDirectoryTemplate());
|
QString buildPath = expander.expand(ProjectExplorerPlugin::buildDirectoryTemplate());
|
||||||
return FileName::fromString(FileUtils::resolvePath(projectDir, buildPath));
|
return FileName::fromString(FileUtils::resolvePath(projectDir, buildPath));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -94,7 +94,7 @@ static QString buildDir(const QString &projectFilePath, const Kit *k)
|
|||||||
BuildConfiguration::Unknown);
|
BuildConfiguration::Unknown);
|
||||||
const QString projectDir
|
const QString projectDir
|
||||||
= Project::projectDirectory(FileName::fromString(projectFilePath)).toString();
|
= Project::projectDirectory(FileName::fromString(projectFilePath)).toString();
|
||||||
const QString buildPath = expander.expand(ProjectExplorerPlugin::defaultBuildDirectoryTemplate());
|
const QString buildPath = expander.expand(ProjectExplorerPlugin::buildDirectoryTemplate());
|
||||||
return FileUtils::resolvePath(projectDir, buildPath);
|
return FileUtils::resolvePath(projectDir, buildPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -984,7 +984,7 @@ void QmakeProject::updateBuildSystemData()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
DeploymentData deploymentData;
|
DeploymentData deploymentData;
|
||||||
collectData(rootProjectNode(), deploymentData);
|
collectData(file, deploymentData);
|
||||||
target->setDeploymentData(deploymentData);
|
target->setDeploymentData(deploymentData);
|
||||||
|
|
||||||
BuildTargetInfoList appTargetList;
|
BuildTargetInfoList appTargetList;
|
||||||
@@ -1025,7 +1025,7 @@ void QmakeProject::updateBuildSystemData()
|
|||||||
workingDir += '/' + ti.target + ".app/Contents/MacOS";
|
workingDir += '/' + ti.target + ".app/Contents/MacOS";
|
||||||
|
|
||||||
BuildTargetInfo bti;
|
BuildTargetInfo bti;
|
||||||
bti.targetFilePath = FileName::fromString(executableFor(node));
|
bti.targetFilePath = FileName::fromString(executableFor(node->proFile()));
|
||||||
bti.projectFilePath = node->filePath();
|
bti.projectFilePath = node->filePath();
|
||||||
bti.workingDirectory = FileName::fromString(workingDir);
|
bti.workingDirectory = FileName::fromString(workingDir);
|
||||||
bti.displayName = bti.projectFilePath.toFileInfo().completeBaseName();
|
bti.displayName = bti.projectFilePath.toFileInfo().completeBaseName();
|
||||||
@@ -1077,9 +1077,8 @@ void QmakeProject::updateBuildSystemData()
|
|||||||
target->setApplicationTargets(appTargetList);
|
target->setApplicationTargets(appTargetList);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmakeProject::collectData(const QmakeProFileNode *node, DeploymentData &deploymentData)
|
void QmakeProject::collectData(const QmakeProFile *file, DeploymentData &deploymentData)
|
||||||
{
|
{
|
||||||
QmakeProFile *file = node->proFile();
|
|
||||||
if (!file->isSubProjectDeployable(file->filePath()))
|
if (!file->isSubProjectDeployable(file->filePath()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -1094,31 +1093,29 @@ void QmakeProject::collectData(const QmakeProFileNode *node, DeploymentData &dep
|
|||||||
switch (file->projectType()) {
|
switch (file->projectType()) {
|
||||||
case ProjectType::ApplicationTemplate:
|
case ProjectType::ApplicationTemplate:
|
||||||
if (!installsList.targetPath.isEmpty())
|
if (!installsList.targetPath.isEmpty())
|
||||||
collectApplicationData(node, deploymentData);
|
collectApplicationData(file, deploymentData);
|
||||||
break;
|
break;
|
||||||
case ProjectType::SharedLibraryTemplate:
|
case ProjectType::SharedLibraryTemplate:
|
||||||
case ProjectType::StaticLibraryTemplate:
|
case ProjectType::StaticLibraryTemplate:
|
||||||
collectLibraryData(file, deploymentData);
|
collectLibraryData(file, deploymentData);
|
||||||
break;
|
break;
|
||||||
case ProjectType::SubDirsTemplate:
|
case ProjectType::SubDirsTemplate:
|
||||||
node->forEachNode({}, [this, &deploymentData](Node *subNode) {
|
for (const QmakePriFile *const subPriFile : file->subPriFilesExact()) {
|
||||||
if (auto subProject = dynamic_cast<QmakeProFileNode *>(subNode)) {
|
auto subProFile = dynamic_cast<const QmakeProFile *>(subPriFile);
|
||||||
QTC_ASSERT(subProject->priFile(), return );
|
if (subProFile)
|
||||||
if (subProject->priFile()->includedInExactParse())
|
collectData(subProFile, deploymentData);
|
||||||
collectData(subProject, deploymentData);
|
|
||||||
}
|
}
|
||||||
});
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmakeProject::collectApplicationData(const QmakeProFileNode *node, DeploymentData &deploymentData)
|
void QmakeProject::collectApplicationData(const QmakeProFile *file, DeploymentData &deploymentData)
|
||||||
{
|
{
|
||||||
QString executable = executableFor(node);
|
QString executable = executableFor(file);
|
||||||
if (!executable.isEmpty())
|
if (!executable.isEmpty())
|
||||||
deploymentData.addFile(executable, node->proFile()->installsList().targetPath,
|
deploymentData.addFile(executable, file->installsList().targetPath,
|
||||||
DeployableFile::TypeExecutable);
|
DeployableFile::TypeExecutable);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1305,17 +1302,16 @@ void QmakeProject::warnOnToolChainMismatch(const QmakeProFile *pro) const
|
|||||||
getFullPathOf(pro, Variable::QmakeCxx, bc));
|
getFullPathOf(pro, Variable::QmakeCxx, bc));
|
||||||
}
|
}
|
||||||
|
|
||||||
QString QmakeProject::executableFor(const QmakeProFileNode *node)
|
QString QmakeProject::executableFor(const QmakeProFile *file)
|
||||||
{
|
{
|
||||||
const Kit *const kit = activeTarget() ? activeTarget()->kit() : nullptr;
|
const Kit *const kit = activeTarget() ? activeTarget()->kit() : nullptr;
|
||||||
const ToolChain *const tc = ToolChainKitAspect::toolChain(kit, ProjectExplorer::Constants::CXX_LANGUAGE_ID);
|
const ToolChain *const tc = ToolChainKitAspect::toolChain(kit, ProjectExplorer::Constants::CXX_LANGUAGE_ID);
|
||||||
if (!tc)
|
if (!tc)
|
||||||
return QString();
|
return QString();
|
||||||
|
|
||||||
TargetInformation ti = node->targetInformation();
|
TargetInformation ti = file->targetInformation();
|
||||||
QString target;
|
QString target;
|
||||||
|
|
||||||
QmakeProFile *file = node->proFile();
|
|
||||||
QTC_ASSERT(file, return QString());
|
QTC_ASSERT(file, return QString());
|
||||||
|
|
||||||
if (tc->targetAbi().os() == Abi::DarwinOS
|
if (tc->targetAbi().os() == Abi::DarwinOS
|
||||||
|
@@ -126,7 +126,7 @@ private:
|
|||||||
|
|
||||||
void setAllBuildConfigurationsEnabled(bool enabled);
|
void setAllBuildConfigurationsEnabled(bool enabled);
|
||||||
|
|
||||||
QString executableFor(const QmakeProFileNode *node);
|
QString executableFor(const QmakeProFile *file);
|
||||||
void updateRunConfigurations();
|
void updateRunConfigurations();
|
||||||
|
|
||||||
void updateCppCodeModel();
|
void updateCppCodeModel();
|
||||||
@@ -135,8 +135,8 @@ private:
|
|||||||
static bool equalFileList(const QStringList &a, const QStringList &b);
|
static bool equalFileList(const QStringList &a, const QStringList &b);
|
||||||
|
|
||||||
void updateBuildSystemData();
|
void updateBuildSystemData();
|
||||||
void collectData(const QmakeProFileNode *node, ProjectExplorer::DeploymentData &deploymentData);
|
void collectData(const QmakeProFile *file, ProjectExplorer::DeploymentData &deploymentData);
|
||||||
void collectApplicationData(const QmakeProFileNode *file,
|
void collectApplicationData(const QmakeProFile *file,
|
||||||
ProjectExplorer::DeploymentData &deploymentData);
|
ProjectExplorer::DeploymentData &deploymentData);
|
||||||
void collectLibraryData(const QmakeProFile *file,
|
void collectLibraryData(const QmakeProFile *file,
|
||||||
ProjectExplorer::DeploymentData &deploymentData);
|
ProjectExplorer::DeploymentData &deploymentData);
|
||||||
|
@@ -318,6 +318,8 @@ void ItemLibraryWidget::setupImportTagWidget()
|
|||||||
|
|
||||||
void ItemLibraryWidget::updateModel()
|
void ItemLibraryWidget::updateModel()
|
||||||
{
|
{
|
||||||
|
QTC_ASSERT(m_itemLibraryModel, return);
|
||||||
|
|
||||||
m_itemLibraryModel->update(m_itemLibraryInfo.data(), m_model.data());
|
m_itemLibraryModel->update(m_itemLibraryInfo.data(), m_model.data());
|
||||||
updateImports();
|
updateImports();
|
||||||
updateSearch();
|
updateSearch();
|
||||||
|
@@ -72,7 +72,7 @@ WidgetInfo StatesEditorView::widgetInfo()
|
|||||||
|
|
||||||
void StatesEditorView::rootNodeTypeChanged(const QString &/*type*/, int /*majorVersion*/, int /*minorVersion*/)
|
void StatesEditorView::rootNodeTypeChanged(const QString &/*type*/, int /*majorVersion*/, int /*minorVersion*/)
|
||||||
{
|
{
|
||||||
checkForWindow();
|
checkForStatesAvailability();
|
||||||
}
|
}
|
||||||
|
|
||||||
void StatesEditorView::toggleStatesViewExpanded()
|
void StatesEditorView::toggleStatesViewExpanded()
|
||||||
@@ -200,11 +200,10 @@ void StatesEditorView::duplicateCurrentState()
|
|||||||
setCurrentState(newState);
|
setCurrentState(newState);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StatesEditorView::checkForWindow()
|
void StatesEditorView::checkForStatesAvailability()
|
||||||
{
|
{
|
||||||
if (m_statesEditorWidget)
|
if (m_statesEditorWidget)
|
||||||
m_statesEditorWidget->showAddNewStatesButton(!rootModelNode().metaInfo().isSubclassOf("QtQuick.Window.Window")
|
m_statesEditorWidget->showAddNewStatesButton(rootModelNode().metaInfo().isSubclassOf("QtQuick.Item"));
|
||||||
&& !rootModelNode().metaInfo().isSubclassOf("QtQuick.Window.Popup"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void StatesEditorView::setCurrentState(const QmlModelState &state)
|
void StatesEditorView::setCurrentState(const QmlModelState &state)
|
||||||
@@ -314,7 +313,7 @@ void StatesEditorView::modelAttached(Model *model)
|
|||||||
if (m_statesEditorWidget)
|
if (m_statesEditorWidget)
|
||||||
m_statesEditorWidget->setNodeInstanceView(nodeInstanceView());
|
m_statesEditorWidget->setNodeInstanceView(nodeInstanceView());
|
||||||
|
|
||||||
checkForWindow();
|
checkForStatesAvailability();
|
||||||
|
|
||||||
resetModel();
|
resetModel();
|
||||||
}
|
}
|
||||||
|
@@ -93,7 +93,7 @@ private:
|
|||||||
void resetModel();
|
void resetModel();
|
||||||
void addState();
|
void addState();
|
||||||
void duplicateCurrentState();
|
void duplicateCurrentState();
|
||||||
void checkForWindow();
|
void checkForStatesAvailability();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QPointer<StatesEditorModel> m_statesEditorModel;
|
QPointer<StatesEditorModel> m_statesEditorModel;
|
||||||
|
@@ -1550,6 +1550,7 @@ bool NodeMetaInfo::isGraphicalItem() const
|
|||||||
{
|
{
|
||||||
return isSubclassOf("QtQuick.Item")
|
return isSubclassOf("QtQuick.Item")
|
||||||
|| isSubclassOf("QtQuick.Window.Window")
|
|| isSubclassOf("QtQuick.Window.Window")
|
||||||
|
|| isSubclassOf("QtQuick.Dialogs.Dialog")
|
||||||
|| isSubclassOf("QtQuick.Controls.Popup");
|
|| isSubclassOf("QtQuick.Controls.Popup");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -51,10 +51,7 @@ bool QmlItemNode::isItemOrWindow(const ModelNode &modelNode)
|
|||||||
if (modelNode.metaInfo().isSubclassOf("QtQuick.Item"))
|
if (modelNode.metaInfo().isSubclassOf("QtQuick.Item"))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (modelNode.metaInfo().isSubclassOf("QtQuick.Window.Window") && modelNode.isRootNode())
|
if (modelNode.metaInfo().isGraphicalItem() && modelNode.isRootNode())
|
||||||
return true;
|
|
||||||
|
|
||||||
if (modelNode.metaInfo().isSubclassOf("QtQuick.Controls.Popup"))
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@@ -62,6 +62,7 @@ DocumentWarningWidget::DocumentWarningWidget(QWidget *parent)
|
|||||||
m_headerLabel->setFont(boldFont);
|
m_headerLabel->setFont(boldFont);
|
||||||
m_messageLabel->setForegroundRole(QPalette::ToolTipText);
|
m_messageLabel->setForegroundRole(QPalette::ToolTipText);
|
||||||
m_messageLabel->setWordWrap(true);
|
m_messageLabel->setWordWrap(true);
|
||||||
|
m_messageLabel->setTextInteractionFlags(Qt::TextSelectableByMouse);
|
||||||
|
|
||||||
m_ignoreWarningsCheckBox->setText(tr("Always ignore these warnings about features "
|
m_ignoreWarningsCheckBox->setText(tr("Always ignore these warnings about features "
|
||||||
"not supported by Qt Quick Designer."));
|
"not supported by Qt Quick Designer."));
|
||||||
|
@@ -87,9 +87,11 @@ void TimelineView::nodeAboutToBeRemoved(const ModelNode &removedNode)
|
|||||||
toolBar->removeTimeline(QmlTimeline(removedNode));
|
toolBar->removeTimeline(QmlTimeline(removedNode));
|
||||||
QString currentId = toolBar->currentTimelineId();
|
QString currentId = toolBar->currentTimelineId();
|
||||||
|
|
||||||
|
removedNode.setAuxiliaryData("removed@Internal", true);
|
||||||
|
|
||||||
if (currentId.isEmpty())
|
if (currentId.isEmpty())
|
||||||
m_timelineWidget->graphicsScene()->clearTimeline();
|
m_timelineWidget->graphicsScene()->clearTimeline();
|
||||||
else if (lastId != currentId)
|
if (lastId != currentId)
|
||||||
m_timelineWidget->setTimelineId(currentId);
|
m_timelineWidget->setTimelineId(currentId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -397,7 +399,7 @@ QList<QmlTimeline> TimelineView::getTimelines() const
|
|||||||
return timelines;
|
return timelines;
|
||||||
|
|
||||||
for (const ModelNode &modelNode : allModelNodes()) {
|
for (const ModelNode &modelNode : allModelNodes()) {
|
||||||
if (QmlTimeline::isValidQmlTimeline(modelNode)) {
|
if (QmlTimeline::isValidQmlTimeline(modelNode) && !modelNode.hasAuxiliaryData("removed@Internal")) {
|
||||||
timelines.append(modelNode);
|
timelines.append(modelNode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -260,7 +260,7 @@ void TimelineWidget::connectToolbar()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setRecording(false);
|
setTimelineActive(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
int TimelineWidget::adjacentFrame(const std::function<qreal(const QVector<qreal> &, qreal)> &fun) const
|
int TimelineWidget::adjacentFrame(const std::function<qreal(const QVector<qreal> &, qreal)> &fun) const
|
||||||
@@ -393,7 +393,7 @@ void TimelineWidget::setupScrollbar(int min, int max, int current)
|
|||||||
|
|
||||||
void TimelineWidget::setTimelineId(const QString &id)
|
void TimelineWidget::setTimelineId(const QString &id)
|
||||||
{
|
{
|
||||||
setRecording(!m_timelineView->getTimelines().isEmpty());
|
setTimelineActive(!m_timelineView->getTimelines().isEmpty());
|
||||||
if (m_timelineView->isAttached()) {
|
if (m_timelineView->isAttached()) {
|
||||||
m_toolbar->setCurrentTimeline(m_timelineView->modelNodeForId(id));
|
m_toolbar->setCurrentTimeline(m_timelineView->modelNodeForId(id));
|
||||||
m_toolbar->setCurrentState(m_timelineView->currentState().name());
|
m_toolbar->setCurrentState(m_timelineView->currentState().name());
|
||||||
@@ -401,7 +401,7 @@ void TimelineWidget::setTimelineId(const QString &id)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TimelineWidget::setRecording(bool b)
|
void TimelineWidget::setTimelineActive(bool b)
|
||||||
{
|
{
|
||||||
if (b) {
|
if (b) {
|
||||||
m_toolbar->setVisible(true);
|
m_toolbar->setVisible(true);
|
||||||
|
@@ -68,7 +68,7 @@ public:
|
|||||||
void setupScrollbar(int min, int max, int current);
|
void setupScrollbar(int min, int max, int current);
|
||||||
void setTimelineId(const QString &id);
|
void setTimelineId(const QString &id);
|
||||||
|
|
||||||
void setRecording(bool b);
|
void setTimelineActive(bool b);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void selectionChanged();
|
void selectionChanged();
|
||||||
|
@@ -14,6 +14,12 @@
|
|||||||
],
|
],
|
||||||
\"Category\" : \"Core\",
|
\"Category\" : \"Core\",
|
||||||
\"Description\" : \"Secondary Welcome Screen Plugin.\",
|
\"Description\" : \"Secondary Welcome Screen Plugin.\",
|
||||||
|
\"Arguments\" : [
|
||||||
|
{
|
||||||
|
\"Name\" : \"-notour\",
|
||||||
|
\"Description\" : \"Do not ask for taking a UI tour on startup\"
|
||||||
|
}
|
||||||
|
],
|
||||||
\"Url\" : \"http://www.qt.io\",
|
\"Url\" : \"http://www.qt.io\",
|
||||||
$$dependencyList
|
$$dependencyList
|
||||||
}
|
}
|
||||||
|
@@ -51,7 +51,6 @@ void IntroductionWidget::askUserAboutIntroduction(QWidget *parent, QSettings *se
|
|||||||
return;
|
return;
|
||||||
auto messageBox = new CheckableMessageBox(parent);
|
auto messageBox = new CheckableMessageBox(parent);
|
||||||
messageBox->setWindowTitle(tr("Take a UI Tour"));
|
messageBox->setWindowTitle(tr("Take a UI Tour"));
|
||||||
messageBox->setIconPixmap(QMessageBox::standardIcon(QMessageBox::Question));
|
|
||||||
messageBox->setText(
|
messageBox->setText(
|
||||||
tr("Do you want to take a quick UI tour? This shows where the most important user "
|
tr("Do you want to take a quick UI tour? This shows where the most important user "
|
||||||
"interface elements are, and how they are used, and will only take a minute. You can "
|
"interface elements are, and how they are used, and will only take a minute. You can "
|
||||||
|
@@ -132,16 +132,10 @@ class WelcomePlugin : public ExtensionSystem::IPlugin
|
|||||||
public:
|
public:
|
||||||
~WelcomePlugin() final { delete m_welcomeMode; }
|
~WelcomePlugin() final { delete m_welcomeMode; }
|
||||||
|
|
||||||
bool initialize(const QStringList &, QString *) final
|
bool initialize(const QStringList &arguments, QString *) final
|
||||||
{
|
{
|
||||||
m_welcomeMode = new WelcomeMode;
|
m_welcomeMode = new WelcomeMode;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void extensionsInitialized() final
|
|
||||||
{
|
|
||||||
m_welcomeMode->initPlugins();
|
|
||||||
ModeManager::activateMode(m_welcomeMode->id());
|
|
||||||
auto introAction = new QAction(tr("UI Tour"), this);
|
auto introAction = new QAction(tr("UI Tour"), this);
|
||||||
connect(introAction, &QAction::triggered, this, []() {
|
connect(introAction, &QAction::triggered, this, []() {
|
||||||
auto intro = new IntroductionWidget(ICore::mainWindow());
|
auto intro = new IntroductionWidget(ICore::mainWindow());
|
||||||
@@ -151,11 +145,23 @@ public:
|
|||||||
ActionContainer *mhelp = ActionManager::actionContainer(Core::Constants::M_HELP);
|
ActionContainer *mhelp = ActionManager::actionContainer(Core::Constants::M_HELP);
|
||||||
if (QTC_GUARD(mhelp))
|
if (QTC_GUARD(mhelp))
|
||||||
mhelp->addAction(cmd, Core::Constants::G_HELP_HELP);
|
mhelp->addAction(cmd, Core::Constants::G_HELP_HELP);
|
||||||
|
|
||||||
|
if (!arguments.contains("-notour")) {
|
||||||
connect(ICore::instance(), &ICore::coreOpened, this, []() {
|
connect(ICore::instance(), &ICore::coreOpened, this, []() {
|
||||||
IntroductionWidget::askUserAboutIntroduction(ICore::mainWindow(), ICore::settings());
|
IntroductionWidget::askUserAboutIntroduction(ICore::mainWindow(),
|
||||||
|
ICore::settings());
|
||||||
}, Qt::QueuedConnection);
|
}, Qt::QueuedConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void extensionsInitialized() final
|
||||||
|
{
|
||||||
|
m_welcomeMode->initPlugins();
|
||||||
|
ModeManager::activateMode(m_welcomeMode->id());
|
||||||
|
}
|
||||||
|
|
||||||
WelcomeMode *m_welcomeMode = nullptr;
|
WelcomeMode *m_welcomeMode = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Submodule src/shared/qbs updated: 50eb4d183c...e0ada9c8ae
@@ -78,13 +78,13 @@ 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)
|
||||||
if platform.system() == 'Darwin':
|
|
||||||
menu.activateWindow()
|
|
||||||
success = menu.visible and widgetContainsPoint(editor, menu.mapToGlobal(QPoint(0, 0)))
|
success = menu.visible and widgetContainsPoint(editor, menu.mapToGlobal(QPoint(0, 0)))
|
||||||
if success:
|
if success:
|
||||||
menuInList[0] = menu
|
menuInList[0] = menu
|
||||||
return success
|
return success
|
||||||
except:
|
except:
|
||||||
|
t, v = sys.exc_info()[:2]
|
||||||
|
test.log("Exception: %s" % str(t), str(v))
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# this function checks whether the given global point (QPoint)
|
# this function checks whether the given global point (QPoint)
|
||||||
|
@@ -146,7 +146,7 @@ def main():
|
|||||||
mainRect = getQModelIndexStr("text='Rectangle'", rootIndex)
|
mainRect = getQModelIndexStr("text='Rectangle'", rootIndex)
|
||||||
doubleClick(waitForObject(mainRect))
|
doubleClick(waitForObject(mainRect))
|
||||||
if not object.exists(":DebugModeWidget_Debugger::Internal::ConsoleView"):
|
if not object.exists(":DebugModeWidget_Debugger::Internal::ConsoleView"):
|
||||||
invokeMenuItem("Window", "Output Panes", "Debugger Console")
|
invokeMenuItem("Window", "Output Panes", "QML Debugger Console")
|
||||||
progressBarWait()
|
progressBarWait()
|
||||||
# color and float values have additional ZERO WIDTH SPACE (\u200b), different usage of
|
# color and float values have additional ZERO WIDTH SPACE (\u200b), different usage of
|
||||||
# whitespaces inside expressions is part of the test
|
# whitespaces inside expressions is part of the test
|
||||||
|
Reference in New Issue
Block a user