Browse Source

Merge branch 'develop' of github.com:ethereum/cpp-ethereum into develop

cl-refactor
Gav Wood 10 years ago
parent
commit
58058ec08d
  1. 7
      mix/qml/LogsPane.qml
  2. 7
      mix/qml/StatusPane.qml
  3. 2
      mix/qml/WebPreview.qml

7
mix/qml/LogsPane.qml

@ -6,12 +6,15 @@ import org.ethereum.qml.SortFilterProxyModel 1.0
Rectangle Rectangle
{ {
property variant statusPane
property variant currentStatus property variant currentStatus
property int contentXPos: logStyle.generic.layout.dateWidth + logStyle.generic.layout.typeWidth - 70 property int contentXPos: logStyle.generic.layout.dateWidth + logStyle.generic.layout.typeWidth - 70
function clear() function clear()
{ {
logsModel.clear(); logsModel.clear();
statusPane.clear();
currentStatus = undefined;
} }
function push(_level, _type, _content) function push(_level, _type, _content)
@ -22,7 +25,7 @@ Rectangle
onVisibleChanged: onVisibleChanged:
{ {
if (visible && (logsModel.count === 0 || (logsModel.get(0).date !== currentStatus.date && logsModel.get(0).content !== currentStatus.content))) if (currentStatus && visible && (logsModel.count === 0 || logsModel.get(0).content !== currentStatus.content || logsModel.get(0).date !== currentStatus.date))
logsModel.insert(0, { "type": currentStatus.type, "date": currentStatus.date, "content": currentStatus.content, "level": currentStatus.level }); logsModel.insert(0, { "type": currentStatus.type, "date": currentStatus.date, "content": currentStatus.content, "level": currentStatus.level });
else if (!visible) else if (!visible)
{ {
@ -533,7 +536,7 @@ Rectangle
enabled: logsModel.count > 0 enabled: logsModel.count > 0
tooltip: qsTr("Clear") tooltip: qsTr("Clear")
onTriggered: { onTriggered: {
logsModel.clear(); logsPane.clear()
} }
} }
} }

7
mix/qml/StatusPane.qml

@ -55,6 +55,12 @@ Rectangle {
currentStatus = { "type": type, "date": Qt.formatDateTime(new Date(), "hh:mm:ss"), "content": text, "level": "error" } currentStatus = { "type": type, "date": Qt.formatDateTime(new Date(), "hh:mm:ss"), "content": text, "level": "error" }
} }
function clear()
{
status.state = "";
status.text = "";
}
StatusPaneStyle { StatusPaneStyle {
id: statusPaneStyle id: statusPaneStyle
} }
@ -359,6 +365,7 @@ Rectangle {
LogsPane LogsPane
{ {
id: logPane; id: logPane;
statusPane: statusHeader
onContentXPosChanged: onContentXPosChanged:
{ {
parent.move(); parent.move();

2
mix/qml/WebPreview.qml

@ -317,7 +317,7 @@ Item {
experimental.settings.localContentCanAccessRemoteUrls: true experimental.settings.localContentCanAccessRemoteUrls: true
onJavaScriptConsoleMessage: { onJavaScriptConsoleMessage: {
console.log(sourceID + ":" + lineNumber + ": " + message); console.log(sourceID + ":" + lineNumber + ": " + message);
webPreview.javaScriptMessage(level, sourceID, lineNumber, message); webPreview.javaScriptMessage(level, sourceID, lineNumber - 1, message);
} }
onLoadingChanged: { onLoadingChanged: {
if (!loading) { if (!loading) {

Loading…
Cancel
Save