Merge remote-tracking branch 'origin/4.10'

Change-Id: I0d4655b195d0615719d5d391aa69e682f8c6f78f
This commit is contained in:
Eike Ziller
2019-08-26 09:45:01 +02:00
27 changed files with 367 additions and 381 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 B

View File

@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2018 The Qt Company Ltd.
** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -29,16 +29,7 @@
\section1 Setting Breakpoints
A breakpoint represents a position or sets of positions in the code that,
when executed, interrupts the program being debugged and passes the control
to you. You can then examine the state of the interrupted program, or
continue execution either line-by-line or continuously.
\QC shows breakpoints in the \uicontrol Breakpoints view which is enabled
by default. The \uicontrol Breakpoints view is also accessible when the
debugger and the program being debugged is not running.
\image qtcreator-debug-breakpoints.png "Breakpoints view"
You can associate breakpoints with:
@@ -68,9 +59,48 @@
The interruption of a program by a breakpoint can be restricted with certain
conditions.
You can set and delete breakpoints before the program starts running or
while it is running under the debugger's control. Breakpoints are saved
together with a session.
Breakpoints come in two varieties: \c unclaimed and \c claimed.
An unclaimed breakpoint represents a task to interrupt the debugged
program and passes the control to you later. I has two states:
\c pending and \c implanted.
Unclaimed breakpoints are stored as a part of a session and exist
independently of whether a program is being debugged or not. They
are listed in the \uicontrol {Breakpoint Preset} view and in the
editor using the \inlineimage qtcreator-unclaimed-breakpoint-icon.png
(\uicontrol {Unclaimed Breakpoint}) icon, when they refer to a position
in code.
\image qtcreator-debugger-breakpoint-preset.png "Breakpoint Preset" view
When a debugger starts, the debugging backend identifies breakpoints
from the set of unclaimed breakpoints that might be handled by the
debugged program and claims them for its own exclusive use. Claimed
breakpoints are listed in the \uicontrol {Breakpoints} view of the
running debugger. This view only exists while the debugger is running.
When a debugger claims a breakpoint, the unclaimed breakpoint disappears
from the \uicontrol {Breakpoint Preset} view, to appear as a pending
breakpoint in the \uicontrol Breakpoints view.
At various times, attempts are made to implant pending breakpoints into
the debugged process. Succesfull implantation might create one or more
implanted breakpoints, each associated with an actual address in
the debugged breakpoint. The implantation might also move a breakpoint
marker in the editor from an empty line to the next line for which the
actual code was generated, for example. Implanted breakpoint icons don't
have the hourglass overlay.
When the debugger ends, its claimed breakpoints, both pending and
implanted, will return to the unclaimed state and re-appear in the
\uicontrol{Breakpoint Preset} view.
When an implanted breakpoint is hit during the execution of the
debugged program, control is passed back to you.
You can then examine the state of the interrupted program, or
continue execution either line-by-line or continuously.
\image qtcreator-debug-breakpoints.png "Breakpoints view"
\section2 Adding Breakpoints
@@ -86,12 +116,14 @@
(\key F8 for \macos) at a particular line you want the
program to stop.
\li In the \uicontrol Breakpoints view, double-click in the empty
part of the view.
\li In the \uicontrol Breakpoints view, select
\uicontrol {Add Breakpoint} in the context menu.
\li In the \uicontrol {Breakpoint Preset} view or the
\uicontrol Breakpoints view:
\list
\li Double-click the empty part of the view.
\li Right-click the view, and select
\uicontrol {Add Breakpoint} in the context menu.
\endlist
\endlist
\li In the \uicontrol {Breakpoint type} field, select the location in the
@@ -119,7 +151,16 @@
\section2 Moving Breakpoints
To move the breakpoint, drag and drop a breakpoint marker to another line.
To move a breakpoint:
\list
\li Drag and drop a breakpoint marker to another line
in the text editor.
\li In the \uicontrol {Breakpoint Preset} view or the
\uicontrol Breakpoints view, select
\uicontrol {Edit Selected Breakpoints}, and set the
line number in the \uicontrol {Line number} field.
\endlist
\section2 Deleting Breakpoints
@@ -129,11 +170,15 @@
\li Click the breakpoint marker in the text editor.
\li Select the breakpoint in the \uicontrol Breakpoints view and press
\key Delete.
\li Select \uicontrol {Delete Breakpoint} in the context menu in the
\uicontrol Breakpoints view.
\li In the \uicontrol {Breakpoint Preset} view or the
\uicontrol Breakpoints view:
\list
\li Select the breakpoint and press \key Delete.
\li Select \uicontrol {Delete Selected Breakpoints},
\uicontrol {Delete Selected Breakpoints}, or
\uicontrol {Delete Breakpoints of File} in the
context menu.
\endlist
\endlist
@@ -147,31 +192,17 @@
\li Right-click the breakpoint marker in the text editor and select
\uicontrol{Disable Breakpoint}.
\li Select the breakpoint in the \uicontrol Breakpoints view and press
\key Space.
\li Select \uicontrol {Disabled Breakpoint} in the context menu in the
\uicontrol Breakpoints view.
\li In the \uicontrol {Breakpoint Preset} view or the
\uicontrol Breakpoints view:
\list
\li Select the breakpoint and press \key Space.
\li Select \uicontrol {Disable Breakpoint} in the context menu.
\endlist
\endlist
A disabled breakpoint is marked with a hollow read circle in the
text editor and the \uicontrol Breakpoint view.
To re-enable a temporarily disabled breakpoint:
\list
\li Right-click the marker of a disabled breakpoint in the text editor and
select \uicontrol{Enable Breakpoint}.
\li Select a disabled breakpoint in the \uicontrol Breakpoints view and press
\key Space.
\li Select \uicontrol {Disabled Breakpoint} in the context menu in the
\uicontrol Breakpoints view.
\endlist
A hollow breakpoint icon in the text editor and the views indicates a
disabled breakpoint. To re-enable a breakpoint, use any of the above
methods.
With the notable exception of data breakpoints, breakpoints retain their
enabled or disabled state when the debugged program is restarted.
@@ -185,8 +216,8 @@
\list 1
\li Right-click in the \uicontrol Breakpoints view to open the context
menu, and select \uicontrol {Add Breakpoint}.
\li In the \uicontrol {Breakpoint Preset} or \uicontrol Breakpoints
view, select \uicontrol {Add Breakpoint} in the context menu.
\li In the \uicontrol {Breakpoint type} field, select
\uicontrol {Break on data access at fixed address}.

View File

@@ -89,7 +89,7 @@ RowLayout {
}
Label {
text: "Margin"
text: qsTr("Margin")
color: __defaultTextColor
elide: Text.ElideRight
Layout.minimumWidth: Math.min(60, Layout.preferredWidth + 10)

View File

@@ -43,13 +43,12 @@ Column {
SecondColumnLayout {
ComboBox {
scope: "Flow"
model: ["LeftToRight", "TopToBottom"]
backendValue: backendValues.flow
scope: "Flow"
Layout.fillWidth: true
}
ExpandingSpacer {
}
}
@@ -59,12 +58,13 @@ Column {
SecondColumnLayout {
ComboBox {
scope: "Qt"
model: ["LeftToRight", "RightToLeft"]
backendValue: backendValues.layoutDirection
Layout.fillWidth: true
scope: "Qt"
}
ExpandingSpacer {
}
}
Label {
@@ -78,7 +78,6 @@ Column {
maximumValue: 4000
decimals: 0
}
ExpandingSpacer {
}
}

View File

@@ -51,13 +51,11 @@ Column {
SectionLayout {
SpinBox {
backendValue: backendValues.cacheBuffer
minimumValue: 0;
maximumValue: 1000;
minimumValue: 0
maximumValue: 1000
decimals: 0
}
ExpandingSpacer {
}
}
@@ -66,47 +64,48 @@ Column {
}
SecondColumnLayout {
Label {
text: "W"
width: 12
}
SpinBox {
backendValue: backendValues.cellWidth
minimumValue: 0;
maximumValue: 1000;
minimumValue: 0
maximumValue: 1000
decimals: 0
}
Item {
width: 4
height: 4
}
Label {
text: "H"
width: 12
}
SpinBox {
backendValue: backendValues.cellHeight
minimumValue: 0;
maximumValue: 1000;
minimumValue: 0
maximumValue: 1000
decimals: 0
}
ExpandingSpacer {
}
}
Label {
text: qsTr("Flow")
}
SecondColumnLayout {
ComboBox {
scope: "GridView"
model: ["FlowLeftToRight", "FlowTopToBottom"]
backendValue: backendValues.flow
Layout.fillWidth: true
scope: "GridView"
}
ExpandingSpacer {
}
}
@@ -117,11 +116,11 @@ Column {
SectionLayout {
CheckBox {
Layout.fillWidth: true
backendValue: backendValues.keyNavigationWraps
text: backendValues.keyNavigationWraps.valueToString
}
ExpandingSpacer {
}
}
@@ -131,10 +130,12 @@ Column {
SecondColumnLayout {
ComboBox {
scope: "Qt"
model: ["LeftToRight", "RightToLeft"]
backendValue: backendValues.layoutDirection
Layout.fillWidth: true
scope: "Qt"
}
ExpandingSpacer {
}
}
@@ -145,10 +146,12 @@ Column {
SecondColumnLayout {
ComboBox {
scope: "GridView"
model: ["NoSnap", "SnapToRow", "SnapOneRow"]
backendValue: backendValues.snapMode
Layout.fillWidth: true
scope: "GridView"
}
ExpandingSpacer {
}
}
@@ -169,14 +172,15 @@ Column {
SecondColumnLayout {
ComboBox {
scope: "GridView"
model: ["NoHighlightRange", "ApplyRange", "StrictlyEnforceRange"]
backendValue: backendValues.highlightRangeMode
Layout.fillWidth: true
scope: "GridView"
}
ExpandingSpacer {
}
}
Label {
text: qsTr("Move duration")
tooltip: qsTr("Move animation duration of the highlight delegate.")
@@ -185,13 +189,11 @@ Column {
SectionLayout {
SpinBox {
backendValue: backendValues.highlightMoveDuration
minimumValue: 0;
maximumValue: 1000;
minimumValue: 0
maximumValue: 1000
decimals: 0
}
ExpandingSpacer {
}
}
@@ -203,13 +205,11 @@ Column {
SectionLayout {
SpinBox {
backendValue: backendValues.highlightMoveSpeed
minimumValue: 0;
maximumValue: 1000;
minimumValue: 0
maximumValue: 1000
decimals: 0
}
ExpandingSpacer {
}
}
@@ -221,13 +221,11 @@ Column {
SectionLayout {
SpinBox {
backendValue: backendValues.preferredHighlightBegin
minimumValue: 0;
maximumValue: 1000;
minimumValue: 0
maximumValue: 1000
decimals: 0
}
ExpandingSpacer {
}
}
@@ -239,13 +237,11 @@ Column {
SectionLayout {
SpinBox {
backendValue: backendValues.preferredHighlightEnd
minimumValue: 0;
maximumValue: 1000;
minimumValue: 0
maximumValue: 1000
decimals: 0
}
ExpandingSpacer {
}
}
@@ -256,11 +252,11 @@ Column {
SectionLayout {
CheckBox {
Layout.fillWidth: true
backendValue: backendValues.highlightFollowsCurrentItem
text: backendValues.highlightFollowsCurrentItem.valueToString
}
ExpandingSpacer {
}
}

View File

@@ -43,12 +43,11 @@ Column {
SecondColumnLayout {
UrlChooser {
Layout.fillWidth: true
backendValue: backendValues.source
Layout.fillWidth: true
backendValue: backendValues.source
}
ExpandingSpacer {
}
}
@@ -58,15 +57,14 @@ Column {
SecondColumnLayout {
ComboBox {
scope: "Image"
model: ["Stretch", "PreserveAspectFit", "PreserveAspectCrop", "Tile", "TileVertically", "TileHorizontally"]
backendValue: backendValues.fillMode
implicitWidth: 180
Layout.fillWidth: true
scope: "Image"
}
ExpandingSpacer {
}
}
@@ -87,6 +85,11 @@ Column {
decimals: 0
}
Item {
width: 4
height: 4
}
Label {
text: "H"
width: 12
@@ -100,7 +103,6 @@ Column {
}
ExpandingSpacer {
}
}
}

View File

@@ -51,13 +51,12 @@ Column {
SectionLayout {
SpinBox {
backendValue: backendValues.cacheBuffer
minimumValue: 0;
maximumValue: 1000;
minimumValue: 0
maximumValue: 1000
decimals: 0
}
ExpandingSpacer {
}
}
@@ -68,11 +67,11 @@ Column {
SectionLayout {
CheckBox {
Layout.fillWidth: true
backendValue: backendValues.keyNavigationWraps
text: backendValues.keyNavigationWraps.valueToString
}
ExpandingSpacer {
}
}
@@ -83,12 +82,13 @@ Column {
SecondColumnLayout {
ComboBox {
scope: "ListView"
model: ["Horizontal", "Vertical"]
backendValue: backendValues.orientation
Layout.fillWidth: true
scope: "ListView"
}
ExpandingSpacer {
}
}
Label {
@@ -97,14 +97,12 @@ Column {
SecondColumnLayout {
ComboBox {
scope: "Qt"
model: ["LeftToRight", "RightToLeft"]
backendValue: backendValues.layoutDirection
scope: "Qt"
Layout.fillWidth: true
}
ExpandingSpacer {
}
}
@@ -115,14 +113,12 @@ Column {
SecondColumnLayout {
ComboBox {
scope: "ListView"
model: ["NoSnap", "SnapToItem", "SnapOneItem"]
backendValue: backendValues.snapMode
scope: "ListView"
Layout.fillWidth: true
}
ExpandingSpacer {
}
}
@@ -134,13 +130,11 @@ Column {
SectionLayout {
SpinBox {
backendValue: backendValues.spacing
minimumValue: 0;
maximumValue: 1000;
minimumValue: 0
maximumValue: 1000
decimals: 0
}
ExpandingSpacer {
}
}
@@ -161,14 +155,12 @@ Column {
SecondColumnLayout {
ComboBox {
scope: "ListView"
model: ["NoHighlightRange", "ApplyRange", "StrictlyEnforceRange"]
backendValue: backendValues.highlightRangeMode
Layout.fillWidth: true
scope: "ListView"
}
ExpandingSpacer {
}
}
@@ -181,13 +173,11 @@ Column {
SectionLayout {
SpinBox {
backendValue: backendValues.highlightMoveDuration
minimumValue: 0;
maximumValue: 1000;
minimumValue: 0
maximumValue: 1000
decimals: 0
}
ExpandingSpacer {
}
}
@@ -199,13 +189,11 @@ Column {
SectionLayout {
SpinBox {
backendValue: backendValues.highlightMoveSpeed
minimumValue: 0;
maximumValue: 1000;
minimumValue: 0
maximumValue: 1000
decimals: 0
}
ExpandingSpacer {
}
}
@@ -217,13 +205,11 @@ Column {
SectionLayout {
SpinBox {
backendValue: backendValues.highlightResizeDuration
minimumValue: 0;
maximumValue: 1000;
minimumValue: 0
maximumValue: 1000
decimals: 0
}
ExpandingSpacer {
}
}
@@ -235,13 +221,11 @@ Column {
SectionLayout {
SpinBox {
backendValue: backendValues.preferredHighlightBegin
minimumValue: 0;
maximumValue: 1000;
minimumValue: 0
maximumValue: 1000
decimals: 0
}
ExpandingSpacer {
}
}
@@ -253,13 +237,11 @@ Column {
SectionLayout {
SpinBox {
backendValue: backendValues.preferredHighlightEnd
minimumValue: 0;
maximumValue: 1000;
minimumValue: 0
maximumValue: 1000
decimals: 0
}
ExpandingSpacer {
}
}
@@ -270,11 +252,11 @@ Column {
SectionLayout {
CheckBox {
Layout.fillWidth: true
backendValue: backendValues.highlightFollowsCurrentItem
text: backendValues.highlightFollowsCurrentItem.valueToString
}
ExpandingSpacer {
}
}

View File

@@ -44,11 +44,12 @@ Column {
SecondColumnLayout {
CheckBox {
Layout.fillWidth: true
backendValue: backendValues.enabled
text: backendValues.enabled.valueToString
}
ExpandingSpacer {
}
}
@@ -59,7 +60,9 @@ Column {
SecondColumnLayout {
CheckBox {
Layout.fillWidth: true
backendValue: backendValues.hoverEnabled
text: backendValues.hoverEnabled.valueToString
}
ExpandingSpacer {

View File

@@ -46,13 +46,11 @@ Column {
SecondColumnLayout {
SpinBox {
backendValue: backendValues.dragMargin
minimumValue: 0;
maximumValue: 100;
minimumValue: 0
maximumValue: 100
decimals: 0
}
ExpandingSpacer {
}
}
@@ -63,13 +61,11 @@ Column {
SecondColumnLayout {
SpinBox {
backendValue: backendValues.flickDeceleration
minimumValue: 0;
maximumValue: 1000;
minimumValue: 0
maximumValue: 1000
decimals: 0
}
ExpandingSpacer {
}
}
@@ -80,11 +76,11 @@ Column {
SecondColumnLayout {
CheckBox {
Layout.fillWidth: true
backendValue: backendValues.interactive
text: backendValues.interactive.valueToString
}
ExpandingSpacer {
}
}
@@ -96,13 +92,11 @@ Column {
SecondColumnLayout {
SpinBox {
backendValue: backendValues.offset
minimumValue: 0;
maximumValue: 1000;
minimumValue: 0
maximumValue: 1000
decimals: 0
}
ExpandingSpacer {
}
}
@@ -114,13 +108,11 @@ Column {
SecondColumnLayout {
SpinBox {
backendValue: backendValues.pathItemCount
minimumValue: -1;
maximumValue: 1000;
minimumValue: -1
maximumValue: 1000
decimals: 0
}
ExpandingSpacer {
}
}
}
@@ -139,18 +131,15 @@ Column {
SecondColumnLayout {
ComboBox {
scope: "PathView"
model: ["NoHighlightRange", "ApplyRange", "StrictlyEnforceRange"]
backendValue: backendValues.highlightRangeMode
Layout.fillWidth: true
scope: "PathView"
}
ExpandingSpacer {
}
}
Label {
text: qsTr("Move duration")
tooltip: qsTr("Move animation duration of the highlight delegate.")
@@ -159,13 +148,11 @@ Column {
SecondColumnLayout {
SpinBox {
backendValue: backendValues.highlightMoveDuration
minimumValue: 0;
maximumValue: 1000;
minimumValue: 0
maximumValue: 1000
decimals: 0
}
ExpandingSpacer {
}
}
@@ -177,13 +164,11 @@ Column {
SecondColumnLayout {
SpinBox {
backendValue: backendValues.preferredHighlightBegin
minimumValue: 0;
maximumValue: 1;
minimumValue: 0
maximumValue: 1
decimals: 2
}
ExpandingSpacer {
}
}
@@ -195,13 +180,11 @@ Column {
SecondColumnLayout {
SpinBox {
backendValue: backendValues.preferredHighlightEnd
minimumValue: 0;
maximumValue: 1;
minimumValue: 0
maximumValue: 1
decimals: 2
}
ExpandingSpacer {
}
}
}

View File

@@ -27,7 +27,6 @@ import QtQuick 2.1
import HelperWidgets 2.0
import QtQuick.Layouts 1.0
Section {
anchors.left: parent.left
anchors.right: parent.right
@@ -40,7 +39,6 @@ Section {
rows: 4
columns: 2
Label {
visible: textInputSection.isTextInput
text: qsTr("Input mask")
@@ -62,7 +60,7 @@ Section {
Layout.fillWidth: true
backendValue: backendValues.echoMode
scope: "TextInput"
model: ["Normal", "Password", "PasswordEchoOnEdit", "NoEcho"]
model: ["Normal", "Password", "PasswordEchoOnEdit", "NoEcho"]
}
Label {
@@ -85,25 +83,28 @@ Section {
SecondColumnLayout {
ColumnLayout {
CheckBox {
Layout.fillWidth: true
text: qsTr("Read only")
backendValue: backendValues.readOnly;
backendValue: backendValues.readOnly
}
CheckBox {
Layout.fillWidth: true
text: qsTr("Cursor visible")
backendValue: backendValues.cursorVisible;
backendValue: backendValues.cursorVisible
}
CheckBox {
Layout.fillWidth: true
text: qsTr("Active focus on press")
backendValue: backendValues.activeFocusOnPress;
backendValue: backendValues.activeFocusOnPress
}
CheckBox {
Layout.fillWidth: true
text: qsTr("Auto scroll")
backendValue: backendValues.autoScroll;
backendValue: backendValues.autoScroll
}
}
}
}

View File

@@ -0,0 +1,42 @@
/****************************************************************************
**
** 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
import StudioControls 1.0 as StudioControls
import StudioTheme 1.0 as StudioTheme
StudioControls.AbstractButton {
id: button
property alias tooltip: toolTipArea.tooltip
ToolTipArea {
id: toolTipArea
anchors.fill: parent
// Without setting the acceptedButtons property the clicked event won't
// reach the AbstractButton, it will be consumed by the ToolTipArea
acceptedButtons: Qt.NoButton
}
}

View File

@@ -40,10 +40,10 @@ StudioControls.ButtonRow {
id: group
}
StudioControls.AbstractButton {
AbstractButton {
checkable: true
buttonIcon: StudioTheme.Constants.anchorTop
//tooltip: qsTr("Anchor item to the top.")
tooltip: qsTr("Anchor item to the top.")
property bool topAnchored: anchorBackend.topAnchored
onTopAnchoredChanged: {
@@ -61,10 +61,10 @@ StudioControls.ButtonRow {
}
}
StudioControls.AbstractButton {
AbstractButton {
checkable: true
buttonIcon: StudioTheme.Constants.anchorBottom
//tooltip: qsTr("Anchor item to the bottom.")
tooltip: qsTr("Anchor item to the bottom.")
property bool bottomAnchored: anchorBackend.bottomAnchored
onBottomAnchoredChanged: {
@@ -80,13 +80,12 @@ StudioControls.ButtonRow {
anchorBackend.bottomAnchored = false;
}
}
}
StudioControls.AbstractButton {
AbstractButton {
checkable: true
buttonIcon: StudioTheme.Constants.anchorLeft
//tooltip: qsTr("Anchor item to the left.")
tooltip: qsTr("Anchor item to the left.")
property bool leftAnchored: anchorBackend.leftAnchored
onLeftAnchoredChanged: {
@@ -104,10 +103,10 @@ StudioControls.ButtonRow {
}
}
StudioControls.AbstractButton {
AbstractButton {
checkable: true
buttonIcon: StudioTheme.Constants.anchorRight
//tooltip: qsTr("Anchor item to the right.")
tooltip: qsTr("Anchor item to the right.")
property bool rightAnchored: anchorBackend.rightAnchored
onRightAnchoredChanged: {
@@ -125,15 +124,14 @@ StudioControls.ButtonRow {
}
}
StudioControls.AbstractButton {
AbstractButton {
enabled: false
}
StudioControls.AbstractButton {
AbstractButton {
checkable: true
buttonIcon: StudioTheme.Constants.anchorFill
//tooltip: qsTr("Fill parent item.")
tooltip: qsTr("Fill parent item.")
property bool isFilled: anchorBackend.isFilled
onIsFilledChanged: {
@@ -149,14 +147,14 @@ StudioControls.ButtonRow {
}
}
StudioControls.AbstractButton {
AbstractButton {
enabled: false
}
StudioControls.AbstractButton {
AbstractButton {
checkable: true
buttonIcon: StudioTheme.Constants.centerVertical
//tooltip: qsTr("Anchor item vertically.")
tooltip: qsTr("Anchor item vertically.")
property bool verticalCentered: anchorBackend.verticalCentered;
onVerticalCenteredChanged: {
@@ -176,10 +174,10 @@ StudioControls.ButtonRow {
}
}
StudioControls.AbstractButton {
AbstractButton {
checkable: true
buttonIcon: StudioTheme.Constants.centerHorizontal
//tooltip: qsTr("Anchor item horizontally.")
tooltip: qsTr("Anchor item horizontally.")
property bool horizontalCentered: anchorBackend.horizontalCentered;
onHorizontalCenteredChanged: {

View File

@@ -24,61 +24,42 @@
****************************************************************************/
import QtQuick 2.1
import QtQuick.Controls 1.1 as Controls
import QtQuick.Controls.Styles 1.0
import QtQuickDesignerTheme 1.0
import "Constants.js" as Constants
import StudioTheme 1.0 as StudioTheme
QtObject {
id: innerObject
property variant backendValue
property color textColor: StudioTheme.Values.themeTextColor//Theme.color(Theme.PanelTextColorLight)
property color textColor: StudioTheme.Values.themeTextColor
property variant valueFromBackend: backendValue.value;
property bool baseStateFlag: isBaseState;
property bool isInModel: backendValue.isInModel;
property bool isInSubState: backendValue.isInSubState;
property bool highlight: textColor === __changedTextColor
property color __defaultTextColor: StudioTheme.Values.themeTextColor//Theme.color(Theme.PanelTextColorLight)
readonly property color __changedTextColor: StudioTheme.Values.themeInteraction//Theme.color(Theme.QmlDesigner_HighlightColor)
property color __defaultTextColor: StudioTheme.Values.themeTextColor
readonly property color __changedTextColor: StudioTheme.Values.themeInteraction
onBackendValueChanged: {
evaluate();
}
onValueFromBackendChanged: {
evaluate();
}
onBaseStateFlagChanged: {
evaluate();
}
onIsInModelChanged: {
evaluate();
}
onIsInSubStateChanged: {
evaluate();
}
onBackendValueChanged: evaluate()
onValueFromBackendChanged: evaluate()
onBaseStateFlagChanged: evaluate()
onIsInModelChanged: evaluate()
onIsInSubStateChanged: evaluate()
function evaluate() {
if (innerObject.backendValue === undefined)
return;
return
if (baseStateFlag) {
if (innerObject.baseStateFlag) {
if (innerObject.backendValue.isInModel)
innerObject.textColor = __changedTextColor
else
innerObject.textColor = Theme.color(Theme.PanelTextColorLight)
innerObject.textColor = __defaultTextColor
} else {
if (innerObject.backendValue.isInSubState)
innerObject.textColor = Constants.colorsChangedStateText
innerObject.textColor = StudioTheme.Values.themeChangedStateText
else
innerObject.textColor = Theme.color(Theme.PanelTextColorLight)
innerObject.textColor = __defaultTextColor
}
}
}

View File

@@ -23,10 +23,7 @@
**
****************************************************************************/
import QtQuick 2.1
import QtQuick.Controls 1.0 as Controls
import QtQuick.Layouts 1.0
import StudioControls 1.0 as StudioControls
Item {
Layout.fillWidth: true
StudioControls.ExpandingSpacer {
}

View File

@@ -104,7 +104,6 @@ Item {
onTriggered: {
transaction.start()
backendValue.resetValue()
backendValue.resetValue()
transaction.end()
extendedFunctionButton.reseted()
}

View File

@@ -50,7 +50,8 @@ Section {
Layout.fillWidth: true
scope: "Flickable"
}
ExpandingSpacer {
}
}
Label {
@@ -65,7 +66,8 @@ Section {
Layout.fillWidth: true
scope: "Flickable"
}
ExpandingSpacer {
}
}
@@ -81,18 +83,21 @@ Section {
Layout.fillWidth: true
scope: "Flickable"
}
ExpandingSpacer {
}
}
Label {
text:qsTr("Interactive")
text: qsTr("Interactive")
tooltip: qsTr("Describes whether the user can interact with the Flickable. A user cannot drag or flick a Flickable that is not interactive.")
}
SecondColumnLayout {
CheckBox {
Layout.fillWidth: true
backendValue: backendValues.interactive
text: backendValues.interactive.valueToString
}
ExpandingSpacer {
}
}
@@ -109,7 +114,6 @@ Section {
maximumValue: 8000
decimals: 0
}
ExpandingSpacer {
}
}
@@ -126,7 +130,6 @@ Section {
maximumValue: 8000
decimals: 0
}
ExpandingSpacer {
}
}
@@ -143,21 +146,21 @@ Section {
maximumValue: 2000
decimals: 0
}
ExpandingSpacer {
}
}
Label {
text:qsTr("Pixel aligned")
text: qsTr("Pixel aligned")
tooltip: qsTr("Sets the alignment of contentX and contentY to pixels (true) or subpixels (false).")
}
SecondColumnLayout {
CheckBox {
Layout.fillWidth: true
backendValue: backendValues.pixelAligned
tooltip: qsTr("Sets the alignment of contentX and contentY to pixels (true) or subpixels (false).")
text: backendValues.pixelAligned.valueToString
}
ExpandingSpacer {
}
}
@@ -170,7 +173,7 @@ Section {
Label {
text: "W"
width: 28
width: 42
}
SpinBox {
@@ -178,6 +181,7 @@ Section {
minimumValue: 0
maximumValue: 8000
implicitWidth: root.spinBoxWidth
Layout.fillWidth: true
}
Item {
@@ -187,7 +191,7 @@ Section {
Label {
text: "H"
width: 28
width: 42
}
SpinBox {
@@ -195,11 +199,9 @@ Section {
minimumValue: 0
maximumValue: 8000
implicitWidth: root.spinBoxWidth
Layout.fillWidth: true
}
ExpandingSpacer {
}
}
@@ -211,7 +213,7 @@ Section {
Label {
text: "X"
width: 28
width: 42
}
SpinBox {
@@ -219,6 +221,7 @@ Section {
minimumValue: 0
maximumValue: 8000
implicitWidth: root.spinBoxWidth
Layout.fillWidth: true
}
Item {
@@ -228,7 +231,7 @@ Section {
Label {
text: "Y"
width: 28
width: 42
}
SpinBox {
@@ -236,11 +239,9 @@ Section {
minimumValue: 0
maximumValue: 8000
implicitWidth: root.spinBoxWidth
Layout.fillWidth: true
}
ExpandingSpacer {
}
}
@@ -253,7 +254,7 @@ Section {
Label {
text: "Top"
width: 28
width: 42
}
SpinBox {
@@ -262,6 +263,7 @@ Section {
minimumValue: 0
decimals: 0
implicitWidth: root.spinBoxWidth
Layout.fillWidth: true
}
Item {
@@ -271,7 +273,7 @@ Section {
Label {
text: "Bottom"
width: 28
width: 42
}
SpinBox {
@@ -280,9 +282,9 @@ Section {
minimumValue: 0
decimals: 0
implicitWidth: root.spinBoxWidth
Layout.fillWidth: true
}
ExpandingSpacer {
}
}
@@ -295,7 +297,7 @@ Section {
Label {
text: "Left"
width: 28
width: 42
}
SpinBox {
@@ -304,6 +306,7 @@ Section {
minimumValue: 0
decimals: 0
implicitWidth: root.spinBoxWidth
Layout.fillWidth: true
}
Item {
@@ -313,7 +316,7 @@ Section {
Label {
text: "Right"
width: 28
width: 42
}
SpinBox {
@@ -322,11 +325,10 @@ Section {
minimumValue: 0
decimals: 0
implicitWidth: root.spinBoxWidth
Layout.fillWidth: true
}
ExpandingSpacer {
}
}
}
}

View File

@@ -45,8 +45,8 @@ Section {
width: 42
}
SpinBox {
maximumValue: 9999999
minimumValue: -9999999
maximumValue: 10000
minimumValue: -10000
decimals: 0
backendValue: backendValues.topPadding
Layout.fillWidth: true
@@ -62,8 +62,8 @@ Section {
width: 42
}
SpinBox {
maximumValue: 9999999
minimumValue: -9999999
maximumValue: 10000
minimumValue: -10000
decimals: 0
backendValue: backendValues.bottomPadding
Layout.fillWidth: true
@@ -80,8 +80,8 @@ Section {
width: 42
}
SpinBox {
maximumValue: 9999999
minimumValue: -9999999
maximumValue: 10000
minimumValue: -10000
decimals: 0
backendValue: backendValues.leftPadding
Layout.fillWidth: true
@@ -97,8 +97,8 @@ Section {
width: 42
}
SpinBox {
maximumValue: 9999999
minimumValue: -9999999
maximumValue: 10000
minimumValue: -10000
decimals: 0
backendValue: backendValues.rightPadding
Layout.fillWidth: true
@@ -111,8 +111,8 @@ Section {
}
SecondColumnLayout {
SpinBox {
maximumValue: 9999999
minimumValue: -9999999
maximumValue: 10000
minimumValue: -10000
decimals: 0
backendValue: backendValues.padding
Layout.fillWidth: true

View File

@@ -31,16 +31,15 @@ import QtQuick.Controls.Styles 1.1
RowLayout {
id: urlChooser
property variant backendValue
property color textColor: colorLogic.highlight ? colorLogic.textColor : "white"
property string filter: "*.png *.gif *.jpg *.bmp *.jpeg *.svg"
property string filter: "*.png *.gif *.jpg *.bmp *.jpeg *.svg *.pbm *.pgm *.ppm *.xbm *.xpm"
FileResourcesModel {
id: fileModel
modelNodeBackendProperty: modelNodeBackend
filter: urlChooser.filter
id: fileModel
}
ColorLogic {
@@ -57,35 +56,31 @@ RowLayout {
ExtendedFunctionLogic {
id: extFuncLogic
backendValue: comboBox.backendValue
backendValue: urlChooser.backendValue
}
property bool isComplete: false
property bool dirty: false
onEditTextChanged: comboBox.dirty = true
function setCurrentText(text) {
if (text === "")
return
var index = comboBox.find(text)
if (index === -1)
currentIndex = -1
editText = text
comboBox.editText = text
comboBox.dirty = false
}
property string textValue: {
if (backendValue.isBound)
return backendValue.expression
if (urlChooser.backendValue.isBound)
return urlChooser.backendValue.expression
return backendValue.valueToString
return urlChooser.backendValue.valueToString
}
onTextValueChanged: setCurrentText(textValue)
onTextValueChanged: comboBox.setCurrentText(comboBox.textValue)
Layout.fillWidth: true
@@ -95,27 +90,27 @@ RowLayout {
onModelChanged: {
if (!comboBox.isComplete)
return;
return
setCurrentText(textValue)
comboBox.setCurrentText(comboBox.textValue)
}
onAccepted: {
if (!comboBox.isComplete)
return;
return
if (backendValue.value !== editText)
backendValue.value = editText;
if (comboBox.backendValue.value !== comboBox.editText)
comboBox.backendValue.value = comboBox.editText
comboBox.dirty = false
}
onFocusChanged: {
if (comboBox.dirty)
handleActivate(comboBox.currentIndex)
comboBox.handleActivate(comboBox.currentIndex)
}
onActivated: handleActivate(index)
onActivated: comboBox.handleActivate(index)
function handleActivate(index)
{
@@ -125,19 +120,19 @@ RowLayout {
cText = comboBox.editText
if (urlChooser.backendValue === undefined)
return;
return
if (!comboBox.isComplete)
return;
return
if (urlChooser.backendValue.value !== cText)
urlChooser.backendValue.value = cText;
urlChooser.backendValue.value = cText
comboBox.dirty = false
}
Component.onCompleted: {
//Hack to style the text input
// Hack to style the text input
for (var i = 0; i < comboBox.children.length; i++) {
if (comboBox.children[i].text !== undefined) {
comboBox.children[i].color = urlChooser.textColor
@@ -145,55 +140,18 @@ RowLayout {
}
}
comboBox.isComplete = true
setCurrentText(textValue)
comboBox.setCurrentText(comboBox.textValue)
}
}
RoundedPanel {
roundLeft: true
roundRight: true
width: 24
height: 18
RoundedPanel {
id: darkPanel
roundLeft: true
roundRight: true
anchors.fill: parent
opacity: 0
Behavior on opacity {
PropertyAnimation {
duration: 100
}
}
gradient: Gradient {
GradientStop {color: '#444' ; position: 0}
GradientStop {color: '#333' ; position: 1}
}
}
Text {
renderType: Text.NativeRendering
text: "..."
color: urlChooser.textColor
anchors.centerIn: parent
}
MouseArea {
anchors.fill: parent
onClicked: {
darkPanel.opacity = 1
fileModel.openFileDialog()
if (fileModel.fileName != "")
backendValue.value = fileModel.fileName
darkPanel.opacity = 0
}
StudioControls.AbstractButton {
buttonIcon: "..."
iconFont: StudioTheme.Constants.font.family
iconColor: urlChooser.textColor
onClicked: {
fileModel.openFileDialog()
if (fileModel.fileName !== "")
urlChooser.backendValue.value = fileModel.fileName
}
}
}

View File

@@ -1,3 +1,4 @@
AbstractButton 2.0 AbstractButton.qml
ActionIndicator 2.0 ActionIndicator.qml
AligmentHorizontalButtons 2.0 AligmentHorizontalButtons.qml
AligmentVerticalButtons 2.0 AligmentVerticalButtons.qml

View File

@@ -32,6 +32,7 @@ T.AbstractButton {
property alias buttonIcon: buttonIcon.text
property alias iconColor: buttonIcon.color
property alias iconFont: buttonIcon.font.family
property alias backgroundVisible: buttonBackground.visible
property alias backgroundRadius: buttonBackground.radius

View File

@@ -44,8 +44,8 @@ QtObject {
readonly property string anchorLeft: "\u0026"
readonly property string anchorRight: "\u0027"
readonly property string anchorTop: "\u0028"
readonly property string centerHorizontal: "\u0029"
readonly property string centerVertical: "\u002A"
readonly property string centerHorizontal: "\u002A"
readonly property string centerVertical: "\u0029"
readonly property string closeCross: "\u002B"
readonly property string fontStyleBold: "\u002C"
readonly property string fontStyleItalic: "\u002D"

View File

@@ -122,4 +122,7 @@ QtObject {
property string themeControlBackgroundInteraction: "#404040" // TODO Name. Right now themeFocusEdit is used for all 'edit' states. Is that correct? Different color!
property string themeTranslationIndicatorBorder: "#7f7f7f"
// Taken out of Constants.js
property string themeChangedStateText: "#99ccff"
}

View File

@@ -1,9 +1,11 @@
set(CLANG_VERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH})
add_qtc_library(ClangSupport
PUBLIC_DEPENDS Utils Sqlite Qt5::Core Qt5::Network
PUBLIC_DEFINES
CLANG_VERSION="${CLANG_VERSION}"
CLANG_RESOURCE_DIR="${CLANG_RESOURCE_DIR}"
CLANG_BINDIR="${CLANG_BIN_DIR}"
CLANG_RESOURCE_DIR="${LLVM_LIBRARY_DIR}/clang/${CLANG_VERSION}/include"
CLANG_BINDIR="${LLVM_TOOLS_BINARY_DIR}"
DEFINES CLANGSUPPORT_BUILD_LIB
SOURCES
alivemessage.cpp alivemessage.h

View File

@@ -87,7 +87,7 @@ static CppTools::ClangDiagnosticConfig configFor(const QString &tidyChecks,
config.setIsReadOnly(true);
config.setClangOptions(QStringList{QStringLiteral("-Wno-everything")});
config.setClangTidyMode(CppTools::ClangDiagnosticConfig::TidyMode::ChecksPrefixList);
config.setClangTidyChecks(tidyChecks);
config.setClangTidyChecks("-*," + tidyChecks);
config.setClazyChecks(clazyChecks);
return config;
}

View File

@@ -198,9 +198,13 @@ void toFront(const SelectionContext &selectionState)
try {
QmlItemNode node = selectionState.firstSelectedModelNode();
if (node.isValid()) {
signed int maximumZ = getMaxZValue(siblingsForNode(node));
maximumZ++;
node.setVariantProperty("z", maximumZ);
ModelNode modelNode = selectionState.currentSingleSelectedNode();
NodeListProperty parentProperty = modelNode.parentProperty().toNodeListProperty();
const int index = parentProperty.indexOf(modelNode);
const int lastIndex = parentProperty.count() - 1;
if (index != lastIndex)
parentProperty.slide(index, lastIndex);
}
} catch (const RewritingException &e) { //better save then sorry
e.showException();
@@ -215,9 +219,12 @@ void toBack(const SelectionContext &selectionState)
try {
QmlItemNode node = selectionState.firstSelectedModelNode();
if (node.isValid()) {
signed int minimumZ = getMinZValue(siblingsForNode(node));
minimumZ--;
node.setVariantProperty("z", minimumZ);
ModelNode modelNode = selectionState.currentSingleSelectedNode();
NodeListProperty parentProperty = modelNode.parentProperty().toNodeListProperty();
const int index = parentProperty.indexOf(modelNode);
if (index != 0)
parentProperty.slide(index, 0);
}
} catch (const RewritingException &e) { //better save then sorry

View File

@@ -969,13 +969,13 @@ void RewriterView::delayedSetup()
static QString annotationsEnd()
{
const static QString end = QString(" %1*/").arg(annotationsEscapeSequence);
const static QString end = QString("%1*/").arg(annotationsEscapeSequence);
return end;
}
static QString annotationsStart()
{
const static QString start = QString("/*%1 ").arg(annotationsEscapeSequence);
const static QString start = QString("/*%1").arg(annotationsEscapeSequence);
return start;
}
@@ -1000,29 +1000,27 @@ void RewriterView::writeAuxiliaryData()
const QString oldText = m_textModifier->text();
QString newText = oldText;
int startIndex = newText.indexOf(annotationsStart());
int endIndex = newText.indexOf(annotationsEnd());
if (startIndex > 0 && endIndex > 0)
newText.remove(startIndex, endIndex - startIndex + annotationsEnd().length());
newText = newText.trimmed();
newText.append("\n");
const int startIndex = oldText.indexOf(annotationsStart());
const int endIndex = oldText.indexOf(annotationsEnd());
QString auxData = auxiliaryDataAsQML();
const bool replace = startIndex > 0 && endIndex > 0;
if (!auxData.isEmpty()) {
auxData.prepend("\n" + annotationsStart());
auxData.append(annotationsEnd() + "\n");
newText.append(auxData);
auxData.prepend("\n");
auxData.prepend(annotationsStart());
if (!replace)
auxData.prepend("\n");
auxData.append(annotationsEnd());
if (!replace)
auxData.append("\n");
}
QTextCursor tc(m_textModifier->textDocument());
Utils::ChangeSet changeSet;
changeSet.replace(0, oldText.length(), newText);
changeSet.apply(&tc);
if (replace)
m_textModifier->replace(startIndex, endIndex - startIndex + annotationsEnd().length(), auxData);
else
m_textModifier->replace(oldText.length(), 0, auxData);
}
static void checkNode(const QmlJS::SimpleReaderNode::Ptr &node, RewriterView *view);