Monday, 2020-07-20

r0kk3rz haasn in sailfish thats lower than gstreamer and qtmultimedia, so yeah00:28
*** zbenjamin is now known as Guest3940601:12
*** zbenjamin_ is now known as zbenjamin01:12
*** frinring_ is now known as frinring08:08
malantis: I haven't yet figured out the issue12:01
mad_devHey, I am kind of lost as to what is the exact procedure needed to become a coordinator for a community translation. Anyone from the l10n team here? The wiki states that it's based on merit by means of contribution.13:36
attahI'm messing around with a sharing plugin, and have stripped down a previous one to the bare necessities... now i just need to have it actually do something17:16
attahThere are no docs anywhere, are there?17:17
attahI can get the thing t be shared in to a the QML page, but i'm pretty sure i want to do C++ things to it, and i can't really see that i have the data in C++-land somewhere, or figure out how to make one of the C++ classes QML importable17:19
Nico[m]You can register classes to be able to use them in Qml, if that is what you are looking for?17:20
Nico[m]You need to register it in different ways, depending on if you just want to expose it or be able to instantiate it17:20
attahI know how to do that in the normal case... but here i don't have a main(...) to do it in17:21
attahmaybe i could/should just throw that in somewhere else?17:21
Nico[m]Maybe somthing like this would work: https://doc.qt.io/qt-5/qtqml-modules-cppplugins.html ?17:22
attahhmm, yes.. i see similarities with one of the plugins i have been inspired by17:25
attahbut does it only work with subprojects? O.o17:27
Nico[m]I think it should work with installed plugins too, but I don't know much about it17:27
attahI don't even get the terminology tbh17:29
attahThat example is such a hot mess, they want to expose TimeModel, but just gloss over what actually tie it together17:50
Nico[m]The TimeModel gets registererd by the QML_NAMED_ELEMENT. Not sure, if that is available in sailfish yet though. May need qmlRegisterType17:52
Nico[m]And the QExampleQmlPlugin class is used to identify the plugin17:53
attahthat last part is where it gets foggy...17:53
attahhow?17:53
attahi see them sharing no data or anything17:54
Nico[m]Did you read the additional links below it? https://doc.qt.io/qt-5/plugins-howto.html17:55
Nico[m]You need to install it to the correct directory and other qml apps can load it17:56
attahAs not to wear on your goodwill, i 'll have to give up17:57
attahbecause i can't find the first thing about where what gets installed, the whole project setup is all greek to me17:57
Nico[m]What example code did you start from?17:57
attahhttps://github.com/Acce0ss/harbour-qr-share-plugin17:58
attahit does not currently seem to import its own c++ to qml17:59
Nico[m]It's all listed in the .pro files and the qmldir file specifies the folders too, afaik17:59
Nico[m]I think the lib ends up in here: [QT_INSTALL_LIBS]/nemo-transferengine/plugins18:00
attahright... so i throw a qmldir where?18:01
Nico[m]Uhh18:01
attahi've tried src, top-level and a separate folder18:02
Nico[m]Well, you need to install it into a subfolder of the qt plugin directory18:02
Nico[m]As listed in the docs18:02
Nico[m]In this case https://github.com/monich/sailfish-qrshare/blob/master/qmlplugin/qmlplugin.pro#L67 it ends up in $$[QT_INSTALL_QML]/com/monich/qrshare18:04
attahin my defense, i still can't find taht it mentions anywhere that qmldir is something one installs... i just assumed it was build-time stuff18:05
Nico[m]> Finally, a qmldir file is required in the imports/TimeExample directory to describe the plugin and the types that it exports. The plugin includes a Clock.qml file along with the qmlqtimeexampleplugin that is built by the project (as shown above in the .pro file) so both of these need to be specified in the qmldir file:18:06
Nico[m]> What is important is the name of the directory that the qmldir is installed into. When the user imports our module, the QML engine uses the module identifier (TimeExample) to find the plugin, and so the directory in which it is installed must match the module identifier.18:06
attahTalk about impostor syndrome... i'm waay too stupid for this perhaps i should just accept i can't code18:14
Nico[m]Nah, you just need to read it like 5x18:15
Nico[m]You are asking the right questions, now you just need to research them :318:15
attahI guess i'm too much of a spoiled millennial to reach much past 0.5 times18:17
attahNico[m]: thanks for the pointers18:19
attahI'll go whine in the forum and see if anyone can take pity on the lack of official examples18:21
Nico[m]Good luck :318:22
attahPeople already struggle with interacting with C++ in the basic case, so i surely can't be alone in failing to see the logic here18:22
Nico[m]Well, you just need a single class inheriting from the plugin baseclass, add a macro with you plugin id and register your types like you would in any other qt/qml application. Then you need to install it into the correct folders, so that qt can find it + add the config files. So from a distance it looks mostly reasonable18:25
attahNico[m]: wait.. i now see monich explicitely registering the plugins... that's needed still, with all this other magic?18:28
Nico[m]Where?18:29
attahhttps://github.com/monich/sailfish-qrshare/blob/e9706e2add4ea58cd333bd9fd3492333b342f33c/qmlplugin/plugin.cpp#L14318:29
Nico[m]That's the type he is registering, not the plugin18:30
Nico[m]QML_SINGLETON to replace that, was only added in Qt5.15: https://doc.qt.io/qt-5/qqmlengine.html#QML_SINGLETON18:30
attahright, terminology issue on my part18:30
attahbut i really only wanted to be able to call back to my plugin from QML, i guess making it the type as well18:31
Nico[m]You can register types without those explicit calls to qmlRegister*, but not in Sailfish, since Qt is too old18:31
Nico[m]Do you actually want a plugin? What exactly do you want to achieve?18:47
attahI'm making a sharing plugin so thet i can publish an option in that menu... and i just want it as thin as possible and to invoke an existing app18:50
attah...and that invocation i think is best/only done in C++18:51
Nico[m]Mhm, do you intend to have your app running while that happens or do you want to start it?18:52
Nico[m]Anyway, sounds like you need the plugin18:52
Nico[m]Not sure if you need much qml though18:52
attahI'm thinking starting it... and then later making it behave more like a single instance if started a second time18:53
attahI'm currently looking at taking the data i need in C++, but couldn't quite find it before18:53
attahso the qml could just be a spinner thingy18:53
Nico[m]Mhm18:54
Nico[m]You probably want to do something like the single instance dbus activated apps then, like some messangers are or so18:54
attahyeah, but that's next on my list, or i'll go even more crazy :)18:55
Nico[m]Oh god :D18:55
Nico[m]Have fun :318:56
Simeraxi would like to split a page in my app into 2 even sized rectangles have them in solid color and be able to react to them being clicked. I tried to use Rectangle but this does not have a onClicked property. Has anyone an idea on how to implement something like this?20:27
Nico[m]Use a Rectangle + a mouse area20:27
Nico[m]It even has your use case as an example pretty much :320:28
Simerax@Nico[m] thanks! i had a weird error about MouseArea not being instantiated so i thought im doing something wrong but the example code cleared it up!20:32
Nico[m]Yay :D20:33
monichattah: that qrshare thing is compatible with sfos all the way down to (at least) 2.0, there was transfer-engine abi break somewhere along the road20:33
monichthat's why it's more complicated than if you only need to target the latest release20:33
attahmonich: i suspected it was more complicated than i need... thanks for the info20:35
monichI just like making my apps backward compatible with as many os releases as reasonably possible20:36
monichI even have a special jolla1 device for testing those, it's still running sfos 2.0.something20:36
monichit's fun :)20:37
attahThat's very nice of you, and maybe i should too, but i seem to have enough issues at the time being (:20:37
attahProblem solving is fun, for sure20:37
Nico[m]I think it is fine, if you like doing such stuff, but since Sailfish is pretty good about updates, I don't think it is that necessary as it is on other platforms20:38
monichI'm not saying it's necessary, but I still like it))20:38
attahI would really want to separate the backend and frontend of SeaPrint even more so that it can benefit other open mobile os initiatives too, but my efforts still very much center around what i actually use20:39
Nico[m]I understand that. For the same reason I wrote a new event store for Nheko, that only needs to keep 2 integers and 2 strings per room in memory... :D20:40
attahmonich: if anything came across as criticism previously, that was entirely unintentional... i have nothing but admiration20:42
attahbtw... i tried despeartely putting qDebug() and QDesktopServices::openUrl() in my uploader, both in start() and the constructor, but neither appears to get called... any ideas on what i'm missing?20:46
Nico[m]What start? Of the plugin?20:48
attahno, there is a plugin(TransferPluginInterface), a info(TransferPluginInfo) and a uploader(MediaTransferInterface)20:50
attahand the uploader is what seems to have access to what is actually being shared20:51
Nico[m]Well, your uploader is probably not getting called then20:51
attahi'd still expect it to be constructed... but perhaps not...20:52
Nico[m]Not if it doesn't get loaded, I guess20:52
attahand i can't really find examples on how it gets started20:52
Nico[m]Alternatively, It may log to somewhere else?20:53
attahthus my try with opening an external url to just see *something*20:53
attahi peppered it with exit statements too, but was wholly unable to fins which one broke the entire sharing menu20:54
Nico[m]You could try creating a file in /tmp20:54
attahas a reboot with no changed code made it work again20:54
attahsure, but i have no reason to suspect url opening is somehow disabled20:55
attahtime to sleep... good night! (i do read logs if there are "late" answers)21:06
Nico[m]Good night :321:06
*** Ischwitch is now known as Ingvix22:04

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