Browse Source

Bug fix:

- debug: clear local variables list when getting out of a function.
 - small ui changes.
cl-refactor
yann300 10 years ago
parent
commit
93c8024ecc
  1. 3
      mix/ClientModel.cpp
  2. 2
      mix/qml/DebuggerPaneStyle.qml
  3. 14
      mix/qml/QIntTypeView.qml
  4. 15
      mix/qml/StructView.qml
  5. 2
      mix/qml/VariablesView.qml

3
mix/ClientModel.cpp

@ -484,7 +484,10 @@ void ClientModel::showDebuggerForTransaction(ExecutionResult const& _t)
if (!functionName.isEmpty() && ((prevInstruction.getJumpType() == AssemblyItem::JumpType::IntoFunction) || solCallStack.empty())) if (!functionName.isEmpty() && ((prevInstruction.getJumpType() == AssemblyItem::JumpType::IntoFunction) || solCallStack.empty()))
solCallStack.push_front(QVariant::fromValue(functionName)); solCallStack.push_front(QVariant::fromValue(functionName));
else if (prevInstruction.getJumpType() == AssemblyItem::JumpType::OutOfFunction && !solCallStack.empty()) else if (prevInstruction.getJumpType() == AssemblyItem::JumpType::OutOfFunction && !solCallStack.empty())
{
solCallStack.pop_front(); solCallStack.pop_front();
solLocals.clear();
}
} }
//format solidity context values //format solidity context values

2
mix/qml/DebuggerPaneStyle.qml

@ -9,6 +9,8 @@ QtObject {
property QtObject general: QtObject { property QtObject general: QtObject {
property int basicFontSize: absoluteSize(-2) property int basicFontSize: absoluteSize(-2)
property string basicColor: "#4a4a4a"
property string basicFont: "monospace"
property int dataDumpFontSize: absoluteSize(-3) property int dataDumpFontSize: absoluteSize(-3)
} }
} }

14
mix/qml/QIntTypeView.qml

@ -5,24 +5,24 @@ Item
property alias value: textinput.text property alias value: textinput.text
property alias readOnly: textinput.readOnly property alias readOnly: textinput.readOnly
id: editRoot id: editRoot
height: 20
width: readOnly ? textinput.implicitWidth : 150 width: readOnly ? textinput.implicitWidth : 150
SourceSansProBold DebuggerPaneStyle {
{ id: dbgStyle
id: boldFont
} }
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
radius: 4 radius: 4
TextInput { TextInput {
anchors.verticalCenter: parent.verticalCenter
id: textinput id: textinput
text: value font.family: dbgStyle.general.basicFont
anchors.fill: parent
font.family: boldFont.name
clip: true clip: true
selectByMouse: true selectByMouse: true
text: value
font.pointSize: dbgStyle.general.basicFontSize
color: dbgStyle.general.basicColor
} }
} }
} }

15
mix/qml/StructView.qml

@ -13,6 +13,11 @@ Column
property string context property string context
Layout.fillWidth: true Layout.fillWidth: true
spacing: 0 spacing: 0
DebuggerPaneStyle {
id: dbgStyle
}
Repeater Repeater
{ {
id: repeater id: repeater
@ -29,6 +34,9 @@ Column
id: typeLabel id: typeLabel
text: modelData.type.name text: modelData.type.name
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
font.family: dbgStyle.general.basicFont
color: dbgStyle.general.basicColor
font.pointSize: dbgStyle.general.basicFontSize
} }
DefaultLabel { DefaultLabel {
@ -36,6 +44,9 @@ Column
id: nameLabel id: nameLabel
text: modelData.name text: modelData.name
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
font.family: dbgStyle.general.basicFont
color: dbgStyle.general.basicColor
font.pointSize: dbgStyle.general.basicFontSize
} }
DefaultLabel { DefaultLabel {
@ -43,7 +54,11 @@ Column
id: equalLabel id: equalLabel
text: "=" text: "="
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
font.family: dbgStyle.general.basicFont
color: dbgStyle.general.basicColor
font.pointSize: dbgStyle.general.basicFontSize
} }
Loader Loader
{ {
id: typeLoader id: typeLoader

2
mix/qml/VariablesView.qml

@ -18,7 +18,7 @@ DebugInfoList
property alias members: typeLoader.members; property alias members: typeLoader.members;
property alias value: typeLoader.value; property alias value: typeLoader.value;
anchors.fill: parent anchors.fill: parent
anchors.rightMargin: 8 anchors.leftMargin: 10
StructView StructView
{ {
id: typeLoader id: typeLoader

Loading…
Cancel
Save