Nico[m] | Congrats! | 00:02 |
---|---|---|
juhaj | Thanks. | 00:41 |
*** BitEvil is now known as SpeedEvil | 01:15 | |
*** zbenjamin is now known as Guest87077 | 02:24 | |
*** zbenjamin_ is now known as zbenjamin | 02:24 | |
*** frinring_ is now known as frinring | 03:27 | |
*** armands_ is now known as armands | 07:28 | |
Mister_Magister | i need to detect in .spec file whether user is nemo or defaultuser, how can i achieve that? | 20:28 |
mal | what are you doing in the spec? | 20:29 |
Mister_Magister | installing files in home dir | 20:30 |
Nico[m] | I think you should not do that :D | 20:30 |
mal | that is quite ugly way, why do you do that? | 20:30 |
Nico[m] | Instead install them on the application launch | 20:30 |
Mister_Magister | idc that i shouldn't | 20:30 |
Mister_Magister | xd | 20:30 |
Nico[m] | Because it breaks with multiple users | 20:30 |
Mister_Magister | hmm | 20:30 |
Mister_Magister | can someone explain me why the heck QStandardPaths::writableLocation(QStandardPaths::AppDataLocation); leads to /home/user/.local/share/appname/appname | 20:49 |
Nico[m] | Because that is the XDG data dir | 20:50 |
Mister_Magister | but the data dir is /home/user/.local/share/appname/ | 20:50 |
Mister_Magister | like always | 20:50 |
Mister_Magister | there's no need for second dir | 20:50 |
Nico[m] | Well, qt makes a difference here, if you set the organization and application name or just one of those | 20:51 |
Mister_Magister | what do you mean | 20: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.html | 20:52 |
Mister_Magister | i will just use QStandardPaths::HomeLocation and append .local/share/appname | 20:52 |
Mister_Magister | its all stupid | 20:52 |
Mister_Magister | Nico[m]: if you look at that link, AppDataLocation"~/.local/share/<APPNAME>", | 20:52 |
Mister_Magister | and not AppDataLocation"~/.local/share/<APPNAME>/<APPNAME>", | 20:52 |
Nico[m] | Well, you are missing the context of what appname is | 20:52 |
Nico[m] | Which is why I quoted it (although I forgot to add quotes) | 20:53 |
Mister_Magister | still noone uses appname/appname | 20:53 |
Mister_Magister | every app ever uses just /appname | 20:54 |
Nico[m] | Doesn't that depend? KDE often puts stuff in KDE/app | 20:54 |
Mister_Magister | Nico[m]: nope, no KDE/app here | 20:55 |
Mister_Magister | every app is appname/ | 20:55 |
Nico[m] | Right, they stopped doing that at some point, I think | 20:56 |
mal | Mister_Magister: can you show some code | 20:57 |
Mister_Magister | i did | 20: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 it | 20:57 |
Mister_Magister | QStandardPaths::writableLocation(QStandardPaths::AppDataLocation); leads to /home/user/.local/share/appname/appname | 20:57 |
mal | I mean how you set appname etc | 20:57 |
Mister_Magister | i don't | 20:57 |
mal | looks like most harbour apps I have on a device use the path with that twice | 20:59 |
Mister_Magister | yeah and that's wrong | 20:59 |
Mister_Magister | that's most likely due to SailfishApp::application | 20:59 |
Nico[m] | It is not wrong, it is actually useful, if you run multiple forks of the same app :3 | 21:00 |
Mister_Magister | it is wrong | 21:00 |
Mister_Magister | literally no apps duplicate app name | 21:01 |
Mister_Magister | only sfos is doing it wrong | 21:01 |
Nico[m] | It does not duplicate the app name, it just has the organization name set to the app name | 21:01 |
Mister_Magister | >noone does that outside of sfos | 21:01 |
Nico[m] | Nope, wrong | 21:01 |
Nico[m] | nheko does that as well and a few other applications on my desktop | 21:02 |
Mister_Magister | exceptions | 21:02 |
Nico[m] | (Like the aspyr-media games, Google software, GOG games, quaternion, Qt itself, etc) | 21:03 |
mal | https://git.sailfishos.org/mer-core/qtbase/blob/mer-5.6/src/corelib/io/qstandardpaths_unix.cpp#L95 | 21:04 |
mal | yeah, it's because or the organization | 21:04 |
mal | it would have been nicer to have empty organization | 21:05 |
Nico[m] | You can just override it in your app | 21:05 |
Nico[m] | maximum namespacing is a good default imo | 21:06 |
mal | but using standard paths from qt is the simple way | 21:11 |
mal | but in general the path really should not matter much because people usually don't look at those folders manually | 21:11 |
Nico[m] | No, I mean, you can just call setOrganizationName on startup | 21:11 |
Nico[m] | https://doc.qt.io/qt-5/qcoreapplication.html#organizationName-prop | 21:12 |
mal | ah, true | 21:12 |
mal | that's what libsailfishapp does https://github.com/sailfishos/libsailfishapp/blob/master/src/sailfishapp_priv.cpp#L113 | 21:16 |
Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!