From 93c8024ecc5764fd5d3c18106a91ad2205a6ab49 Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 26 May 2015 13:57:13 +0200 Subject: [PATCH] Bug fix: - debug: clear local variables list when getting out of a function. - small ui changes. --- mix/ClientModel.cpp | 3 +++ mix/qml/DebuggerPaneStyle.qml | 2 ++ mix/qml/QIntTypeView.qml | 14 +++++++------- mix/qml/StructView.qml | 15 +++++++++++++++ mix/qml/VariablesView.qml | 2 +- 5 files changed, 28 insertions(+), 8 deletions(-) diff --git a/mix/ClientModel.cpp b/mix/ClientModel.cpp index 6b5242084..238fa5372 100644 --- a/mix/ClientModel.cpp +++ b/mix/ClientModel.cpp @@ -484,7 +484,10 @@ void ClientModel::showDebuggerForTransaction(ExecutionResult const& _t) if (!functionName.isEmpty() && ((prevInstruction.getJumpType() == AssemblyItem::JumpType::IntoFunction) || solCallStack.empty())) solCallStack.push_front(QVariant::fromValue(functionName)); else if (prevInstruction.getJumpType() == AssemblyItem::JumpType::OutOfFunction && !solCallStack.empty()) + { solCallStack.pop_front(); + solLocals.clear(); + } } //format solidity context values diff --git a/mix/qml/DebuggerPaneStyle.qml b/mix/qml/DebuggerPaneStyle.qml index db8bbe253..0087b466f 100644 --- a/mix/qml/DebuggerPaneStyle.qml +++ b/mix/qml/DebuggerPaneStyle.qml @@ -9,6 +9,8 @@ QtObject { property QtObject general: QtObject { property int basicFontSize: absoluteSize(-2) + property string basicColor: "#4a4a4a" + property string basicFont: "monospace" property int dataDumpFontSize: absoluteSize(-3) } } diff --git a/mix/qml/QIntTypeView.qml b/mix/qml/QIntTypeView.qml index eacef74e8..a3c67aafc 100644 --- a/mix/qml/QIntTypeView.qml +++ b/mix/qml/QIntTypeView.qml @@ -5,24 +5,24 @@ Item property alias value: textinput.text property alias readOnly: textinput.readOnly id: editRoot - height: 20 width: readOnly ? textinput.implicitWidth : 150 - SourceSansProBold - { - id: boldFont + DebuggerPaneStyle { + id: dbgStyle } Rectangle { anchors.fill: parent radius: 4 TextInput { + anchors.verticalCenter: parent.verticalCenter id: textinput - text: value - anchors.fill: parent - font.family: boldFont.name + font.family: dbgStyle.general.basicFont clip: true selectByMouse: true + text: value + font.pointSize: dbgStyle.general.basicFontSize + color: dbgStyle.general.basicColor } } } diff --git a/mix/qml/StructView.qml b/mix/qml/StructView.qml index cb38ba5ed..029fd162d 100644 --- a/mix/qml/StructView.qml +++ b/mix/qml/StructView.qml @@ -13,6 +13,11 @@ Column property string context Layout.fillWidth: true spacing: 0 + + DebuggerPaneStyle { + id: dbgStyle + } + Repeater { id: repeater @@ -29,6 +34,9 @@ Column id: typeLabel text: modelData.type.name anchors.verticalCenter: parent.verticalCenter + font.family: dbgStyle.general.basicFont + color: dbgStyle.general.basicColor + font.pointSize: dbgStyle.general.basicFontSize } DefaultLabel { @@ -36,6 +44,9 @@ Column id: nameLabel text: modelData.name anchors.verticalCenter: parent.verticalCenter + font.family: dbgStyle.general.basicFont + color: dbgStyle.general.basicColor + font.pointSize: dbgStyle.general.basicFontSize } DefaultLabel { @@ -43,7 +54,11 @@ Column id: equalLabel text: "=" anchors.verticalCenter: parent.verticalCenter + font.family: dbgStyle.general.basicFont + color: dbgStyle.general.basicColor + font.pointSize: dbgStyle.general.basicFontSize } + Loader { id: typeLoader diff --git a/mix/qml/VariablesView.qml b/mix/qml/VariablesView.qml index 6603bd24e..aec629853 100644 --- a/mix/qml/VariablesView.qml +++ b/mix/qml/VariablesView.qml @@ -18,7 +18,7 @@ DebugInfoList property alias members: typeLoader.members; property alias value: typeLoader.value; anchors.fill: parent - anchors.rightMargin: 8 + anchors.leftMargin: 10 StructView { id: typeLoader