r0kk3rz | haasn in sailfish thats lower than gstreamer and qtmultimedia, so yeah | 00:28 |
---|---|---|
*** zbenjamin is now known as Guest39406 | 01:12 | |
*** zbenjamin_ is now known as zbenjamin | 01:12 | |
*** frinring_ is now known as frinring | 08:08 | |
mal | antis: I haven't yet figured out the issue | 12:01 |
mad_dev | Hey, 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 |
attah | I'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 something | 17:16 |
attah | There are no docs anywhere, are there? | 17:17 |
attah | I 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 importable | 17: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 it | 17:20 |
attah | I know how to do that in the normal case... but here i don't have a main(...) to do it in | 17:21 |
attah | maybe 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 |
attah | hmm, yes.. i see similarities with one of the plugins i have been inspired by | 17:25 |
attah | but does it only work with subprojects? O.o | 17:27 |
Nico[m] | I think it should work with installed plugins too, but I don't know much about it | 17:27 |
attah | I don't even get the terminology tbh | 17:29 |
attah | That example is such a hot mess, they want to expose TimeModel, but just gloss over what actually tie it together | 17:50 |
Nico[m] | The TimeModel gets registererd by the QML_NAMED_ELEMENT. Not sure, if that is available in sailfish yet though. May need qmlRegisterType | 17:52 |
Nico[m] | And the QExampleQmlPlugin class is used to identify the plugin | 17:53 |
attah | that last part is where it gets foggy... | 17:53 |
attah | how? | 17:53 |
attah | i see them sharing no data or anything | 17:54 |
Nico[m] | Did you read the additional links below it? https://doc.qt.io/qt-5/plugins-howto.html | 17:55 |
Nico[m] | You need to install it to the correct directory and other qml apps can load it | 17:56 |
attah | As not to wear on your goodwill, i 'll have to give up | 17:57 |
attah | because i can't find the first thing about where what gets installed, the whole project setup is all greek to me | 17:57 |
Nico[m] | What example code did you start from? | 17:57 |
attah | https://github.com/Acce0ss/harbour-qr-share-plugin | 17:58 |
attah | it does not currently seem to import its own c++ to qml | 17:59 |
Nico[m] | It's all listed in the .pro files and the qmldir file specifies the folders too, afaik | 17:59 |
Nico[m] | I think the lib ends up in here: [QT_INSTALL_LIBS]/nemo-transferengine/plugins | 18:00 |
attah | right... so i throw a qmldir where? | 18:01 |
Nico[m] | Uhh | 18:01 |
attah | i've tried src, top-level and a separate folder | 18:02 |
Nico[m] | Well, you need to install it into a subfolder of the qt plugin directory | 18:02 |
Nico[m] | As listed in the docs | 18: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/qrshare | 18:04 |
attah | in my defense, i still can't find taht it mentions anywhere that qmldir is something one installs... i just assumed it was build-time stuff | 18: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 |
attah | Talk about impostor syndrome... i'm waay too stupid for this perhaps i should just accept i can't code | 18:14 |
Nico[m] | Nah, you just need to read it like 5x | 18:15 |
Nico[m] | You are asking the right questions, now you just need to research them :3 | 18:15 |
attah | I guess i'm too much of a spoiled millennial to reach much past 0.5 times | 18:17 |
attah | Nico[m]: thanks for the pointers | 18:19 |
attah | I'll go whine in the forum and see if anyone can take pity on the lack of official examples | 18:21 |
Nico[m] | Good luck :3 | 18:22 |
attah | People already struggle with interacting with C++ in the basic case, so i surely can't be alone in failing to see the logic here | 18: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 reasonable | 18:25 |
attah | Nico[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 |
attah | https://github.com/monich/sailfish-qrshare/blob/e9706e2add4ea58cd333bd9fd3492333b342f33c/qmlplugin/plugin.cpp#L143 | 18:29 |
Nico[m] | That's the type he is registering, not the plugin | 18:30 |
Nico[m] | QML_SINGLETON to replace that, was only added in Qt5.15: https://doc.qt.io/qt-5/qqmlengine.html#QML_SINGLETON | 18:30 |
attah | right, terminology issue on my part | 18:30 |
attah | but i really only wanted to be able to call back to my plugin from QML, i guess making it the type as well | 18:31 |
Nico[m] | You can register types without those explicit calls to qmlRegister*, but not in Sailfish, since Qt is too old | 18:31 |
Nico[m] | Do you actually want a plugin? What exactly do you want to achieve? | 18:47 |
attah | I'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 app | 18: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 plugin | 18:52 |
Nico[m] | Not sure if you need much qml though | 18:52 |
attah | I'm thinking starting it... and then later making it behave more like a single instance if started a second time | 18:53 |
attah | I'm currently looking at taking the data i need in C++, but couldn't quite find it before | 18:53 |
attah | so the qml could just be a spinner thingy | 18:53 |
Nico[m] | Mhm | 18:54 |
Nico[m] | You probably want to do something like the single instance dbus activated apps then, like some messangers are or so | 18:54 |
attah | yeah, but that's next on my list, or i'll go even more crazy :) | 18:55 |
Nico[m] | Oh god :D | 18:55 |
Nico[m] | Have fun :3 | 18:56 |
Simerax | i 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 area | 20:27 |
Nico[m] | It even has your use case as an example pretty much :3 | 20: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 :D | 20:33 |
monich | attah: 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 road | 20:33 |
monich | that's why it's more complicated than if you only need to target the latest release | 20:33 |
attah | monich: i suspected it was more complicated than i need... thanks for the info | 20:35 |
monich | I just like making my apps backward compatible with as many os releases as reasonably possible | 20:36 |
monich | I even have a special jolla1 device for testing those, it's still running sfos 2.0.something | 20:36 |
monich | it's fun :) | 20:37 |
attah | That's very nice of you, and maybe i should too, but i seem to have enough issues at the time being (: | 20:37 |
attah | Problem solving is fun, for sure | 20: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 platforms | 20:38 |
monich | I'm not saying it's necessary, but I still like it)) | 20:38 |
attah | I 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 use | 20: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... :D | 20:40 |
attah | monich: if anything came across as criticism previously, that was entirely unintentional... i have nothing but admiration | 20:42 |
attah | btw... 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 |
attah | no, there is a plugin(TransferPluginInterface), a info(TransferPluginInfo) and a uploader(MediaTransferInterface) | 20:50 |
attah | and the uploader is what seems to have access to what is actually being shared | 20:51 |
Nico[m] | Well, your uploader is probably not getting called then | 20:51 |
attah | i'd still expect it to be constructed... but perhaps not... | 20:52 |
Nico[m] | Not if it doesn't get loaded, I guess | 20:52 |
attah | and i can't really find examples on how it gets started | 20:52 |
Nico[m] | Alternatively, It may log to somewhere else? | 20:53 |
attah | thus my try with opening an external url to just see *something* | 20:53 |
attah | i peppered it with exit statements too, but was wholly unable to fins which one broke the entire sharing menu | 20:54 |
Nico[m] | You could try creating a file in /tmp | 20:54 |
attah | as a reboot with no changed code made it work again | 20:54 |
attah | sure, but i have no reason to suspect url opening is somehow disabled | 20:55 |
attah | time to sleep... good night! (i do read logs if there are "late" answers) | 21:06 |
Nico[m] | Good night :3 | 21:06 |
*** Ischwitch is now known as Ingvix | 22:04 |
Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!