Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

Commit

Permalink
m_qwebConnector is not a pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
debris committed Oct 31, 2014
1 parent cebfa35 commit 8c6af7f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
5 changes: 2 additions & 3 deletions alethzero/MainWin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,7 @@ Main::Main(QWidget *parent) :

m_webThree.reset(new WebThreeDirect(string("AlethZero/v") + dev::Version + "/" DEV_QUOTED(ETH_BUILD_TYPE) "/" DEV_QUOTED(ETH_BUILD_PLATFORM), getDataDir() + "/AlethZero", false, {"eth", "shh"}));

m_qwebConnector = new QWebThreeConnector();
m_server = unique_ptr<WebThreeStubServer>(new WebThreeStubServer(m_qwebConnector, *web3(), keysAsVector(m_myKeys)));
m_server = unique_ptr<WebThreeStubServer>(new WebThreeStubServer(&m_qwebConnector, *web3(), keysAsVector(m_myKeys)));
m_server->setIdentities(keysAsVector(owned()));
m_server->StartListening();

Expand All @@ -159,7 +158,7 @@ Main::Main(QWidget *parent) :
// NOTE: no need to delete as QETH_INSTALL_JS_NAMESPACE adopts it.
m_qweb = new QWebThree(this);
auto qweb = m_qweb;
m_qwebConnector->setQWeb(qweb);
m_qwebConnector.setQWeb(qweb);

QWebSettings::globalSettings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
QWebFrame* f = ui->webView->page()->mainFrame();
Expand Down
2 changes: 1 addition & 1 deletion alethzero/MainWin.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,6 @@ private slots:
bool m_logChanged = true;

std::unique_ptr<WebThreeStubServer> m_server;
QWebThreeConnector* m_qwebConnector = nullptr;
QWebThreeConnector m_qwebConnector;
QWebThree* m_qweb = nullptr;
};
5 changes: 2 additions & 3 deletions third/MainWin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ Main::Main(QWidget *parent) :
m_web3.reset(new WebThreeDirect("Third", getDataDir() + "/Third", false, {"eth", "shh"}));
m_web3->connect(Host::pocHost());

m_qwebConnector = new QWebThreeConnector();
m_server = unique_ptr<WebThreeStubServer>(new WebThreeStubServer(m_qwebConnector, *web3(), keysAsVector(m_myKeys)));
m_server = unique_ptr<WebThreeStubServer>(new WebThreeStubServer(&m_qwebConnector, *web3(), keysAsVector(m_myKeys)));
m_server->setIdentities(keysAsVector(owned()));
m_server->StartListening();

Expand All @@ -127,7 +126,7 @@ Main::Main(QWidget *parent) :
// NOTE: no need to delete as QETH_INSTALL_JS_NAMESPACE adopts it.
m_qweb = new QWebThree(this);
auto qweb = m_qweb;
m_qwebConnector->setQWeb(qweb);
m_qwebConnector.setQWeb(qweb);

QWebFrame* f = ui->webView->page()->mainFrame();
f->disconnect(SIGNAL(javaScriptWindowObjectCleared()));
Expand Down
2 changes: 1 addition & 1 deletion third/MainWin.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,6 @@ private slots:
QNetworkAccessManager m_webCtrl;

std::unique_ptr<WebThreeStubServer> m_server;
QWebThreeConnector* m_qwebConnector = nullptr;
QWebThreeConnector m_qwebConnector;
QWebThree* m_qweb = nullptr;
};

0 comments on commit 8c6af7f

Please sign in to comment.