File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -246,6 +246,7 @@ ApplicationWindow {
246246 }
247247 }
248248 }
249+
249250 }
250251
251252 property var blockModel: ListModel {
Original file line number Diff line number Diff line change @@ -131,6 +131,7 @@ func (gui *Gui) Start(assetPath string) {
131131 context .SetVar ("gui" , gui )
132132 context .SetVar ("eth" , gui .uiLib )
133133 context .SetVar ("shh" , gui .whisper )
134+ //clipboard.SetQMLClipboard(context)
134135
135136 win , err := gui .showWallet (context )
136137 if err != nil {
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ type RpcServer interface {
8080
8181type Log struct {
8282 Address string `json:"address"`
83- Topics []string `json:"topics"`
83+ Topic []string `json:"topics"`
8484 Data string `json:"data"`
8585}
8686
@@ -89,11 +89,11 @@ func toLogs(logs state.Logs) (ls []Log) {
8989
9090 for i , log := range logs {
9191 var l Log
92- l .Topics = make ([]string , len (log .Topics ()))
92+ l .Topic = make ([]string , len (log .Topics ()))
9393 l .Address = toHex (log .Address ())
9494 l .Data = toHex (log .Data ())
9595 for j , topic := range log .Topics () {
96- l .Topics [j ] = toHex (topic )
96+ l .Topic [j ] = toHex (topic )
9797 }
9898 ls [i ] = l
9999 }
Original file line number Diff line number Diff line change 1+ #pragma once
2+
3+ #include " clipboard.hpp"
4+
5+ typedef void Clipboard_;
6+
7+ Clipboard_ *initClipboard ()
8+ {
9+ Clipboard *clipboard = new (Clipboard);
10+ return static_cast <Clipboard_*>(clipboard);
11+ }
Original file line number Diff line number Diff line change 1+ #include " clipboard.h"
2+
3+ #include < QClipboard>
4+
5+ Clipboard::Clipboard ()
6+ {
7+ connect (QApplication::clipboard (), &QClipboard::dataChanged, [this ] { emit clipboardChanged ();});
8+ }
9+
10+ QString Clipboard::get () const
11+ {
12+ QClipboard *clipboard = QApplication::clipboard ();
13+ return clipboard->text ();
14+ }
15+
16+ void Clipboard::toClipboard (QString _text)
17+ {
18+ QClipboard *clipboard = QApplicationion::clipboard ();
19+ clipboard->setText (_text);
20+ }
Original file line number Diff line number Diff line change 1+ package clipboard
2+
3+ // #cgo CPPFLAGS: -I./
4+ // #cgo CXXFLAGS: -std=c++0x -pedantic-errors -Wall -fno-strict-aliasing
5+ // #cgo LDFLAGS: -lstdc++
6+ // #cgo pkg-config: Qt5Quick
7+ //
8+ // #include "capi.hpp"
9+ import "C"
10+
11+ import "github.com/obscuren/qml"
12+
13+ func SetQMLClipboard (context * qml.Context ) {
14+ context .SetVar ("clipboard" , (unsafe .Pointer )(C .initClipboard ()))
15+ }
Original file line number Diff line number Diff line change 1+ #pragma once
2+
3+ #ifdef __cplusplus
4+ extern " C" {
5+ #endif
6+
7+ class Clipboard : public QObject
8+ {
9+ Q_OBJECT
10+ Q_PROPERTY (QString get READ get WRITE toClipboard NOTIFY clipboardChanged)
11+ public:
12+ Clipboard ();
13+ virtual ~Clipboard (){}
14+
15+ Q_INVOKABLE void toClipboard (QString _text);
16+
17+ signals:
18+ void clipboardChanged ();
19+ };
20+
21+ #ifdef __cplusplus
22+ } // extern "C"
23+ #endif
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ type Transaction struct {
150150func NewTx (tx * types.Transaction ) * Transaction {
151151 hash := toHex (tx .Hash ())
152152 receiver := toHex (tx .To ())
153- if receiver == "0000000000000000000000000000000000000000" {
153+ if len ( receiver ) == 0 {
154154 receiver = toHex (core .AddressFromMessage (tx ))
155155 }
156156 sender := toHex (tx .From ())
You can’t perform that action at this time.
0 commit comments