This commit is contained in:
erinn 2019-01-28 14:02:36 -08:00
parent d019f3538f
commit 6ba5b7b638
1 changed files with 3 additions and 2 deletions

View File

@ -64,9 +64,8 @@ func main() {
go characters.PresencePoller(gcd.UIState.GetContact, gcd.UIState.AddContact, gcd.UIState.UpdateContact)
go characters.GroupPoller(gcd.UIState.GetContact, gcd.UIState.UpdateContact)
// here we go!
// prevent qt from initiating network connections (possible deanon attempts!)
factory := qml.NewQQmlNetworkAccessManagerFactory()
factory.Create(nil)
factory.ConnectCreate(func(parent *core.QObject) *network.QNetworkAccessManager {
nam := network.NewQNetworkAccessManager(parent)
nam.SetNetworkAccessible(network.QNetworkAccessManager__NotAccessible)
@ -80,6 +79,8 @@ func main() {
return nam
})
view.Engine().SetNetworkAccessManagerFactory(factory)
// here we go!
view.Show()
widgets.QApplication_Exec()
}