summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2020-04-28 15:48:36 +0200
committerEike Ziller <eike.ziller@qt.io>2020-04-28 15:48:36 +0200
commite9661e43cbbb934e1aca7941685e2035c7dbde56 (patch)
tree438839660dff750585b4182bcb3711bf98e2e8a9 /share
parent6efed7140b37616b6a6882dd9096d1edafedd089 (diff)
parent05f746cfd029c0232bb5880c50d0b0d7d17f0cc5 (diff)
downloadqt-creator-e9661e43cbbb934e1aca7941685e2035c7dbde56.tar.gz
Merge remote-tracking branch 'origin/4.12'
Conflicts: cmake/QtCreatorIDEBranding.cmake qbs/modules/qtc/qtc.qbs qtcreator_ide_branding.pri src/libs/qtcreatorcdbext/qtcreatorcdbextension.cpp Change-Id: If6963d1ef7b5a1ea6343f68c8e7ce6fb5f482f21
Diffstat (limited to 'share')
-rw-r--r--share/qtcreator/CMakeLists.txt35
-rw-r--r--share/qtcreator/debugger/stdtypes.py3
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ComboBox.qml62
3 files changed, 64 insertions, 36 deletions
diff --git a/share/qtcreator/CMakeLists.txt b/share/qtcreator/CMakeLists.txt
index 05f64cc2f1..303fb9c7d0 100644
--- a/share/qtcreator/CMakeLists.txt
+++ b/share/qtcreator/CMakeLists.txt
@@ -1,25 +1,42 @@
-set(template_directories android cplusplus debugger glsl modeleditor qml qmldesigner
- qmlicons qml-type-descriptions schemes scripts snippets styles templates themes welcomescreen)
+set(resource_directories
+ android
+ cplusplus
+ debugger
+ glsl
+ indexer_preincludes
+ modeleditor
+ qml
+ qmldesigner
+ qmlicons
+ qml-type-descriptions
+ schemes
+ snippets
+ styles
+ templates
+ themes
+)
+
+if (APPLE)
+ set(resource_directories ${resource_directories} scripts)
+endif()
add_custom_target(copy_share_to_builddir ALL
COMMENT Copy files into build directory
VERBATIM
)
-foreach(dir IN ITEMS ${template_directories})
+# copy resource directories during build
+foreach(dir IN ITEMS ${resource_directories})
add_custom_command(TARGET copy_share_to_builddir POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy_directory "${dir}"
"${PROJECT_BINARY_DIR}/${IDE_DATA_PATH}/${dir}"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
- COMMENT Copy files into build directory
+ COMMENT Copy resource directories into build directory
VERBATIM
)
endforeach()
-install(DIRECTORY ${template_directories} DESTINATION "${IDE_DATA_PATH}")
-install(
- FILES indexer_preincludes/qglobal.h indexer_preincludes/windows.h
- DESTINATION "${IDE_DATA_PATH}/indexer_preincludes"
-)
+# create install rule for resource directories
+install(DIRECTORY ${resource_directories} DESTINATION "${IDE_DATA_PATH}")
add_subdirectory(translations)
diff --git a/share/qtcreator/debugger/stdtypes.py b/share/qtcreator/debugger/stdtypes.py
index b08b9d603d..9d5cd0029a 100644
--- a/share/qtcreator/debugger/stdtypes.py
+++ b/share/qtcreator/debugger/stdtypes.py
@@ -283,7 +283,8 @@ def qdump__std__map(d, value):
return
# stuff is actually (color, pad) with 'I@', but we can save cycles/
- (compare, stuff, parent, left, right, size) = value.split('pppppp')
+ (compare, stuff, parent, left, right) = value.split('ppppp')
+ size = value["_M_t"]["_M_impl"]["_M_node_count"].integer()
d.check(0 <= size and size <= 100 * 1000 * 1000)
d.putItemCount(size)
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ComboBox.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ComboBox.qml
index b3e8fda368..2d70e40b1d 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ComboBox.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ComboBox.qml
@@ -38,6 +38,10 @@ StudioControls.ComboBox {
enum ValueType { String, Integer, Enum }
property int valueType: ComboBox.ValueType.Enum
+ onModelChanged: colorLogic.invalidate()
+
+ // This is available in all editors.
+
onValueTypeChanged: {
if (comboBox.valueType === ComboBox.ValueType.Integer)
comboBox.useInteger = true
@@ -97,28 +101,34 @@ StudioControls.ComboBox {
comboBox.valueFromBackendChanged()
} else {
switch (comboBox.valueType) {
- case ComboBox.ValueType.String:
- if (comboBox.currentText !== comboBox.backendValue.value)
- comboBox.currentText = comboBox.backendValue.value
- break
- case ComboBox.ValueType.Integer:
- if (comboBox.currentIndex !== comboBox.backendValue.value)
- comboBox.currentIndex = comboBox.backendValue.value
- break
- case ComboBox.ValueType.Enum:
- default:
- var enumString = comboBox.backendValue.enumeration
-
- if (enumString === "")
- enumString = comboBox.backendValue.value
-
- var index = comboBox.find(enumString)
-
+ case ComboBox.ValueType.String:
+ if (comboBox.currentText !== comboBox.backendValue.value) {
+ var index = comboBox.find(comboBox.backendValue.value)
if (index < 0)
index = 0
if (index !== comboBox.currentIndex)
comboBox.currentIndex = index
+ }
+ break
+ case ComboBox.ValueType.Integer:
+ if (comboBox.currentIndex !== comboBox.backendValue.value)
+ comboBox.currentIndex = comboBox.backendValue.value
+ break
+ case ComboBox.ValueType.Enum:
+ default:
+ var enumString = comboBox.backendValue.enumeration
+
+ if (enumString === "")
+ enumString = comboBox.backendValue.value
+
+ index = comboBox.find(enumString)
+
+ if (index < 0)
+ index = 0
+
+ if (index !== comboBox.currentIndex)
+ comboBox.currentIndex = index
}
}
@@ -137,15 +147,15 @@ StudioControls.ComboBox {
return
switch (comboBox.valueType) {
- case ComboBox.ValueType.String:
- comboBox.backendValue.value = comboBox.currentText
- break
- case ComboBox.ValueType.Integer:
- comboBox.backendValue.value = comboBox.currentIndex
- break
- case ComboBox.ValueType.Enum:
- default:
- comboBox.backendValue.setEnumeration(comboBox.scope, comboBox.currentText)
+ case ComboBox.ValueType.String:
+ comboBox.backendValue.value = comboBox.currentText
+ break
+ case ComboBox.ValueType.Integer:
+ comboBox.backendValue.value = comboBox.currentIndex
+ break
+ case ComboBox.ValueType.Enum:
+ default:
+ comboBox.backendValue.setEnumeration(comboBox.scope, comboBox.currentText)
}
}