Commit c9f907d1 authored by Dominique Hummel's avatar Dominique Hummel Committed by Claudio Cambra
Browse files

Display Google Meet/Hangout data if available

## Note

This patch will not work until libkgapi!31 is merged.

Feel free to undraft this MR if and when the relevant libkgapi patch has been merged.

## Summary

This MR aims to solve [Bug-458655]( by displaying a clickable Google Meet/Hangout link on events that supply one.

## Test Plan

1. Ensure your local libkgapi has libkgapi!31 applied.
2. Connect a new Google groupware.
3. Create an event in said Google Calendar which contains an invitation to a Google Meet/Hangout.
4. Have Kalendar sync the events.

You should observe that the link to the Google Meet/Hangout is displayed below the organizer in the detailed event view.
parent 1f07c493
Pipeline #234360 passed with stage
in 2 minutes and 2 seconds
......@@ -498,6 +498,18 @@ QQC2.ScrollView {
QQC2.Label {
Layout.alignment: QT.AlignTop
text: i18n("<b>Google Meet:</b>")
visible: root.incidenceWrapper.googleConferenceUrl
HoverLabel {
Layout.fillWidth: true
text: root.incidenceWrapper.googleConferenceUrl
visible: root.incidenceWrapper.googleConferenceUrl
QQC2.Label {
Layout.alignment: Qt.AlignTop
text: i18n("<b>Guests:</b>")
......@@ -87,6 +87,7 @@ void IncidenceWrapper::notifyDataChanged()
Q_EMIT todoCompletedChanged();
Q_EMIT todoCompletionDtChanged();
Q_EMIT todoPercentCompleteChanged();
Q_EMIT googleConferenceUrlChanged();
Akonadi::Item IncidenceWrapper::incidenceItem() const
......@@ -603,6 +604,11 @@ void IncidenceWrapper::setRecurrenceDataItem(const QString &key, const QVariant
Q_EMIT recurrenceDataChanged();
QString IncidenceWrapper::googleConferenceUrl()
return m_incidence->customProperty("LIBKGAPI", "EventHangoutLink");
QVariantMap IncidenceWrapper::organizer()
auto organizerPerson = m_incidence->organizer();
......@@ -86,6 +86,8 @@ class IncidenceWrapper : public QObject, public Akonadi::ItemMonitor
Q_PROPERTY(QDateTime todoCompletionDt READ todoCompletionDt NOTIFY todoCompletionDtChanged)
Q_PROPERTY(int todoPercentComplete READ todoPercentComplete WRITE setTodoPercentComplete NOTIFY todoPercentCompleteChanged)
Q_PROPERTY(QString googleConferenceUrl READ googleConferenceUrl NOTIFY googleConferenceUrlChanged)
enum RecurrenceIntervals {
......@@ -195,6 +197,8 @@ public:
Q_INVOKABLE void clearRecurrences();
Q_INVOKABLE void setCollection(const Akonadi::Collection &collection);
QString googleConferenceUrl();
void incidenceItemChanged();
void incidencePtrChanged(KCalendarCore::Incidence::Ptr incidencePtr);
......@@ -238,6 +242,8 @@ Q_SIGNALS:
void todoPercentCompleteChanged();
void attendeesChanged();
void googleConferenceUrlChanged();
void itemChanged(const Akonadi::Item &item) override;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment