libera/#maemo-leste/ Friday, 2024-06-14

dsc_freemangordon: I removed config stuff and AccountChannel from tp: https://github.com/maemo-leste/conversations/tree/tp-configstate04:29
dsc_its much better04:29
dsc_still wip04:29
freemangordondsc_: cool07:52
freemangordondsc_: while on it, please, please, for the life of the kittens, do not use 'auto' unless strictly necessary07:53
freemangordonalso, instead of using isNull() on shared pointers, there should be operator bool, i.e. if (!shared_pre.isNull()) {} can be done as if (shared_ptr) {}07:54
freemangordonumm, sorry for the typo, I meant "if (!shared_ptr.isNull()) {} can be done as if (shared_ptr) {}"07:56
freemangordonhttps://github.com/maemo-leste/conversations/compare/master...tp-configstate#diff-e2170e85790184b8a7e3cc950589dff0faf126adff727f418c48e763ad8a1e3dR2207:58
freemangordonthere is QStandardPaths::ConfigLocation and QStandardPaths::GenericConfigLocation and QStandardPaths::AppConfigLocation etc07:59
freemangordonno need to create config path by hand, unless I am missing something, see https://doc.qt.io/qt-6/qstandardpaths.html08:00
freemangordonwhy ConfigState() class, instead of just using QSettings? with QSettings you can store QVariant, and you can put there whatever structure you may need08:02
freemangordonugh, no, this is a recipe for disaster https://github.com/maemo-leste/conversations/compare/master...tp-configstate#diff-87db68d7596ffb0dfea5735881430cc11e7a6c780e8de85a530e1654839077cdR15208:04
freemangordonnever use raw pointers as keys or whatever08:05
freemangordonmake that list map08:07
freemangordonor use local_id or remote_id something when iterating08:09
Wizzupfreemangordon: what is wrong with 'auto' ?11:02
freemangordoncode becomes unreadable11:05
freemangordonso, unless it is lamda, auto *must* not be used in my book11:05
freemangordonmaybe there is one more legitimate use case, but I can't remember11:06
freemangordonif we are to use auto, why not just switch to js and call it a day?11:07
WizzupI mean fair enough I guess11:13
freemangordonumm, can't parse :)11:14
uvos__sometimes deeply nested templateing can make it really undesirable to list the type more than once11:15
uvos__but ofc your working a larger problem with auto there11:15
freemangordonright, that was the other use case11:15
uvos__*working around11:15
freemangordon:nod:11:15
freemangordonyou'd better have typedef-ed that11:16
freemangordonbut yeah, if it is very long type, auto is fine I guess11:16
uvos__but yeah i dont like "auto item = getItem(local_uid, remote_id);" either11:18
uvos__since now i have to go figure out what getItem returns11:18
freemangordonexactly11:19
uvos__feals like python xD11:19
uvos__who-knows-what-this-is11:19
freemangordon== "unreadable code"11:19
Wizzupour user guide, shall we host it on maedevu.maemo.org or somewhere else11:56
* unic0rn lurks out, shivers, hides back and hugs his tcl/tk11:57
Wizzupleste.maemo.org is an option but it's a wiki too11:57
Wizzupfreemangordon: so for debugging audio issues with sofiasip I guess we have: voicecall-manager, telepathy-rakia, various gst dependencies/components, pulseaudio, and the different sip settings?12:01
Wizzupand I guess farstream is in voicecall-manager12:11
freemangordonWizzup: I have absolutely NFC how all this is supposed to work12:20
Wizzupfreemangordon: ok, so we're in the same boat then12:27
dsc_ freemangordon> umm, sorry for the typo, I meant "if (!shared_ptr.isNull()) {} can be done as if (shared_ptr) {}"13:03
dsc_^-- I did that but didnt work hence I used isNull()13:03
dsc_ freemangordon> why ConfigState() class, instead of just using QSettings?13:05
dsc_^-- because I want to write state.json which is a file that can be hand-edited, based on an earlier request by Wizzup13:06
dsc_< freemangordon> ugh, no, this is a recipe for disaster13:07
dsc_^-- your link is broken, I dont know what you a referring to13:07
dsc_your reaction makes it seem like this code is terrible, which it is not. I will refrain from posting WIPs to you.13:08
dsc_i shared it to share the general architecture13:09
dsc_and ill use `auto` whenever I want ;)13:10
dsc_< freemangordon> there is QStandardPaths::ConfigLocation and QStandardPaths::GenericConfigLocation13:13
dsc_why even mention this, this code is about Tp, I am well aware aboug XDG paths, you want me to fix everything in one commit? :P13:13
dsc_its just being pedantic for no reason13:14
dsc_regarding `auto getItem`, the API is easy to follow; add, get, delete, save, load: https://github.com/maemo-leste/conversations/blob/tp-configstate/src/lib/state.h13:25
freemangordondsc_: weird that the link is broken, anyways, I was referring to channelByName() implementation13:41
freemangordonfor(TelepathyAccount *ta: accounts) {13:41
freemangordondsc_: also, my comments were not meant to offend you, it is a pity you take it like that13:42
dsc_QList<TelepathyAccount*> accounts;13:43
freemangordondsc_: re auto - it makes it way harder to read the code, esp when doing peer review os a commit13:43
freemangordon*of a13:43
dsc_this one right? ought to be wrapped in Ptr13:43
dsc_SharedPtr13:44
dsc_https://github.com/maemo-leste/conversations/blob/master/src/lib/tp.h#L20613:44
dsc_we've had this forever, and yes its bad, ill do something about it13:45
inkyif today anyone would like to help me to install maemo on mz617, i think i can concentrate on it in nearest hours.13:59
Wizzupthere's no documentation yet, so don't brick it14:01
Wizzuplike I said, I am working on it, I likely won't be able to help if you brick it by doing it before we have documentation14:01
Wizzupalso you need the -experimental kernel for it to boot and the current images do not have this14:02
freemangordondsc_: sorry, got a call14:03
freemangordonyes, this one QList<TelepathyAccount*> accounts;14:03
freemangordondsc_: again re auto - ofc I cannot tell you how to code, but, most-probably at some point I'll change all autos to proper types14:04
freemangordonusing auto for bool ...14:04
freemangordona side note - I was thinking you have been long enough in BG so there is no need for me to be politically correct. Obliviously that's not the case, so I'll watch my tone more strictly for the future.14:07
dsc_hehe14:07
freemangordonno, really, I was kind of surprised by your reaction, however, I'll watch my comments14:08
dsc_freemangordon: https://berthub.eu/articles/pretty-ok.png14:08
freemangordonexactly14:09
dsc_please, just be yourself, no need to change14:10
dsc_and in return i will keep telling you you are being pedantic14:10
dsc_its fine14:10
dsc_:P14:11
freemangordonok, we have a deal, as long as there are no hard feelings14:11
dsc_no no14:11
freemangordonand we are moving ahead14:11
freemangordon:deal:14:11
dsc_regarding isNull(), ill fix that too because https://godbolt.org/z/6qrzKGf8x14:38
freemangordonmaybe my browser is old, but that link renders no usable info14:40
freemangordonI see just some top bar "compiler explorer" and thats all14:40
dsc_https://plak.infrapuin.nl/selif/a5ltu6tp.png14:41
dsc_i was observing other results last night but you are correct, isNull should not be needed14:41
freemangordonhmm, wait14:42
freemangordonah, right14:42
freemangordonmy bad14:42
freemangordonhowever, you should be able to do FooPtr p; if (p) {}14:43
dsc_yes14:45
havenonamehi all15:17
dsc_hi15:20
kivasicelo: I did not find Fremantle fingerterm, but more resent source found quite obvious place: https://github.com/sailfishos/fingerterm15:22
siceloah, now i remember that when i used it on N900, i was running Meego CE16:43
dsc_Wizzup: https://github.com/maemo-leste/conversations/blob/tp-configstate/src/lib/tp.cpp#L248-L29816:55
dsc_I think this works without using `requestsSatisfied` (old version: https://github.com/maemo-leste/conversations/blob/master/src/lib/tp.cpp#L228-L302 )16:55
dsc_but I will verify16:55
Wizzupyes, please don't rewrite the core tp stuff too much, I spent a lot of time figuring out why we need to do all these things16:59
Wizzupwith various edge cases that you might not run into here16:59
Wizzupand I honestly have no idea why it was needed anymore but it definitely was at the time16:59
Wizzupso please don't get rid of it :(16:59
Wizzupalthough it would make sense that requests satisfied is something we write, not read17:00
Wizzup Requests_Satisfied — ao17:01
WizzupThe requests satisfied by these channels.17:01
WizzupRationale:17:01
WizzupIf the handler implements Requests, this tells it that these channels match previous AddRequest calls that it may have received.17:01
WizzupThere can be more than one, if they were EnsureChannel requests.17:01
dsc_yes17:16
dsc_however I did check various Tp clients on Github and could not find one that actually uses `requestsSatisfied`17:16
dsc_like the KDE one etc.17:16
dsc_but we'll see17:16
Wizzuphow will we see?17:19
dsc_by first understanding what `requestsSatisfied` is, or why we are the only one using it, and to see if everything works without using it17:23
dsc_> If the handler implements Requests, this tells it that these channels match previous AddRequest calls17:24
dsc_e.g: are we doing AddRequest calls17:24
dsc_if so, is it relevant to us to match them handleChannels()17:24
dsc_https://bugs.freedesktop.org/show_bug.cgi?id=7798617:29
dsc_> The main purpose of Requests_Satisfied is matching up channels you're being asked to handle with either requests you started (if you create/ensure channels), or channels whose channel request you were previously asked to approve (if you're an Observer or Approver)17:29
dsc_> If you're doing either of those, you have a TpChannelRequest already, it's probably already prepared too, and all you need to do is match it by object path or by object identity, for instance looking it up in a hash table { channel request => chat window }.17:29
dsc_sounds like `Requests_Satisfied` is a way to make sure handleChannels is only handling the channels it previously requested (in the case there are multiple observers)17:30
Wizzupdsc_: what about ensuring that a channel doesn't already exist18:16
dsc_Wizzup: channels are unique on TargetID (remote_uid in practice)18:41
dsc_and we're only handling TextChannels at this point18:42
Wizzuphttps://maedevu.maemo.org/docs/userguide/20:15
Wizzup^^20:15
freemangordonnice :)20:21
Wizzupdsc_: in the latest stable release the bug is still there btw20:24
Wizzupdsc_: https://wizzup.org/bug.png20:25
Wizzupthis happens for every sms20:25
Wizzupwell, stable, I mean devel release20:26
Wizzupfreemangordon: just for the record the repo I made on github might not be 'official' one atm so I am not sure if the guy will see it but I will let him know20:40
Wizzupbrtw20:40
Wizzupbtw20:40
Wizzupapt install maemo-user-guide20:40
freemangordonok20:40
freemangordonI just closed the issue anyways20:41
WizzupI will update hildon-desktop's user-guide.desktop now20:41
Wizzuproot@maindroid:/usr/share/applications/hildon# grep Exec user-guide.desktop20:41
freemangordongreat20:41
WizzupExec=x-www-browser file:///usr/share/doc/maemo-user-guide/html/index.html20:41
Wizzupagreed?20:41
Wizzupthis works with jib and dillo (n900)20:41
freemangordonisn't it better to open the pdf?20:41
Wizzupno, because our pdf reader is shit20:42
Wizzup:)20:42
freemangordonis it?20:42
Wizzupit crashes frequently and I haven't given it any more love20:42
freemangordonnever had issues, but ok20:42
Wizzupeven locking the screen will make it crash20:42
Wizzupreally?20:42
Wizzupon leste?20:42
freemangordonmhm20:42
freemangordonnot that used it much :)20:42
Wizzupthat's probably why20:42
freemangordonyeah20:42
WizzupI use it every time I take the bus or whatever20:42
Wizzupand it is very crash prone20:42
Wizzupthere is also epub version which might be ok on n900, maybe better than dillo, but, eh.20:42
freemangordonok.20:42
Wizzupftr I did most of the pdf reader porting so the blame probably falls on me ;)20:43
freemangordongood to know :)20:45
Wizzupdsc_: and re: the bug, incoming sms is not a group chat and also not a chat message (different icon)20:46
Wizzupand it goes away upon conversations restart20:46
freemangordonok, I am going MIA, see ya in 2 weeks :)20:46
Wizzupttyl20:53
Wizzupany objections to running this in leste-config-n900 postinst?21:13
Wizzupupdate-alternatives --install /usr/bin/x-www-browser x-www-browser /usr/bin/dillo 10021:13
dsc_Wizzup: lets fix this in this commit im working on21:20
dsc_but I will need info21:21
dsc_brb 30min21:21
dsc_Wizzup: since made significant changes to both tp.cpp and the way overview renders21:53
dsc_lets try this on the new version first21:53
dsc_but not now, I am dealing with quite a big refactor21:54
dsc_im in the process of testing IRC and XMPP and the functionality related to that21:55
dsc_after that I can push changes, at which point we can see what exactly happens to SMS21:55
Wizzupokay, please also test sms if you can, assuming you have a second sim card22:05
dsc_ugh finally found the leak23:48
dsc_but thats good news23:49
dsc_https://github.com/maemo-leste/conversations/blob/master/src/lib/rtcom.cpp#L10223:50
dsc_should use `qtrtcom::rtcomel()`23:50
dsc_not sure how it was missed23:50
dsc_ok great :)23:52
dsc_Wizzup: sorry I dont have a 2nd SIM right now23:55

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