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