I’ve been asked repeatedly about implementing previously available Fahrplan departure times to calendar functionality. Currently that is implemented in dated mkal / kcalendar methods that I’m not so keen to support if there is a middle way. Also, the direct approach won’t get into harbour.
Now, as I understand it, the qml calendar plugin is also still not allowed in harbour? Is there a time line for this?
For the time being I’m probably going to hack a temp file to import method a’la Sailfish.Share API Documentation
But I’d go nemo-qml if there is some chance it will make into harbour in the near future.
Can you explain what you want to achieve here ? I mean, I can read the code, and from a very quick overview, it seems that you would like to add an event to a calendar.
The way it is written looks good to me. You just have to remove the KDateTime stuff that were from KDE3-4 era. Don’t hesitate to ask me whatever you need to understand the code.
Well, I’d need to be able to include the correct libraries, for one
#elif defined(BUILD_FOR_SAILFISHOS) && defined(BUILD_FOR_OPENREPOS)
# include <extendedcalendar.h>
# include <extendedstorage.h>
# include <kdatetime.h>
# include <ksystemtimezone.h>
#endif
It seems that old KTimeZone had a default constructor for string. But not QTimeZone. So create all ExtendedCalendars with QTimeZone::utc() as argument, instead of a string.
Since I can’t import KCalendarCore/Event, how could I compile? The other messages vis. the undefined template is a error warning in the sdk.
mKCal::ExtendedCalendar::Ptr calendar( new mKCal::ExtendedCalendar( QTimeZone::utc() ) );
produces the template error. And seems to be the form you’re suggesting
Ah this is in QtCreator you mean ? Then, no idea what is missing. I’ve never used it.
Besides a spelling mistake somewhere, the creation of an ExtendedCalendar object matches its definition in mKCal and the QTimeZone one from QTimeZone Class | Qt Core 5.15.9 :