Browse Source

refactoring

cl-refactor
yann300 10 years ago
committed by yann300
parent
commit
36405af0cc
  1. 1
      mix/ClientModel.cpp
  2. 29
      mix/qml/main.qml

1
mix/ClientModel.cpp

@ -218,4 +218,3 @@ ExecutionResult ClientModel::callContract(Address const& _contract, bytes const&
r.contractAddress = _contract;
return r;
}

29
mix/qml/main.qml

@ -78,34 +78,37 @@ ApplicationWindow {
text: "&Run"
shortcut: "F5"
onTriggered: {
var item = TransactionHelper.defaultTransaction();
item.executeConstructor = true;
if (codeModel.code.contract.constructor.parameters.length === 0)
{
mainContent.ensureRightView();
clientModel.debugDeployment();
startF5Debugging(item);
}
else
{
var item = TransactionHelper.defaultTransaction();
item.executeConstructor = true;
transactionDialog.open(0, item);
}
}
enabled: codeModel.hasContract && !clientModel.running;
}
function startF5Debugging(transaction)
{
var ether = QEtherHelper.createEther("100000000000000000000000000", QEther.Wei);
var state = {
title: "",
balance: ether,
transactions: [transaction]
};
clientModel.debugState(state);
}
TransactionDialog {
id: transactionDialog
onAccepted: {
mainContent.ensureRightView();
var item = transactionDialog.getItem();
var ether = QEtherHelper.createEther("100000000000000000000000000", QEther.Wei);
var state = {
title: "",
balance: ether,
transactions: [item]
};
clientModel.debugState(state);
item.executeConstructor = true;
startF5Debugging(item);
}
useTransactionDefaultValue: true
}

Loading…
Cancel
Save