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