Even though Python has native data types for such purposes, the Qt values are converted to string. This makes working with them hard. I'd like to see, for example, a QDateTime converted to a datetime.datetime instance. (I hope kdelibs is the correct product here, as I wasn't able to find a better one.)
Hi Jan, yes, that would be really more comfortable. The problem with changing it from string to datetime would be, that it changes the behavior and would break existing scripts/solutions that relay on the current implementation. In fact the work to return and take python's datetime is already done (see the commented out QDateTime code in http://websvn.kde.org/trunk/KDE/kdebindings/python/krosspython/pythonvariant.h?view=markup and works fine. But cause of the requirment to don't change prev behavior and existing scripts, it's disabled and not used. Well, it may an idea to introduce some kind of switch to let consumers optional enable it explicit. Not sure there how that could be done but guess it would be the only way how it can be done :-/
Hi Sebastian, well, are you sure there are any custom scripts relying on this behavior? I'd say that as nobody bothered to report this issue (which *is* a bug), it probably isn't used that much. For example, In Gentoo, we aren't shipping Python bindings yet, and I'm the only one who seems to be interested in this stuff.
Sebastian, could we perhaps add an extra function to Kross which, when called, would set a flag and cause QDateTime passing to work as expected?
@Jan Yes, that would be an idea. Maybe we just need some flag in Kross::Manager that is then evaluated at the backend. The problem is, that this is interpreter dependent. Maybe we could just add an InterpreterInfo::Option?
Thank you for the bug report. As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists. If this bug is no longer persisting or relevant please change the status to resolved.
Kross got removed in KF6, that solves this, naturally no like anticipated, but that never took of, sorry.