Browse Source

Optimize Code set to false by default

cl-refactor
yann300 10 years ago
parent
commit
9f5981ad05
  1. 2
      mix/CodeModel.h
  2. 14
      mix/qml/Application.qml

2
mix/CodeModel.h

@ -277,7 +277,7 @@ private:
std::map<QString, dev::bytes> m_compiledContracts; //by name std::map<QString, dev::bytes> m_compiledContracts; //by name
dev::Mutex x_pendingContracts; dev::Mutex x_pendingContracts;
std::map<QString, QString> m_pendingContracts; //name to source std::map<QString, QString> m_pendingContracts; //name to source
bool m_optimizeCode = true; bool m_optimizeCode = false;
friend class BackgroundWorker; friend class BackgroundWorker;
}; };

14
mix/qml/Application.qml

@ -420,19 +420,19 @@ ApplicationWindow {
text: qsTr("Display gas estimation") text: qsTr("Display gas estimation")
shortcut: "Ctrl+G" shortcut: "Ctrl+G"
checkable: true checkable: true
onTriggered: onTriggered: mainContent.codeEditor.displayGasEstimation(checked);
{
mainContent.codeEditor.displayGasEstimation(checked);
}
} }
Action { Action {
id: optimizeCodeAction id: optimizeCodeAction
text: qsTr("Optimize contract code") text: qsTr("Enable optimized compilation")
shortcut: "Ctrl+Shift+O" shortcut: "Ctrl+Shift+O"
checkable: true checkable: true
checked: true
Component.onCompleted: codeModel.setOptimizeCode(true);
onTriggered: codeModel.setOptimizeCode(checked); onTriggered: codeModel.setOptimizeCode(checked);
} }
Settings {
property alias gasEstimation: gasEstimationAction.checked
property alias optimizeCode: optimizeCodeAction.checked
}
} }

Loading…
Cancel
Save