Sunday, 2020-10-11

*** zbenjamin is now known as Guest5810701:53
*** zbenjamin_ is now known as zbenjamin01:53
r0kk3rznot sure it does03:03
*** frinring_ is now known as frinring03:40
*** jameshjacks0njr_ is now known as jameshjacks0njr04:54
*** monich_ is now known as monich10:33
attahOkay Qt-wizards.. Are QProcess instances with the same parent fighting for time on the same CPU core or not?17:33
attahThem showing separately in top would suggest they aren't, but the CPU utilization summing to 100, within margin of error makes me wonder... and trying to search for answers on the internet certainly didn't make anything clearer17:34
attahHmm, if i just get my head on straight and compare apples to apples, i can see it performs just the same as a regular pipe... so no reason to complain17:51
attahstill lots of confusion on the interwebs...17:51
Nico[m]Man, once qmllivebench and sfsdk work, they are actually really fun to use :D20:13
Mister_Magistermal: monich: how can i receive in my app network change?20:27
Nico[m]Mister_Magister: static ContextProperty *prop = new ContextProperty("Internet.NetworkState");20:29
Nico[m]connect(prop, &ContextProperty::valueChanged, [this]() {});20:29
Nico[m](You can do the same from Qml too)20:29
Mister_MagisterNico[m]: my savior!20:30
Nico[m]Basically you want to connect to the Internet.NetworkState property from statefs20:30
Mister_Magisterthe hell is context property lmao20:30
Mister_Magisterhuuh20:30
Nico[m]There also is one for the carrier etc20:30
Mister_Magisteri need to know if its wifi, roaming, mobile yaknow20:30
Nico[m]Yeah, that one is called a bit differently, let me check20:31
Nico[m]You wanto Internet.NetworkType20:32
Nico[m]You can also read the current value from here on your device: /var/run/state/namespaces/Internet/NetworkType20:33
Mister_Magisterthanks!20:34
Mister_MagisterNico[m]: will ContextProperty *prop = new ContextProperty("Internet.NetworkType"); tell me if there's no network?20:35
monichMister_Magister: I would consider NetworkManager::connected20:35
monichhttps://git.sailfishos.org/mer-core/libconnman-qt/blob/e0448d13/libconnman-qt/networkmanager.h#L5020:35
monichor NetworkManager::state20:36
Mister_Magisterwell i need both if its connected or not and connection type20:36
Nico[m]Mister_Magister: Not sure, I think I used the network state for it :320:36
Nico[m]And you can connect to multiple properties .-.20:37
monichMister_Magister: how about NetworkManager::defaultRoute then20:37
monichmore than one service can be connected at the same time20:38
Mister_Magisterbut how do i use that20:38
monichit's certainly the case certainly in case of vpn20:38
monichMister_Magister: you can use that any way tou like!20:38
Mister_Magisteri mean20:38
Mister_Magisterhow do i connect and stuff20:38
monichit's a property, there's a signal associated with it20:39
monichin c++ you better get the instance from NetworkManager::instance()20:40
monichfrom qml you can also get the shared instance somehow20:40
Mister_Magisterc++ interests me only20:41
Mister_Magisteri mean NetworkManager? didn't sfos have connman20:41
Mister_Magisterconfused20:42
monichNetworkManager is a wrapper for net.connman.Manager dbus interface20:42
Mister_Magisterahh20:42
monichyeah, it's a bit confusing))20:42
Mister_Magisterhow do i include it20:42
monichBuildRequires:  pkgconfig(connman-qt5)20:44
monichconnman-qt5-devel package20:44
Mister_Magisteranything in .pro?20:45
Mister_Magisterbut like header to include20:45
monichregular pkgconfig stuff in .pro20:45
Mister_Magisternetworkmanager.h found!20:46
monichPKGCONFIG += connman-qt520:46
monichCONFIG += link_pkgconfig20:47
Mister_Magisteryeah yeah20:47
Mister_Magisteralready said its found20:47
Mister_Magister;)20:47
Mister_Magistermonich: i can use connectedChanged for connection state but what about type?20:48
monichfrom defaultRoute you get NetworkService which has the type20:49
monichdon't keep the pointer to NetworkService though, it can be spontaneously deleted20:50
monichor watch its deleted() signal20:50
monichor what it's called20:51
monichdestroyed() it is20:51
Mister_Magisternice warning20:54
Mister_Magisterxd20:54
Mister_Magisterbut how do you keep signal slot then20:54
Mister_Magisterwouldn't contextproperty be better then?20:55
monichwell, it's programming21:00
monichthere are 100500 ways to do the same thing21:00
Mister_Magisteryeah but context property won't magically suddenly remove  connection21:01
Mister_Magistermonich: how can i mitigate networkmanager going RIP21:01
monichI think networkmanager lives forever, its networkservice that can die anytime21:02
Mister_Magisteryeah how can i mitigate that?21:03
Mister_MagisteronDelete, assign new instance and connection?21:03
monichfirst, do you really need to keep that pointer21:03
Mister_Magisteri really need to keep connected to signal21:04
Mister_Magisterso i get network state/type change signal21:04
monichto defaultRoute you have to if you want to get notified21:04
Mister_Magisteryeah but if pointer will get deleted, signal will too21:05
monichdefaultRoute is networkmanager's property21:05
monichthat thing never dies I think21:05
monichbut the value is networkservice*21:06
monichwhich can die later21:06
Mister_Magisterohhh21:06
Mister_Magisteryeah no i just need change21:06
Mister_Magisterso i set network type in library21:06
Mister_Magisteri dont need its pointer21:06
monichthen you handle defaultRoute, check it for null, query the type21:06
monichand you're done21:07
monichhandle defaultRouteChanged that is21:07
monichthe signal21:07
monichQ_PROPERTY(NetworkService* defaultRoute READ defaultRoute NOTIFY defaultRouteChanged)21:07
Mister_Magisterokay21:29
Mister_Magistermonich: but what types are there21:45
Mister_Magistercan't seem to find it21:45
Mister_Magisterhttps://git.sailfishos.org/mer-core/libconnman-qt/blob/e0448d13/libconnman-qt/networkmanager.cpp#L97 found this21:47
Mister_Magisterbut its not enough21:47
Mister_Magisterguess i can take roaming value in case its cellural21:50
Mister_Magisteror however you type that21:50
monichhttps://git.sailfishos.org/mer-core/connman/blob/41b88740/connman/src/service.c#L55821:51
monichMister_Magister: types ^21:51
Mister_Magistermonich: i need wifi. cellular, roaming, none. https://paste.opensuse.org/709a3ec5 would this be sufficient?21:52
Mister_Magisterand if networkService is nulptr then none21:52
monichthen you're not connected21:53
Mister_Magisteryeah networkservice isn't null but type is empty, so is that sufficient for my needs?21:54
Mister_Magisteror do i need to bother with bt etc21:54
Mister_Magisterif its vpn i don't know which one is it right?21:54
Mister_Magisterhow's gps a connection even21:55
Mister_Magisterso confused21:55
Mister_Magistermonich: ?22:02
monichMister_Magister: in reality you won't see anything other than wifi, cellular and vpn22:08
monichactually22:08
Mister_Magistervpn is the scary one22:08
monichI'm not sure what's usb connection22:08
Mister_Magisterbecause idk if its cellular or wifi22:08
monichpossibly gadget22:08
Mister_Magistermonich: gadget22:08
Mister_Magistermonich: can i determine if vpn is over cellular or wifi?22:09
monichthat I'm not sure22:09
monichiirc wifi takes precedence over cellular22:10
Mister_Magisteryeah22:10
Mister_Magisterill set vpn to other22:10
monichso if both are connected, wifi is the one actually being used22:10
Mister_Magisterwhy would i bother22:10
Mister_Magisteranything else i'll set to other22:10
Mister_Magisteri know22:10
Mister_Magisterthanks monich for help22:14
monichcheers!22:14
Mister_Magister:322:15
Mister_Magistermonich: will i get defaultroutechanged signal if i change from 2g to 3g?22:21
monichMister_Magister: probably not, unless connection breaks in the process22:23
Mister_Magisterthats… okay i guess? if it keeps all internet connections its fine22:23
monichI would expect 2g to 3g switch to occur without loss of connection22:24
Mister_Magisterokay22:24
monicheven lte although I'm not 100% sure about lte22:24
monichlte is a different radio22:25
Mister_Magisterif it looses conection and notifies me about that thats good22:31

Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!