summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2017-04-21 15:29:27 +0200
committerEike Ziller <eike.ziller@qt.io>2017-04-21 15:30:00 +0200
commitdae2556d2ffb3ea4982e9caf312ac95811ddbe72 (patch)
treecc90426882671565d337ef68cdb6a67f7be9b893 /share
parentac86b2e8ddbd1f9874475a8ee0d5418f12eadea4 (diff)
parent1891af4b07801e6cbab95aca77b2ef4979b46cc0 (diff)
downloadqt-creator-dae2556d2ffb3ea4982e9caf312ac95811ddbe72.tar.gz
Merge remote-tracking branch 'origin/4.3'
Change-Id: I44511e06986b7df6007be7daf7051c895a10794b
Diffstat (limited to 'share')
-rw-r--r--share/qtcreator/debugger/dumper.py7
-rw-r--r--share/qtcreator/debugger/gdbbridge.py5
-rw-r--r--share/qtcreator/qml/qmlpuppet/commands/valueschangedcommand.cpp2
-rw-r--r--share/qtcreator/qml/qmlpuppet/container/imagecontainer.cpp2
-rw-r--r--share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppetmain.cpp2
-rw-r--r--share/qtcreator/qml/qmlpuppet/qmlprivategate/qmlprivategate.cpp2
-rw-r--r--share/qtcreator/qml/qmlpuppet/qmlprivategate/qmlprivategate_56.cpp2
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ColorEditor.qml6
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/UrlChooser.qml8
9 files changed, 26 insertions, 10 deletions
diff --git a/share/qtcreator/debugger/dumper.py b/share/qtcreator/debugger/dumper.py
index 2d814e76f4..d94ffbe640 100644
--- a/share/qtcreator/debugger/dumper.py
+++ b/share/qtcreator/debugger/dumper.py
@@ -3637,7 +3637,9 @@ class DumperBase:
self.registerType(typeId, tdata)
return self.Type(self, typeId)
- def createTypedefedType(self, targetType, typeId):
+ def createTypedefedType(self, targetType, typeName, typeId = None):
+ if typeId is None:
+ typeId = typeName
if not isinstance(targetType, self.Type):
error('Expected type in createTypedefType(), got %s'
% type(targetType))
@@ -3645,12 +3647,13 @@ class DumperBase:
if targetType.typeId == typeId:
return targetType
tdata = self.TypeData(self)
- tdata.name = typeId
+ tdata.name = typeName
tdata.typeId = typeId
tdata.code = TypeCodeTypedef
tdata.ltarget = targetType
tdata.lbitsize = targetType.lbitsize
#tdata.lfields = targetType.lfields
+ tdata.lbitsize = targetType.lbitsize
self.registerType(typeId, tdata)
return self.Type(self, typeId)
diff --git a/share/qtcreator/debugger/gdbbridge.py b/share/qtcreator/debugger/gdbbridge.py
index acf22e4786..c2b0710326 100644
--- a/share/qtcreator/debugger/gdbbridge.py
+++ b/share/qtcreator/debugger/gdbbridge.py
@@ -315,7 +315,8 @@ class Dumper(DumperBase):
while nativeTargetType.code == gdb.TYPE_CODE_TYPEDEF:
nativeTargetType = nativeTargetType.strip_typedefs().unqualified()
targetType = self.fromNativeType(nativeTargetType)
- return self.createTypedefedType(targetType, str(nativeType))
+ return self.createTypedefedType(targetType, str(nativeType),
+ self.nativeTypeId(nativeType))
if code == gdb.TYPE_CODE_ERROR:
warn('Type error: %s' % nativeType)
@@ -408,6 +409,8 @@ class Dumper(DumperBase):
return '%d' % intval
def nativeTypeId(self, nativeType):
+ if nativeType.code == gdb.TYPE_CODE_TYPEDEF:
+ return '%s{%s}' % (nativeType, nativeType.strip_typedefs())
name = str(nativeType)
if len(name) == 0:
c = '0'
diff --git a/share/qtcreator/qml/qmlpuppet/commands/valueschangedcommand.cpp b/share/qtcreator/qml/qmlpuppet/commands/valueschangedcommand.cpp
index e53d87b9ac..249cf38432 100644
--- a/share/qtcreator/qml/qmlpuppet/commands/valueschangedcommand.cpp
+++ b/share/qtcreator/qml/qmlpuppet/commands/valueschangedcommand.cpp
@@ -93,7 +93,7 @@ static SharedMemory *createSharedMemory(qint32 key, int byteCount)
QDataStream &operator<<(QDataStream &out, const ValuesChangedCommand &command)
{
- static const bool dontUseSharedMemory = !qgetenv("DESIGNER_DONT_USE_SHARED_MEMORY").isEmpty();
+ static const bool dontUseSharedMemory = qEnvironmentVariableIsSet("DESIGNER_DONT_USE_SHARED_MEMORY");
if (!dontUseSharedMemory && command.valueChanges().count() > 5) {
static quint32 keyCounter = 0;
diff --git a/share/qtcreator/qml/qmlpuppet/container/imagecontainer.cpp b/share/qtcreator/qml/qmlpuppet/container/imagecontainer.cpp
index 04f9ea6046..77efa1af5c 100644
--- a/share/qtcreator/qml/qmlpuppet/container/imagecontainer.cpp
+++ b/share/qtcreator/qml/qmlpuppet/container/imagecontainer.cpp
@@ -152,7 +152,7 @@ static void writeStream(QDataStream &out, const QImage &image)
QDataStream &operator<<(QDataStream &out, const ImageContainer &container)
{
const int extraDataSize = 20;
- static const bool dontUseSharedMemory = !qgetenv("DESIGNER_DONT_USE_SHARED_MEMORY").isEmpty();
+ static const bool dontUseSharedMemory = qEnvironmentVariableIsSet("DESIGNER_DONT_USE_SHARED_MEMORY");
out << container.instanceId();
out << container.keyNumber();
diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppetmain.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppetmain.cpp
index cb75403e6d..0d29b554e6 100644
--- a/share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppetmain.cpp
+++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppetmain.cpp
@@ -136,7 +136,7 @@ int main(int argc, char *argv[])
#endif
//If a style different from Desktop is set we have to use QGuiApplication
- bool useGuiApplication = !qgetenv("QT_QUICK_CONTROLS_STYLE").isEmpty()
+ bool useGuiApplication = qEnvironmentVariableIsSet("QT_QUICK_CONTROLS_STYLE")
&& qgetenv("QT_QUICK_CONTROLS_STYLE") != "Desktop";
if (useGuiApplication) {
diff --git a/share/qtcreator/qml/qmlpuppet/qmlprivategate/qmlprivategate.cpp b/share/qtcreator/qml/qmlpuppet/qmlprivategate/qmlprivategate.cpp
index 3243db8fc0..329ac0a8a8 100644
--- a/share/qtcreator/qml/qmlpuppet/qmlprivategate/qmlprivategate.cpp
+++ b/share/qtcreator/qml/qmlpuppet/qmlprivategate/qmlprivategate.cpp
@@ -237,7 +237,7 @@ static void allSubObject(QObject *object, QObjectList &objectList)
static void fixResourcePathsForObject(QObject *object)
{
- if (qgetenv("QMLDESIGNER_RC_PATHS").isEmpty())
+ if (qEnvironmentVariableIsEmpty("QMLDESIGNER_RC_PATHS"))
return;
PropertyNameList propertyNameList = propertyNameListForWritableProperties(object);
diff --git a/share/qtcreator/qml/qmlpuppet/qmlprivategate/qmlprivategate_56.cpp b/share/qtcreator/qml/qmlpuppet/qmlprivategate/qmlprivategate_56.cpp
index cbc4e54fb1..8db8c29ccb 100644
--- a/share/qtcreator/qml/qmlpuppet/qmlprivategate/qmlprivategate_56.cpp
+++ b/share/qtcreator/qml/qmlpuppet/qmlprivategate/qmlprivategate_56.cpp
@@ -139,7 +139,7 @@ QVariant fixResourcePaths(const QVariant &value)
void fixResourcePathsForObject(QObject *object)
{
- if (qgetenv("QMLDESIGNER_RC_PATHS").isEmpty())
+ if (qEnvironmentVariableIsEmpty("QMLDESIGNER_RC_PATHS"))
return;
PropertyNameList propertyNameList = propertyNameListForWritableProperties(object);
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ColorEditor.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ColorEditor.qml
index baf54c818d..583c324ac2 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ColorEditor.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ColorEditor.qml
@@ -45,6 +45,8 @@ Column {
property alias gradientPropertyName: gradientLine.gradientPropertyName
+ property alias transparent: transparentButton.checked
+
function isNotInGradientMode() {
return (buttonRow.checkedIndex !== 1)
}
@@ -154,6 +156,7 @@ Column {
SecondColumnLayout {
LineEdit {
+ enabled: !colorEditor.transparent
id: textField
writeValueManually: true
@@ -208,6 +211,7 @@ Column {
tooltip: qsTr("Gradient")
}
ButtonRowButton {
+ id: transparentButton
iconSource: "images/icon_color_none.png"
onClicked: {
colorEditor.color = "#00000000"
@@ -229,7 +233,7 @@ Column {
colorButton.color = colorButton.bindedColor
}
- enabled: buttonRow.checkedIndex !== 2
+ enabled: !colorEditor.transparent
opacity: checkButton.checked ? 1 : 0
id: colorButton
width: 116
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/UrlChooser.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/UrlChooser.qml
index f6bcae25a3..0c89aa119e 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/UrlChooser.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/UrlChooser.qml
@@ -72,7 +72,13 @@ RowLayout {
editText = textValue
}
- property string textValue: backendValue.valueToString
+ property string textValue: {
+ if (backendValue.isBound)
+ return backendValue.expression
+
+ return backendValue.valueToString
+ }
+
onTextValueChanged: {
setCurrentText(textValue)
}