Wednesday, 2021-03-17

Nico[m]Congrats!00:02
juhajThanks.00:41
*** BitEvil is now known as SpeedEvil01:15
*** zbenjamin is now known as Guest8707702:24
*** zbenjamin_ is now known as zbenjamin02:24
*** frinring_ is now known as frinring03:27
*** armands_ is now known as armands07:28
Mister_Magisteri need to detect in .spec file whether user is nemo or defaultuser, how can i achieve that?20:28
malwhat are you doing in the spec?20:29
Mister_Magisterinstalling files in home dir20:30
Nico[m]I think you should not do that :D20:30
malthat is quite ugly way, why do you do that?20:30
Nico[m]Instead install them on the application launch20:30
Mister_Magisteridc that i shouldn't20:30
Mister_Magisterxd20:30
Nico[m]Because it breaks with multiple users20:30
Mister_Magisterhmm20:30
Mister_Magistercan someone explain me why the heck QStandardPaths::writableLocation(QStandardPaths::AppDataLocation); leads to /home/user/.local/share/appname/appname20:49
Nico[m]Because that is the XDG data dir20:50
Mister_Magisterbut the data dir is /home/user/.local/share/appname/20:50
Mister_Magisterlike always20:50
Mister_Magisterthere's no need for second dir20:50
Nico[m]Well, qt makes a difference here, if you set the organization and application name or just one of those20:51
Mister_Magisterwhat do you mean20:51
Nico[m]In the table above, <APPNAME> is usually the organization name, the application name, or both, or a unique name generated at packaging.20:52
Nico[m]https://doc.qt.io/qt-5/qstandardpaths.html20:52
Mister_Magisteri will just use QStandardPaths::HomeLocation and append .local/share/appname20:52
Mister_Magisterits all stupid20:52
Mister_MagisterNico[m]: if you look at that link, AppDataLocation"~/.local/share/<APPNAME>",20:52
Mister_Magisterand not AppDataLocation"~/.local/share/<APPNAME>/<APPNAME>",20:52
Nico[m]Well, you are missing the context of what appname is20:52
Nico[m]Which is why I quoted it (although I forgot to add quotes)20:53
Mister_Magisterstill noone uses appname/appname20:53
Mister_Magisterevery app ever uses just /appname20:54
Nico[m]Doesn't that depend? KDE often puts stuff in KDE/app20:54
Mister_MagisterNico[m]: nope, no KDE/app here20:55
Mister_Magisterevery app is appname/20:55
Nico[m]Right, they stopped doing that at some point, I think20:56
malMister_Magister: can you show some code20:57
Mister_Magisteri did20:57
Nico[m]But I have quite a few applications doing that and if you don't set the organization name, Qt won't nest it20:57
Mister_MagisterQStandardPaths::writableLocation(QStandardPaths::AppDataLocation); leads to /home/user/.local/share/appname/appname20:57
malI mean how you set appname etc20:57
Mister_Magisteri don't20:57
mallooks like most harbour apps I have on a device use the path with that twice20:59
Mister_Magisteryeah and that's wrong20:59
Mister_Magisterthat's most likely due to SailfishApp::application20:59
Nico[m]It is not wrong, it is actually useful, if you run multiple forks of the same app :321:00
Mister_Magisterit is wrong21:00
Mister_Magisterliterally no apps duplicate app name21:01
Mister_Magisteronly sfos is doing it wrong21:01
Nico[m]It does not duplicate the app name, it just has the organization name set to the app name21:01
Mister_Magister>noone does that outside of sfos21:01
Nico[m]Nope, wrong21:01
Nico[m]nheko does that as well and a few other applications on my desktop21:02
Mister_Magisterexceptions21:02
Nico[m](Like the aspyr-media games, Google software, GOG games, quaternion, Qt itself, etc)21:03
malhttps://git.sailfishos.org/mer-core/qtbase/blob/mer-5.6/src/corelib/io/qstandardpaths_unix.cpp#L9521:04
malyeah, it's because or the organization21:04
malit would have been nicer to have empty organization21:05
Nico[m]You can just override it in your app21:05
Nico[m]maximum namespacing is a good default imo21:06
malbut using standard paths from qt is the simple way21:11
malbut in general the path really should not matter much because people usually don't look at those folders manually21:11
Nico[m]No, I mean, you can just call setOrganizationName on startup21:11
Nico[m]https://doc.qt.io/qt-5/qcoreapplication.html#organizationName-prop21:12
malah, true21:12
malthat's what libsailfishapp does https://github.com/sailfishos/libsailfishapp/blob/master/src/sailfishapp_priv.cpp#L11321:16

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