forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.10'
Conflicts: src/plugins/debugger/cdb/cdbengine.cpp Change-Id: Idcfd19292730d2b0e67816715f7aa2cc0eb71c48
This commit is contained in:
@@ -305,7 +305,7 @@
|
||||
{ "key": "CN", "value": "%{JS: Cpp.className(value('Class'))}" },
|
||||
{ "key": "Base", "value": "%{JS: value('BaseCB') === '' ? value('BaseEdit') : value('BaseCB')}" },
|
||||
{ "key": "isQObject", "value": "%{JS: (value('Base') === 'QObject' || value('Base') === 'QWidget' || value('Base') === 'QMainWindow' || value('Base') === 'QDeclarativeItem' || value('Base') === 'QQuickItem' ) ? 'true' : 'false'}" },
|
||||
{ "key": "GUARD", "value": "%{JS: Cpp.classToHeaderGuard(value('Class'), Util.preferredSuffix('text/x-c++hdr'))}" },
|
||||
{ "key": "GUARD", "value": "%{JS: Cpp.classToHeaderGuard(value('Class'), Util.suffix(value('HdrFileName'))}" },
|
||||
{ "key": "SharedDataInit", "value": "%{JS: value('IncludeQSharedData') ? 'data(new %{CN}Data)' : '' }" }
|
||||
],
|
||||
\endcode
|
||||
|
@@ -25,6 +25,8 @@
|
||||
|
||||
#include "qt5nodeinstanceserver.h"
|
||||
|
||||
#include <QSurfaceFormat>
|
||||
|
||||
#include <QQmlFileSelector>
|
||||
|
||||
#include <QQuickItem>
|
||||
@@ -58,6 +60,12 @@ void Qt5NodeInstanceServer::initializeView()
|
||||
Q_ASSERT(!quickView());
|
||||
|
||||
m_quickView = new QQuickView;
|
||||
|
||||
QSurfaceFormat surfaceFormat = m_quickView->requestedFormat();
|
||||
surfaceFormat.setVersion(4, 1);
|
||||
surfaceFormat.setProfile(QSurfaceFormat::CoreProfile);
|
||||
m_quickView->setFormat(surfaceFormat);
|
||||
|
||||
DesignerSupport::createOpenGLContext(m_quickView.data());
|
||||
|
||||
if (qEnvironmentVariableIsSet("QML_FILE_SELECTORS")) {
|
||||
|
@@ -1,8 +1,5 @@
|
||||
Item {
|
||||
}
|
||||
|
||||
ColorEditor {
|
||||
caption: "%1"
|
||||
backendValue: backendValues.%2
|
||||
supportGradient: false
|
||||
}
|
||||
|
@@ -2,10 +2,16 @@ Label {
|
||||
text: "%1"
|
||||
tooltip: "%1"
|
||||
}
|
||||
SpinBox {
|
||||
|
||||
SecondColumnLayout {
|
||||
SpinBox {
|
||||
maximumValue: 9999999
|
||||
minimumValue: -9999999
|
||||
backendValue: backendValues.%2
|
||||
Layout.fillWidth: true
|
||||
Layout.maximumWidth: 100
|
||||
}
|
||||
|
||||
ExpandingSpacer {
|
||||
}
|
||||
}
|
||||
|
@@ -2,7 +2,9 @@ Label {
|
||||
text: "%1"
|
||||
tooltip: "%1"
|
||||
}
|
||||
SpinBox {
|
||||
|
||||
SecondColumnLayout {
|
||||
SpinBox {
|
||||
maximumValue: 9999999
|
||||
minimumValue: -9999999
|
||||
decimals: 2
|
||||
@@ -10,4 +12,7 @@ SpinBox {
|
||||
backendValue: backendValues.%2
|
||||
Layout.fillWidth: true
|
||||
Layout.maximumWidth: 100
|
||||
}
|
||||
ExpandingSpacer {
|
||||
}
|
||||
}
|
||||
|
@@ -49,6 +49,7 @@ AutoTypes {
|
||||
|
||||
Type {
|
||||
typeNames: ["color", "QColor"]
|
||||
sourceFile: "StringEditorTemplate.template"
|
||||
sourceFile: "ColorEditorTemplate.template"
|
||||
separateSection: true
|
||||
}
|
||||
}
|
||||
|
@@ -29,6 +29,9 @@ import QtQuick.Layouts 1.0
|
||||
import QtQuick.Controls 1.0 as Controls
|
||||
import QtQuickDesignerTheme 1.0
|
||||
|
||||
import StudioControls 1.0 as StudioControls
|
||||
import StudioTheme 1.0 as StudioTheme
|
||||
|
||||
RowLayout {
|
||||
id: anchorRow
|
||||
|
||||
@@ -71,7 +74,7 @@ RowLayout {
|
||||
rows: 2
|
||||
columns: 2
|
||||
|
||||
Controls.Label {
|
||||
Label {
|
||||
text: qsTr("Target")
|
||||
color: __defaultTextColor
|
||||
elide: Text.ElideRight
|
||||
@@ -85,7 +88,7 @@ RowLayout {
|
||||
}
|
||||
}
|
||||
|
||||
Controls.Label {
|
||||
Label {
|
||||
text: "Margin"
|
||||
color: __defaultTextColor
|
||||
elide: Text.ElideRight
|
||||
@@ -99,6 +102,80 @@ RowLayout {
|
||||
backendValue: anchorMargin
|
||||
}
|
||||
|
||||
StudioControls.ButtonRow {
|
||||
id: buttonRow
|
||||
actionIndicatorVisible: false
|
||||
|
||||
property variant relativeTarget: anchorBackend.relativeAnchorTargetTop
|
||||
|
||||
onRelativeTargetChanged: {
|
||||
|
||||
buttonSameEdge.checked = false
|
||||
buttonCenter.checked = false
|
||||
buttonOppositeEdge.checked = false
|
||||
|
||||
if (relativeTarget == AnchorBindingProxy.SameEdge) {
|
||||
if (!invertRelativeTargets) {
|
||||
buttonSameEdge.checked = true
|
||||
} else {
|
||||
buttonOppositeEdge.checked = true
|
||||
}
|
||||
} else if (relativeTarget == AnchorBindingProxy.OppositeEdge) {
|
||||
if (!invertRelativeTargets) {
|
||||
buttonOppositeEdge.checked = true
|
||||
} else {
|
||||
buttonSameEdge.checked = true
|
||||
}
|
||||
} else if (relativeTarget == AnchorBindingProxy.Center) {
|
||||
buttonCenter.checked = true
|
||||
}
|
||||
}
|
||||
|
||||
StudioControls.ButtonGroup {
|
||||
id: group
|
||||
}
|
||||
|
||||
StudioControls.AbstractButton {
|
||||
id: buttonSameEdge
|
||||
buttonIcon: verticalAnchor ? StudioTheme.Constants.anchorTop : StudioTheme.Constants.anchorLeft
|
||||
checkable: true
|
||||
autoExclusive: true
|
||||
StudioControls.ButtonGroup.group: group
|
||||
//tooltip: verticalAnchor ? qsTr("Anchor to the top of the target.") : qsTr("Anchor to the left of the target.")
|
||||
onClicked: {
|
||||
if (!invertRelativeTargets)
|
||||
sameEdgeButtonClicked();
|
||||
else
|
||||
oppositeEdgeButtonClicked();
|
||||
}
|
||||
}
|
||||
StudioControls.AbstractButton {
|
||||
id: buttonCenter
|
||||
buttonIcon: verticalAnchor ? StudioTheme.Constants.centerVertical : StudioTheme.Constants.centerHorizontal
|
||||
checkable: true
|
||||
autoExclusive: true
|
||||
StudioControls.ButtonGroup.group: group
|
||||
//tooltip: verticalAnchor ? qsTr("Anchor to the vertical center of the target.") : qsTr("Anchor to the horizontal center of the target.")
|
||||
onClicked: centerButtonClicked();
|
||||
}
|
||||
StudioControls.AbstractButton {
|
||||
id: buttonOppositeEdge
|
||||
buttonIcon: verticalAnchor ? StudioTheme.Constants.anchorBottom : StudioTheme.Constants.anchorRight
|
||||
checkable: true
|
||||
autoExclusive: true
|
||||
StudioControls.ButtonGroup.group: group
|
||||
//tooltip: verticalAnchor ? qsTr("Anchor to the bottom of the target.") : qsTr("Anchor to the right of the target.")
|
||||
onClicked: {
|
||||
if (!invertRelativeTargets)
|
||||
oppositeEdgeButtonClicked();
|
||||
else
|
||||
sameEdgeButtonClicked();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
ButtonRow {
|
||||
id: buttonRow
|
||||
|
||||
@@ -157,6 +234,7 @@ RowLayout {
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -40,6 +40,7 @@ Rectangle {
|
||||
|
||||
ScrollView {
|
||||
anchors.fill: parent
|
||||
horizontalScrollBarPolicy: Qt.ScrollBarAlwaysOff
|
||||
|
||||
Column {
|
||||
y: -1
|
||||
|
@@ -25,21 +25,12 @@
|
||||
|
||||
import QtQuick 2.1
|
||||
import HelperWidgets 2.0
|
||||
import StudioControls 1.0 as StudioControls
|
||||
import StudioTheme 1.0 as StudioTheme
|
||||
|
||||
Row {
|
||||
id: alignmentHorizontalButtons
|
||||
|
||||
RoundedPanel {
|
||||
width: 16
|
||||
height: parent.height
|
||||
roundLeft: true
|
||||
ExtendedFunctionButton {
|
||||
x: 2
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
backendValue: alignmentHorizontalButtons.backendValue
|
||||
}
|
||||
}
|
||||
|
||||
property bool blueHighlight: false
|
||||
|
||||
property variant backendValue: backendValues.horizontalAlignment;
|
||||
@@ -48,19 +39,20 @@ Row {
|
||||
|
||||
property bool baseStateFlag: isBaseState;
|
||||
|
||||
property color __currentColor: blueHighlight ? StudioTheme.Values.themeInteraction : StudioTheme.Values.themeTextColor
|
||||
|
||||
onValueChanged: {
|
||||
buttonRow.initalChecked = 0
|
||||
buttonRow.checkedIndex = 0
|
||||
buttonAlignLeft.checked = true
|
||||
buttonAlignHCenter.checked = false
|
||||
buttonAlignRight.checked = false
|
||||
|
||||
if (value !== undefined) {
|
||||
if (value === "AlignLeft") {
|
||||
buttonRow.initalChecked = 0
|
||||
buttonRow.checkedIndex = 0
|
||||
buttonAlignLeft.checked = true
|
||||
} else if (value === "AlignHCenter") {
|
||||
buttonRow.initalChecked = 1
|
||||
buttonRow.checkedIndex = 1
|
||||
buttonAlignHCenter.checked = true
|
||||
} else if (value === "AlignRight") {
|
||||
buttonRow.initalChecked = 2
|
||||
buttonRow.checkedIndex = 2
|
||||
buttonAlignRight.checked = true
|
||||
}
|
||||
}
|
||||
evaluate()
|
||||
@@ -89,27 +81,54 @@ Row {
|
||||
}
|
||||
}
|
||||
|
||||
ButtonRow {
|
||||
id: buttonRow
|
||||
exclusive: true
|
||||
ExtendedFunctionLogic {
|
||||
id: extFuncLogic
|
||||
backendValue: alignmentHorizontalButtons.backendValue
|
||||
}
|
||||
|
||||
ButtonRowButton {
|
||||
roundLeftButton: false
|
||||
iconSource: "image://icons/alignment-left" + (blueHighlight ? "-h" : "")
|
||||
StudioControls.ButtonRow {
|
||||
id: buttonRow
|
||||
actionIndicatorVisible: true
|
||||
|
||||
actionIndicator.icon.color: extFuncLogic.color
|
||||
actionIndicator.icon.text: extFuncLogic.glyph
|
||||
actionIndicator.onClicked: extFuncLogic.show()
|
||||
|
||||
StudioControls.ButtonGroup {
|
||||
id: group
|
||||
}
|
||||
|
||||
StudioControls.AbstractButton {
|
||||
id: buttonAlignLeft
|
||||
buttonIcon: StudioTheme.Constants.textAlignLeft
|
||||
checkable: true
|
||||
autoExclusive: true
|
||||
StudioControls.ButtonGroup.group: group
|
||||
iconColor: __currentColor
|
||||
onClicked: {
|
||||
if (checked)
|
||||
backendValue.setEnumeration("Text", "AlignLeft")
|
||||
}
|
||||
}
|
||||
ButtonRowButton {
|
||||
iconSource: "image://icons/alignment-center" + (blueHighlight ? "-h" : "")
|
||||
StudioControls.AbstractButton {
|
||||
id: buttonAlignHCenter
|
||||
buttonIcon: StudioTheme.Constants.textAlignCenter
|
||||
checkable: true
|
||||
autoExclusive: true
|
||||
StudioControls.ButtonGroup.group: group
|
||||
iconColor: __currentColor
|
||||
onClicked: {
|
||||
if (checked)
|
||||
backendValue.setEnumeration("Text", "AlignHCenter")
|
||||
}
|
||||
}
|
||||
ButtonRowButton {
|
||||
iconSource: "image://icons/alignment-right" + (blueHighlight ? "-h" : "")
|
||||
StudioControls.AbstractButton {
|
||||
id: buttonAlignRight
|
||||
buttonIcon: StudioTheme.Constants.textAlignRight
|
||||
checkable: true
|
||||
autoExclusive: true
|
||||
StudioControls.ButtonGroup.group: group
|
||||
iconColor: __currentColor
|
||||
onClicked: {
|
||||
if (checked)
|
||||
backendValue.setEnumeration("Text", "AlignRight")
|
||||
|
@@ -25,22 +25,12 @@
|
||||
|
||||
import QtQuick 2.1
|
||||
import HelperWidgets 2.0
|
||||
import StudioControls 1.0 as StudioControls
|
||||
import StudioTheme 1.0 as StudioTheme
|
||||
|
||||
Row {
|
||||
id: alignmentVerticalButtons
|
||||
|
||||
RoundedPanel {
|
||||
width: 16
|
||||
height: parent.height
|
||||
roundLeft: true
|
||||
|
||||
ExtendedFunctionButton {
|
||||
x: 2
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
backendValue: alignmentVerticalButtons.backendValue
|
||||
}
|
||||
}
|
||||
|
||||
property bool blueHighlight: false
|
||||
|
||||
property variant backendValue: backendValues.verticalAlignment;
|
||||
@@ -49,19 +39,20 @@ Row {
|
||||
|
||||
property bool baseStateFlag: isBaseState;
|
||||
|
||||
property color __currentColor: blueHighlight ? StudioTheme.Values.themeInteraction : StudioTheme.Values.themeTextColor
|
||||
|
||||
onValueChanged: {
|
||||
buttonRow.initalChecked = 0
|
||||
buttonRow.checkedIndex = 0
|
||||
buttonAlignTop.checked = true
|
||||
buttonAlignVCenter.checked = false
|
||||
buttonAlignBottom.checked = false
|
||||
|
||||
if (value !== undefined) {
|
||||
if (value === "AlignTop") {
|
||||
buttonRow.initalChecked = 0
|
||||
buttonRow.checkedIndex = 0
|
||||
buttonAlignTop.checked = true
|
||||
} else if (value === "AlignVCenter") {
|
||||
buttonRow.initalChecked = 1
|
||||
buttonRow.checkedIndex = 1
|
||||
buttonAlignVCenter.checked = true
|
||||
} else if (value === "AlignBottom") {
|
||||
buttonRow.initalChecked = 2
|
||||
buttonRow.checkedIndex = 2
|
||||
buttonAlignBottom.checked = true
|
||||
}
|
||||
}
|
||||
evaluate()
|
||||
@@ -90,27 +81,54 @@ Row {
|
||||
}
|
||||
}
|
||||
|
||||
ButtonRow {
|
||||
id: buttonRow
|
||||
exclusive: true
|
||||
ExtendedFunctionLogic {
|
||||
id: extFuncLogic
|
||||
backendValue: alignmentVerticalButtons.backendValue
|
||||
}
|
||||
|
||||
ButtonRowButton {
|
||||
roundLeftButton: false
|
||||
iconSource: "image://icons/alignment-top" + (blueHighlight ? "-h" : "")
|
||||
StudioControls.ButtonRow {
|
||||
id: buttonRow
|
||||
actionIndicatorVisible: true
|
||||
|
||||
actionIndicator.icon.color: extFuncLogic.color
|
||||
actionIndicator.icon.text: extFuncLogic.glyph
|
||||
actionIndicator.onClicked: extFuncLogic.show()
|
||||
|
||||
StudioControls.ButtonGroup {
|
||||
id: group
|
||||
}
|
||||
|
||||
StudioControls.AbstractButton {
|
||||
id: buttonAlignTop
|
||||
buttonIcon: StudioTheme.Constants.textAlignTop
|
||||
checkable: true
|
||||
autoExclusive: true
|
||||
StudioControls.ButtonGroup.group: group
|
||||
iconColor: __currentColor
|
||||
onClicked: {
|
||||
if (checked)
|
||||
backendValue.setEnumeration("Text", "AlignTop")
|
||||
}
|
||||
}
|
||||
ButtonRowButton {
|
||||
iconSource: "image://icons/alignment-middle" + (blueHighlight ? "-h" : "")
|
||||
StudioControls.AbstractButton {
|
||||
id: buttonAlignVCenter
|
||||
buttonIcon: StudioTheme.Constants.textAlignMiddle
|
||||
checkable: true
|
||||
autoExclusive: true
|
||||
StudioControls.ButtonGroup.group: group
|
||||
iconColor: __currentColor
|
||||
onClicked: {
|
||||
if (checked)
|
||||
backendValue.setEnumeration("Text", "AlignVCenter")
|
||||
}
|
||||
}
|
||||
ButtonRowButton {
|
||||
iconSource: "image://icons/alignment-bottom" + (blueHighlight ? "-h" : "")
|
||||
StudioControls.AbstractButton {
|
||||
id: buttonAlignBottom
|
||||
buttonIcon: StudioTheme.Constants.textAlignBottom
|
||||
checkable: true
|
||||
autoExclusive: true
|
||||
StudioControls.ButtonGroup.group: group
|
||||
iconColor: __currentColor
|
||||
onClicked: {
|
||||
if (checked)
|
||||
backendValue.setEnumeration("Text", "AlignBottom")
|
||||
|
@@ -25,16 +25,25 @@
|
||||
|
||||
import QtQuick 2.1
|
||||
import HelperWidgets 2.0
|
||||
import StudioControls 1.0 as StudioControls
|
||||
import StudioTheme 1.0 as StudioTheme
|
||||
|
||||
StudioControls.ButtonRow {
|
||||
id: buttonRow
|
||||
|
||||
ButtonRow {
|
||||
enabled: anchorBackend.hasParent
|
||||
opacity: enabled ? 1 : 0.5
|
||||
|
||||
id: buttonRow
|
||||
actionIndicatorVisible: false
|
||||
|
||||
ButtonRowButton {
|
||||
iconSource: "image://icons/anchor-top"
|
||||
tooltip: qsTr("Anchor item to the top.")
|
||||
StudioControls.ButtonGroup {
|
||||
id: group
|
||||
}
|
||||
|
||||
StudioControls.AbstractButton {
|
||||
checkable: true
|
||||
buttonIcon: StudioTheme.Constants.anchorTop
|
||||
//tooltip: qsTr("Anchor item to the top.")
|
||||
|
||||
property bool topAnchored: anchorBackend.topAnchored
|
||||
onTopAnchoredChanged: {
|
||||
@@ -52,9 +61,10 @@ ButtonRow {
|
||||
}
|
||||
}
|
||||
|
||||
ButtonRowButton {
|
||||
iconSource: "image://icons/anchor-bottom"
|
||||
tooltip: qsTr("Anchor item to the bottom.")
|
||||
StudioControls.AbstractButton {
|
||||
checkable: true
|
||||
buttonIcon: StudioTheme.Constants.anchorBottom
|
||||
//tooltip: qsTr("Anchor item to the bottom.")
|
||||
|
||||
property bool bottomAnchored: anchorBackend.bottomAnchored
|
||||
onBottomAnchoredChanged: {
|
||||
@@ -73,9 +83,10 @@ ButtonRow {
|
||||
|
||||
}
|
||||
|
||||
ButtonRowButton {
|
||||
iconSource: "image://icons/anchor-left"
|
||||
tooltip: qsTr("Anchor item to the left.")
|
||||
StudioControls.AbstractButton {
|
||||
checkable: true
|
||||
buttonIcon: StudioTheme.Constants.anchorLeft
|
||||
//tooltip: qsTr("Anchor item to the left.")
|
||||
|
||||
property bool leftAnchored: anchorBackend.leftAnchored
|
||||
onLeftAnchoredChanged: {
|
||||
@@ -93,9 +104,10 @@ ButtonRow {
|
||||
}
|
||||
}
|
||||
|
||||
ButtonRowButton {
|
||||
iconSource: "image://icons/anchor-right"
|
||||
tooltip: qsTr("Anchor item to the right.")
|
||||
StudioControls.AbstractButton {
|
||||
checkable: true
|
||||
buttonIcon: StudioTheme.Constants.anchorRight
|
||||
//tooltip: qsTr("Anchor item to the right.")
|
||||
|
||||
property bool rightAnchored: anchorBackend.rightAnchored
|
||||
onRightAnchoredChanged: {
|
||||
@@ -113,14 +125,15 @@ ButtonRow {
|
||||
}
|
||||
}
|
||||
|
||||
ButtonRowButton {
|
||||
StudioControls.AbstractButton {
|
||||
enabled: false
|
||||
}
|
||||
|
||||
|
||||
ButtonRowButton {
|
||||
iconSource: "image://icons/anchor-fill"
|
||||
tooltip: qsTr("Fill parent item.")
|
||||
StudioControls.AbstractButton {
|
||||
checkable: true
|
||||
buttonIcon: StudioTheme.Constants.anchorFill
|
||||
//tooltip: qsTr("Fill parent item.")
|
||||
|
||||
property bool isFilled: anchorBackend.isFilled
|
||||
onIsFilledChanged: {
|
||||
@@ -136,13 +149,14 @@ ButtonRow {
|
||||
}
|
||||
}
|
||||
|
||||
ButtonRowButton {
|
||||
StudioControls.AbstractButton {
|
||||
enabled: false
|
||||
}
|
||||
|
||||
ButtonRowButton {
|
||||
iconSource: "image://icons/anchor-vertical"
|
||||
tooltip: qsTr("Anchor item vertically.")
|
||||
StudioControls.AbstractButton {
|
||||
checkable: true
|
||||
buttonIcon: StudioTheme.Constants.centerVertical
|
||||
//tooltip: qsTr("Anchor item vertically.")
|
||||
|
||||
property bool verticalCentered: anchorBackend.verticalCentered;
|
||||
onVerticalCenteredChanged: {
|
||||
@@ -162,9 +176,10 @@ ButtonRow {
|
||||
}
|
||||
}
|
||||
|
||||
ButtonRowButton {
|
||||
iconSource: "image://icons/anchor-horizontal"
|
||||
tooltip: qsTr("Anchor item horizontally.")
|
||||
StudioControls.AbstractButton {
|
||||
checkable: true
|
||||
buttonIcon: StudioTheme.Constants.centerHorizontal
|
||||
//tooltip: qsTr("Anchor item horizontally.")
|
||||
|
||||
property bool horizontalCentered: anchorBackend.horizontalCentered;
|
||||
onHorizontalCenteredChanged: {
|
||||
|
@@ -25,33 +25,31 @@
|
||||
|
||||
import QtQuick 2.1
|
||||
import HelperWidgets 2.0
|
||||
import StudioControls 1.0 as StudioControls
|
||||
import StudioTheme 1.0 as StudioTheme
|
||||
|
||||
ButtonRowButton {
|
||||
id: boolButtonRowButton
|
||||
StudioControls.Button {
|
||||
id: button
|
||||
|
||||
property variant backendValue
|
||||
|
||||
property bool isHighlighted: false
|
||||
|
||||
property string standardIconSource
|
||||
property string highlightedIconSource
|
||||
|
||||
leftPadding: 18
|
||||
|
||||
iconSource: isHighlighted ? highlightedIconSource : standardIconSource
|
||||
iconColor: isHighlighted ? StudioTheme.Values.themeInteraction : StudioTheme.Values.themeTextColor
|
||||
actionIndicatorVisible: true
|
||||
checkable: true
|
||||
|
||||
QtObject {
|
||||
id: innerObject
|
||||
function evaluate() {
|
||||
if (innerObject.baseStateFlag) {
|
||||
if (boolButtonRowButton.backendValue !== null
|
||||
if (button.backendValue !== null
|
||||
&& innerObject.isInModel) {
|
||||
isHighlighted = true
|
||||
} else {
|
||||
isHighlighted = false
|
||||
}
|
||||
} else {
|
||||
if (boolButtonRowButton.backendValue !== null
|
||||
if (button.backendValue !== null
|
||||
&& innerObject.isInSubState) {
|
||||
isHighlighted = true
|
||||
} else {
|
||||
@@ -63,27 +61,30 @@ ButtonRowButton {
|
||||
property bool baseStateFlag: isBaseState
|
||||
onBaseStateFlagChanged: evaluate()
|
||||
|
||||
property bool isInModel: boolButtonRowButton.backendValue.isInModel
|
||||
property bool isInModel: button.backendValue.isInModel
|
||||
onIsInModelChanged: evaluate()
|
||||
|
||||
|
||||
property bool isInSubState: boolButtonRowButton.backendValue.isInSubState
|
||||
property bool isInSubState: button.backendValue.isInSubState
|
||||
onIsInSubStateChanged: evaluate()
|
||||
|
||||
property variant theValue: boolButtonRowButton.backendValue.value
|
||||
property variant theValue: button.backendValue.value
|
||||
onTheValueChanged: {
|
||||
evaluate()
|
||||
boolButtonRowButton.checked = innerObject.theValue
|
||||
button.checked = innerObject.theValue
|
||||
}
|
||||
}
|
||||
|
||||
onCheckedChanged: {
|
||||
boolButtonRowButton.backendValue.value = checked
|
||||
button.backendValue.value = button.checked
|
||||
}
|
||||
|
||||
ExtendedFunctionButton {
|
||||
backendValue: boolButtonRowButton.backendValue
|
||||
x: 2
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
ExtendedFunctionLogic {
|
||||
id: extFuncLogic
|
||||
backendValue: button.backendValue
|
||||
}
|
||||
|
||||
actionIndicator.icon.color: extFuncLogic.color
|
||||
actionIndicator.icon.text: extFuncLogic.glyph
|
||||
actionIndicator.onClicked: extFuncLogic.show()
|
||||
}
|
||||
|
@@ -24,10 +24,10 @@
|
||||
****************************************************************************/
|
||||
|
||||
import QtQuick 2.1
|
||||
import StudioControls 1.0 as Controls
|
||||
import StudioControls 1.0 as StudioControls
|
||||
import QtQuick.Controls.Styles 1.1
|
||||
|
||||
Controls.CheckBox {
|
||||
StudioControls.CheckBox {
|
||||
id: checkBox
|
||||
|
||||
property variant backendValue
|
||||
@@ -47,14 +47,14 @@ Controls.CheckBox {
|
||||
id: colorLogic
|
||||
backendValue: checkBox.backendValue
|
||||
onValueFromBackendChanged: {
|
||||
if (checkBox.checked !== colorLogic.valueFromBackend)
|
||||
checkBox.checked = colorLogic.valueFromBackend;
|
||||
if (colorLogic.valueFromBackend !== undefined
|
||||
&& checkBox.checked !== colorLogic.valueFromBackend)
|
||||
checkBox.checked = colorLogic.valueFromBackend
|
||||
}
|
||||
}
|
||||
|
||||
onCheckedChanged: {
|
||||
if (backendValue.value !== checkBox.checked)
|
||||
backendValue.value = checkBox.checked;
|
||||
backendValue.value = checkBox.checked
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -28,20 +28,21 @@ 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: Theme.color(Theme.PanelTextColorLight)
|
||||
property color textColor: StudioTheme.Values.themeTextColor//Theme.color(Theme.PanelTextColorLight)
|
||||
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: Theme.color(Theme.PanelTextColorLight)
|
||||
readonly property color __changedTextColor: Theme.color(Theme.QmlDesigner_HighlightColor)
|
||||
property color __defaultTextColor: StudioTheme.Values.themeTextColor//Theme.color(Theme.PanelTextColorLight)
|
||||
readonly property color __changedTextColor: StudioTheme.Values.themeInteraction//Theme.color(Theme.QmlDesigner_HighlightColor)
|
||||
|
||||
onBackendValueChanged: {
|
||||
evaluate();
|
||||
|
@@ -24,15 +24,16 @@
|
||||
****************************************************************************/
|
||||
|
||||
import QtQuick 2.1
|
||||
import StudioControls 1.0 as Controls
|
||||
import QtQuick.Controls.Styles 1.1
|
||||
import StudioControls 1.0 as StudioControls
|
||||
import StudioTheme 1.0 as StudioTheme
|
||||
|
||||
Controls.ComboBox {
|
||||
StudioControls.ComboBox {
|
||||
id: comboBox
|
||||
|
||||
property variant backendValue
|
||||
|
||||
labelColor: colorLogic.textColor
|
||||
labelColor: edit ? StudioTheme.Values.themeTextColor : colorLogic.textColor
|
||||
property string scope: "Qt"
|
||||
|
||||
property bool useInteger: false
|
||||
|
@@ -54,7 +54,7 @@ Item {
|
||||
// translations are a special case
|
||||
extendedFunctionButton.glyph = StudioTheme.Constants.actionIcon
|
||||
} else {
|
||||
extendedFunctionButton.glyph = StudioTheme.Constants.closeCross
|
||||
extendedFunctionButton.glyph = StudioTheme.Constants.actionIconBinding
|
||||
extendedFunctionButton.color = StudioTheme.Values.themeInteraction
|
||||
}
|
||||
} else {
|
||||
|
@@ -25,6 +25,7 @@
|
||||
|
||||
import QtQuick 2.1
|
||||
import HelperWidgets 2.0
|
||||
import StudioTheme 1.0 as StudioTheme
|
||||
|
||||
ButtonRow {
|
||||
|
||||
@@ -34,25 +35,31 @@ ButtonRow {
|
||||
property variant strikeout: backendValues.font_strikeout
|
||||
|
||||
BoolButtonRowButton {
|
||||
standardIconSource: "image://icons/style-bold"
|
||||
highlightedIconSource: "image://icons/style-bold-h"
|
||||
buttonIcon: StudioTheme.Constants.fontStyleBold
|
||||
backendValue: bold
|
||||
}
|
||||
Item {
|
||||
width: 4
|
||||
height: 4
|
||||
}
|
||||
BoolButtonRowButton {
|
||||
standardIconSource: "image://icons/style-italic"
|
||||
highlightedIconSource: "image://icons/style-italic-h"
|
||||
buttonIcon: StudioTheme.Constants.fontStyleItalic
|
||||
backendValue: italic
|
||||
}
|
||||
Item {
|
||||
width: 4
|
||||
height: 4
|
||||
}
|
||||
BoolButtonRowButton {
|
||||
standardIconSource: "image://icons/style-underline"
|
||||
highlightedIconSource: "image://icons/style-underline-h"
|
||||
buttonIcon: StudioTheme.Constants.fontStyleUnderline
|
||||
backendValue: underline
|
||||
}
|
||||
|
||||
Item {
|
||||
width: 4
|
||||
height: 4
|
||||
}
|
||||
BoolButtonRowButton {
|
||||
standardIconSource: "image://icons/style-strikeout"
|
||||
highlightedIconSource: "image://icons/style-strikeout-h"
|
||||
buttonIcon: StudioTheme.Constants.fontStyleStrikethrough
|
||||
backendValue: strikeout
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -37,7 +37,7 @@ Controls.Label {
|
||||
// workaround because PictureSpecifics.qml still use this
|
||||
property alias toolTip: toolTipArea.tooltip
|
||||
|
||||
width: Math.max(Math.min(240, parent.width - 220), 80)
|
||||
width: Math.max(Math.min(240, parent.width - 280), 50)
|
||||
color: Theme.color(Theme.PanelTextColorLight)
|
||||
elide: Text.ElideRight
|
||||
|
||||
|
@@ -24,17 +24,18 @@
|
||||
****************************************************************************/
|
||||
|
||||
import QtQuick 2.2
|
||||
import StudioControls 1.0 as Controls
|
||||
import StudioControls 1.0 as StudioControls
|
||||
import StudioTheme 1.0 as StudioTheme
|
||||
import QtQuick.Controls.Styles 1.0
|
||||
import QtQuickDesignerTheme 1.0
|
||||
|
||||
Controls.TextField {
|
||||
StudioControls.TextField {
|
||||
id: lineEdit
|
||||
|
||||
property variant backendValue
|
||||
property color borderColor: "#222"
|
||||
property color highlightColor: "orange"
|
||||
color: colorLogic.textColor
|
||||
color: lineEdit.edit ? StudioTheme.Values.themeTextColor : colorLogic.textColor
|
||||
|
||||
property bool showTranslateCheckBox: true
|
||||
translationIndicatorVisible: showTranslateCheckBox
|
||||
|
@@ -26,6 +26,7 @@
|
||||
import QtQuick 2.1
|
||||
import QtQuick.Controls.Styles 1.1
|
||||
import StudioControls 1.0 as StudioControls
|
||||
import StudioTheme 1.0 as StudioTheme
|
||||
|
||||
Item {
|
||||
id: wrapper
|
||||
@@ -40,7 +41,7 @@ Item {
|
||||
property alias backendValue: spinBox.backendValue
|
||||
property alias sliderIndicatorVisible: spinBox.sliderIndicatorVisible
|
||||
|
||||
width: 120
|
||||
width: 96
|
||||
implicitHeight: spinBox.height
|
||||
|
||||
property bool __initialized: false
|
||||
@@ -91,7 +92,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
labelColor: colorLogic.textColor
|
||||
labelColor: edit ? StudioTheme.Values.themeTextColor : colorLogic.textColor
|
||||
|
||||
onCompressedValueModified: {
|
||||
if (backendValue.value !== realValue)
|
||||
|
@@ -31,6 +31,7 @@ T.AbstractButton {
|
||||
id: myButton
|
||||
|
||||
property alias buttonIcon: buttonIcon.text
|
||||
property alias iconColor: buttonIcon.color
|
||||
property alias backgroundVisible: buttonBackground.visible
|
||||
|
||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||
|
@@ -31,9 +31,14 @@ ButtonRow {
|
||||
id: myButtonRow
|
||||
|
||||
property alias buttonIcon: myAbstractButton.buttonIcon
|
||||
property alias iconColor: myAbstractButton.iconColor
|
||||
property alias checkable: myAbstractButton.checkable
|
||||
property alias checked: myAbstractButton.checked
|
||||
|
||||
signal onCheckedChanged()
|
||||
|
||||
AbstractButton {
|
||||
id: myAbstractButton
|
||||
onCheckedChanged: myButtonRow.onCheckedChanged()
|
||||
}
|
||||
}
|
||||
|
@@ -32,9 +32,8 @@ Row {
|
||||
// TODO When using Item as root it won't react to outer layout
|
||||
id: myButtonGroup
|
||||
|
||||
property alias actionIcon: actionIndicator.icon
|
||||
property alias actionIndicator: actionIndicator
|
||||
|
||||
//property bool hover: myCheckBox.hovered // TODO
|
||||
property alias actionIndicatorVisible: actionIndicator.visible
|
||||
property real __actionIndicatorWidth: StudioTheme.Values.squareComponentWidth
|
||||
property real __actionIndicatorHeight: StudioTheme.Values.height
|
||||
|
@@ -108,8 +108,7 @@ Item {
|
||||
|
||||
PropertyChanges {
|
||||
target: translationIndicatorBackground
|
||||
//color: StudioTheme.Values.themeFocusDrag // TODO
|
||||
color: "red"
|
||||
color: StudioTheme.Values.themeInteraction // TODO
|
||||
}
|
||||
},
|
||||
State {
|
||||
|
@@ -37,24 +37,30 @@ QtObject {
|
||||
}
|
||||
|
||||
readonly property string actionIcon: "\u0021"
|
||||
readonly property string anchorBottom: "\u0022"
|
||||
readonly property string anchorFill: "\u0023"
|
||||
readonly property string anchorLeft: "\u0024"
|
||||
readonly property string anchorRight: "\u0025"
|
||||
readonly property string anchorTop: "\u0026"
|
||||
readonly property string centerHorizontal: "\u0027"
|
||||
readonly property string centerVertical: "\u0028"
|
||||
readonly property string closeCross: "\u0029"
|
||||
readonly property string fontStyleBold: "\u002A"
|
||||
readonly property string fontStyleItalic: "\u002B"
|
||||
readonly property string fontStyleStrikethrough: "\u002C"
|
||||
readonly property string fontStyleUnderline: "\u002D"
|
||||
readonly property string textAlignCenter: "\u002E"
|
||||
readonly property string textAlignLeft: "\u002F"
|
||||
readonly property string textAlignRight: "\u0030"
|
||||
readonly property string tickIcon: "\u0031"
|
||||
readonly property string upDownIcon: "\u0032"
|
||||
readonly property string upDownSquare2: "\u0033"
|
||||
readonly property string actionIconBinding: "\u0022"
|
||||
readonly property string anchorBaseline: "\u0023"
|
||||
readonly property string anchorBottom: "\u0024"
|
||||
readonly property string anchorFill: "\u0025"
|
||||
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 closeCross: "\u002B"
|
||||
readonly property string fontStyleBold: "\u002C"
|
||||
readonly property string fontStyleItalic: "\u002D"
|
||||
readonly property string fontStyleStrikethrough: "\u002E"
|
||||
readonly property string fontStyleUnderline: "\u002F"
|
||||
readonly property string textAlignBottom: "\u0030"
|
||||
readonly property string textAlignCenter: "\u0031"
|
||||
readonly property string textAlignLeft: "\u0032"
|
||||
readonly property string textAlignMiddle: "\u0033"
|
||||
readonly property string textAlignRight: "\u0034"
|
||||
readonly property string textAlignTop: "\u0035"
|
||||
readonly property string tickIcon: "\u0036"
|
||||
readonly property string triState: "\u0037"
|
||||
readonly property string upDownIcon: "\u0038"
|
||||
readonly property string upDownSquare2: "\u0039"
|
||||
|
||||
readonly property font iconFont: Qt.font({
|
||||
"family": controlIcons.name,
|
||||
|
Binary file not shown.
@@ -1,7 +1,6 @@
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.1)
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
PROJECT(%{TestCaseName}
|
||||
LANGUAGES CXX)
|
||||
project(%{TestCaseName} LANGUAGES CXX)
|
||||
|
||||
@if "%{TestFrameWork}" == "QtTest"
|
||||
|
||||
@@ -10,38 +9,46 @@ find_package(Qt5Test REQUIRED)
|
||||
find_package(Qt5Gui REQUIRED)
|
||||
@endif
|
||||
|
||||
SET(CMAKE_AUTOMOC ON)
|
||||
SET(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
SET(CMAKE_CXX_STANDARD 11)
|
||||
SET(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
ENABLE_TESTING()
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
add_executable(${PROJECT_NAME} %{TestCaseFileWithCppSuffix})
|
||||
add_test(${PROJECT_NAME} COMMAND ${PROJECT_NAME})
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
enable_testing()
|
||||
|
||||
add_executable(%{TestCaseName} %{TestCaseFileWithCppSuffix})
|
||||
add_test(%{TestCaseName} COMMAND %{TestCaseName})
|
||||
|
||||
@if "%{RequireGUI}" == "true"
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Gui Qt5::Test)
|
||||
target_link_libraries(%{TestCaseName} PRIVATE Qt5::Gui Qt5::Test)
|
||||
@else
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Test)
|
||||
target_link_libraries(%{TestCaseName} PRIVATE Qt5::Test)
|
||||
@endif
|
||||
|
||||
@endif
|
||||
@if "%{TestFrameWork}" == "QtQuickTest"
|
||||
find_package(Qt5QuickTest REQUIRED)
|
||||
|
||||
SET(CMAKE_AUTOMOC ON)
|
||||
SET(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
SET(CMAKE_CXX_STANDARD 11)
|
||||
SET(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
ENABLE_TESTING()
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
enable_testing()
|
||||
|
||||
# no need to copy around qml test files for shadow builds - just set the respective define
|
||||
add_definitions(-DQUICK_TEST_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
||||
add_executable(${PROJECT_NAME} %{MainCppName})
|
||||
add_test(${PROJECT_NAME} COMMAND ${PROJECT_NAME})
|
||||
add_executable(%{TestCaseName} %{MainCppName})
|
||||
add_test(%{TestCaseName} COMMAND %{TestCaseName})
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::QuickTest)
|
||||
target_link_libraries(%{TestCaseName} PRIVATE Qt5::QuickTest)
|
||||
|
||||
@endif
|
||||
@if "%{TestFrameWork}" == "GTest"
|
||||
@@ -53,14 +60,14 @@ add_definitions(-DGTEST_LANGUAGE_CXX11)
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
if ($ENV{GOOGLETEST_DIR})
|
||||
SET(GOOGLETEST_DIR $ENV{GOOGLETEST_DIR})
|
||||
set(GOOGLETEST_DIR $ENV{GOOGLETEST_DIR})
|
||||
else ()
|
||||
message(WARNING "Using googletest src dir specified at Qt Creator wizard")
|
||||
SET(GOOGLETEST_DIR "%{GTestRepository}")
|
||||
set(GOOGLETEST_DIR "%{GTestRepository}")
|
||||
endif ()
|
||||
if (EXISTS ${GOOGLETEST_DIR})
|
||||
SET(GTestSrc ${GOOGLETEST_DIR}/googletest)
|
||||
SET(GMockSrc ${GOOGLETEST_DIR}/googlemock)
|
||||
set(GTestSrc ${GOOGLETEST_DIR}/googletest)
|
||||
set(GMockSrc ${GOOGLETEST_DIR}/googlemock)
|
||||
else ()
|
||||
message( FATAL_ERROR "No googletest src dir found - set GOOGLETEST_DIR to enable!")
|
||||
endif ()
|
||||
@@ -68,19 +75,22 @@ endif ()
|
||||
|
||||
include_directories(${GTestSrc} ${GTestSrc}/include ${GMockSrc} ${GMockSrc}/include)
|
||||
|
||||
add_executable(${PROJECT_NAME} %{MainCppName} %{TestCaseFileWithHeaderSuffix}
|
||||
add_executable(%{TestCaseName} %{MainCppName} %{TestCaseFileWithHeaderSuffix}
|
||||
${GTestSrc}/src/gtest-all.cc
|
||||
${GMockSrc}/src/gmock-all.cc)
|
||||
add_test(${PROJECT_NAME} COMMAND ${PROJECT_NAME})
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE Threads::Threads)
|
||||
add_test(%{TestCaseName} COMMAND %{TestCaseName})
|
||||
target_link_libraries(%{TestCaseName} PRIVATE Threads::Threads)
|
||||
|
||||
@endif
|
||||
@if "%{TestFrameWork}" == "BoostTest"
|
||||
SET(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
ENABLE_TESTING()
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
add_executable(${PROJECT_NAME} %{MainCppName})
|
||||
add_test(${PROJECT_NAME} COMMAND ${PROJECT_NAME})
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
enable_testing()
|
||||
|
||||
add_executable(%{TestCaseName} %{MainCppName})
|
||||
add_test(%{TestCaseName} COMMAND %{TestCaseName})
|
||||
|
||||
if (DEFINED ENV{BOOST_INCLUDE_DIR})
|
||||
set(BOOST_INCLUDE_DIR $ENV{BOOST_INCLUDE_DIR})
|
||||
|
@@ -17,7 +17,7 @@
|
||||
{ "key": "CN", "value": "%{JS: Cpp.className(value('Class'))}" },
|
||||
{ "key": "Base", "value": "%{JS: value('BaseCB') === '' ? value('BaseEdit') : value('BaseCB')}" },
|
||||
{ "key": "isQObject", "value": "%{JS: [ 'QObject', 'QWidget', 'QMainWindow', 'QDeclarativeItem', 'QQuickItem'].indexOf(value('Base')) >= 0 }" },
|
||||
{ "key": "GUARD", "value": "%{JS: Cpp.headerGuard(value('HdrFileName'))}" },
|
||||
{ "key": "GUARD", "value": "%{JS: Cpp.classToHeaderGuard(value('Class'), Util.suffix(value('HdrFileName')))}" },
|
||||
{ "key": "SharedDataInit", "value": "%{JS: (value('IncludeQSharedData')) ? 'data(new %{CN}Data)' : '' }" }
|
||||
],
|
||||
|
||||
|
@@ -1,12 +1,17 @@
|
||||
cmake_minimum_required(VERSION 3.0.0)
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
project(%{ProjectName} VERSION 0.1 LANGUAGES CXX)
|
||||
project(%{ProjectName} LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
find_package(Qt5Core)
|
||||
|
||||
add_executable(${PROJECT_NAME} "%{CppFileName}")
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} Qt5::Core)
|
||||
add_executable(%{ProjectName} %{CppFileName})
|
||||
target_link_libraries(%{ProjectName} Qt5::Core)
|
||||
|
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
project(%{ProjectName} LANGUAGES CXX)
|
||||
|
||||
@@ -15,21 +15,21 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
find_package(Qt5 COMPONENTS %{QtModuleUpperCase} REQUIRED)
|
||||
@endif
|
||||
|
||||
add_library(${PROJECT_NAME} %{JS: %{IsStatic} ? 'STATIC' : 'SHARED'}
|
||||
add_library(%{ProjectName} %{JS: %{IsStatic} ? 'STATIC' : 'SHARED'}
|
||||
@if '%{Type}' === 'shared'
|
||||
"%{GlobalHdrFileName}"
|
||||
%{GlobalHdrFileName}
|
||||
@endif
|
||||
"%{SrcFileName}"
|
||||
"%{HdrFileName}"
|
||||
%{SrcFileName}
|
||||
%{HdrFileName}
|
||||
@if %{IsQtPlugin}
|
||||
"%{PluginJsonFile}"
|
||||
%{PluginJsonFile}
|
||||
@endif
|
||||
)
|
||||
@if '%{QtModule}' != 'none'
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::%{QtModuleUpperCase})
|
||||
target_link_libraries(%{ProjectName} PRIVATE Qt5::%{QtModuleUpperCase})
|
||||
@endif
|
||||
@if '%{IsShared}'
|
||||
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE %{LibraryDefine})
|
||||
target_compile_definitions(%{ProjectName} PRIVATE %{LibraryDefine})
|
||||
@endif
|
||||
|
@@ -30,7 +30,7 @@
|
||||
{ "key": "GlobalHdrFileName", "value": "%{JS: Util.fileName(value('ProjectName') + '_global', Util.preferredSuffix('text/x-c++hdr'))}" },
|
||||
{ "key": "TargetInstallPath", "value": "%{JS: value('IsShared') === 'true' ? '/usr/lib' : (value('IsQtPlugin') && value('PluginTargetPath') ? '$$[QT_INSTALL_PLUGINS]/' + value('PluginTargetPath') : '')}" },
|
||||
{ "key": "CN", "value": "%{JS: Cpp.className(value('Class'))}" },
|
||||
{ "key": "GUARD", "value": "%{JS: Cpp.headerGuard(value('HdrFileName'))}" },
|
||||
{ "key": "GUARD", "value": "%{JS: Cpp.classToHeaderGuard(value('Class'), Util.suffix(value('HdrFileName')))}" },
|
||||
{ "key": "GLOBAL_GUARD", "value": "%{JS: Cpp.headerGuard(value('GlobalHdrFileName'))}" }
|
||||
],
|
||||
|
||||
|
@@ -1,4 +1,5 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
project(%{ProjectName})
|
||||
add_executable(${PROJECT_NAME} "%{CFileName}")
|
||||
project(%{ProjectName} LANGUAGES C)
|
||||
|
||||
add_executable(%{ProjectName} %{CFileName})
|
||||
|
@@ -1,4 +1,8 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
project(%{ProjectName})
|
||||
add_executable(${PROJECT_NAME} "%{CppFileName}")
|
||||
project(%{ProjectName} LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
add_executable(%{ProjectName} %{CppFileName})
|
||||
|
@@ -1,23 +1,28 @@
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
project(%{ProjectName} LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
find_package(Qt5 COMPONENTS Core Quick REQUIRED)
|
||||
|
||||
if(ANDROID)
|
||||
add_library(${PROJECT_NAME} SHARED "%{MainCppFileName}" "qml.qrc")
|
||||
add_library(%{ProjectName} SHARED %{MainCppFileName} qml.qrc)
|
||||
else()
|
||||
add_executable(${PROJECT_NAME} "%{MainCppFileName}" "qml.qrc")
|
||||
add_executable(%{ProjectName} %{MainCppFileName} qml.qrc)
|
||||
endif()
|
||||
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Core Qt5::Quick)
|
||||
target_compile_definitions(%{ProjectName}
|
||||
PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
|
||||
target_link_libraries(%{ProjectName}
|
||||
PRIVATE Qt5::Core Qt5::Quick)
|
||||
|
||||
# QtCreator supports the following variables for Android, which are identical to qmake Android variables.
|
||||
# Check http://doc.qt.io/qt-5/deployment-android.html for more information.
|
||||
|
@@ -1,23 +1,25 @@
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
project(%{ProjectName} LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
find_package(Qt5 COMPONENTS Widgets REQUIRED)
|
||||
|
||||
add_executable(${PROJECT_NAME}
|
||||
"%{MainFileName}"
|
||||
"%{SrcFileName}"
|
||||
"%{HdrFileName}"
|
||||
add_executable(%{ProjectName}
|
||||
%{MainFileName}
|
||||
%{SrcFileName}
|
||||
%{HdrFileName}
|
||||
@if %{GenerateForm}
|
||||
"%{FormFileName}"
|
||||
%{FormFileName}
|
||||
@endif
|
||||
)
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Widgets)
|
||||
target_link_libraries(%{ProjectName} PRIVATE Qt5::Widgets)
|
||||
|
@@ -19,7 +19,7 @@
|
||||
{ "key": "MainFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src')}" },
|
||||
{ "key": "UiHdrFileName", "value": "%{JS: (value('BuildSystem') === 'cmake' ? (Util.path(value('FormFileName')) + '/') : '') + 'ui_' + Util.completeBaseName(value('FormFileName')) + '.h'}" },
|
||||
{ "key": "CN", "value": "%{JS: Cpp.className(value('Class'))}" },
|
||||
{ "key": "GUARD", "value": "%{JS: Cpp.headerGuard(value('HdrFileName'))}" }
|
||||
{ "key": "GUARD", "value": "%{JS: Cpp.classToHeaderGuard(value('Class'), Util.suffix(value('HdrFileName')))}" }
|
||||
],
|
||||
|
||||
"pages":
|
||||
|
@@ -173,14 +173,13 @@ void ModelTreeView::dragMoveEvent(QDragMoveEvent *event)
|
||||
if (dynamic_cast<MObject*>(modelElement))
|
||||
accept = true;
|
||||
if (m_autoDelayIndex == dropIndex) {
|
||||
if (m_autoDelayStartTime.elapsed() > 1000) {
|
||||
if (m_autoDelayStartTimer.elapsed() > 1000) {
|
||||
setExpanded(dropIndex, !isExpanded(dropIndex));
|
||||
m_autoDelayStartTime.start();
|
||||
m_autoDelayStartTimer.start();
|
||||
}
|
||||
} else {
|
||||
m_autoDelayIndex = dropIndex;
|
||||
m_autoDelayStartTime = QTime::currentTime();
|
||||
m_autoDelayStartTime.start();
|
||||
m_autoDelayStartTimer.start();
|
||||
}
|
||||
}
|
||||
event->setAccepted(accept);
|
||||
|
@@ -25,11 +25,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QTreeView>
|
||||
#include "qmt/infrastructure/qmt_global.h"
|
||||
#include "qmt/model_ui/modeltreeviewinterface.h"
|
||||
|
||||
#include <QTime>
|
||||
#include <QElapsedTimer>
|
||||
#include <QTreeView>
|
||||
|
||||
namespace qmt {
|
||||
|
||||
@@ -70,7 +70,7 @@ private:
|
||||
SortedTreeModel *m_sortedTreeModel = nullptr;
|
||||
IElementTasks *m_elementTasks = nullptr;
|
||||
QModelIndex m_autoDelayIndex;
|
||||
QTime m_autoDelayStartTime;
|
||||
QElapsedTimer m_autoDelayStartTimer;
|
||||
};
|
||||
|
||||
} // namespace qmt
|
||||
|
@@ -116,7 +116,6 @@ void TestResultItem::updateDescription(const QString &description)
|
||||
static bool isSignificant(ResultType type)
|
||||
{
|
||||
switch (type) {
|
||||
case ResultType::Skip:
|
||||
case ResultType::Benchmark:
|
||||
case ResultType::MessageInfo:
|
||||
case ResultType::MessageInternal:
|
||||
|
@@ -43,7 +43,7 @@
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
#include <QSignalSpy>
|
||||
#include <QTimer>
|
||||
#include <QElapsedTimer>
|
||||
#include <QtTest>
|
||||
#include <QVariant>
|
||||
|
||||
@@ -54,10 +54,10 @@ using namespace ProjectExplorer;
|
||||
|
||||
static bool processEventsUntil(const std::function<bool()> condition, int timeOutInMs = 30000)
|
||||
{
|
||||
QTime t;
|
||||
QElapsedTimer t;
|
||||
t.start();
|
||||
|
||||
forever {
|
||||
while (true) {
|
||||
if (t.elapsed() > timeOutInMs)
|
||||
return false;
|
||||
|
||||
|
@@ -360,9 +360,8 @@ void CMakeProject::updateProjectData(CMakeBuildConfiguration *bc)
|
||||
void CMakeProject::updateQmlJSCodeModel()
|
||||
{
|
||||
QmlJS::ModelManagerInterface *modelManager = QmlJS::ModelManagerInterface::instance();
|
||||
QTC_ASSERT(modelManager, return);
|
||||
|
||||
if (!activeTarget() || !activeTarget()->activeBuildConfiguration())
|
||||
if (!modelManager || !activeTarget() || !activeTarget()->activeBuildConfiguration())
|
||||
return;
|
||||
|
||||
QmlJS::ModelManagerInterface::ProjectInfo projectInfo =
|
||||
|
@@ -53,8 +53,6 @@ MessageOutputWindow::MessageOutputWindow()
|
||||
QColor activeHighlightedText = p.color(QPalette::Active, QPalette::HighlightedText);
|
||||
p.setColor(QPalette::HighlightedText, activeHighlightedText);
|
||||
m_widget->setPalette(p);
|
||||
m_widget->setHighlightBgColor(p.color(QPalette::Highlight));
|
||||
m_widget->setHighlightTextColor(p.color(QPalette::HighlightedText));
|
||||
|
||||
connect(this, &IOutputPane::zoomIn, m_widget, &Core::OutputWindow::zoomIn);
|
||||
connect(this, &IOutputPane::zoomOut, m_widget, &Core::OutputWindow::zoomOut);
|
||||
|
@@ -59,8 +59,6 @@ public:
|
||||
|
||||
IContext *outputWindowContext = nullptr;
|
||||
Utils::OutputFormatter *formatter = nullptr;
|
||||
QColor highlightBgColor;
|
||||
QColor highlightTextColor;
|
||||
QString settingsKey;
|
||||
|
||||
bool enforceNewline = false;
|
||||
@@ -273,16 +271,6 @@ void OutputWindow::setWheelZoomEnabled(bool enabled)
|
||||
d->zoomEnabled = enabled;
|
||||
}
|
||||
|
||||
void OutputWindow::setHighlightBgColor(const QColor &bgColor)
|
||||
{
|
||||
d->highlightBgColor = bgColor;
|
||||
}
|
||||
|
||||
void OutputWindow::setHighlightTextColor(const QColor &textColor)
|
||||
{
|
||||
d->highlightTextColor = textColor;
|
||||
}
|
||||
|
||||
void OutputWindow::updateFilterProperties(const QString &filterText,
|
||||
Qt::CaseSensitivity caseSensitivity, bool isRegexp)
|
||||
{
|
||||
@@ -297,21 +285,22 @@ void OutputWindow::updateFilterProperties(const QString &filterText,
|
||||
d->filterText = filterText;
|
||||
|
||||
// Update textedit's background color
|
||||
if (filterText.isEmpty()) {
|
||||
if (filterText.isEmpty() && !filterTextWasEmpty) {
|
||||
setPalette(d->originalPalette);
|
||||
setReadOnly(d->originalReadOnly);
|
||||
} else {
|
||||
if (filterTextWasEmpty) {
|
||||
d->originalReadOnly = isReadOnly();
|
||||
d->originalPalette = palette();
|
||||
}
|
||||
QPalette pal;
|
||||
pal.setColor(QPalette::Active, QPalette::Base, d->highlightBgColor);
|
||||
pal.setColor(QPalette::Inactive, QPalette::Base, d->highlightBgColor.darker(120));
|
||||
pal.setColor(QPalette::Active, QPalette::Text, d->highlightTextColor);
|
||||
pal.setColor(QPalette::Inactive, QPalette::Text, d->highlightTextColor.darker(120));
|
||||
setPalette(pal);
|
||||
if (!filterText.isEmpty() && filterTextWasEmpty) {
|
||||
d->originalReadOnly = isReadOnly();
|
||||
setReadOnly(true);
|
||||
const auto newBgColor = [this] {
|
||||
const QColor currentColor = palette().color(QPalette::Base);
|
||||
const int factor = 120;
|
||||
return currentColor.value() < 128 ? currentColor.lighter(factor)
|
||||
: currentColor.darker(factor);
|
||||
};
|
||||
QPalette p = palette();
|
||||
p.setColor(QPalette::Base, newBgColor());
|
||||
setPalette(p);
|
||||
}
|
||||
}
|
||||
d->filterMode = flags;
|
||||
|
@@ -30,9 +30,9 @@
|
||||
|
||||
#include <utils/outputformat.h>
|
||||
|
||||
#include <QElapsedTimer>
|
||||
#include <QPlainTextEdit>
|
||||
#include <QTimer>
|
||||
#include <QTime>
|
||||
|
||||
namespace Utils { class OutputFormatter; }
|
||||
|
||||
@@ -76,8 +76,6 @@ public:
|
||||
float fontZoom() const;
|
||||
void setFontZoom(float zoom);
|
||||
void setWheelZoomEnabled(bool enabled);
|
||||
void setHighlightBgColor(const QColor &bgColor);
|
||||
void setHighlightTextColor(const QColor &textColor);
|
||||
|
||||
void updateFilterProperties(const QString &filterText, Qt::CaseSensitivity caseSensitivity, bool regexp);
|
||||
|
||||
@@ -100,7 +98,7 @@ protected:
|
||||
private:
|
||||
using QPlainTextEdit::setFont; // call setBaseFont instead, which respects the zoom factor
|
||||
QTimer m_scrollTimer;
|
||||
QTime m_lastMessage;
|
||||
QElapsedTimer m_lastMessage;
|
||||
void enableUndoRedo();
|
||||
QString doNewlineEnforcement(const QString &out);
|
||||
void filterNewContent();
|
||||
|
@@ -295,12 +295,9 @@ QString CdbEngine::extensionLibraryName(bool is64Bit)
|
||||
return rc;
|
||||
}
|
||||
|
||||
int CdbEngine::elapsedLogTime() const
|
||||
int CdbEngine::elapsedLogTime()
|
||||
{
|
||||
const int elapsed = m_logTime.elapsed();
|
||||
const int delta = elapsed - m_elapsedLogTime;
|
||||
m_elapsedLogTime = elapsed;
|
||||
return delta;
|
||||
return m_logTimer.restart();
|
||||
}
|
||||
|
||||
void CdbEngine::createFullBacktrace()
|
||||
@@ -323,8 +320,8 @@ void CdbEngine::setupEngine()
|
||||
qDebug(">setupEngine");
|
||||
|
||||
init();
|
||||
if (!m_logTime.elapsed())
|
||||
m_logTime.start();
|
||||
if (!m_logTimer.elapsed())
|
||||
m_logTimer.start();
|
||||
|
||||
// Console: Launch the stub with the suspended application and attach to it
|
||||
// CDB in theory has a command line option '-2' that launches a
|
||||
|
@@ -32,14 +32,12 @@
|
||||
|
||||
#include <projectexplorer/devicesupport/idevice.h>
|
||||
|
||||
#include <QTime>
|
||||
#include <QElapsedTimer>
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
class CdbCommand;
|
||||
struct MemoryViewCookie;
|
||||
class StringInputStream;
|
||||
|
||||
class CdbEngine : public CppDebuggerEngine
|
||||
{
|
||||
@@ -195,7 +193,7 @@ private:
|
||||
NormalizedSourceFileName sourceMapNormalizeFileNameFromDebugger(const QString &f);
|
||||
void doUpdateLocals(const UpdateParameters ¶ms) override;
|
||||
void updateAll() override;
|
||||
int elapsedLogTime() const;
|
||||
int elapsedLogTime();
|
||||
unsigned parseStackTrace(const GdbMi &data, bool sourceStepInto);
|
||||
void mergeStartParametersSourcePathMap();
|
||||
|
||||
@@ -223,8 +221,7 @@ private:
|
||||
wow64Stack32Bit,
|
||||
wow64Stack64Bit
|
||||
} m_wow64State = wow64Uninitialized;
|
||||
QTime m_logTime;
|
||||
mutable int m_elapsedLogTime = 0;
|
||||
QElapsedTimer m_logTimer;
|
||||
QString m_extensionMessageBuffer;
|
||||
bool m_sourceStepInto = false;
|
||||
int m_watchPointX = 0;
|
||||
|
@@ -2,7 +2,6 @@
|
||||
\"Name\" : \"LanguageClient\",
|
||||
\"Version\" : \"$$QTCREATOR_VERSION\",
|
||||
\"CompatVersion\" : \"$$QTCREATOR_COMPAT_VERSION\",
|
||||
\"Experimental\" : true,
|
||||
\"Vendor\" : \"The Qt Company Ltd\",
|
||||
\"Copyright\" : \"(C) $$QTCREATOR_COPYRIGHT_YEAR The Qt Company Ltd\",
|
||||
\"License\" : [ \"Commercial Usage\",
|
||||
|
@@ -426,7 +426,6 @@ void AppOutputPane::createNewOutputWindow(RunControl *rc)
|
||||
}
|
||||
// Create new
|
||||
static int counter = 0;
|
||||
const TextEditor::FontSettings &fs = TextEditor::TextEditorSettings::fontSettings();
|
||||
Core::Id contextId = Core::Id(C_APP_OUTPUT).withSuffix(counter++);
|
||||
Core::Context context(contextId);
|
||||
Core::OutputWindow *ow = new Core::OutputWindow(context, SETTINGS_KEY, m_tabWidget);
|
||||
@@ -434,10 +433,6 @@ void AppOutputPane::createNewOutputWindow(RunControl *rc)
|
||||
ow->setWindowIcon(Icons::WINDOW.icon());
|
||||
ow->setWordWrapEnabled(m_settings.wrapOutput);
|
||||
ow->setMaxCharCount(m_settings.maxCharCount);
|
||||
ow->setHighlightBgColor(fs.toTextCharFormat(TextEditor::C_SEARCH_RESULT)
|
||||
.background().color());
|
||||
ow->setHighlightTextColor(fs.toTextCharFormat(TextEditor::C_SEARCH_RESULT)
|
||||
.foreground().color());
|
||||
|
||||
auto updateFontSettings = [ow] {
|
||||
ow->setBaseFont(TextEditor::TextEditorSettings::fontSettings().font());
|
||||
|
@@ -172,11 +172,6 @@ CompileOutputWindow::CompileOutputWindow(QAction *cancelBuildAction) :
|
||||
|
||||
updateFontSettings();
|
||||
updateZoomEnabled();
|
||||
const TextEditor::FontSettings &fs = TextEditor::TextEditorSettings::fontSettings();
|
||||
m_outputWindow->setHighlightBgColor(fs.toTextCharFormat(TextEditor::C_SEARCH_RESULT)
|
||||
.background().color());
|
||||
m_outputWindow->setHighlightTextColor(fs.toTextCharFormat(TextEditor::C_SEARCH_RESULT)
|
||||
.foreground().color());
|
||||
setupFilterUi("CompileOutputPane.Filter");
|
||||
setFilteringEnabled(true);
|
||||
|
||||
|
@@ -29,6 +29,7 @@
|
||||
#include <utils/pathchooser.h>
|
||||
|
||||
#include <QPushButton>
|
||||
#include <QTimer>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
namespace ProjectExplorer {
|
||||
@@ -60,6 +61,14 @@ ImportWidget::ImportWidget(QWidget *parent) :
|
||||
layout->addWidget(importButton);
|
||||
|
||||
connect(importButton, &QAbstractButton::clicked, this, &ImportWidget::handleImportRequest);
|
||||
connect(m_pathChooser->lineEdit(), &QLineEdit::returnPressed, this, [this] {
|
||||
if (m_pathChooser->isValid()) {
|
||||
handleImportRequest();
|
||||
|
||||
// The next return should trigger the "Configure" button.
|
||||
QTimer::singleShot(0, this, QOverload<>::of(&QWidget::setFocus));
|
||||
}
|
||||
});
|
||||
|
||||
detailsWidget->setWidget(widget);
|
||||
}
|
||||
@@ -70,6 +79,11 @@ void ImportWidget::setCurrentDirectory(const Utils::FilePath &dir)
|
||||
m_pathChooser->setFileName(dir);
|
||||
}
|
||||
|
||||
bool ImportWidget::lineEditHasFocus() const
|
||||
{
|
||||
return m_pathChooser->lineEdit()->hasFocus();
|
||||
}
|
||||
|
||||
void ImportWidget::handleImportRequest()
|
||||
{
|
||||
Utils::FilePath dir = m_pathChooser->fileName();
|
||||
|
@@ -44,6 +44,8 @@ public:
|
||||
|
||||
void setCurrentDirectory(const Utils::FilePath &dir);
|
||||
|
||||
bool lineEditHasFocus() const;
|
||||
|
||||
signals:
|
||||
void importFrom(const Utils::FilePath &dir);
|
||||
|
||||
|
@@ -780,6 +780,11 @@ bool FlatModel::generatedFilesFilterEnabled()
|
||||
return m_filterGeneratedFiles;
|
||||
}
|
||||
|
||||
bool FlatModel::trimEmptyDirectoriesEnabled()
|
||||
{
|
||||
return m_trimEmptyDirectories;
|
||||
}
|
||||
|
||||
Node *FlatModel::nodeForIndex(const QModelIndex &index) const
|
||||
{
|
||||
WrapperNode *flatNode = itemForIndex(index);
|
||||
|
@@ -78,6 +78,7 @@ public:
|
||||
|
||||
bool projectFilterEnabled();
|
||||
bool generatedFilesFilterEnabled();
|
||||
bool trimEmptyDirectoriesEnabled();
|
||||
void setProjectFilterEnabled(bool filter);
|
||||
void setGeneratedFilesFilterEnabled(bool filter);
|
||||
void setTrimEmptyDirectories(bool filter);
|
||||
|
@@ -569,6 +569,11 @@ bool ProjectTreeWidget::generatedFilesFilter()
|
||||
return m_model->generatedFilesFilterEnabled();
|
||||
}
|
||||
|
||||
bool ProjectTreeWidget::trimEmptyDirectoriesFilter()
|
||||
{
|
||||
return m_model->trimEmptyDirectoriesEnabled();
|
||||
}
|
||||
|
||||
bool ProjectTreeWidget::projectFilter()
|
||||
{
|
||||
return m_model->projectFilterEnabled();
|
||||
@@ -611,6 +616,7 @@ void ProjectTreeWidgetFactory::saveSettings(QSettings *settings, int position, Q
|
||||
const QString baseKey = QLatin1String("ProjectTreeWidget.") + QString::number(position);
|
||||
settings->setValue(baseKey + QLatin1String(".ProjectFilter"), ptw->projectFilter());
|
||||
settings->setValue(baseKey + QLatin1String(".GeneratedFilter"), ptw->generatedFilesFilter());
|
||||
settings->setValue(baseKey + QLatin1String(".TrimEmptyDirsFilter"), ptw->trimEmptyDirectoriesFilter());
|
||||
settings->setValue(baseKey + QLatin1String(".SyncWithEditor"), ptw->autoSynchronization());
|
||||
}
|
||||
|
||||
@@ -621,5 +627,6 @@ void ProjectTreeWidgetFactory::restoreSettings(QSettings *settings, int position
|
||||
const QString baseKey = QLatin1String("ProjectTreeWidget.") + QString::number(position);
|
||||
ptw->setProjectFilter(settings->value(baseKey + QLatin1String(".ProjectFilter"), false).toBool());
|
||||
ptw->setGeneratedFilesFilter(settings->value(baseKey + QLatin1String(".GeneratedFilter"), true).toBool());
|
||||
ptw->setTrimEmptyDirectories(settings->value(baseKey + QLatin1String(".TrimEmptyDirsFilter"), true).toBool());
|
||||
ptw->setAutoSynchronization(settings->value(baseKey + QLatin1String(".SyncWithEditor"), true).toBool());
|
||||
}
|
||||
|
@@ -56,6 +56,7 @@ public:
|
||||
void setAutoSynchronization(bool sync);
|
||||
bool projectFilter();
|
||||
bool generatedFilesFilter();
|
||||
bool trimEmptyDirectoriesFilter();
|
||||
QToolButton *toggleSync();
|
||||
Node *currentNode();
|
||||
void sync(ProjectExplorer::Node *node);
|
||||
|
@@ -95,6 +95,8 @@ protected:
|
||||
|
||||
void keyPressEvent(QKeyEvent *event) override
|
||||
{
|
||||
if (m_targetSetupPage && m_targetSetupPage->importLineEditHasFocus())
|
||||
return;
|
||||
if (event->key() == Qt::Key_Return || event->key() == Qt::Key_Enter) {
|
||||
event->accept();
|
||||
if (m_targetSetupPage)
|
||||
|
@@ -328,6 +328,11 @@ void TargetSetupPage::setProjectImporter(ProjectImporter *importer)
|
||||
initializePage();
|
||||
}
|
||||
|
||||
bool TargetSetupPage::importLineEditHasFocus() const
|
||||
{
|
||||
return m_importWidget->lineEditHasFocus();
|
||||
}
|
||||
|
||||
void TargetSetupPage::setNoteText(const QString &text)
|
||||
{
|
||||
m_ui->descriptionLabel->setText(text);
|
||||
|
@@ -70,6 +70,7 @@ public:
|
||||
void setPreferredKitPredicate(const ProjectExplorer::Kit::Predicate &predicate);
|
||||
void setProjectPath(const QString &dir);
|
||||
void setProjectImporter(ProjectImporter *importer);
|
||||
bool importLineEditHasFocus() const;
|
||||
|
||||
/// Sets whether the targetsetupage uses a scrollarea
|
||||
/// to host the widgets from the factories
|
||||
|
@@ -109,7 +109,7 @@ void FormEditorItem::updateGeometry()
|
||||
m_boundingRect = m_paintedBoundingRect.united(m_selectionBoundingRect);
|
||||
setTransform(qmlItemNode().instanceTransformWithContentTransform());
|
||||
//the property for zValue is called z in QGraphicsObject
|
||||
if (qmlItemNode().instanceValue("z").isValid())
|
||||
if (qmlItemNode().instanceValue("z").isValid() && !qmlItemNode().isRootModelNode())
|
||||
setZValue(qmlItemNode().instanceValue("z").toDouble());
|
||||
}
|
||||
|
||||
|
@@ -408,18 +408,44 @@ QString PropertyEditorQmlBackend::templateGeneration(const NodeMetaInfo &type,
|
||||
if (!templateConfiguration() || !templateConfiguration()->isValid())
|
||||
return QString();
|
||||
|
||||
const auto nodes = templateConfiguration()->children();
|
||||
|
||||
QStringList sectorTypes;
|
||||
|
||||
for (const QmlJS::SimpleReaderNode::Ptr &node : nodes) {
|
||||
if (node->propertyNames().contains("separateSection"))
|
||||
sectorTypes.append(variantToStringList(node->property("typeNames")));
|
||||
}
|
||||
|
||||
QStringList imports = variantToStringList(templateConfiguration()->property(QStringLiteral("imports")));
|
||||
|
||||
QString qmlTemplate = imports.join(QLatin1Char('\n')) + QLatin1Char('\n');
|
||||
qmlTemplate += QStringLiteral("Section {\n");
|
||||
qmlTemplate += QStringLiteral("caption: \"%1\"\n").arg(QString::fromUtf8(type.simplifiedTypeName()));
|
||||
qmlTemplate += QStringLiteral("SectionLayout {\n");
|
||||
|
||||
qmlTemplate += "Column {\n";
|
||||
qmlTemplate += "anchors.left: parent.left\n";
|
||||
qmlTemplate += "anchors.right: parent.right\n";
|
||||
|
||||
QList<PropertyName> orderedList = type.propertyNames();
|
||||
Utils::sort(orderedList);
|
||||
Utils::sort(orderedList, [type, §orTypes](const PropertyName &left, const PropertyName &right){
|
||||
const QString typeNameLeft = QString::fromLatin1(type.propertyTypeName(left));
|
||||
const QString typeNameRight = QString::fromLatin1(type.propertyTypeName(right));
|
||||
if (typeNameLeft == typeNameRight)
|
||||
return left > right;
|
||||
|
||||
if (sectorTypes.contains(typeNameLeft)) {
|
||||
if (sectorTypes.contains(typeNameRight))
|
||||
return left > right;
|
||||
return true;
|
||||
} else if (sectorTypes.contains(typeNameRight)) {
|
||||
return false;
|
||||
}
|
||||
return left > right;
|
||||
});
|
||||
|
||||
bool emptyTemplate = true;
|
||||
|
||||
bool sectionStarted = false;
|
||||
|
||||
foreach (const PropertyName &name, orderedList) {
|
||||
|
||||
if (name.startsWith("__"))
|
||||
@@ -433,15 +459,35 @@ QString PropertyEditorQmlBackend::templateGeneration(const NodeMetaInfo &type,
|
||||
if (typeName == "alias" && node.isValid())
|
||||
typeName = node.instanceType(name);
|
||||
|
||||
auto nodes = templateConfiguration()->children();
|
||||
|
||||
if (!superType.hasProperty(name) && type.propertyIsWritable(name) && !name.contains(".")) {
|
||||
foreach (const QmlJS::SimpleReaderNode::Ptr &node, templateConfiguration()->children())
|
||||
|
||||
foreach (const QmlJS::SimpleReaderNode::Ptr &node, nodes)
|
||||
if (variantToStringList(node->property(QStringLiteral("typeNames"))).contains(QString::fromLatin1(typeName))) {
|
||||
const QString fileName = propertyTemplatesPath() + node->property(QStringLiteral("sourceFile")).toString();
|
||||
QFile file(fileName);
|
||||
if (file.open(QIODevice::ReadOnly)) {
|
||||
QString source = QString::fromUtf8(file.readAll());
|
||||
file.close();
|
||||
const bool section = node->propertyNames().contains("separateSection");
|
||||
if (section) {
|
||||
qmlTemplate += "Section {\n";
|
||||
qmlTemplate += "anchors.left: parent.left\n";
|
||||
qmlTemplate += "anchors.right: parent.right\n";
|
||||
qmlTemplate += QString("caption: \"%1\"\n").arg(QString::fromUtf8(properName));
|
||||
} else if (!sectionStarted) {
|
||||
qmlTemplate += QStringLiteral("Section {\n");
|
||||
qmlTemplate += QStringLiteral("caption: \"%1\"\n").arg(QString::fromUtf8(type.simplifiedTypeName()));
|
||||
qmlTemplate += "anchors.left: parent.left\n";
|
||||
qmlTemplate += "anchors.right: parent.right\n";
|
||||
qmlTemplate += QStringLiteral("SectionLayout {\n");
|
||||
sectionStarted = true;
|
||||
}
|
||||
|
||||
qmlTemplate += source.arg(QString::fromUtf8(name)).arg(QString::fromUtf8(properName));
|
||||
if (section)
|
||||
qmlTemplate += "}\n";
|
||||
emptyTemplate = false;
|
||||
} else {
|
||||
qWarning().nospace() << "template definition source file not found:" << fileName;
|
||||
@@ -449,8 +495,12 @@ QString PropertyEditorQmlBackend::templateGeneration(const NodeMetaInfo &type,
|
||||
}
|
||||
}
|
||||
}
|
||||
if (sectionStarted) {
|
||||
qmlTemplate += QStringLiteral("}\n"); //Section
|
||||
qmlTemplate += QStringLiteral("}\n"); //SectionLayout
|
||||
}
|
||||
|
||||
qmlTemplate += "}\n";
|
||||
|
||||
if (emptyTemplate)
|
||||
return QString();
|
||||
|
@@ -26,7 +26,6 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Timeline 1.0
|
||||
import QtQuick.Controls 2.12
|
||||
import welcome 1.0
|
||||
|
||||
CheckBox {
|
||||
id: do_not_show_checkBox
|
||||
|
@@ -27,6 +27,7 @@ import QtQuick 2.7
|
||||
import QtQuick.Controls 2.3
|
||||
import StudioFonts 1.0
|
||||
import QtQuick.Layouts 1.0
|
||||
import projectmodel 1.0
|
||||
|
||||
Image {
|
||||
id: welcome_splash
|
||||
@@ -243,7 +244,7 @@ Image {
|
||||
color: "#ffffff"
|
||||
text: qsTr("Community Edition")
|
||||
font.pixelSize: 13
|
||||
font.family: Constants.titilliumWeb_light
|
||||
font.family: StudioFonts.titilliumWeb_light
|
||||
visible: projectModel.communityVersion
|
||||
ProjectModel {
|
||||
id: projectModel
|
||||
|
@@ -196,7 +196,7 @@ Item {
|
||||
anchors.rightMargin: 23
|
||||
font.weight: Font.Light
|
||||
font.pixelSize: 14
|
||||
font.family: Constants.titilliumWeb_regular
|
||||
font.family: StudioFonts.titilliumWeb_regular
|
||||
renderType: Text.NativeRendering
|
||||
visible: projectModel.communityVersion
|
||||
}
|
||||
|
@@ -283,6 +283,10 @@ void Parser::Private::parseHeader(QIODevice *device)
|
||||
while (!device->atEnd()) {
|
||||
QByteArray line = device->readLine();
|
||||
|
||||
// last character will be ignored anyhow, but we might have CRLF; if so cut the last one
|
||||
if (line.endsWith("\r\n"))
|
||||
line.chop(1);
|
||||
|
||||
// now that we're done checking if we're done (heh) with the header, parse the address
|
||||
// and cost column descriptions. speed is unimportant here.
|
||||
if (line.startsWith('#')) {
|
||||
@@ -352,8 +356,9 @@ Parser::Private::NamePair Parser::Private::parseName(const char *begin, const ch
|
||||
|
||||
void Parser::Private::dispatchLine(const QByteArray &line)
|
||||
{
|
||||
int lineEnding = line.endsWith("\r\n") ? 2 : 1;
|
||||
const char *const begin = line.constData();
|
||||
const char *const end = begin + line.length() - 1; // we're not interested in the '\n'
|
||||
const char *const end = begin + line.length() - lineEnding; // we're not interested in the '\n'
|
||||
const char *current = begin;
|
||||
|
||||
// shortest possible line is "1 1" - a cost item line
|
||||
|
@@ -1,8 +1,9 @@
|
||||
# TODO: Do not depend on Utils! Include relevant files instead.
|
||||
get_target_property(UtilsSourcesDir Utils SOURCES_DIR)
|
||||
|
||||
add_qtc_executable(sdktool
|
||||
DEFINES DATA_PATH=\"${IDE_DATA_PATH}\"
|
||||
DEPENDS Qt5::Core Utils app_version
|
||||
DEPENDS Qt5::Core app_version
|
||||
INCLUDES "${UtilsSourcesDir}/../"
|
||||
SOURCES
|
||||
addabiflavor.cpp addabiflavor.h
|
||||
addcmakeoperation.cpp addcmakeoperation.h
|
||||
@@ -26,3 +27,33 @@ add_qtc_executable(sdktool
|
||||
rmtoolchainoperation.cpp rmtoolchainoperation.h
|
||||
settings.cpp settings.h
|
||||
)
|
||||
|
||||
extend_qtc_target(sdktool
|
||||
SOURCES_PREFIX "${UtilsSourcesDir}"
|
||||
DEFINES QTCREATOR_UTILS_STATIC_LIB
|
||||
SOURCES
|
||||
environment.cpp environment.h
|
||||
fileutils.cpp fileutils.h
|
||||
hostosinfo.cpp hostosinfo.h
|
||||
persistentsettings.cpp persistentsettings.h
|
||||
qtcassert.cpp qtcassert.h
|
||||
qtcprocess.cpp qtcprocess.h
|
||||
savefile.cpp savefile.h
|
||||
stringutils.cpp stringutils.h
|
||||
)
|
||||
|
||||
extend_qtc_target(sdktool CONDITION APPLE
|
||||
SOURCES_PREFIX "${UtilsSourcesDir}"
|
||||
SOURCES
|
||||
fileutils_mac.mm fileutils_mac.h
|
||||
DEPENDS
|
||||
${FWFoundation}
|
||||
)
|
||||
|
||||
extend_qtc_target(sdktool CONDITION WIN32
|
||||
DEPENDS
|
||||
user32 iphlpapi ws2_32 shell32
|
||||
DEFINES
|
||||
_UNICODE UNICODE
|
||||
_CRT_SECURE_NO_WARNINGS _SCL_SECURE_NO_WARNINGS
|
||||
)
|
||||
|
@@ -2,6 +2,7 @@ import qbs
|
||||
|
||||
Project {
|
||||
name: "Memcheck autotests"
|
||||
condition: !qbs.targetOS.contains("windows")
|
||||
references: [
|
||||
"testapps/testapps.qbs",
|
||||
"modeldemo.qbs"
|
||||
|
@@ -2,7 +2,6 @@ import qbs
|
||||
|
||||
Project {
|
||||
name: "Valgrind autotests"
|
||||
condition: !qbs.targetOS.contains("windows")
|
||||
references: [
|
||||
"callgrind/callgrind.qbs",
|
||||
"memcheck/memcheck.qbs"
|
||||
|
@@ -166,7 +166,10 @@ def selectBuildConfig(wantedKit, configName, afterSwitchTo=ViewConstants.EDIT):
|
||||
def verifyBuildConfig(currentTarget, configName, shouldBeDebug=False, enableShadowBuild=False, enableQmlDebug=False):
|
||||
selectBuildConfig(currentTarget, configName, None)
|
||||
ensureChecked(waitForObject(":scrollArea.Details_Utils::DetailsButton"))
|
||||
ensureChecked("{name='shadowBuildCheckBox' type='QCheckBox' visible='1'}", enableShadowBuild)
|
||||
ensureChecked("{leftWidget={text='Shadow build:' type='QLabel' unnamed='1' visible='1' "
|
||||
"window=':Qt Creator_Core::Internal::MainWindow'} "
|
||||
"type='QCheckBox' unnamed='1' visible='1' "
|
||||
"window=':Qt Creator_Core::Internal::MainWindow'}", enableShadowBuild)
|
||||
buildCfCombo = waitForObject("{type='QComboBox' name='buildConfigurationComboBox' visible='1' "
|
||||
"window=':Qt Creator_Core::Internal::MainWindow'}")
|
||||
if shouldBeDebug:
|
||||
|
@@ -26,7 +26,7 @@
|
||||
source("../../shared/qtcreator.py")
|
||||
|
||||
# test search in help mode and advanced search
|
||||
searchKeywordDictionary={ "abundance":True, "deplmint":False, "QODBC":True, "bld":False }
|
||||
searchKeywordDictionary = { "abundance":True, "deplmint":False, "QODBC":True, "bldx":False }
|
||||
urlDictionary = { "abundance":"qthelp://com.trolltech.qt.487/qdoc/gettingstarted-develop.html",
|
||||
"QODBC":"qthelp://com.trolltech.qt.487/qdoc/sql-driver.html" }
|
||||
|
||||
@@ -93,7 +93,7 @@ def main():
|
||||
clickButton(waitForObject("{text='Search' type='QPushButton' unnamed='1' visible='1' "
|
||||
"window=':Qt Creator_Core::Internal::MainWindow'}"))
|
||||
resultWidget = waitForObject(':Hits_QResultWidget', 5000)
|
||||
if not JIRA.isBugStillOpen(67737, JIRA.Bug.QT):
|
||||
if os.getenv("SYSTEST_BUILT_WITH_QT_5_13_1_OR_NEWER", "0") == "1":
|
||||
test.verify(waitFor("noMatch in "
|
||||
"str(resultWidget.plainText)", 2000),
|
||||
"Verifying if search did not match anything.")
|
||||
@@ -121,9 +121,10 @@ def main():
|
||||
type(resultWidget, "<Return>")
|
||||
waitFor("__getUrl__() != url or selText != __getSelectedText__()", 20000)
|
||||
verifySelection(searchKeyword)
|
||||
if not (searchKeyword == "QODBC" and JIRA.isBugStillOpen(10331)):
|
||||
verifyUrl(urlDictionary[searchKeyword])
|
||||
else:
|
||||
if not JIRA.isBugStillOpen(67737, JIRA.Bug.QT):
|
||||
if os.getenv("SYSTEST_BUILT_WITH_QT_5_13_1_OR_NEWER", "0") == "1":
|
||||
test.verify(waitFor("noMatch in "
|
||||
"str(resultWidget.plainText)", 1000),
|
||||
"Verifying if search did not match anything for: " + searchKeyword)
|
||||
|
Reference in New Issue
Block a user