Skip to content

Commit 9f48868

Browse files
committed
Moved over to hardcoded v1 of Go QML
1 parent df0c432 commit 9f48868

File tree

7 files changed

+31
-22
lines changed

7 files changed

+31
-22
lines changed

ethereal/debugger.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"github.com/ethereum/eth-go/ethutil"
1212
"github.com/ethereum/eth-go/ethvm"
1313
"github.com/ethereum/go-ethereum/utils"
14-
"github.com/go-qml/qml"
14+
"gopkg.in/qml.v1"
1515
)
1616

1717
type DebuggerWindow struct {

ethereal/ext_app.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"github.com/ethereum/eth-go/ethreact"
99
"github.com/ethereum/eth-go/ethstate"
1010
"github.com/ethereum/go-ethereum/javascript"
11-
"github.com/go-qml/qml"
11+
"gopkg.in/qml.v1"
1212
)
1313

1414
type AppContainer interface {

ethereal/gui.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"github.com/ethereum/eth-go/ethutil"
1919
"github.com/ethereum/eth-go/ethwire"
2020
"github.com/ethereum/go-ethereum/utils"
21-
"github.com/go-qml/qml"
21+
"gopkg.in/qml.v1"
2222
)
2323

2424
var logger = ethlog.NewLogger("GUI")

ethereal/html_container.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import (
1414
"github.com/ethereum/eth-go/ethstate"
1515
"github.com/ethereum/eth-go/ethutil"
1616
"github.com/ethereum/go-ethereum/javascript"
17-
"github.com/go-qml/qml"
1817
"github.com/howeyc/fsnotify"
18+
"gopkg.in/qml.v1"
1919
)
2020

2121
type HtmlApplication struct {

ethereal/main.go

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,20 @@ import (
44
"os"
55
"runtime"
66

7+
"github.com/ethereum/eth-go"
78
"github.com/ethereum/eth-go/ethlog"
89
"github.com/ethereum/go-ethereum/utils"
9-
"github.com/go-qml/qml"
10+
"gopkg.in/qml.v1"
1011
)
1112

1213
const (
1314
ClientIdentifier = "Ethereal"
1415
Version = "0.6.1"
1516
)
1617

17-
func main() {
18-
runtime.GOMAXPROCS(runtime.NumCPU())
19-
20-
// This is a bit of a cheat, but ey!
21-
os.Setenv("QTWEBKIT_INSPECTOR_SERVER", "127.0.0.1:99999")
22-
23-
qml.Init(nil)
24-
25-
var interrupted = false
26-
utils.RegisterInterrupt(func(os.Signal) {
27-
interrupted = true
28-
})
29-
30-
utils.HandleInterrupt()
18+
var ethereum *eth.Ethereum
3119

20+
func run() error {
3221
// precedence: code-internal flag default < config file < environment variables < command line
3322
Init() // parsing command line
3423

@@ -47,7 +36,7 @@ func main() {
4736

4837
clientIdentity := utils.NewClientIdentity(ClientIdentifier, Version, Identifier)
4938

50-
ethereum := utils.NewEthereum(db, clientIdentity, keyManager, UseUPnP, OutboundPort, MaxPeer)
39+
ethereum = utils.NewEthereum(db, clientIdentity, keyManager, UseUPnP, OutboundPort, MaxPeer)
5140

5241
if ShowGenesis {
5342
utils.ShowGenesis(ethereum)
@@ -65,6 +54,26 @@ func main() {
6554
utils.StartEthereum(ethereum, UseSeed)
6655
// gui blocks the main thread
6756
gui.Start(AssetPath)
57+
58+
return nil
59+
}
60+
61+
func main() {
62+
runtime.GOMAXPROCS(runtime.NumCPU())
63+
64+
// This is a bit of a cheat, but ey!
65+
os.Setenv("QTWEBKIT_INSPECTOR_SERVER", "127.0.0.1:99999")
66+
67+
//qml.Init(nil)
68+
qml.Run(run)
69+
70+
var interrupted = false
71+
utils.RegisterInterrupt(func(os.Signal) {
72+
interrupted = true
73+
})
74+
75+
utils.HandleInterrupt()
76+
6877
// we need to run the interrupt callbacks in case gui is closed
6978
// this skips if we got here by actual interrupt stopping the GUI
7079
if !interrupted {

ethereal/qml_container.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"github.com/ethereum/eth-go/ethpub"
99
"github.com/ethereum/eth-go/ethstate"
1010
"github.com/ethereum/eth-go/ethutil"
11-
"github.com/go-qml/qml"
11+
"gopkg.in/qml.v1"
1212
)
1313

1414
type QmlApplication struct {

ethereal/ui_lib.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/ethereum/eth-go/ethpipe"
1010
"github.com/ethereum/eth-go/ethutil"
1111
"github.com/ethereum/go-ethereum/javascript"
12-
"github.com/go-qml/qml"
12+
"gopkg.in/qml.v1"
1313
)
1414

1515
type memAddr struct {

0 commit comments

Comments
 (0)