├── .gitignore ├── .gitlab-ci.yml ├── .gitlab └── merge_request_templates │ ├── template.md │ └── template.md.license ├── .kde-ci.yml ├── .reuse └── dep5 ├── CMakeLists.txt ├── CMakePresets.json ├── CMakePresets.json.license ├── LICENSES ├── BSD-2-Clause.txt ├── BSD-3-Clause.txt ├── CC0-1.0.txt ├── GPL-2.0-only.txt ├── GPL-2.0-or-later.txt ├── GPL-3.0-only.txt ├── GPL-3.0-or-later.txt ├── LGPL-2.0-or-later.txt ├── LGPL-2.1-only.txt ├── LGPL-2.1-or-later.txt ├── LGPL-3.0-only.txt ├── LGPL-3.0-or-later.txt ├── LicenseRef-KDE-Accepted-GPL.txt ├── LicenseRef-KDE-Accepted-LGPL.txt └── LicenseRef-Qt-Commercial-exception-1.0.txt ├── README.md ├── cmake └── modules │ ├── FindGpgme.cmake │ ├── add_gpg_crypto_test.cmake │ ├── generate_crypto_test_wrapper.cmake │ ├── kdepim_add_gpg_crypto_test.cmake │ └── kdepim_generate_crypto_test_wrapper.cmake ├── flake.nix ├── logo.png ├── org.kde.kalendar.appdata.xml ├── org.kde.kalendar.svg ├── po ├── ar │ ├── kalendar.po │ └── plasma_applet_org.kde.kalendar.contact.po ├── az │ ├── kalendar.po │ └── plasma_applet_org.kde.kalendar.contact.po ├── ca │ ├── kalendar.po │ └── plasma_applet_org.kde.kalendar.contact.po ├── ca@valencia │ ├── kalendar.po │ └── plasma_applet_org.kde.kalendar.contact.po ├── cs │ ├── kalendar.po │ └── plasma_applet_org.kde.kalendar.contact.po ├── de │ ├── kalendar.po │ └── plasma_applet_org.kde.kalendar.contact.po ├── el │ └── kalendar.po ├── en_GB │ ├── kalendar.po │ └── plasma_applet_org.kde.kalendar.contact.po ├── es │ ├── kalendar.po │ └── plasma_applet_org.kde.kalendar.contact.po ├── eu │ ├── kalendar.po │ └── plasma_applet_org.kde.kalendar.contact.po ├── fi │ ├── kalendar.po │ └── plasma_applet_org.kde.kalendar.contact.po ├── fr │ ├── kalendar.po │ └── plasma_applet_org.kde.kalendar.contact.po ├── gl │ └── plasma_applet_org.kde.kalendar.contact.po ├── hu │ └── kalendar.po ├── id │ ├── kalendar.po │ └── plasma_applet_org.kde.kalendar.contact.po ├── it │ ├── kalendar.po │ └── plasma_applet_org.kde.kalendar.contact.po ├── ja │ ├── kalendar.po │ └── plasma_applet_org.kde.kalendar.contact.po ├── ka │ ├── kalendar.po │ └── plasma_applet_org.kde.kalendar.contact.po ├── ko │ └── kalendar.po ├── lt │ ├── kalendar.po │ └── plasma_applet_org.kde.kalendar.contact.po ├── lv │ └── kalendar.po ├── nl │ ├── kalendar.po │ └── plasma_applet_org.kde.kalendar.contact.po ├── nn │ └── plasma_applet_org.kde.kalendar.contact.po ├── pl │ ├── kalendar.po │ └── plasma_applet_org.kde.kalendar.contact.po ├── pt │ ├── kalendar.po │ └── plasma_applet_org.kde.kalendar.contact.po ├── pt_BR │ ├── kalendar.po │ └── plasma_applet_org.kde.kalendar.contact.po ├── ru │ ├── kalendar.po │ └── plasma_applet_org.kde.kalendar.contact.po ├── sk │ ├── kalendar.po │ └── plasma_applet_org.kde.kalendar.contact.po ├── sl │ ├── kalendar.po │ └── plasma_applet_org.kde.kalendar.contact.po ├── sv │ ├── kalendar.po │ └── plasma_applet_org.kde.kalendar.contact.po ├── ta │ ├── kalendar.po │ └── plasma_applet_org.kde.kalendar.contact.po ├── tr │ ├── kalendar.po │ └── plasma_applet_org.kde.kalendar.contact.po ├── uk │ ├── kalendar.po │ └── plasma_applet_org.kde.kalendar.contact.po ├── zh_CN │ ├── kalendar.po │ └── plasma_applet_org.kde.kalendar.contact.po └── zh_TW │ ├── kalendar.po │ └── plasma_applet_org.kde.kalendar.contact.po └── src ├── CMakeLists.txt ├── Messages.sh ├── calendar ├── CMakeLists.txt ├── autotests │ ├── CMakeLists.txt │ ├── calutilstest.cpp │ ├── filtertest.cpp │ ├── incidenceoccurrencemodeltest.cpp │ ├── remindersmodeltest.cpp │ ├── todosortfilterproxymodeltest.cpp │ └── unittestenv │ │ ├── config.xml │ │ ├── xdgconfig │ │ ├── akonadi-firstrunrc │ │ ├── akonadi-firstrunrc.license │ │ ├── akonadi_ical_resource_0rc │ │ ├── akonadi_ical_resource_0rc.license │ │ ├── emaildefaults │ │ ├── emaildefaults.license │ │ ├── emailidentities │ │ ├── emailidentities.license │ │ ├── mailtransports │ │ └── mailtransports.license │ │ └── xdglocal │ │ ├── std0.ics │ │ └── std0.ics.license ├── calendarapplication.cpp ├── calendarapplication.h ├── calendarconfig.kcfg ├── calendarconfig.kcfgc ├── calendarmanager.cpp ├── calendarmanager.h ├── calendarplugin.cpp ├── calendarplugin.h ├── datetimestate.cpp ├── datetimestate.h ├── filter.cpp ├── filter.h ├── importer.cpp ├── importer.h ├── incidencewrapper.cpp ├── incidencewrapper.h ├── main.cpp ├── models │ ├── attachmentsmodel.cpp │ ├── attachmentsmodel.h │ ├── attendeesmodel.cpp │ ├── attendeesmodel.h │ ├── hourlyincidencemodel.cpp │ ├── hourlyincidencemodel.h │ ├── incidenceoccurrencemodel.cpp │ ├── incidenceoccurrencemodel.h │ ├── infinitecalendarviewmodel.cpp │ ├── infinitecalendarviewmodel.h │ ├── itemtagsmodel.cpp │ ├── itemtagsmodel.h │ ├── monthmodel.cpp │ ├── monthmodel.h │ ├── multidayincidencemodel.cpp │ ├── multidayincidencemodel.h │ ├── recurrenceexceptionsmodel.cpp │ ├── recurrenceexceptionsmodel.h │ ├── timezonelistmodel.cpp │ ├── timezonelistmodel.h │ ├── todosortfilterproxymodel.cpp │ └── todosortfilterproxymodel.h ├── mousetracker.cpp ├── mousetracker.h ├── org.kde.calendar.Calendar.xml ├── org.kde.kalendar.calendar.desktop ├── qml │ ├── Bars │ │ ├── DayLabelsBar.qml │ │ └── FilterHeaderBar.qml │ ├── BottomToolBar.qml │ ├── Controls │ │ ├── CalendarItemTapHandler.qml │ │ ├── CheckableCollectionNavigationView.qml │ │ ├── ColoredCheckbox.qml │ │ ├── DateControls │ │ │ ├── DateChanger.qml │ │ │ ├── DateCombo.qml │ │ │ ├── DatePicker.qml │ │ │ ├── TimeCombo.qml │ │ │ └── TimePicker.qml │ │ ├── DayMouseArea.qml │ │ ├── ImportHandler.qml │ │ ├── IncidenceInfoContents.qml │ │ ├── IncidenceInfoPopup.qml │ │ ├── IncidenceMouseArea.qml │ │ ├── KBMNavigationMouseArea.qml │ │ ├── MainDrawerToggleButton.qml │ │ ├── ResizerSeparator.qml │ │ ├── Tag.qml │ │ ├── TitleDateButton.qml │ │ └── TodoCheckBox.qml │ ├── Delegates │ │ ├── DayGridViewIncidenceDelegate.qml │ │ ├── IncidenceDelegateBackground.qml │ │ ├── RelatedIncidenceDelegate.qml │ │ └── ViewTitleDelegate.qml │ ├── Dialogs │ │ ├── CollectionPickerPage.qml │ │ ├── DeleteCalendarPage.qml │ │ ├── DeleteIncidencePage.qml │ │ ├── IncidenceEditorPage.qml │ │ └── RecurringIncidenceChangePage.qml │ ├── Drawers │ │ ├── IncidenceInfoDrawer.qml │ │ └── MainDrawer.qml │ ├── KalendarUtils │ │ ├── KalendarUiUtils.qml │ │ ├── dateutils.js │ │ └── labelutils.js │ ├── Location │ │ └── LocationMap.qml │ ├── MainViews │ │ ├── BasicInternalHourlyView.qml │ │ ├── BasicMonthGridView.qml │ │ ├── BasicMonthListView.qml │ │ ├── DayGridView.qml │ │ ├── HourlyView.qml │ │ ├── MonthView.qml │ │ ├── ScheduleView.qml │ │ ├── SwipeableInternalHourlyView.qml │ │ ├── SwipeableMonthGridView.qml │ │ ├── SwipeableMonthListView.qml │ │ ├── TodoTreeView.qml │ │ └── TodoView.qml │ ├── Menus │ │ ├── CalendarItemMenu.qml │ │ ├── GlobalMenuBar.qml │ │ └── MenuBar.qml │ ├── Settings │ │ ├── AboutPage.qml │ │ ├── CalendarSettingsPage.qml │ │ ├── Schedule │ │ │ ├── AvailabilitySettingsPage.qml │ │ │ ├── FreeBusySettingsPage.qml │ │ │ └── ScheduleSettingsPage.qml │ │ ├── SettingsPage.qml │ │ ├── SourceSettingsPage.qml │ │ └── ViewSettingsPage.qml │ ├── TreeView │ │ ├── AbstractTreeItem.qml │ │ ├── BasicTreeItem.qml │ │ ├── InternalTreeListView.qml │ │ ├── TreeListView.qml │ │ └── TreeViewDecoration.qml │ ├── incidenceeditor │ │ ├── PriorityComboBox.qml │ │ └── ReminderDelegate.qml │ └── main.qml ├── remindersmodel.cpp ├── remindersmodel.h ├── resources.qrc ├── utils.cpp └── utils.h ├── components ├── CMakeLists.txt ├── componentsplugin.cpp ├── componentsplugin.h ├── helper.cpp ├── helper.h └── qml │ ├── BaseApplication.qml │ ├── ColoredCheckbox.qml │ ├── EditMenu.qml │ ├── FileMenu.qml │ ├── HelpMenu.qml │ ├── KActionFromAction.qml │ ├── KQuickCommandBarPage.qml │ ├── NativeEditMenu.qml │ ├── NativeFileMenu.qml │ ├── NativeHelpMenu.qml │ ├── NativeMenuItemFromAction.qml │ ├── NativeWindowMenu.qml │ ├── SettingsMenu.qml │ ├── ViewMenu.qml │ └── WindowMenu.qml ├── contacts ├── CMakeLists.txt ├── addresseewrapper.cpp ├── addresseewrapper.h ├── addressmodel.cpp ├── addressmodel.h ├── applet │ ├── CMakeLists.txt │ ├── Messages.sh │ └── package │ │ ├── contents │ │ ├── config │ │ │ └── main.xml │ │ ├── resources │ │ │ └── fallbackBackground.png │ │ └── ui │ │ │ ├── CompactRepresentation.qml │ │ │ ├── ContactListItem.qml │ │ │ ├── ContactPage.qml │ │ │ ├── ContactsPage.qml │ │ │ ├── Header.qml │ │ │ ├── QrCodePage.qml │ │ │ └── main.qml │ │ ├── metadata.json │ │ └── metadata.json.license ├── attributes │ ├── attributeregistrar.cpp │ ├── contactmetadataattribute.cpp │ └── contactmetadataattribute_p.h ├── autotests │ ├── CMakeLists.txt │ ├── addressmodeltest.cpp │ ├── emailmodeltest.cpp │ ├── imppmodeltest.cpp │ └── phonemodeltest.cpp ├── contactapplication.cpp ├── contactapplication.h ├── contactcollectionmodel.cpp ├── contactcollectionmodel.h ├── contactconfig.kcfg ├── contactconfig.kcfgc ├── contacteditorbackend.cpp ├── contacteditorbackend.h ├── contactgroupeditor.cpp ├── contactgroupeditor.h ├── contactgroupmodel.cpp ├── contactgroupmodel.h ├── contactgroupwrapper.cpp ├── contactgroupwrapper.h ├── contactmanager.cpp ├── contactmanager.h ├── contactmetadata.cpp ├── contactmetadata.h ├── contactplugin.cpp ├── contactplugin.h ├── contactsmodel.cpp ├── contactsmodel.h ├── emailmodel.cpp ├── emailmodel.h ├── globalcontactmodel.cpp ├── globalcontactmodel.h ├── imppmodel.cpp ├── imppmodel.h ├── main.cpp ├── org.kde.kalendar.contact.desktop ├── phonemodel.cpp ├── phonemodel.h ├── qml │ ├── AddressBookCollectionHandler.qml │ ├── ContactChooserPage.qml │ ├── ContactView.qml │ ├── GlobalMenuBar.qml │ ├── MenuBar.qml │ ├── Settings.qml │ ├── Sidebar.qml │ ├── main.qml │ └── private │ │ ├── AddressBookMenu.qml │ │ ├── ContactGroupPage.qml │ │ ├── ContactListItem.qml │ │ ├── ContactPage.qml │ │ ├── ContactsPage.qml │ │ ├── DeleteContactAction.qml │ │ ├── Header.qml │ │ ├── PhoneNumberDialog.qml │ │ ├── QrCodePage.qml │ │ └── contact_editor │ │ ├── AddressBookEditorCard.qml │ │ ├── BusinessEditorCard.qml │ │ ├── ContactEditorPage.qml │ │ ├── ContactGroupEditorPage.qml │ │ ├── EmailEditorCard.qml │ │ ├── InstantMessengerEditorCard.qml │ │ ├── PersonalInfoEditorCard.qml │ │ ├── PhoneEditorCard.qml │ │ └── PhotoEditor.qml ├── resources.qrc └── resources │ └── fallbackBackground.png ├── lib ├── CMakeLists.txt ├── abstractapplication.cpp ├── abstractapplication.h ├── actionsmodel.cpp ├── actionsmodel.h ├── colorproxymodel.cpp ├── colorproxymodel.h ├── commandbarfiltermodel.cpp ├── commandbarfiltermodel.h ├── sortedcollectionproxymodel.cpp └── sortedcollectionproxymodel.h ├── mail ├── CMakeLists.txt ├── contactimageprovider.cpp ├── contactimageprovider.h ├── crypto.cpp ├── crypto.h ├── errors.h ├── helper.cpp ├── helper.h ├── identitymodel.cpp ├── identitymodel.h ├── mailapplication.cpp ├── mailapplication.h ├── mailheadermodel.cpp ├── mailheadermodel.h ├── mailmanager.cpp ├── mailmanager.h ├── mailmodel.cpp ├── mailmodel.h ├── mailplugin.cpp ├── mailplugin.h ├── main.cpp ├── messagestatus.cpp ├── messagestatus.h ├── mime │ ├── async.h │ ├── attachmentmodel.cpp │ ├── attachmentmodel.h │ ├── htmlutils.cpp │ ├── htmlutils.h │ ├── mailcrypto.cpp │ ├── mailcrypto.h │ ├── mailtemplates.cpp │ ├── mailtemplates.h │ ├── messageparser.cpp │ ├── messageparser.h │ ├── partmodel.cpp │ ├── partmodel.h │ ├── testdata │ │ ├── 8bitencoded.mbox │ │ ├── README │ │ ├── alternative-notext.mbox │ │ ├── alternative-notext.mbox.html │ │ ├── alternative-notext.mbox.tree │ │ ├── alternative.mbox │ │ ├── alternative.mbox.html │ │ ├── alternative.mbox.tree │ │ ├── applehtmlwithattachments.mbox │ │ ├── applehtmlwithattachmentsmixed.mbox │ │ ├── attachment.mbox │ │ ├── cid-links-forwarded-inline.mbox │ │ ├── cid-links.mbox │ │ ├── crlf-encrypted-with-signature-multipart.mbox │ │ ├── crlf-encrypted-with-signature.mbox │ │ ├── details │ │ │ ├── forward-openpgp-signed-encrypted.mbox.html │ │ │ ├── openpgp-encoded.mbox.html │ │ │ ├── openpgp-encrypted+signed.mbox.html │ │ │ ├── openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox.html │ │ │ ├── openpgp-encrypted-attachment.mbox.html │ │ │ ├── openpgp-encrypted-non-encrypted-attachment.mbox.html │ │ │ ├── openpgp-encrypted-partially-signed-attachments.mbox.html │ │ │ ├── openpgp-inline-charset-encrypted.mbox.html │ │ │ ├── openpgp-inline-signed.mbox.html │ │ │ ├── openpgp-signed-base64-mailman-footer.mbox.html │ │ │ ├── openpgp-signed-encrypted-two-attachments.mbox.html │ │ │ ├── openpgp-signed-encrypted.mbox.html │ │ │ ├── openpgp-signed-mailinglist+old.mbox.html │ │ │ ├── openpgp-signed-mailinglist.mbox.html │ │ │ ├── openpgp-signed-two-attachments.mbox.html │ │ │ ├── signed-forward-openpgp-signed-encrypted.mbox.html │ │ │ ├── smime-opaque-enc+sign.mbox.html │ │ │ ├── smime-opaque-sign.mbox.html │ │ │ └── smime-signed-encrypted.mbox.html │ │ ├── encapsulated-with-attachment.mbox │ │ ├── encapsulated-with-attachment.mbox.html │ │ ├── encapsulated-with-attachment.mbox.tree │ │ ├── forward-openpgp-signed-encrypted.mbox │ │ ├── forward-openpgp-signed-encrypted.mbox.html │ │ ├── forward-openpgp-signed-encrypted.mbox.tree │ │ ├── gmail-invitation.mbox │ │ ├── headeronly │ │ │ ├── openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox.html │ │ │ ├── openpgp-encrypted-attachment.mbox.html │ │ │ ├── openpgp-encrypted-non-encrypted-attachment.mbox.html │ │ │ ├── openpgp-encrypted-partially-signed-attachments.mbox.html │ │ │ ├── openpgp-encrypted-two-attachments.mbox.html │ │ │ ├── openpgp-signed-apple.mbox.html │ │ │ ├── openpgp-signed-encrypted-two-attachments.mbox.html │ │ │ ├── openpgp-signed-mailinglist+additional-children.mbox.html │ │ │ ├── openpgp-signed-no-protocol.mbox.html │ │ │ ├── openpgp-signed-two-attachments.mbox.html │ │ │ └── smime-signed-apple.mbox.html │ │ ├── hidden │ │ │ ├── encapsulated-with-attachment.mbox.html │ │ │ ├── openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox.html │ │ │ ├── openpgp-encrypted-attachment.mbox.html │ │ │ ├── openpgp-encrypted-noData.mbox.html │ │ │ ├── openpgp-encrypted-non-encrypted-attachment.mbox.html │ │ │ ├── openpgp-encrypted-partially-signed-attachments.mbox.html │ │ │ ├── openpgp-encrypted-two-attachments.mbox.html │ │ │ ├── openpgp-signed-apple.mbox.html │ │ │ ├── openpgp-signed-encrypted-two-attachments.mbox.html │ │ │ ├── openpgp-signed-mailinglist+additional-children.mbox.html │ │ │ ├── openpgp-signed-no-protocol.mbox.html │ │ │ ├── openpgp-signed-two-attachments.mbox.html │ │ │ └── smime-signed-apple.mbox.html │ │ ├── html-with-signature.mbox │ │ ├── html.mbox │ │ ├── html.mbox.html │ │ ├── html.mbox.tree │ │ ├── htmlonly.mbox │ │ ├── htmlonly.mbox.html │ │ ├── htmlonly.mbox.tree │ │ ├── htmlonlyexternal.mbox │ │ ├── iconic │ │ │ ├── openpgp-encrypted-partially-signed-attachments.mbox.html │ │ │ ├── openpgp-encrypted-two-attachments.mbox.html │ │ │ ├── openpgp-signed-encrypted-two-attachments.mbox.html │ │ │ └── openpgp-signed-two-attachments.mbox.html │ │ ├── inlined │ │ │ ├── encapsulated-with-attachment.mbox.html │ │ │ ├── openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox.html │ │ │ ├── openpgp-encrypted-attachment.mbox.html │ │ │ ├── openpgp-encrypted-non-encrypted-attachment.mbox.html │ │ │ ├── openpgp-signed-apple.mbox.html │ │ │ ├── openpgp-signed-mailinglist+additional-children.mbox.html │ │ │ └── smime-signed-apple.mbox.html │ │ ├── inlinepgpencrypted-appendix.mbox │ │ ├── inlinepgpencrypted-appendix.mbox.html │ │ ├── inlinepgpencrypted-appendix.mbox.tree │ │ ├── inlinepgpencrypted-error.mbox │ │ ├── inlinepgpencrypted-error.mbox.html │ │ ├── inlinepgpencrypted-error.mbox.tree │ │ ├── inlinepgpencrypted.mbox │ │ ├── inlinepgpencrypted.mbox.html │ │ ├── inlinepgpencrypted.mbox.inProgress.html │ │ ├── inlinepgpencrypted.mbox.tree │ │ ├── inlinepgpgencrypted-error.mbox │ │ ├── invitation.mbox │ │ ├── listmessage.mbox │ │ ├── mailheader.css │ │ ├── multirecipients.mbox │ │ ├── no-content-type.mbox │ │ ├── no-content-type.mbox.html │ │ ├── no-content-type.mbox.tree │ │ ├── openpgp-encoded.mbox │ │ ├── openpgp-encoded.mbox.html │ │ ├── openpgp-encoded.mbox.tree │ │ ├── openpgp-encrypted+signed.mbox │ │ ├── openpgp-encrypted+signed.mbox.html │ │ ├── openpgp-encrypted+signed.mbox.tree │ │ ├── openpgp-encrypted-applemail.mbox │ │ ├── openpgp-encrypted-applemail.mbox.html │ │ ├── openpgp-encrypted-applemail.mbox.tree │ │ ├── openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox │ │ ├── openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox.html │ │ ├── openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox.tree │ │ ├── openpgp-encrypted-attachment.mbox │ │ ├── openpgp-encrypted-attachment.mbox.html │ │ ├── openpgp-encrypted-attachment.mbox.tree │ │ ├── openpgp-encrypted-enigmail1.6.mbox │ │ ├── openpgp-encrypted-enigmail1.6.mbox.html │ │ ├── openpgp-encrypted-enigmail1.6.mbox.tree │ │ ├── openpgp-encrypted-memoryhole2.mbox │ │ ├── openpgp-encrypted-noData.mbox │ │ ├── openpgp-encrypted-noData.mbox.html │ │ ├── openpgp-encrypted-noData.mbox.tree │ │ ├── openpgp-encrypted-non-encrypted-attachment.mbox │ │ ├── openpgp-encrypted-non-encrypted-attachment.mbox.html │ │ ├── openpgp-encrypted-non-encrypted-attachment.mbox.tree │ │ ├── openpgp-encrypted-partially-signed-attachments.mbox │ │ ├── openpgp-encrypted-partially-signed-attachments.mbox.html │ │ ├── openpgp-encrypted-partially-signed-attachments.mbox.tree │ │ ├── openpgp-encrypted-two-attachments.mbox │ │ ├── openpgp-encrypted-two-attachments.mbox.html │ │ ├── openpgp-encrypted-two-attachments.mbox.tree │ │ ├── openpgp-encrypted.mbox │ │ ├── openpgp-encrypted.mbox.html │ │ ├── openpgp-encrypted.mbox.inProgress.html │ │ ├── openpgp-encrypted.mbox.tree │ │ ├── openpgp-inline-charset-encrypted.mbox │ │ ├── openpgp-inline-charset-encrypted.mbox.html │ │ ├── openpgp-inline-charset-encrypted.mbox.inProgress.html │ │ ├── openpgp-inline-charset-encrypted.mbox.tree │ │ ├── openpgp-inline-encrypted+nonenc.mbox │ │ ├── openpgp-inline-signed-broken.mbox │ │ ├── openpgp-inline-signed.mbox │ │ ├── openpgp-inline-signed.mbox.html │ │ ├── openpgp-inline-signed.mbox.inProgress.html │ │ ├── openpgp-inline-signed.mbox.tree │ │ ├── openpgp-inline-wrong-charset-encrypted.mbox │ │ ├── openpgp-inline-wrong-charset-encrypted.mbox.html │ │ ├── openpgp-inline-wrong-charset-encrypted.mbox.tree │ │ ├── openpgp-multipart-embedded-signed.mbox │ │ ├── openpgp-multipart-embedded.mbox │ │ ├── openpgp-signed-apple.mbox │ │ ├── openpgp-signed-apple.mbox.html │ │ ├── openpgp-signed-apple.mbox.inProgress.html │ │ ├── openpgp-signed-apple.mbox.tree │ │ ├── openpgp-signed-base64-mailman-footer.mbox │ │ ├── openpgp-signed-base64-mailman-footer.mbox.html │ │ ├── openpgp-signed-base64-mailman-footer.mbox.tree │ │ ├── openpgp-signed-encrypted-two-attachments.mbox │ │ ├── openpgp-signed-encrypted-two-attachments.mbox.html │ │ ├── openpgp-signed-encrypted-two-attachments.mbox.tree │ │ ├── openpgp-signed-encrypted.mbox │ │ ├── openpgp-signed-encrypted.mbox.html │ │ ├── openpgp-signed-encrypted.mbox.tree │ │ ├── openpgp-signed-mailinglist+additional-children.mbox │ │ ├── openpgp-signed-mailinglist+additional-children.mbox.html │ │ ├── openpgp-signed-mailinglist+additional-children.mbox.tree │ │ ├── openpgp-signed-mailinglist+old.mbox │ │ ├── openpgp-signed-mailinglist+old.mbox.html │ │ ├── openpgp-signed-mailinglist+old.mbox.tree │ │ ├── openpgp-signed-mailinglist.mbox │ │ ├── openpgp-signed-mailinglist.mbox.html │ │ ├── openpgp-signed-mailinglist.mbox.inProgress.html │ │ ├── openpgp-signed-mailinglist.mbox.tree │ │ ├── openpgp-signed-no-protocol.mbox │ │ ├── openpgp-signed-no-protocol.mbox.html │ │ ├── openpgp-signed-no-protocol.mbox.tree │ │ ├── openpgp-signed-two-attachments.mbox │ │ ├── openpgp-signed-two-attachments.mbox.html │ │ ├── openpgp-signed-two-attachments.mbox.tree │ │ ├── plaintext-with-signature.mbox │ │ ├── plaintext.mbox │ │ ├── plaintextattachment.mbox │ │ ├── signed-forward-openpgp-signed-encrypted.mbox │ │ ├── signed-forward-openpgp-signed-encrypted.mbox.html │ │ ├── signed-forward-openpgp-signed-encrypted.mbox.tree │ │ ├── smime-cert.mbox │ │ ├── smime-cert.mbox.html │ │ ├── smime-cert.mbox.tree │ │ ├── smime-encrypted-octet-stream.mbox │ │ ├── smime-encrypted-octet-stream.mbox.html │ │ ├── smime-encrypted-octet-stream.mbox.tree │ │ ├── smime-encrypted.mbox │ │ ├── smime-encrypted.mbox.html │ │ ├── smime-encrypted.mbox.inProgress.html │ │ ├── smime-encrypted.mbox.tree │ │ ├── smime-opaque-enc+sign.mbox │ │ ├── smime-opaque-enc+sign.mbox.html │ │ ├── smime-opaque-enc+sign.mbox.tree │ │ ├── smime-opaque-sign.mbox │ │ ├── smime-opaque-sign.mbox.html │ │ ├── smime-opaque-sign.mbox.inProgress.html │ │ ├── smime-opaque-sign.mbox.tree │ │ ├── smime-opaque-signed-encrypted-attachment.mbox │ │ ├── smime-signed-apple.mbox │ │ ├── smime-signed-apple.mbox.html │ │ ├── smime-signed-apple.mbox.inProgress.html │ │ ├── smime-signed-apple.mbox.tree │ │ ├── smime-signed-encrypted.mbox │ │ ├── smime-signed-encrypted.mbox.html │ │ ├── smime-signed-encrypted.mbox.tree │ │ ├── text+html-maillinglist.mbox │ │ ├── text+html-maillinglist.mbox.html │ │ └── text+html-maillinglist.mbox.tree │ └── tests │ │ ├── CMakeLists.txt │ │ └── mailtemplatetest.cpp ├── mimetreeparser │ ├── autotests │ │ ├── CMakeLists.txt │ │ ├── attachmenttest.cpp │ │ ├── cryptohelpertest.cpp │ │ ├── cryptohelpertest.h │ │ ├── setupenv.cpp │ │ └── setupenv.h │ ├── bodypartformatter.cpp │ ├── bodypartformatter.h │ ├── bodypartformatter_impl.cpp │ ├── bodypartformatterbasefactory.cpp │ ├── bodypartformatterbasefactory.h │ ├── bodypartformatterbasefactory_p.h │ ├── cryptohelper.cpp │ ├── cryptohelper.h │ ├── enums.h │ ├── messagepart.cpp │ ├── messagepart.h │ ├── mimetreeparser_debug.cpp │ ├── mimetreeparser_debug.h │ ├── objecttreeparser.cpp │ ├── objecttreeparser.h │ ├── partmetadata.h │ ├── testdata │ │ ├── 8bitencoded.mbox │ │ ├── README │ │ ├── alternative-notext.mbox │ │ ├── alternative.mbox │ │ ├── applehtmlwithattachments.mbox │ │ ├── applehtmlwithattachmentsmixed.mbox │ │ ├── attachment.mbox │ │ ├── attachment2.mbox │ │ ├── cid-links-forwarded-inline.mbox │ │ ├── cid-links.mbox │ │ ├── crlf-encrypted-with-signature-multipart.mbox │ │ ├── crlf-encrypted-with-signature.mbox │ │ ├── encapsulated-with-attachment.mbox │ │ ├── forward-openpgp-signed-encrypted.mbox │ │ ├── gmail-invitation.mbox │ │ ├── html.mbox │ │ ├── htmlonly.mbox │ │ ├── htmlonlyexternal.mbox │ │ ├── inlinepgpencrypted-appendix.mbox │ │ ├── inlinepgpencrypted-error.mbox │ │ ├── inlinepgpencrypted.mbox │ │ ├── inlinepgpgencrypted-error.mbox │ │ ├── invitation.mbox │ │ ├── listmessage.mbox │ │ ├── mailheader.css │ │ ├── multirecipients.mbox │ │ ├── no-content-type.mbox │ │ ├── openpgp-encoded.mbox │ │ ├── openpgp-encrypted+signed.mbox │ │ ├── openpgp-encrypted-applemail.mbox │ │ ├── openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox │ │ ├── openpgp-encrypted-attachment.mbox │ │ ├── openpgp-encrypted-enigmail1.6.mbox │ │ ├── openpgp-encrypted-memoryhole.mbox │ │ ├── openpgp-encrypted-memoryhole2.mbox │ │ ├── openpgp-encrypted-noData.mbox │ │ ├── openpgp-encrypted-non-encrypted-attachment.mbox │ │ ├── openpgp-encrypted-partially-signed-attachments.mbox │ │ ├── openpgp-encrypted-signed-thunderbird.mbox │ │ ├── openpgp-encrypted-two-attachments.mbox │ │ ├── openpgp-encrypted.mbox │ │ ├── openpgp-inline-charset-encrypted.mbox │ │ ├── openpgp-inline-encrypted+nonenc.mbox │ │ ├── openpgp-inline-signed-broken.mbox │ │ ├── openpgp-inline-signed.mbox │ │ ├── openpgp-inline-wrong-charset-encrypted.mbox │ │ ├── openpgp-multipart-embedded-signed.mbox │ │ ├── openpgp-multipart-embedded.mbox │ │ ├── openpgp-signed-apple.mbox │ │ ├── openpgp-signed-base64-mailman-footer.mbox │ │ ├── openpgp-signed-encrypted-two-attachments.mbox │ │ ├── openpgp-signed-encrypted.mbox │ │ ├── openpgp-signed-mailinglist+additional-children.mbox │ │ ├── openpgp-signed-mailinglist+old.mbox │ │ ├── openpgp-signed-mailinglist.mbox │ │ ├── openpgp-signed-no-protocol.mbox │ │ ├── openpgp-signed-two-attachments.mbox │ │ ├── outlook.mbox │ │ ├── plaintext.mbox │ │ ├── plaintextattachment.mbox │ │ ├── signed-forward-openpgp-signed-encrypted.mbox │ │ ├── smime-cert.mbox │ │ ├── smime-encrypted-octet-stream.mbox │ │ ├── smime-encrypted.mbox │ │ ├── smime-opaque-enc+sign.mbox │ │ ├── smime-opaque-sign.mbox │ │ ├── smime-opaque-signed-encrypted-attachment.mbox │ │ ├── smime-signed-apple.mbox │ │ ├── smime-signed-encrypted.mbox │ │ └── text+html-maillinglist.mbox │ ├── tests │ │ ├── CMakeLists.txt │ │ ├── gnupg_home │ │ │ ├── CMakeLists.txt │ │ │ ├── dirmngr-cache.d │ │ │ │ ├── DIR.txt │ │ │ │ ├── crl-4E31CEB57DDD4A7B9991AB05507B1ED4293FF952.db │ │ │ │ └── crl-7F2A402CBB016A9146D613568C89D3596A4111AA.db │ │ │ ├── dirmngr.conf │ │ │ ├── gpg-agent.conf.in │ │ │ ├── gpg.conf │ │ │ ├── gpgsm.conf.in │ │ │ ├── pinentry-fake.sh │ │ │ ├── private-keys-v1.d │ │ │ │ └── 1AA8BA52430E51AE249AF0DA97D59F869E4101A8.key │ │ │ ├── pubring.gpg │ │ │ ├── pubring.kbx │ │ │ ├── scdaemon.conf │ │ │ ├── secring.gpg │ │ │ ├── trustdb.gpg │ │ │ └── trustlist.txt │ │ ├── gpgerrortest.cpp │ │ └── mimetreeparsertest.cpp │ ├── utils.cpp │ └── utils.h ├── org.kde.kalendar.mail.desktop ├── qml │ ├── ConversationViewer.qml │ ├── FolderView.qml │ ├── MailComposer.qml │ ├── MailSidebar.qml │ ├── MailViewer.qml │ ├── app │ │ ├── GlobalMenuBar.qml │ │ ├── MenuBar.qml │ │ └── main.qml │ ├── mailboxselector │ │ ├── MailBoxList.qml │ │ ├── MailBoxListPage.qml │ │ └── MailBoxListSidebar.qml │ ├── mailpartview │ │ ├── ErrorPart.qml │ │ ├── HtmlPart.qml │ │ ├── ICalPart.qml │ │ ├── MailPart.qml │ │ ├── MailPartModel.qml │ │ ├── MailPartView.qml │ │ └── TextPart.qml │ └── private │ │ ├── AttachmentDelegate.qml │ │ └── MailDelegate.qml ├── resources.qrc ├── tests │ ├── CMakeLists.txt │ └── cryptotest.cpp └── windowcrypto.h └── quick ├── CMakeLists.txt ├── agentconfiguration.cpp ├── agentconfiguration.h ├── akonadiquickplugin.cpp ├── akonadiquickplugin.h ├── collection.cpp ├── collection.h ├── collectioncomboboxmodel.cpp ├── collectioncomboboxmodel.h ├── collectionpickermodel.cpp ├── collectionpickermodel.h ├── mimetypes.cpp ├── mimetypes.h ├── qml ├── AgentConfigurationForm.qml ├── CollectionComboBox.qml ├── MobileCollectionComboBox.qml └── TagManagerPage.qml ├── tagmanager.cpp └── tagmanager.h /.gitignore: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2021 Carl Schwan 2 | # SPDX-FileCopyrightText: 2021 Claudio Cambra 3 | # SPDX-License-Identifier: CC0-1.0 4 | 5 | # Ignore the following files 6 | *.kate-swp 7 | *.kdev4 8 | /build*/ 9 | CMakeLists.txt.user* 10 | /.clang-format 11 | /compile_commands.json 12 | .cache 13 | CMakeCache.txt 14 | CMakeFiles 15 | Testing/ 16 | Testing/ 17 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2020-2021 Laurent Montel 2 | # SPDX-License-Identifier: CC0-1.0 3 | 4 | include: 5 | - https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/reuse-lint.yml 6 | - https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux.yml 7 | - https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/freebsd.yml 8 | # - https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/freebsd-qt6.yml TODO enable once FreeBSD CI has gpgme Qt6 9 | -------------------------------------------------------------------------------- /.gitlab/merge_request_templates/template.md: -------------------------------------------------------------------------------- 1 | ## Summary 2 | 3 | Add a description of your merge request here. What does your new feature do? 4 | 5 | Describe in detail what your patch does, why it does that, etc. Merge requests 6 | without an adequate description are difficult to review, and probably we will 7 | ask for more information! 8 | 9 | Please also keep this description up-to-date with any discussion that takes 10 | place so that reviewers can understand your intent. This is especially 11 | important if they didn't participate in the discussion. 12 | 13 | Make sure to remove this comment when you are done. 14 | 15 | Implements 16 | 17 | ## Test Plan 18 | 19 | Add a description of how to test your patch here. Tell us how to use the new 20 | feature and what we should be seeing. If applicable, it is great to include 21 | screenshots, either here or in the Summary section. 22 | 23 | It can be difficult to understand a new feature from the text description in 24 | the summary, so put enough detail here that so that we can understand how to run 25 | the new feature and we can play with it ourselves to understand it. 26 | 27 | > If your merge request adds some UI string be sure to use the ellipsis character instead of triple periods. 28 | -------------------------------------------------------------------------------- /.gitlab/merge_request_templates/template.md.license: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2019 Simon Redman 2 | // SPDX-FileCopyrightText: 2021 Felipe Kinoshita 3 | // SPDX-License-Identifier: LGPL-2.0-or-later 4 | -------------------------------------------------------------------------------- /.kde-ci.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: None 2 | # SPDX-License-Identifier: CC0-1.0 3 | 4 | Dependencies: 5 | - 'on': ['Linux/Qt5', 'FreeBSD/Qt5'] 6 | 'require': 7 | 'frameworks/extra-cmake-modules': '@latest' 8 | 'frameworks/qqc2-desktop-style': '@latest' 9 | 'frameworks/kcalendarcore' : '@latest' 10 | 'frameworks/kconfigwidgets' : '@latest' 11 | 'frameworks/kwindowsystem' : '@latest' 12 | 'frameworks/kxmlgui' : '@latest' 13 | 'frameworks/kcontacts' : '@latest' 14 | 'pim/akonadi' : '@same' 15 | 'pim/akonadi-calendar' : '@same' 16 | 'pim/kcalutils' : '@same' 17 | 'pim/kmime' : '@same' 18 | 'pim/kdepim-runtime' : '@same' 19 | 'pim/mailcommon' : '@same' 20 | 'frameworks/kirigami' : '@latest' 21 | 'libraries/kirigami-addons': '@latest' 22 | 23 | Options: 24 | require-passing-tests-on: ['Linux'] 25 | -------------------------------------------------------------------------------- /.reuse/dep5: -------------------------------------------------------------------------------- 1 | Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | Upstream-Name: Kalendar 3 | Upstream-Contact: Claudio Cambra 4 | 5 | Files: logo.png org.kde.kalendar.svg 6 | Copyright: 2021 Áron Kovács 7 | License: LGPL-2.0-or-later 8 | 9 | Files: src/contacts/resources/fallbackBackground.png src/contacts/applet/package/contents/resources/fallbackBackground.png 10 | Copyright: Jonah Brüchert 11 | License: GPL-3.0-or-later 12 | 13 | Files: src/contacts/qml/qmldir 14 | Copyright: Carl Schwan 15 | License: CC0-1.0 16 | 17 | Files: mimetreeparser/autotests/data/* src/mail/mimetreeparser/tests/gnupg_home/* src/mail/mime/testdata/* src/mail/mimetreeparser/testdata/* 18 | Copyright: none 19 | License: CC0-1.0 20 | -------------------------------------------------------------------------------- /CMakePresets.json.license: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2021 Laurent Montel 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | -------------------------------------------------------------------------------- /LICENSES/BSD-2-Clause.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) . All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without modification, 4 | are permitted provided that the following conditions are met: 5 | 6 | 1. Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | 9 | 2. Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | 13 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 14 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 17 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 19 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 20 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 21 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 22 | USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 | -------------------------------------------------------------------------------- /LICENSES/LicenseRef-KDE-Accepted-GPL.txt: -------------------------------------------------------------------------------- 1 | This library is free software; you can redistribute it and/or 2 | modify it under the terms of the GNU General Public License as 3 | published by the Free Software Foundation; either version 3 of 4 | the license or (at your option) at any later version that is 5 | accepted by the membership of KDE e.V. (or its successor 6 | approved by the membership of KDE e.V.), which shall act as a 7 | proxy as defined in Section 14 of version 3 of the license. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | -------------------------------------------------------------------------------- /LICENSES/LicenseRef-KDE-Accepted-LGPL.txt: -------------------------------------------------------------------------------- 1 | This library is free software; you can redistribute it and/or 2 | modify it under the terms of the GNU Lesser General Public 3 | License as published by the Free Software Foundation; either 4 | version 3 of the license or (at your option) any later version 5 | that is accepted by the membership of KDE e.V. (or its successor 6 | approved by the membership of KDE e.V.), which shall act as a 7 | proxy as defined in Section 6 of version 3 of the license. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | -------------------------------------------------------------------------------- /LICENSES/LicenseRef-Qt-Commercial-exception-1.0.txt: -------------------------------------------------------------------------------- 1 | As a special exception, the copyright holder(s) give permission to link 2 | this program with the Qt Library (commercial or non-commercial edition), 3 | and distribute the resulting executable, without including the source 4 | code for the Qt library in the source distribution. 5 | -------------------------------------------------------------------------------- /cmake/modules/FindGpgme.cmake: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2013 Sandro Knauß 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | find_path(GPGME_INCLUDE_DIR NAMES gpgme.h) 5 | find_path(GPGERROR_INCLUDE_DIR NAMES gpg-error.h) 6 | find_library(GPGME_LIBRARY NAMES gpgme) 7 | find_library(GPGERROR_LIBRARY NAMES gpg-error) 8 | 9 | include(FindPackageHandleStandardArgs) 10 | find_package_handle_standard_args(Gpgme DEFAULT_MSG GPGME_INCLUDE_DIR GPGERROR_INCLUDE_DIR GPGME_LIBRARY GPGERROR_LIBRARY) 11 | 12 | mark_as_advanced(GPGME_INCLUDE_DIR GPGME_LIBRARY GPGME_INCLUDE_DIR GPGME_LIBRARY) 13 | 14 | set(GPGME_LIBRARIES ${GPGME_LIBRARY} ${GPGERROR_LIBRARY}) 15 | set(GPGME_INCLUDE_DIRS ${GPGME_INCLUDE_DIR} ${GPGERROR_INCLUDE_DIR}) 16 | 17 | if (GPGME_FOUND AND NOT TARGET Gpgme::Gpgme) 18 | add_library(Gpgme::Gpgme INTERFACE IMPORTED) 19 | set_target_properties(Gpgme::Gpgme PROPERTIES 20 | INTERFACE_INCLUDE_DIRECTORIES "${GPGME_INCLUDE_DIRS}" 21 | INTERFACE_LINK_LIBRARIES "${GPGME_LIBRARIES}" 22 | ) 23 | endif() 24 | -------------------------------------------------------------------------------- /cmake/modules/generate_crypto_test_wrapper.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2006, Alexander Neundorf, 2 | # Copyright (c) 2013, Sandro Knauß 3 | # Copyright (c) 2018, Christian Mollekopf 4 | # 5 | # SPDX-License-Identifier: BSD-3-Clause 6 | 7 | 8 | if (UNIX) 9 | 10 | file(WRITE "${_filename}" 11 | "#!/usr/bin/env sh 12 | # created by cmake, don't edit, changes will be lost 13 | 14 | # don't mess with a gpg-agent already running on the system 15 | unset GPG_AGENT_INFO 16 | 17 | ${_library_path_variable}=${_ld_library_path}\${${_library_path_variable}:+:\$${_library_path_variable}} GNUPGHOME=${_gnupghome} gpg-agent --daemon \"${_executable}\" \"$@\" 18 | _result=$? 19 | GNUPGHOME=${_gnupghome} gpg-connect-agent killagent /bye 20 | exit \$_result 21 | ") 22 | 23 | # make it executable 24 | # since this is only executed on UNIX, it is safe to call chmod 25 | exec_program(chmod ARGS ug+x \"${_filename}\" OUTPUT_VARIABLE _dummy ) 26 | 27 | else (UNIX) 28 | 29 | file(TO_NATIVE_PATH "${_ld_library_path}" win_path) 30 | file(TO_NATIVE_PATH "${_gnupghome}" win_gnupghome) 31 | 32 | file(WRITE "${_filename}" 33 | " 34 | set PATH=${win_path};$ENV{PATH} 35 | set GNUPGHOME=${win_gnupghome};$ENV{GNUPGHOME} 36 | gpg-agent --daemon \"${_executable}\" %* 37 | ") 38 | 39 | endif (UNIX) 40 | -------------------------------------------------------------------------------- /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/kalendar/4fbd4c3e65bfdc9f43deee59f1e5f709544b9ba8/logo.png -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: (C) 2020 Carl Schwan 2 | # 3 | # SPDX-License-Identifier: BSD-2-Clause 4 | 5 | add_subdirectory(lib) 6 | add_subdirectory(quick) 7 | add_subdirectory(contacts) 8 | add_subdirectory(mail) 9 | add_subdirectory(calendar) 10 | add_subdirectory(components) 11 | -------------------------------------------------------------------------------- /src/Messages.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | # SPDX-FileCopyrightText: 2020 Tobias Fella 3 | # SPDX-License-Identifier: CC0-1.0 4 | $XGETTEXT `find -name \*.cpp -o -name \*.qml -o -name \*.js | grep -v '/contacts/applet/'` -o $podir/kalendar.pot 5 | 6 | -------------------------------------------------------------------------------- /src/calendar/autotests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2023 Joshua Goins 2 | # SPDX-FileCopyrightText: 2023 Carl Schwan 3 | # SPDX-License-Identifier: BSD-2-Clause 4 | 5 | ecm_add_test(calutilstest.cpp 6 | TEST_NAME calutilstest 7 | LINK_LIBRARIES kalendar_calendar_static Qt::Test 8 | NAME_PREFIX "kalendar-calendar-" 9 | ) 10 | 11 | ecm_add_test(remindersmodeltest.cpp 12 | TEST_NAME remindersmodeltest 13 | LINK_LIBRARIES kalendar_calendar_static Qt::Test 14 | NAME_PREFIX "kalendar-calendar-" 15 | ) 16 | 17 | ecm_add_test(filtertest.cpp 18 | TEST_NAME filtertest 19 | LINK_LIBRARIES kalendar_calendar_static Qt::Test 20 | NAME_PREFIX "kalendar-calendar-" 21 | ) 22 | 23 | # the tests need the ical resource, which we might not have at this point (e.g. on the CI) 24 | find_program(AKONADI_ICAL_RESOURCE NAMES akonadi_ical_resource) 25 | if (UNIX) 26 | add_akonadi_isolated_test_advanced(incidenceoccurrencemodeltest incidenceoccurrencemodeltest.cpp kalendar_calendar_static Qt::Test) 27 | add_akonadi_isolated_test_advanced(todosortfilterproxymodeltest todosortfilterproxymodeltest.cpp kalendar_calendar_static Qt::Test) 28 | endif() 29 | -------------------------------------------------------------------------------- /src/calendar/autotests/calutilstest.cpp: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2023 Joshua Goins 2 | // SPDX-License-Identifier: LGPL-2.0-or-later 3 | 4 | #include "../utils.h" 5 | 6 | #include 7 | #include 8 | 9 | class CalendarUtilsTest : public QObject 10 | { 11 | Q_OBJECT 12 | 13 | public: 14 | CalendarUtilsTest() = default; 15 | ~CalendarUtilsTest() override = default; 16 | 17 | private: 18 | Utils utils; 19 | 20 | private Q_SLOTS: 21 | void initTestCase() 22 | { 23 | } 24 | 25 | void testRemindersLabel() 26 | { 27 | QCOMPARE(utils.secondsToReminderLabel(0), QStringLiteral("On event start")); 28 | 29 | QCOMPARE(utils.secondsToReminderLabel(300), QStringLiteral("5 minutes after start of event")); 30 | QCOMPARE(utils.secondsToReminderLabel(7200), QStringLiteral("2 hours after start of event")); 31 | QCOMPARE(utils.secondsToReminderLabel(259200), QStringLiteral("3 days after start of event")); 32 | 33 | QCOMPARE(utils.secondsToReminderLabel(-300), QStringLiteral("5 minutes before start of event")); 34 | QCOMPARE(utils.secondsToReminderLabel(-7200), QStringLiteral("2 hours before start of event")); 35 | QCOMPARE(utils.secondsToReminderLabel(-259200), QStringLiteral("3 days before start of event")); 36 | } 37 | }; 38 | 39 | QTEST_MAIN(CalendarUtilsTest) 40 | #include "calutilstest.moc" 41 | -------------------------------------------------------------------------------- /src/calendar/autotests/unittestenv/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | xdglocal 7 | akonadi_ical_resource 8 | akonadi_knut_resource 9 | true 10 | 11 | -------------------------------------------------------------------------------- /src/calendar/autotests/unittestenv/xdgconfig/akonadi-firstrunrc: -------------------------------------------------------------------------------- 1 | [ProcessedDefaults] 2 | defaultaddressbook=done 3 | defaultcalendar=done -------------------------------------------------------------------------------- /src/calendar/autotests/unittestenv/xdgconfig/akonadi-firstrunrc.license: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2021 Claudio Cambra 2 | # SPDX-License-Identifier: CC0-1.0 3 | -------------------------------------------------------------------------------- /src/calendar/autotests/unittestenv/xdgconfig/akonadi_ical_resource_0rc: -------------------------------------------------------------------------------- 1 | [General] 2 | Path[$e]=$XDG_DATA_HOME/std0.ics 3 | -------------------------------------------------------------------------------- /src/calendar/autotests/unittestenv/xdgconfig/akonadi_ical_resource_0rc.license: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2021 Claudio Cambra 2 | # SPDX-License-Identifier: CC0-1.0 3 | -------------------------------------------------------------------------------- /src/calendar/autotests/unittestenv/xdgconfig/emaildefaults: -------------------------------------------------------------------------------- 1 | [Defaults] 2 | Profile=Default 3 | 4 | [PROFILE_Default] 5 | EmailAddress=unittests@dev.nul 6 | FullName=Unit Test User 7 | Organization=KDE 8 | ReplyAddr= 9 | ServerType= 10 | -------------------------------------------------------------------------------- /src/calendar/autotests/unittestenv/xdgconfig/emaildefaults.license: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2021 Claudio Cambra 2 | # SPDX-License-Identifier: CC0-1.0 3 | -------------------------------------------------------------------------------- /src/calendar/autotests/unittestenv/xdgconfig/emailidentities: -------------------------------------------------------------------------------- 1 | [$Version] 2 | update_info=kmail.upd:3.3-move-identities-to-own-file,kmail.upd:3.3-aegypten-emailidentities-split-sign-encr-keys 3 | 4 | [General] 5 | Default Identity=1319040445 6 | 7 | [Identity #0] 8 | Dictionary=English (United States of America) 9 | Email Address=unittests@dev.nul 10 | Email Aliases= alias1@kde.org,alias2@kde.org 11 | Identity=UnitTestUser 12 | Image Location= 13 | Inline Signature= 14 | Name=Unit Test User 15 | Organization=KDE 16 | Preferred Crypto Message Format=auto 17 | Signature Type=disabled 18 | X-FaceEnabled=false 19 | uoid=1319040445 20 | 21 | [Identity #1] 22 | Dictionary=English (United States of America) 23 | Email Address=identity2@kde.org 24 | Email Aliases=alias1@kde.org,alias2@kde.org 25 | Identity=UnitTestUser 26 | Image Location= 27 | Inline Signature= 28 | Name=Unit Test User ID2 29 | Organization=KDE 30 | Preferred Crypto Message Format=auto 31 | Signature Type=disabled 32 | X-FaceEnabled=false 33 | uoid=1319040446 34 | 35 | -------------------------------------------------------------------------------- /src/calendar/autotests/unittestenv/xdgconfig/emailidentities.license: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2021 Claudio Cambra 2 | # SPDX-License-Identifier: CC0-1.0 3 | -------------------------------------------------------------------------------- /src/calendar/autotests/unittestenv/xdgconfig/mailtransports: -------------------------------------------------------------------------------- 1 | [$Version] 2 | update_info=mailtransports.upd:initial-kmail-migration,mailtransports.upd:initial-knode-migration 3 | 4 | [General] 5 | default-transport=69372773 6 | 7 | [Transport 69372773] 8 | host=akonadi_mailtransport_dummy_resource_0 9 | id=69372773 10 | name=dummymailtransport 11 | type=Akonadi 12 | -------------------------------------------------------------------------------- /src/calendar/autotests/unittestenv/xdgconfig/mailtransports.license: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2021 Claudio Cambra 2 | # SPDX-License-Identifier: CC0-1.0 3 | -------------------------------------------------------------------------------- /src/calendar/autotests/unittestenv/xdglocal/std0.ics.license: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2021 Claudio Cambra 2 | # SPDX-License-Identifier: CC0-1.0 3 | -------------------------------------------------------------------------------- /src/calendar/calendarconfig.kcfgc: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2021 Claudio Cambra 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | File=calendarconfig.kcfg 5 | ClassName=CalendarConfig 6 | Mutators=true 7 | DefaultValueGetters=true 8 | GenerateProperties=true 9 | ParentInConstructor=true 10 | UseEnumTypes=true 11 | GlobalEnums=true 12 | 13 | -------------------------------------------------------------------------------- /src/calendar/calendarplugin.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2022 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-2.0-or-later 3 | 4 | #pragma once 5 | 6 | #include 7 | 8 | class CalendarPlugin : public QQmlExtensionPlugin 9 | { 10 | Q_OBJECT 11 | Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") 12 | 13 | public: 14 | void registerTypes(const char *uri) override; 15 | }; -------------------------------------------------------------------------------- /src/calendar/filter.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2022 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-2.0-or-later 3 | #pragma once 4 | #include 5 | 6 | /** 7 | * This class is used to enable cross-compatible filtering of data in models. 8 | */ 9 | class Filter : public QObject 10 | { 11 | Q_OBJECT 12 | Q_PROPERTY(qint64 collectionId READ collectionId WRITE setCollectionId NOTIFY collectionIdChanged) 13 | Q_PROPERTY(QStringList tags READ tags WRITE setTags NOTIFY tagsChanged) 14 | Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) 15 | 16 | public: 17 | qint64 collectionId() const; 18 | QStringList tags() const; 19 | QString name() const; 20 | 21 | public Q_SLOTS: 22 | void setCollectionId(const qint64 collectionId); 23 | void setTags(const QStringList tags); 24 | void setName(const QString &name); 25 | 26 | void toggleFilterTag(const QString tagName); 27 | void reset(); 28 | void removeTag(const QString &tagName); 29 | 30 | Q_SIGNALS: 31 | void collectionIdChanged(); 32 | void tagsChanged(); 33 | void nameChanged(); 34 | 35 | private: 36 | qint64 m_collectionId = -1; 37 | QStringList m_tags; 38 | QString m_name; 39 | }; 40 | -------------------------------------------------------------------------------- /src/calendar/models/itemtagsmodel.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2021 Claudio Cambra 2 | // SPDX-License-Identifier: LGPL-2.1-or-later 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | 9 | class ItemTagsModel : public QAbstractListModel 10 | { 11 | Q_OBJECT 12 | Q_PROPERTY(Akonadi::Item item READ item WRITE setItem NOTIFY itemChanged) 13 | 14 | public: 15 | enum Roles { 16 | NameRole = Qt::UserRole + 1, 17 | IdRole, 18 | }; 19 | Q_ENUM(Roles) 20 | 21 | explicit ItemTagsModel(QObject *parent = nullptr); 22 | ~ItemTagsModel() override = default; 23 | 24 | QVariant data(const QModelIndex &idx, int role) const override; 25 | QHash roleNames() const override; 26 | int rowCount(const QModelIndex &parent = {}) const override; 27 | 28 | Akonadi::Item item() const; 29 | void setItem(Akonadi::Item item); 30 | 31 | Q_SIGNALS: 32 | void itemChanged(); 33 | 34 | private: 35 | Akonadi::Item m_item; 36 | }; 37 | -------------------------------------------------------------------------------- /src/calendar/models/timezonelistmodel.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2021 Claudio Cambra 2 | // SPDX-License-Identifier: LGPL-2.1-or-later 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | class TimeZoneListModel : public QAbstractListModel 10 | { 11 | Q_OBJECT 12 | 13 | public: 14 | enum Roles { IdRole = Qt::UserRole + 1 }; 15 | Q_ENUM(Roles) 16 | 17 | explicit TimeZoneListModel(QObject *parent = nullptr); 18 | ~TimeZoneListModel() override = default; 19 | 20 | QVariant data(const QModelIndex &idx, int role) const override; 21 | QHash roleNames() const override; 22 | int rowCount(const QModelIndex &parent = {}) const override; 23 | 24 | Q_INVOKABLE int getTimeZoneRow(const QByteArray &timeZone); 25 | 26 | private: 27 | QVector m_timeZones; 28 | }; 29 | -------------------------------------------------------------------------------- /src/calendar/mousetracker.cpp: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2023 Claudio Cambra 2 | // SPDX-License-Identifier: LGPL-2.1-or-later 3 | 4 | #include "mousetracker.h" 5 | 6 | #include 7 | #include 8 | 9 | MouseTracker *MouseTracker::instance() 10 | { 11 | static MouseTracker *trackerInstance = new MouseTracker; 12 | return trackerInstance; 13 | } 14 | 15 | MouseTracker::MouseTracker(QObject *parent) 16 | : QObject{parent} 17 | { 18 | } 19 | 20 | QPointF MouseTracker::mousePosition() const 21 | { 22 | return m_lastMousePos; 23 | } 24 | 25 | // This method is necessary for 'installEventFilter' 26 | bool MouseTracker::eventFilter(QObject *watched, QEvent *event) 27 | { 28 | Q_ASSERT(event); 29 | const auto type = event->type(); 30 | 31 | switch (type) { 32 | case QEvent::MouseMove: { 33 | const auto mouseEvent = static_cast(event); 34 | m_lastMousePos = mouseEvent->windowPos(); 35 | Q_EMIT mousePositionChanged(m_lastMousePos); 36 | break; 37 | } 38 | case QEvent::MouseButtonRelease: { 39 | const auto mouseEvent = static_cast(event); 40 | const auto buttonClicked = mouseEvent->button(); 41 | Q_EMIT mouseButtonReleased(buttonClicked); 42 | break; 43 | } 44 | default: 45 | break; 46 | } 47 | 48 | return QObject::eventFilter(watched, event); 49 | } 50 | -------------------------------------------------------------------------------- /src/calendar/mousetracker.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2023 Claudio Cambra 2 | // SPDX-License-Identifier: LGPL-2.1-or-later 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | class MouseTracker : public QObject 10 | { 11 | Q_OBJECT 12 | Q_PROPERTY(QPointF mousePosition READ mousePosition NOTIFY mousePositionChanged) 13 | 14 | public: 15 | static MouseTracker *instance(); 16 | QPointF mousePosition() const; 17 | 18 | Q_SIGNALS: 19 | void mousePositionChanged(QPointF position); 20 | void mouseButtonReleased(Qt::MouseButton button); 21 | 22 | protected: 23 | bool eventFilter(QObject *watched, QEvent *event) override; 24 | 25 | private: 26 | explicit MouseTracker(QObject *parent = nullptr); 27 | 28 | QPointF m_lastMousePos; 29 | }; 30 | -------------------------------------------------------------------------------- /src/calendar/org.kde.calendar.Calendar.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/calendar/qml/Bars/DayLabelsBar.qml: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2018 Christian Mollekopf, 2 | // SPDX-License-Identifier: GPL-2.0-or-later 3 | 4 | import QtQuick 2.4 5 | import QtQuick.Layouts 1.1 6 | import QtQuick.Controls 2.2 7 | 8 | import "dateutils.js" as DateUtils 9 | 10 | Row { 11 | id: root 12 | property date startDate 13 | property int dayWidth 14 | property int daysToShow 15 | property Component delegate 16 | 17 | height: childrenRect.height 18 | 19 | spacing: 0 20 | Repeater { 21 | model: root.daysToShow 22 | delegate: Loader { 23 | width: root.dayWidth 24 | property date day: DateUtils.addDaysToDate(root.startDate, modelData) 25 | sourceComponent: root.delegate 26 | } 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /src/calendar/qml/Controls/ColoredCheckbox.qml: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2021 Claudio Cambra 2 | // SPDX-License-Identifier: LGPL-2.0-or-later 3 | 4 | import QtQuick 2.15 5 | import QtQuick.Controls 2.15 as QQC2 6 | 7 | QQC2.CheckBox { 8 | id: checkbox 9 | 10 | property color color: Kirigami.Theme.highlightColor 11 | property real radius: 3 12 | 13 | indicator: Rectangle { 14 | anchors.horizontalCenter: parent.horizontalCenter 15 | anchors.verticalCenter: parent.verticalCenter 16 | height: parent.height * 0.8 17 | width: height 18 | x: checkbox.leftPadding 19 | y: parent.height / 2 - height / 2 20 | radius: checkbox.radius 21 | border.color: checkbox.color 22 | border.width: checkbox.visualFocus ? 2.25 : 1.25 23 | color: Qt.rgba(checkbox.color.r, checkbox.color.g, checkbox.color.b, 0.1) 24 | 25 | Rectangle { 26 | anchors.margins: parent.height * 0.2 27 | anchors.fill: parent 28 | radius: checkbox.radius / 3 29 | color: checkbox.color 30 | visible: checkbox.checked 31 | } 32 | } 33 | } 34 | 35 | -------------------------------------------------------------------------------- /src/calendar/qml/Controls/DateControls/DateChanger.qml: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2021 Claudio Cambra 2 | 3 | // SPDX-License-Identifier: GPL-3.0-or-later 4 | 5 | import QtQuick 2.15 6 | import org.kde.kirigami 2.14 as Kirigami 7 | import QtQuick.Controls 2.15 as QQC2 8 | import QtQuick.Layouts 1.15 9 | import "dateutils.js" as DateUtils 10 | 11 | QQC2.Popup { 12 | id: root 13 | 14 | signal dateSelected(date date) 15 | 16 | property date date: new Date() 17 | onDateChanged: { 18 | datePicker.selectedDate = date; 19 | datePicker.clickedDate = date; 20 | } 21 | property bool showDays: true 22 | 23 | implicitWidth: Kirigami.Units.gridUnit * 20 24 | padding: 0 25 | 26 | contentItem: DatePicker { 27 | id: datePicker 28 | showDays: root.showDays 29 | selectedDate: root.date 30 | clickedDate: root.date 31 | onDatePicked: root.dateSelected(pickedDate) 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/calendar/qml/Controls/KBMNavigationMouseArea.qml: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2021 Felipe Kinoshita 2 | // SPDX-FileCopyrightText: 2022 Claudio Cambra 3 | // SPDX-License-Identifier: LGPL-2.0-or-later 4 | 5 | import QtQuick 2.15 6 | import QtQuick.Controls 2.15 as QQC2 7 | 8 | MouseArea { 9 | acceptedButtons: Qt.BackButton | Qt.ForwardButton 10 | propagateComposedEvents: true 11 | hoverEnabled: false 12 | 13 | function repositionIncidencePopup() { 14 | if(incidenceInfoPopup && incidenceInfoPopup.visible) { 15 | incidenceInfoPopup.reposition(); 16 | } 17 | } 18 | 19 | onWheel: { 20 | repositionIncidencePopup(); 21 | wheel.accepted = false; 22 | } 23 | 24 | onPressAndHold: { 25 | repositionIncidencePopup(); 26 | mouse.accepted = false; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/calendar/qml/Controls/MainDrawerToggleButton.qml: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2022 Claudio Cambra 2 | // SPDX-License-Identifier: LGPL-2.0-or-later 3 | 4 | import QtQuick 2.15 5 | import QtQuick.Controls 2.15 as QQC2 6 | import org.kde.kirigami 2.15 as Kirigami 7 | import org.kde.kalendar.calendar 1.0 8 | import org.kde.kalendar.utils 1.0 9 | 10 | QQC2.ToolButton { 11 | property var mainDrawer: KalendarUiUtils.appMain.mainDrawer 12 | 13 | visible: !Kirigami.Settings.isMobile 14 | icon.name: mainDrawer.collapsed ? "sidebar-expand" : "sidebar-collapse" 15 | onClicked: { 16 | if(mainDrawer.collapsed && applicationWindow().width < mainDrawer.narrowWindowWidth) { // Collapsed due to narrow window 17 | // We don't want to write to config as when narrow the button will only open the modal drawer 18 | mainDrawer.collapsed = !mainDrawer.collapsed; 19 | } else { 20 | Config.forceCollapsedMainDrawer = !Config.forceCollapsedMainDrawer; 21 | Config.save() 22 | } 23 | } 24 | 25 | QQC2.ToolTip.text: mainDrawer.collapsed ? i18n("Expand Main Drawer") : i18n("Collapse Main Drawer") 26 | QQC2.ToolTip.visible: hovered 27 | QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay 28 | } 29 | -------------------------------------------------------------------------------- /src/calendar/qml/Settings/AboutPage.qml: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2021 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-2.0-or-later 3 | 4 | import QtQuick 2.15 5 | import org.kde.kirigami 2.14 as Kirigami 6 | import org.kde.kalendar.calendar 1.0 7 | import org.kde.kirigamiaddons.labs.mobileform 0.1 as MobileForm 8 | 9 | MobileForm.AboutPage { 10 | objectName: "aboutPage" 11 | aboutData: AboutType.aboutData 12 | } 13 | -------------------------------------------------------------------------------- /src/calendar/qml/Settings/Schedule/AvailabilitySettingsPage.qml: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2023 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-3.0-or-later 3 | 4 | import QtQuick 2.15 5 | import org.kde.kirigami 2.19 as Kirigami 6 | import QtQuick.Layouts 1.15 7 | import org.kde.akonadi 1.0 8 | import org.kde.kalendar.calendar 1.0 as Calendar 9 | 10 | Kirigami.ScrollablePage { 11 | id: availabilitySettingsPage 12 | title: i18n("Configure Availability") 13 | leftPadding: 0 14 | rightPadding: 0 15 | } -------------------------------------------------------------------------------- /src/calendar/qml/Settings/Schedule/ScheduleSettingsPage.qml: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2023 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-3.0-or-later 3 | 4 | import QtQuick 2.15 5 | import org.kde.kirigami 2.18 as Kirigami 6 | import QtQuick.Controls 2.15 as Controls 7 | import QtQuick.Layouts 1.15 8 | 9 | Kirigami.CategorizedSettings { 10 | objectName: "settingsPage" 11 | actions: [ 12 | Kirigami.SettingAction { 13 | text: i18n("Free/Busy") 14 | icon.name: "view-calendar-month" 15 | page: Qt.resolvedUrl("FreeBusySettingsPage.qml") 16 | } 17 | // TODO: add Availability configuration here 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /src/calendar/qml/Settings/SettingsPage.qml: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2021 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-2.0-or-later 3 | 4 | import QtQuick 2.15 5 | import org.kde.kirigami 2.18 as Kirigami 6 | import QtQuick.Controls 2.15 as Controls 7 | import QtQuick.Layouts 1.15 8 | import org.kde.kalendar.calendar 1.0 9 | 10 | Kirigami.CategorizedSettings { 11 | objectName: "settingsPage" 12 | actions: [ 13 | Kirigami.SettingAction { 14 | text: i18n("Appearance") 15 | icon.name: "preferences-desktop-theme-global" 16 | page: Qt.resolvedUrl("ViewSettingsPage.qml") 17 | }, 18 | Kirigami.SettingAction { 19 | text: i18n("Accounts") 20 | icon.name: "preferences-system-users" 21 | page: Qt.resolvedUrl("SourceSettingsPage.qml") 22 | }, 23 | Kirigami.SettingAction { 24 | text: i18n("Calendars") 25 | icon.name: "korganizer" 26 | page: Qt.resolvedUrl("CalendarSettingsPage.qml") 27 | }, 28 | Kirigami.SettingAction { 29 | text: i18n("About Kalendar") 30 | icon.name: "help-about" 31 | page: Qt.resolvedUrl("AboutPage.qml") 32 | } 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /src/calendar/qml/Settings/SourceSettingsPage.qml: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2021 Carl Schwan 2 | // SPDX-FileCopyrightText: 2022 Devin Lin 3 | // SPDX-License-Identifier: GPL-2.0-or-later 4 | 5 | import QtQuick 2.15 6 | import org.kde.kirigami 2.19 as Kirigami 7 | import QtQuick.Layouts 1.15 8 | import org.kde.kalendar.calendar 1.0 9 | import org.kde.akonadi 1.0 10 | 11 | Kirigami.ScrollablePage { 12 | id: sourcesSettingsPage 13 | title: i18n("Accounts") 14 | leftPadding: 0 15 | rightPadding: 0 16 | 17 | ColumnLayout { 18 | AgentConfigurationForm { 19 | mimetypes: [MimeTypes.calendar, MimeTypes.todo] 20 | title: i18n("Calendars") 21 | addPageTitle: i18n("Add New Calendar Source…") 22 | Layout.fillWidth: true 23 | Layout.topMargin: Kirigami.Units.largeSpacing 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/calendar/qml/TreeView/TreeListView.qml: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2020 Marco Martin 3 | * 4 | * SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | import QtQuick 2.12 8 | 9 | /** 10 | * A ListView with an internal KDescendantsProxyModel already in place. 11 | * It also features tree node open and close animations. 12 | * 13 | * In order to use it, just assign the actual tree model you need. 14 | * Additional properties: 15 | * * sourceModel: the tree model we want to show 16 | * * descendantsModel: The used KDescendantsProxyModel instance 17 | * * expandsByDefault: If true, the tree view will be loaded completely expanded (default false) 18 | */ 19 | InternalTreeListView { 20 | id: root 21 | property alias model: root.sourceModel 22 | } 23 | 24 | -------------------------------------------------------------------------------- /src/calendar/qml/incidenceeditor/PriorityComboBox.qml: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2021 Claudio Cambra 2 | // SPDX-FileCopyrightText: 2023 Carl Schwan 3 | // SPDX-License-Identifier: LGPL-2.1-or-later 4 | 5 | import QtQuick 2.15 6 | import QtQuick.Controls 2.15 as QQC2 7 | import org.kde.kirigami 2.15 as Kirigami 8 | 9 | QQC2.ComboBox { 10 | id: root 11 | 12 | required property bool isTodo 13 | 14 | visible: incidenceForm.isTodo 15 | textRole: "display" 16 | valueRole: "value" 17 | 18 | Kirigami.FormData.label: i18n("Priority:") 19 | 20 | model: [ 21 | {display: i18n("Unassigned"), value: 0}, 22 | {display: i18n("1 (Highest Priority)"), value: 1}, 23 | {display: i18n("2"), value: 2}, 24 | {display: i18n("3"), value: 3}, 25 | {display: i18n("4"), value: 4}, 26 | {display: i18n("5 (Medium Priority)"), value: 5}, 27 | {display: i18n("6"), value: 6}, 28 | {display: i18n("7"), value: 7}, 29 | {display: i18n("8"), value: 8}, 30 | {display: i18n("9 (Lowest Priority)"), value: 9} 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /src/calendar/utils.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2023 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-2.1-or-later 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | class Utils : public QObject 11 | { 12 | Q_OBJECT 13 | 14 | Q_PROPERTY(QStringList hourlyViewLocalisedHourLabels READ hourlyViewLocalisedHourLabels CONSTANT) 15 | 16 | public: 17 | explicit Utils(QObject *parent = nullptr); 18 | 19 | QStringList hourlyViewLocalisedHourLabels() const; 20 | 21 | Q_INVOKABLE QDate addDaysToDate(const QDate &date, const int days); 22 | 23 | /// Gives prettified time 24 | Q_INVOKABLE QString secondsToReminderLabel(const qint64 seconds) const; 25 | 26 | Q_REQUIRED_RESULT static QString formatSpelloutDuration(const KCalendarCore::Duration &duration, const KFormat &format, const bool allDay); 27 | 28 | Q_INVOKABLE int weekNumber(const QDate &date) const; 29 | 30 | private: 31 | QStringList m_hourlyViewLocalisedHourLabels; 32 | }; 33 | -------------------------------------------------------------------------------- /src/components/componentsplugin.cpp: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2022 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-2.0-or-later 3 | 4 | #include "componentsplugin.h" 5 | 6 | #include "helper.h" 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | void ComponentsPlugin::registerTypes(const char *uri) 13 | { 14 | Q_ASSERT(uri == QByteArray("org.kde.kalendar.components")); 15 | qmlRegisterModule(uri, 1, 0); 16 | qmlRegisterSingletonType(uri, 1, 0, "Helper", [](QQmlEngine *engine, QJSEngine *scriptEngine) { 17 | Q_UNUSED(engine) 18 | Q_UNUSED(scriptEngine) 19 | return new Helper; 20 | }); 21 | 22 | qmlRegisterSingletonType("org.kde.kalendar.components", 1, 0, "About", [](QQmlEngine *engine, QJSEngine *) -> QJSValue { 23 | return engine->toScriptValue(KAboutData::applicationData()); 24 | }); 25 | 26 | qRegisterMetaType(); 27 | } 28 | -------------------------------------------------------------------------------- /src/components/componentsplugin.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2022 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-2.0-or-later 3 | 4 | #pragma once 5 | 6 | #include 7 | 8 | class ComponentsPlugin : public QQmlExtensionPlugin 9 | { 10 | Q_OBJECT 11 | Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") 12 | 13 | public: 14 | void registerTypes(const char *uri) override; 15 | }; -------------------------------------------------------------------------------- /src/components/helper.cpp: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2023 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-3.0-or-later 3 | 4 | #include "helper.h" 5 | #include 6 | 7 | QString Helper::iconName(const QIcon &icon) const 8 | { 9 | return icon.name(); 10 | } 11 | -------------------------------------------------------------------------------- /src/components/helper.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2021 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-3.0-or-later 3 | 4 | #pragma once 5 | 6 | #include 7 | 8 | class Helper : public QObject 9 | { 10 | Q_OBJECT 11 | 12 | public: 13 | Q_INVOKABLE QString iconName(const QIcon &icon) const; 14 | }; 15 | -------------------------------------------------------------------------------- /src/components/qml/ColoredCheckbox.qml: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2021 Claudio Cambra 2 | // SPDX-License-Identifier: LGPL-2.0-or-later 3 | 4 | import QtQuick 2.15 5 | import QtQuick.Controls 2.15 as QQC2 6 | 7 | QQC2.CheckBox { 8 | id: checkbox 9 | 10 | property color color: Kirigami.Theme.highlightColor 11 | property real radius: 3 12 | 13 | indicator: Rectangle { 14 | anchors.horizontalCenter: parent.horizontalCenter 15 | anchors.verticalCenter: parent.verticalCenter 16 | height: parent.height * 0.8 17 | width: height 18 | x: checkbox.leftPadding 19 | y: parent.height / 2 - height / 2 20 | radius: checkbox.radius 21 | border.color: checkbox.color 22 | border.width: checkbox.visualFocus ? 2.25 : 1.25 23 | color: Qt.rgba(checkbox.color.r, checkbox.color.g, checkbox.color.b, 0.1) 24 | 25 | Rectangle { 26 | anchors.margins: parent.height * 0.2 27 | anchors.fill: parent 28 | radius: checkbox.radius / 3 29 | color: checkbox.color 30 | visible: checkbox.checked 31 | } 32 | } 33 | } 34 | 35 | -------------------------------------------------------------------------------- /src/components/qml/FileMenu.qml: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2022 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-3.0-or-later 3 | 4 | import QtQuick 2.15 5 | import QtQuick.Controls 2.15 as QQC2 6 | import QtQuick.Window 2.15 7 | import org.kde.kalendar.components 1.0 8 | import org.kde.kirigami 2.19 as Kirigami 9 | 10 | QQC2.Menu { 11 | id: fileMenu 12 | title: i18nc("@action:menu", "File") 13 | 14 | default property list additionalMenuItems 15 | 16 | property list _menuItems: [ 17 | QQC2.MenuItem { 18 | action: QQC2.Action { 19 | text: i18nc("@action:menu", "Quit Kalendar") 20 | icon.name: "application-exit" 21 | shortcut: StandardKey.Quit 22 | onTriggered: Qt.quit() 23 | } 24 | } 25 | ] 26 | 27 | Component.onCompleted: { 28 | for (let i in additionalMenuItems) { 29 | fileMenu.addItem(additionalMenuItems[i]) 30 | } 31 | for (let i in _menuItems) { 32 | fileMenu.addItem(_menuItems[i]) 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/components/qml/HelpMenu.qml: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2022 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-3.0-or-later 3 | 4 | import QtQuick 2.15 5 | import QtQuick.Controls 2.15 as QQC2 6 | import org.kde.kalendar.components 1.0 7 | 8 | QQC2.Menu { 9 | id: root 10 | 11 | required property var application 12 | 13 | title: i18nc("@action:menu", "Help") 14 | 15 | KActionFromAction { 16 | action: root.application.action("open_about_page") 17 | } 18 | 19 | KActionFromAction { 20 | action: root.application.action("open_about_kde_page") 21 | } 22 | 23 | QQC2.MenuItem { 24 | text: i18nc("@action:menu", "Kalendar Handbook") // todo 25 | visible: false 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/components/qml/KActionFromAction.qml: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2021 Claudio Cambra 2 | // SPDX-License-Identifier: GPL-2.0-or-later 3 | 4 | import QtQuick 2.7 5 | import org.kde.kirigami 2.20 as Kirigami 6 | import org.kde.kalendar.components 1.0 7 | 8 | Kirigami.Action { 9 | required property var action 10 | 11 | text: action.text 12 | shortcut: action.shortcut 13 | icon.name: Helper.iconName(action.icon) 14 | onTriggered: action.trigger() 15 | visible: action.text.length > 0 16 | checkable: action.checkable 17 | checked: action.checked 18 | } 19 | -------------------------------------------------------------------------------- /src/components/qml/NativeFileMenu.qml: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2022 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-3.0-or-later 3 | 4 | import QtQuick 2.15 5 | import Qt.labs.platform 1.1 as Labs 6 | import org.kde.kalendar.components 1.0 7 | 8 | Labs.Menu { 9 | id: fileMenu 10 | title: i18nc("@action:menu", "File") 11 | 12 | default property list additionalMenuItems 13 | 14 | property list _menuItems: [ 15 | Labs.MenuItem { 16 | text: i18nc("@action:menu", "Quit Kalendar") 17 | icon.name: "application-exit" 18 | shortcut: StandardKey.Quit 19 | onTriggered: Qt.quit() 20 | } 21 | ] 22 | 23 | Component.onCompleted: { 24 | for (let i in additionalMenuItems) { 25 | fileMenu.addItem(additionalMenuItems[i]) 26 | } 27 | for (let i in _menuItems) { 28 | fileMenu.addItem(_menuItems[i]) 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/components/qml/NativeHelpMenu.qml: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2022 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-3.0-or-later 3 | 4 | import Qt.labs.platform 1.1 as Labs 5 | import org.kde.kalendar.components 1.0 6 | 7 | Labs.Menu { 8 | id: root 9 | 10 | required property var application 11 | 12 | title: i18nc("@action:menu", "Help") 13 | 14 | NativeMenuItemFromAction { 15 | action: root.application.action("open_about_page") 16 | } 17 | 18 | NativeMenuItemFromAction { 19 | action: root.application.action("open_about_kde_page") 20 | } 21 | 22 | Labs.MenuItem { 23 | text: i18nc("@action:menu", "Kalendar Handbook") // todo 24 | visible: false 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/components/qml/NativeMenuItemFromAction.qml: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2020 (c) Carson Black 2 | // SPDX-License-Identifier: LGPL-3.0-or-later 3 | 4 | import QtQuick 2.7 5 | import Qt.labs.platform 1.1 6 | import org.kde.kalendar.components 1.0 7 | 8 | MenuItem { 9 | required property var action 10 | 11 | text: action.text 12 | shortcut: action.shortcut 13 | iconName: Helper.iconName(action.icon) 14 | onTriggered: action.trigger() 15 | visible: action.text.length > 0 16 | checkable: action.checkable 17 | checked: action.checked 18 | enabled: action.enabled && parent.enabled 19 | } 20 | -------------------------------------------------------------------------------- /src/components/qml/NativeWindowMenu.qml: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2022 Carl Schwan 2 | // SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import QtQuick 2.15 5 | import QtQuick.Window 2.15 6 | import Qt.labs.platform 1.1 as Labs 7 | import org.kde.kalendar.components 1.0 8 | 9 | Labs.Menu { 10 | property Window _window: applicationWindow() 11 | 12 | title: i18nc("@action:menu", "Window") 13 | 14 | Labs.MenuItem { 15 | text: root.visibility === Window.FullScreen ? i18nc("@action:menu", "Exit Full Screen") : i18nc("@action:menu", "Enter Full Screen") 16 | icon.name: "view-fullscreen" 17 | shortcut: StandardKey.FullScreen 18 | onTriggered: if (_window.visibility === Window.FullScreen) { 19 | _window.showNormal(); 20 | } else { 21 | _window.showFullScreen(); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/components/qml/SettingsMenu.qml: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2021 Claudio Cambra 2 | // SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import QtQuick 2.15 5 | import QtQuick.Controls 2.15 as QQC2 6 | import org.kde.kalendar.components 1.0 7 | 8 | QQC2.Menu { 9 | id: root 10 | 11 | required property var application 12 | 13 | title: i18nc("@action:menu", "Settings") 14 | 15 | KActionFromAction { 16 | action: root.application.action("open_tag_manager") 17 | } 18 | 19 | QQC2.MenuSeparator {} 20 | 21 | KActionFromAction { 22 | action: root.application.action("options_configure_keybinding") 23 | } 24 | 25 | KActionFromAction { 26 | action: root.application.action("options_configure") 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/components/qml/ViewMenu.qml: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2022 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-3.0-or-later 3 | 4 | import QtQuick 2.15 5 | import QtQuick.Controls 2.15 as QQC2 6 | import org.kde.kalendar.components 1.0 7 | 8 | KActionFromAction { 9 | kalendarAction: "open_contact_view" 10 | } 11 | KActionFromAction { 12 | kalendarAction: "open_mail_view" 13 | } 14 | KActionFromAction { 15 | kalendarAction: 'open_kcommand_bar' 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/components/qml/WindowMenu.qml: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2022 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-3.0-or-later 3 | 4 | import QtQuick 2.15 5 | import QtQuick.Controls 2.15 as QQC2 6 | import QtQuick.Window 2.15 7 | import org.kde.kirigami 2.19 as Kirigami 8 | 9 | QQC2.Menu { 10 | property Window _window: applicationWindow() 11 | 12 | title: i18nc("@action:menu", "Window") 13 | 14 | Kirigami.Action { 15 | text: _window.visibility === Window.FullScreen ? i18nc("@action:menu", "Exit Full Screen") : i18nc("@action:menu", "Enter Full Screen") 16 | icon.name: "view-fullscreen" 17 | shortcut: StandardKey.FullScreen 18 | onTriggered: if (_window.visibility === Window.FullScreen) { 19 | _window.showNormal(); 20 | } else { 21 | _window.showFullScreen(); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/contacts/addressmodel.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2022 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-2.1-or-later 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | class AddressModel : public QAbstractListModel 10 | { 11 | Q_OBJECT 12 | 13 | public: 14 | enum Roles { 15 | CountryRole = Qt::UserRole + 1, 16 | ExtendedRole, 17 | FormattedAddressRole, 18 | HasGeoRole, 19 | LatitudeRole, 20 | LongitudeRole, 21 | IdRole, 22 | IsEmptyRole, 23 | LabelRole, 24 | PostalCodeRole, 25 | PostOfficeBoxRole, 26 | RegionRole, 27 | StreetRole, 28 | TypeRole, 29 | TypeLabelRole, 30 | }; 31 | Q_ENUM(Roles) 32 | AddressModel(QObject *parent = nullptr); 33 | 34 | void setAddresses(const KContacts::Address::List &addresses); 35 | 36 | int rowCount(const QModelIndex &parent = {}) const override; 37 | QVariant data(const QModelIndex &idx, int role) const override; 38 | QHash roleNames() const override; 39 | 40 | private: 41 | KContacts::Address::List m_addresses; 42 | }; 43 | -------------------------------------------------------------------------------- /src/contacts/applet/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2022 Carl Schwan 2 | # SPDX-License-Identifier: BSD-2-Clause 3 | 4 | find_package(KF${QT_MAJOR_VERSION} ${KF_MIN_VERSION} OPTIONAL_COMPONENTS Plasma) 5 | 6 | if (KF${QT_MAJOR_VERSION}Plasma_FOUND) 7 | plasma_install_package(package org.kde.kalendar.contact) 8 | endif() 9 | -------------------------------------------------------------------------------- /src/contacts/applet/Messages.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # SPDX-FileCopyrightText: 2022 Carl Schwan 3 | # SPDX-License-Identifier: BSD-2-Clause 4 | 5 | $XGETTEXT `find . -name '*.js' -o -name '*.qml'` -o $podir/plasma_applet_org.kde.kalendar.contact.pot 6 | -------------------------------------------------------------------------------- /src/contacts/applet/package/contents/config/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 10 | 11 | 12 | 13 | 14 | 1 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/contacts/applet/package/contents/resources/fallbackBackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/kalendar/4fbd4c3e65bfdc9f43deee59f1e5f709544b9ba8/src/contacts/applet/package/contents/resources/fallbackBackground.png -------------------------------------------------------------------------------- /src/contacts/applet/package/contents/ui/CompactRepresentation.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2014-2015 David Rosca 3 | 4 | SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 5 | */ 6 | 7 | import QtQuick 2.2 8 | import QtQuick.Layouts 1.1 9 | 10 | import org.kde.plasma.core 2.0 as PlasmaCore 11 | import org.kde.plasma.components 3.0 as PlasmaComponents3 12 | 13 | MouseArea { 14 | readonly property bool inPanel: (plasmoid.location === PlasmaCore.Types.TopEdge 15 | || plasmoid.location === PlasmaCore.Types.RightEdge 16 | || plasmoid.location === PlasmaCore.Types.BottomEdge 17 | || plasmoid.location === PlasmaCore.Types.LeftEdge) 18 | 19 | acceptedButtons: Qt.LeftButton 20 | 21 | onClicked: plasmoid.expanded = !plasmoid.expanded; 22 | 23 | hoverEnabled: true 24 | } 25 | -------------------------------------------------------------------------------- /src/contacts/applet/package/contents/ui/ContactListItem.qml: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2017-2019 Kaidan Developers and Contributors 3 | * SPDX-FileCopyrightText: 2019 Jonah Brüchert 4 | * SPDX-FileCopyrightText: 2021 Claudio Cambra 5 | * 6 | * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 7 | */ 8 | 9 | import QtQuick 2.3 10 | import QtQuick.Layouts 1.3 11 | import QtQuick.Controls 2.0 as Controls 12 | 13 | import org.kde.kirigami 2.14 as Kirigami 14 | import org.kde.kalendar.contact 1.0 15 | import org.kde.plasma.components 3.0 as PlasmaComponents3 16 | import org.kde.plasma.extras 2.0 as PlasmaExtras 17 | 18 | PlasmaComponents3.ItemDelegate { 19 | id: listItem 20 | 21 | property string name 22 | property var avatarIcon 23 | 24 | contentItem: RowLayout { 25 | Kirigami.Avatar { 26 | id: avatar 27 | Layout.maximumHeight: parent.height 28 | Layout.maximumWidth: parent.height 29 | source: ContactManager.decorationToUrl(avatarIcon) 30 | name: listItem.name 31 | } 32 | 33 | PlasmaExtras.Heading { 34 | text: name 35 | textFormat: Text.PlainText 36 | elide: Text.ElideRight 37 | maximumLineCount: 1 38 | level: 5 39 | Layout.fillWidth: true 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/contacts/applet/package/metadata.json.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2022 Carl Schwan 2 | SPDX-License-Identifier: BSD-2-Clause -------------------------------------------------------------------------------- /src/contacts/attributes/attributeregistrar.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Akonadi Contact. 3 | 4 | SPDX-FileCopyrightText: 2009 Constantin Berzan 5 | 6 | SPDX-License-Identifier: LGPL-2.0-or-later 7 | */ 8 | 9 | #include "attributes/contactmetadataattribute_p.h" 10 | 11 | #include 12 | 13 | namespace 14 | { 15 | // Anonymous namespace; function is invisible outside this file. 16 | bool dummy() 17 | { 18 | using namespace Akonadi; 19 | AttributeFactory::registerAttribute(); 20 | return true; 21 | } 22 | 23 | // Called when this library is loaded. 24 | const bool registered = dummy(); 25 | } // namespace 26 | -------------------------------------------------------------------------------- /src/contacts/attributes/contactmetadataattribute_p.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Akonadi Contact. 3 | 4 | SPDX-FileCopyrightText: 2009 Tobias Koenig 5 | 6 | SPDX-License-Identifier: LGPL-2.0-or-later 7 | */ 8 | 9 | #pragma once 10 | 11 | #include 12 | 13 | #include 14 | 15 | #include 16 | 17 | class ContactMetaDataAttributePrivate; 18 | 19 | /** 20 | * @short Attribute to store contact specific meta data. 21 | * 22 | * @author Tobias Koenig 23 | */ 24 | class ContactMetaDataAttribute : public Akonadi::Attribute 25 | { 26 | public: 27 | /** 28 | * Creates a new contact meta data attribute. 29 | */ 30 | ContactMetaDataAttribute(); 31 | 32 | /** 33 | * Destroys the contact meta data attribute. 34 | */ 35 | ~ContactMetaDataAttribute() override; 36 | 37 | /** 38 | * Sets the meta @p data. 39 | */ 40 | void setMetaData(const QVariantMap &data); 41 | 42 | /** 43 | * Returns the meta data. 44 | */ 45 | QVariantMap metaData() const; 46 | 47 | QByteArray type() const override; 48 | Akonadi::Attribute *clone() const override; 49 | QByteArray serialized() const override; 50 | void deserialize(const QByteArray &data) override; 51 | 52 | private: 53 | //@cond PRIVATE 54 | std::unique_ptr const d; 55 | //@endcond 56 | }; 57 | -------------------------------------------------------------------------------- /src/contacts/autotests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2022 Carl Schwan 2 | # SPDX-License-Identifier: BSD-2-Clause 3 | 4 | ecm_add_test(emailmodeltest.cpp 5 | TEST_NAME emailmodeltest 6 | LINK_LIBRARIES kalendar_contact_static Qt::Test 7 | NAME_PREFIX "kalendar-contact-" 8 | ) 9 | 10 | ecm_add_test(imppmodeltest.cpp 11 | TEST_NAME imppmodeltest 12 | LINK_LIBRARIES kalendar_contact_static Qt::Test 13 | NAME_PREFIX "kalendar-contact-" 14 | ) 15 | 16 | ecm_add_test(addressmodeltest.cpp 17 | TEST_NAME addressmodeltest 18 | LINK_LIBRARIES kalendar_contact_static Qt::Test 19 | NAME_PREFIX "kalendar-contact-" 20 | ) 21 | 22 | ecm_add_test(phonemodeltest.cpp 23 | TEST_NAME phonemodeltest 24 | LINK_LIBRARIES kalendar_contact_static Qt::Test 25 | NAME_PREFIX "kalendar-contact-" 26 | ) -------------------------------------------------------------------------------- /src/contacts/autotests/imppmodeltest.cpp: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: (C) 2020 Carl Schwan 2 | // SPDX-License-Identifier: BSD-2-Clause 3 | 4 | #include "../imppmodel.h" 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | class ImppModelTest : public QObject 11 | { 12 | Q_OBJECT 13 | 14 | private Q_SLOTS: 15 | void initTestCase() 16 | { 17 | } 18 | 19 | void testReading() 20 | { 21 | KContacts::Addressee addressee; 22 | KContacts::Impp::List impps; 23 | impps.append(KContacts::Impp(QUrl{QStringLiteral("matrix:@carl:kde.org")})); 24 | impps.append(KContacts::Impp(QUrl{QStringLiteral("matrix:@carl2:kde.org")})); 25 | addressee.setImppList(impps); 26 | ImppModel imppModel; 27 | imppModel.loadContact(addressee); 28 | 29 | QCOMPARE(imppModel.rowCount(), 2); 30 | QCOMPARE(imppModel.data(imppModel.index(1, 0), ImppModel::UrlRole).toString(), QStringLiteral("matrix:@carl2:kde.org")); 31 | } 32 | }; 33 | 34 | QTEST_MAIN(ImppModelTest) 35 | #include "imppmodeltest.moc" 36 | -------------------------------------------------------------------------------- /src/contacts/contactapplication.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2023 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-2.1-or-later 3 | 4 | #include 5 | class QQuickWindow; 6 | class ContactApplication : public AbstractApplication 7 | { 8 | Q_OBJECT 9 | 10 | public: 11 | explicit ContactApplication(QObject *parent = nullptr); 12 | 13 | QVector actionCollections() const override; 14 | 15 | Q_INVOKABLE void saveWindowGeometry(QQuickWindow *window); 16 | 17 | Q_SIGNALS: 18 | void createNewContact(); 19 | void createNewContactGroup(); 20 | void refreshAll(); 21 | 22 | private: 23 | void setupActions() override; 24 | KActionCollection *mContactCollection = nullptr; 25 | }; 26 | -------------------------------------------------------------------------------- /src/contacts/contactcollectionmodel.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2007 Tobias Koenig 2 | // SPDX-FileCopyrightText: 2022 Carl Schwan 3 | // SPDX-License-Identifier: GPL-2.0-or-later 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | class ContactCollectionModel : public KCheckableProxyModel 10 | { 11 | public: 12 | explicit ContactCollectionModel(QObject *parent); 13 | 14 | Q_REQUIRED_RESULT QVariant data(const QModelIndex &index, int role) const override; 15 | }; 16 | -------------------------------------------------------------------------------- /src/contacts/contactconfig.kcfg: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 14 | 15 | true 16 | 17 | 18 | 19 | false 20 | 21 | 22 | 23 | 24 | 25 | 26 | -1 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/contacts/contactconfig.kcfgc: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2021 Claudio Cambra 2 | # SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | File=contactconfig.kcfg 5 | ClassName=ContactConfig 6 | Mutators=true 7 | DefaultValueGetters=true 8 | GenerateProperties=true 9 | ParentInConstructor=true 10 | Singleton=false 11 | UseEnumTypes=true 12 | GlobalEnums=true 13 | 14 | -------------------------------------------------------------------------------- /src/contacts/contactgroupwrapper.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2022 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-2.1-or-later 3 | 4 | #pragma once 5 | 6 | #include 7 | 8 | class KJob; 9 | class QAbstractListModel; 10 | class ContactGroupModel; 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | class ContactGroupWrapper : public QObject, public Akonadi::ItemMonitor 17 | { 18 | Q_OBJECT 19 | Q_PROPERTY(QString name READ name NOTIFY nameChanged) 20 | Q_PROPERTY(Akonadi::Item item READ item WRITE setItem NOTIFY akonadiItemChanged) 21 | Q_PROPERTY(QAbstractListModel *model READ model CONSTANT) 22 | 23 | public: 24 | ContactGroupWrapper(QObject *parent = nullptr); 25 | QString name() const; 26 | void setName(const QString &name); 27 | Akonadi::Item item() const; 28 | void setItem(const Akonadi::Item &item); 29 | QAbstractListModel *model() const; 30 | 31 | protected: 32 | virtual void itemChanged(const Akonadi::Item &item) override; 33 | 34 | Q_SIGNALS: 35 | void nameChanged(); 36 | void akonadiItemChanged(); 37 | 38 | private: 39 | void itemFetchDone(KJob *job); 40 | void loadContactGroup(const KContacts::ContactGroup &contactGroup); 41 | 42 | QString m_name; 43 | ContactGroupModel *m_model; 44 | Akonadi::Item m_item; 45 | }; -------------------------------------------------------------------------------- /src/contacts/contactplugin.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2022 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-2.0-or-later 3 | 4 | #pragma once 5 | 6 | #include 7 | 8 | class CalendarPlugin : public QQmlExtensionPlugin 9 | { 10 | Q_OBJECT 11 | Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") 12 | 13 | public: 14 | void registerTypes(const char *uri) override; 15 | }; -------------------------------------------------------------------------------- /src/contacts/contactsmodel.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2022 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-2.1-or-later 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | /// Contacts model with an email addreess 10 | class ContactsModel : public QSortFilterProxyModel 11 | { 12 | Q_OBJECT 13 | public: 14 | enum ExtraRoles { 15 | EmailRole = Akonadi::EntityTreeModel::UserRole + 1, 16 | AllEmailsRole, 17 | GidRole, 18 | }; 19 | Q_ENUM(ExtraRoles) 20 | explicit ContactsModel(QObject *parent = nullptr); 21 | 22 | QVariant data(const QModelIndex &idx, int role) const override; 23 | QHash roleNames() const override; 24 | 25 | protected: 26 | bool filterAcceptsRow(int row, const QModelIndex &sourceParent) const override; 27 | }; 28 | -------------------------------------------------------------------------------- /src/contacts/emailmodel.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2022 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-2.1-or-later 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | class EmailModel : public QAbstractListModel 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | enum ExtraRole { 16 | TypeRole = Qt::UserRole + 1, 17 | TypeValueRole, 18 | DefaultRole, 19 | EmailRole, 20 | }; 21 | enum Type { Unknown = 0, Home = 1, Work = 2, Other = 4 }; 22 | Q_ENUM(Type); 23 | 24 | EmailModel(QObject *parent = nullptr); 25 | 26 | int rowCount(const QModelIndex &parent = {}) const override; 27 | QVariant data(const QModelIndex &idx, int role) const override; 28 | bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override; 29 | QHash roleNames() const override; 30 | 31 | void loadContact(const KContacts::Addressee &contact); 32 | void storeContact(KContacts::Addressee &contact) const; 33 | 34 | Q_INVOKABLE void addEmail(const QString &email, EmailModel::Type type); 35 | Q_INVOKABLE void deleteEmail(int row); 36 | 37 | Q_SIGNALS: 38 | void changed(const KContacts::Email::List &emails); 39 | 40 | private: 41 | KContacts::Email::List m_emails; 42 | }; 43 | -------------------------------------------------------------------------------- /src/contacts/globalcontactmodel.h: -------------------------------------------------------------------------------- 1 | // This file is part of KAddressBook. 2 | // SPDX-FileCopyrightText: 2009 Tobias Koenig 3 | // SPDX-License-Identifier: GPL-2.0-or-later 4 | 5 | #pragma once 6 | 7 | namespace Akonadi 8 | { 9 | class ChangeRecorder; 10 | class ContactsTreeModel; 11 | class Monitor; 12 | class Session; 13 | } 14 | 15 | /** 16 | * @short Provides the global model for all contacts 17 | * 18 | * This model provides the EntityTreeModel for all contacts. 19 | * The model is accessible via the static instance() method. 20 | */ 21 | class GlobalContactModel 22 | { 23 | public: 24 | /** 25 | * Destroys the global contact model. 26 | */ 27 | ~GlobalContactModel(); 28 | 29 | /** 30 | * Returns the global contact model instance. 31 | */ 32 | static GlobalContactModel *instance(); 33 | 34 | /** 35 | * Returns the item model of the global instance. 36 | */ 37 | Akonadi::ContactsTreeModel *model() const; 38 | 39 | private: 40 | GlobalContactModel(); 41 | 42 | static GlobalContactModel *mInstance; 43 | 44 | Akonadi::Session *const mSession; 45 | Akonadi::ChangeRecorder *const mMonitor; 46 | Akonadi::ContactsTreeModel *mModel = nullptr; 47 | }; 48 | -------------------------------------------------------------------------------- /src/contacts/imppmodel.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2022 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-2.1-or-later 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | class ImppModel : public QAbstractListModel 10 | { 11 | Q_OBJECT 12 | 13 | public: 14 | enum ExtraRole { 15 | UrlRole = Qt::UserRole, 16 | TypeRole, 17 | TypeLabelRole, 18 | TypeIconRole, 19 | }; 20 | 21 | ImppModel(QObject *parent = nullptr); 22 | 23 | int rowCount(const QModelIndex &parent = {}) const override; 24 | QVariant data(const QModelIndex &idx, int role) const override; 25 | bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override; 26 | QHash roleNames() const override; 27 | 28 | void loadContact(const KContacts::Addressee &contact); 29 | void storeContact(KContacts::Addressee &contact) const; 30 | 31 | Q_INVOKABLE void addImpp(const QUrl &address); 32 | Q_INVOKABLE void deleteImpp(const int row); 33 | 34 | Q_SIGNALS: 35 | void changed(const KContacts::Impp::List &impps); 36 | 37 | private: 38 | KContacts::Impp::List m_impps; 39 | }; 40 | -------------------------------------------------------------------------------- /src/contacts/qml/MenuBar.qml: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2021 Claudio Cambra 2 | // SPDX-FileCopyrightText: 2022 Carl Schwan 3 | // SPDX-License-Identifier: GPL-3.0-or-later 4 | 5 | import QtQuick 2.15 6 | import QtQuick.Controls 2.12 as QQC2 7 | import org.kde.kalendar.components 1.0 8 | import org.kde.kalendar.contact 1.0 9 | 10 | QQC2.MenuBar { 11 | FileMenu {} 12 | 13 | EditMenu {} 14 | 15 | QQC2.Menu { 16 | title: i18nc("@action:menu", "View") 17 | 18 | KActionFromAction { 19 | action: ContactApplication.action('open_kcommand_bar') 20 | } 21 | 22 | KActionFromAction { 23 | action: ContactApplication.action("refresh_all") 24 | } 25 | } 26 | 27 | QQC2.Menu { 28 | title: i18nc("@action:menu", "Create") 29 | 30 | KActionFromAction { 31 | action: ContactApplication.action("create_contact") 32 | } 33 | KActionFromAction { 34 | action: ContactApplication.action("create_contact_group") 35 | } 36 | } 37 | 38 | WindowMenu {} 39 | 40 | SettingsMenu { 41 | application: ContactApplication 42 | } 43 | 44 | HelpMenu { 45 | application: ContactApplication 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/contacts/qml/Settings.qml: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2021 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-2.0-or-later 3 | 4 | import QtQuick 2.15 5 | import org.kde.kirigami 2.18 as Kirigami 6 | import QtQuick.Layouts 1.15 7 | import org.kde.kirigamiaddons.labs.mobileform 0.1 as MobileForm 8 | import org.kde.akonadi 1.0 as Akonadi 9 | 10 | Kirigami.ScrollablePage { 11 | id: root 12 | 13 | title: i18nc("@title:window", "Settings") 14 | 15 | leftPadding: 0 16 | rightPadding: 0 17 | 18 | ColumnLayout { 19 | Akonadi.AgentConfigurationForm { 20 | mimetypes: [Akonadi.MimeTypes.contactGroup, Akonadi.MimeTypes.address] 21 | title: i18n("Contact Books") 22 | addPageTitle: i18n("Add New Address Book Source…") 23 | Layout.fillWidth: true 24 | Layout.topMargin: Kirigami.Units.largeSpacing 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/contacts/qml/private/ContactGroupPage.qml: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2022 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-3.0-or-later 3 | 4 | import QtQuick 2.15 5 | import QtQuick.Controls 2.15 as Controls 6 | import QtQuick.Layouts 1.15 7 | import org.kde.kirigami 2.19 as Kirigami 8 | import org.kde.kalendar.contact 1.0 9 | 10 | Kirigami.ScrollablePage { 11 | id: page 12 | 13 | property int itemId 14 | property ContactGroupWrapper contactGroup: ContactGroupWrapper { 15 | id: contactGroup 16 | item: ContactManager.getItem(page.itemId) 17 | } 18 | 19 | title: contactGroup.name 20 | 21 | leftPadding: 0 22 | rightPadding: 0 23 | topPadding: 0 24 | 25 | function openEditor() { 26 | pageStack.pushDialogLayer(Qt.resolvedUrl("ContactGroupEditorPage.qml"), { 27 | mode: ContactGroupEditor.EditMode, 28 | item: page.contactGroup.item 29 | }) 30 | } 31 | 32 | actions.main: Kirigami.Action { 33 | iconName: "document-edit" 34 | text: i18n("Edit") 35 | onTriggered: openEditor() 36 | } 37 | 38 | ListView { 39 | model: contactGroup.model 40 | delegate: Kirigami.BasicListItem { 41 | icon: model.iconName 42 | label: model.display 43 | subtitle: model.email 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /src/contacts/qml/private/PhoneNumberDialog.qml: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2021 Nicolas Fella 2 | // SPDX-License-Identifier: LGPL-2.0-or-later 3 | 4 | import QtQuick 2.6 5 | import QtQuick.Controls 2.13 6 | import QtQuick.Layouts 1.2 7 | import org.kde.kirigami 2.10 as Kirigami 8 | 9 | Kirigami.OverlaySheet { 10 | 11 | id: root 12 | 13 | property alias numbers: list.model 14 | property alias title: heading.text 15 | 16 | signal numberSelected(string number) 17 | 18 | header: Kirigami.Heading { 19 | id: heading 20 | } 21 | 22 | ListView { 23 | id: list 24 | implicitWidth: Kirigami.Units.gridUnit * 20 25 | model: 4 26 | delegate: Kirigami.BasicListItem { 27 | text: modelData.typeLabel 28 | subtitle: modelData.number 29 | onClicked: { 30 | close() 31 | root.numberSelected(modelData.normalizedNumber) 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/contacts/qml/private/QrCodePage.qml: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2015 Martin Gräßlin 2 | // SPDX-FileCopyrightText: 2022 Carl Schwan 3 | // SPDX-License-Identifier: GPL-2.0-or-later 4 | 5 | import QtQuick 2.15 6 | import QtQml 2.15 7 | import QtQuick.Layouts 1.15 8 | import QtQuick.Controls 2.15 as QQC2 9 | import org.kde.kirigami 2.15 as Kirigami 10 | import org.kde.kalendar.contact 1.0 11 | import org.kde.prison 1.0 as Prison 12 | 13 | Kirigami.Page { 14 | property string qrCodeData 15 | title: i18n("QR Code") 16 | 17 | contentItem: Prison.Barcode { 18 | id: barcodeItem 19 | content: qrCodeData 20 | barcodeType: Prison.Barcode.QRCode 21 | } 22 | 23 | QQC2.Label { 24 | anchors.fill: parent 25 | horizontalAlignment: Text.AlignHCenter 26 | verticalAlignment: Text.AlignVCenter 27 | text: i18n("Creating QR code failed") 28 | wrapMode: Text.WordWrap 29 | visible: barcodeItem.implicitWidth === 0 && barcodeItem.implicitHeight === 0 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/contacts/qml/private/contact_editor/PersonalInfoEditorCard.qml: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2022 Carl Schwan 2 | // SPDX-FileCopyrightText: 2023 Aakarsh MJ 3 | // SPDX-License-Identifier: LGPL-2.0-or-later 4 | 5 | import QtQuick 2.15 6 | import QtQuick.Controls 2.15 as QQC2 7 | import QtQuick.Layouts 1.15 8 | import Qt.labs.platform 1.1 9 | import QtGraphicalEffects 1.0 10 | 11 | import org.kde.kirigami 2.19 as Kirigami 12 | import org.kde.kirigamiaddons.labs.mobileform 0.1 as MobileForm 13 | import org.kde.kalendar.contact 1.0 14 | import org.kde.akonadi 1.0 as Akonadi 15 | 16 | MobileForm.FormCard { 17 | id: root 18 | 19 | required property ContactEditor contactEditor 20 | 21 | Layout.fillWidth: true 22 | Layout.topMargin: Kirigami.Units.largeSpacing 23 | 24 | contentItem: ColumnLayout { 25 | spacing: 0 26 | 27 | MobileForm.FormCardHeader { 28 | title: i18n("Personal Information") 29 | } 30 | 31 | MobileForm.FormTextFieldDelegate { 32 | id: spousesName 33 | label: i18n("Spouse's Name") 34 | text: root.contactEditor.contact.spousesName 35 | onTextEdited: root.contactEditor.contact.spousesName = text 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/contacts/resources.qrc: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | resources/fallbackBackground.png 8 | qml/main.qml 9 | qml/Settings.qml 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/contacts/resources/fallbackBackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/kalendar/4fbd4c3e65bfdc9f43deee59f1e5f709544b9ba8/src/contacts/resources/fallbackBackground.png -------------------------------------------------------------------------------- /src/lib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: (C) 2020 Carl Schwan 2 | # 3 | # SPDX-License-Identifier: BSD-2-Clause 4 | 5 | 6 | add_library(kalendar_lib STATIC) 7 | target_sources(kalendar_lib PRIVATE 8 | colorproxymodel.cpp 9 | sortedcollectionproxymodel.cpp 10 | colorproxymodel.h 11 | sortedcollectionproxymodel.h 12 | abstractapplication.cpp 13 | abstractapplication.h 14 | actionsmodel.cpp 15 | actionsmodel.h 16 | commandbarfiltermodel.cpp 17 | commandbarfiltermodel.h 18 | ) 19 | set_property(TARGET kalendar_lib PROPERTY POSITION_INDEPENDENT_CODE ON) 20 | 21 | target_include_directories(kalendar_lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) 22 | target_link_libraries(kalendar_lib PUBLIC 23 | Qt::Core 24 | Qt::Gui 25 | Qt::Qml 26 | Qt::Quick 27 | Qt::QuickControls2 28 | Qt::Svg 29 | KF${QT_MAJOR_VERSION}::I18n 30 | KF${QT_MAJOR_VERSION}::CoreAddons 31 | KF${QT_MAJOR_VERSION}::CalendarCore 32 | KPim${QT_MAJOR_VERSION}::AkonadiCore 33 | KPim${QT_MAJOR_VERSION}::AkonadiCalendar 34 | KPim${QT_MAJOR_VERSION}::AkonadiContact 35 | KF${QT_MAJOR_VERSION}::ConfigWidgets 36 | KF${QT_MAJOR_VERSION}::Contacts 37 | KF${QT_MAJOR_VERSION}::ItemModels 38 | KF${QT_MAJOR_VERSION}::XmlGui 39 | KPim${QT_MAJOR_VERSION}::CalendarUtils 40 | ) 41 | -------------------------------------------------------------------------------- /src/lib/abstractapplication.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2023 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-2.1-or-later 3 | 4 | #include "actionsmodel.h" 5 | #include 6 | #include 7 | #include 8 | 9 | class AbstractApplication : public QObject 10 | { 11 | Q_OBJECT 12 | Q_PROPERTY(QSortFilterProxyModel *actionsModel READ actionsModel CONSTANT) 13 | 14 | public: 15 | explicit AbstractApplication(QObject *parent = nullptr); 16 | ~AbstractApplication(); 17 | 18 | Q_INVOKABLE void configureShortcuts(); 19 | Q_INVOKABLE QAction *action(const QString &actionName); 20 | 21 | virtual QVector actionCollections() const = 0; 22 | QSortFilterProxyModel *actionsModel(); 23 | 24 | Q_SIGNALS: 25 | void openLanguageSwitcher(); 26 | void openSettings(); 27 | void openAboutPage(); 28 | void openAboutKDEPage(); 29 | void openKCommandBarAction(); 30 | void openTagManager(); 31 | 32 | protected: 33 | virtual void setupActions(); 34 | KActionCollection *mCollection = nullptr; 35 | 36 | private: 37 | void quit(); 38 | 39 | KalCommandBarModel *m_actionModel = nullptr; 40 | QSortFilterProxyModel *m_proxyModel = nullptr; 41 | }; 42 | -------------------------------------------------------------------------------- /src/lib/colorproxymodel.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2022 Carl Schwan 2 | // SPDX-FileCopyrightText: 2022 Claudio Cambra 3 | // SPDX-License-Identifier: GPL-2.0-or-later 4 | 5 | #pragma once 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | /// Despite the name, this handles the presentation of collections including display text and icons, not just colors. 12 | class ColorProxyModel : public QSortFilterProxyModel 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | enum Roles { 18 | isResource = Akonadi::EntityTreeModel::UserRole + 1, 19 | }; 20 | Q_ENUM(Roles); 21 | 22 | explicit ColorProxyModel(QObject *parent = nullptr); 23 | QVariant data(const QModelIndex &index, int role) const override; 24 | Qt::ItemFlags flags(const QModelIndex &index) const override; 25 | QHash roleNames() const override; 26 | QColor getCollectionColor(Akonadi::Collection collection) const; 27 | QColor color(Akonadi::Collection::Id collectionId) const; 28 | void setColor(Akonadi::Collection::Id collectionId, const QColor &color); 29 | 30 | void setStandardCollectionId(Akonadi::Collection::Id standardCollectionId); 31 | 32 | private: 33 | mutable bool mInitDefaultCalendar; 34 | mutable QHash colorCache; 35 | Akonadi::Collection::Id m_standardCollectionId = -1; 36 | }; 37 | -------------------------------------------------------------------------------- /src/lib/commandbarfiltermodel.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2021 Waqar Ahmed 2 | // SPDX-License-Identifier: LGPL-2.0-or-later 3 | 4 | #pragma once 5 | 6 | #include 7 | 8 | class CommandBarFilterModel final : public QSortFilterProxyModel 9 | { 10 | Q_OBJECT 11 | Q_PROPERTY(QString filterString READ filterString WRITE setFilterString NOTIFY filterStringChanged) 12 | public: 13 | explicit CommandBarFilterModel(QObject *parent = nullptr); 14 | 15 | QString filterString() const; 16 | 17 | void setFilterString(const QString &string); 18 | 19 | Q_SIGNALS: 20 | void filterStringChanged(); 21 | 22 | protected: 23 | bool lessThan(const QModelIndex &sourceLeft, const QModelIndex &sourceRight) const override; 24 | 25 | bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override; 26 | 27 | private: 28 | QString m_pattern; 29 | }; 30 | -------------------------------------------------------------------------------- /src/lib/sortedcollectionproxymodel.cpp: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2021 Claudio Cambra 2 | // SPDX-FileCopyrightText: 2022 Carl Schwan 3 | // 4 | // SPDX-License-Identifier: LGPL-2.0-or-later 5 | 6 | #include "sortedcollectionproxymodel.h" 7 | 8 | SortedCollectionProxModel::SortedCollectionProxModel(QObject *parent) 9 | : Akonadi::CollectionFilterProxyModel(parent) 10 | { 11 | } 12 | 13 | bool SortedCollectionProxModel::lessThan(const QModelIndex &sourceLeft, const QModelIndex &sourceRight) const 14 | { 15 | const auto leftHasChildren = sourceModel()->hasChildren(sourceLeft); 16 | const auto rightHasChildren = sourceModel()->hasChildren(sourceRight); 17 | if (leftHasChildren && !rightHasChildren) { 18 | return false; 19 | } else if (!leftHasChildren && rightHasChildren) { 20 | return true; 21 | } 22 | 23 | return Akonadi::CollectionFilterProxyModel::lessThan(sourceLeft, sourceRight); 24 | } 25 | -------------------------------------------------------------------------------- /src/lib/sortedcollectionproxymodel.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2021 Claudio Cambra 2 | // SPDX-FileCopyrightText: 2022 Carl Schwan 3 | // 4 | // SPDX-License-Identifier: LGPL-2.0-or-later 5 | 6 | #pragma once 7 | 8 | #include 9 | 10 | class SortedCollectionProxModel : public Akonadi::CollectionFilterProxyModel 11 | { 12 | public: 13 | explicit SortedCollectionProxModel(QObject *parent = nullptr); 14 | 15 | protected: 16 | bool lessThan(const QModelIndex &sourceLeft, const QModelIndex &sourceRight) const override; 17 | }; 18 | -------------------------------------------------------------------------------- /src/mail/contactimageprovider.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2022 Carl Schwan 2 | // SPDX-License-Identifier: GPL-3.0-only 3 | 4 | #pragma once 5 | 6 | #include 7 | 8 | #include 9 | #include 10 | 11 | namespace Akonadi 12 | { 13 | class ContactSearchJob; 14 | } 15 | 16 | class ThumbnailResponse : public QQuickImageResponse 17 | { 18 | Q_OBJECT 19 | public: 20 | ThumbnailResponse(QString mediaId, QSize requestedSize); 21 | ~ThumbnailResponse() override = default; 22 | 23 | private Q_SLOTS: 24 | void startRequest(); 25 | void prepareResult(); 26 | void doCancel(); 27 | 28 | private: 29 | bool searchPhoto(const KContacts::AddresseeList &list); 30 | const QString m_email; 31 | QSize requestedSize; 32 | const QString localFile; 33 | 34 | QImage m_image; 35 | KContacts::Picture m_photo; 36 | QString errorStr; 37 | Akonadi::ContactSearchJob *job = nullptr; 38 | mutable QReadWriteLock lock; // Guards ONLY these two members above 39 | 40 | QQuickTextureFactory *textureFactory() const override; 41 | QString errorString() const override; 42 | void cancel() override; 43 | }; 44 | 45 | class ContactImageProvider : public QQuickAsyncImageProvider 46 | { 47 | public: 48 | QQuickImageResponse *requestImageResponse(const QString &id, const QSize &requestedSize) override; 49 | }; 50 | -------------------------------------------------------------------------------- /src/mail/helper.cpp: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2022 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-2.0-or-later 3 | 4 | #include "helper.h" 5 | 6 | #include 7 | 8 | qint64 MailCollectionHelper::unreadCount(const Akonadi::Collection &collection) 9 | { 10 | return collection.statistics().unreadCount(); 11 | } 12 | -------------------------------------------------------------------------------- /src/mail/helper.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2022 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-2.0-or-later 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | class MailCollectionHelper : public QObject 10 | { 11 | Q_OBJECT 12 | 13 | public: 14 | Q_INVOKABLE qint64 unreadCount(const Akonadi::Collection &collection); 15 | }; 16 | -------------------------------------------------------------------------------- /src/mail/identitymodel.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2021 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | using namespace KIdentityManagement; 10 | 11 | class IdentityModel : public QAbstractListModel 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | enum Roles { 17 | EmailRole = Qt::UserRole, 18 | UoidRole 19 | }; 20 | 21 | public: 22 | IdentityModel(QObject *parent = nullptr); 23 | ~IdentityModel(); 24 | QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; 25 | int rowCount(const QModelIndex& parent) const override; 26 | QHash roleNames() const override; 27 | 28 | Q_INVOKABLE QString email(uint uoid); 29 | 30 | private: 31 | void reloadUoidList(); 32 | 33 | QList m_identitiesUoid; 34 | IdentityManager *const m_identityManager; 35 | }; 36 | -------------------------------------------------------------------------------- /src/mail/mailapplication.cpp: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2023 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-3.0-or-later 3 | 4 | #include "mailapplication.h" 5 | #include 6 | #include 7 | #include 8 | 9 | MailApplication::MailApplication(QObject *parent) 10 | : AbstractApplication(parent) 11 | { 12 | setupActions(); 13 | } 14 | 15 | void MailApplication::setupActions() 16 | { 17 | AbstractApplication::setupActions(); 18 | 19 | auto actionName = QLatin1String("create_mail"); 20 | if (KAuthorized::authorizeAction(actionName)) { 21 | auto action = mCollection->addAction(actionName, this, &MailApplication::createNewMail); 22 | action->setText(i18n("New Mail…")); 23 | action->setIcon(QIcon::fromTheme(QStringLiteral("mail-message-new"))); 24 | } 25 | 26 | mCollection->readSettings(); 27 | } 28 | 29 | QVector MailApplication::actionCollections() const 30 | { 31 | return { 32 | mCollection, 33 | }; 34 | } 35 | -------------------------------------------------------------------------------- /src/mail/mailapplication.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2023 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-2.1-or-later 3 | 4 | #include 5 | 6 | class MailApplication : public AbstractApplication 7 | { 8 | Q_OBJECT 9 | 10 | public: 11 | explicit MailApplication(QObject *parent = nullptr); 12 | 13 | QVector actionCollections() const override; 14 | 15 | Q_SIGNALS: 16 | void createNewMail(); 17 | 18 | private: 19 | void setupActions() override; 20 | }; 21 | -------------------------------------------------------------------------------- /src/mail/mailheadermodel.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2023 Aakarsh MJ 2 | // SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 3 | 4 | #pragma once 5 | 6 | #include 7 | 8 | class MailHeaderModel : public QAbstractListModel 9 | { 10 | Q_OBJECT 11 | 12 | public: 13 | enum Roles { 14 | NameRole = Qt::UserRole, 15 | ValueRole, 16 | }; 17 | Q_ENUM(Roles); 18 | 19 | enum Header { 20 | To, 21 | From, 22 | BCC, 23 | CC, 24 | ReplyTo, 25 | }; 26 | Q_ENUM(Header); 27 | 28 | MailHeaderModel(QObject *parent = nullptr); 29 | ~MailHeaderModel() override = default; 30 | 31 | QVariant data(const QModelIndex &index, int role) const override; 32 | Q_INVOKABLE int rowCount(const QModelIndex &parent = {}) const override; 33 | 34 | Q_INVOKABLE void updateModel(const int row, const QString &value); 35 | Q_INVOKABLE void updateHeaderType(const int row, const Header headerName); 36 | private: 37 | struct HeaderItem { 38 | Header header; 39 | QString value; 40 | }; 41 | 42 | QList m_headers; 43 | }; -------------------------------------------------------------------------------- /src/mail/mailplugin.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2022 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-2.0-or-later 3 | 4 | #pragma once 5 | 6 | #include 7 | 8 | class CalendarPlugin : public QQmlExtensionPlugin 9 | { 10 | Q_OBJECT 11 | Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") 12 | 13 | public: 14 | void registerTypes(const char *uri) override; 15 | void initializeEngine(QQmlEngine *engine, const char *uri) override; 16 | }; -------------------------------------------------------------------------------- /src/mail/mime/async.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2017 Christian Mollekopf 2 | // SPDX-License-Identifier: LGPL-2.0-or-later 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | template 12 | void asyncRun(QObject *object, std::function run, std::function continuation) 13 | { 14 | auto guard = QPointer{object}; 15 | auto future = QtConcurrent::run(run); 16 | auto watcher = new QFutureWatcher; 17 | QObject::connect(watcher, &QFutureWatcher::finished, watcher, [watcher, continuation, guard]() { 18 | if (guard) { 19 | continuation(watcher->future().result()); 20 | } 21 | delete watcher; 22 | }); 23 | watcher->setFuture(future); 24 | } 25 | -------------------------------------------------------------------------------- /src/mail/mime/htmlutils.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2017 Christian Mollekopf 2 | // SPDX-License-Identifier: LGPL-2.0-or-later 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | namespace HtmlUtils 11 | { 12 | QString linkify(const QString &in); 13 | 14 | class HtmlUtils : public QObject 15 | { 16 | Q_OBJECT 17 | public: 18 | Q_INVOKABLE QString linkify(const QString &s) 19 | { 20 | return ::HtmlUtils::linkify(s); 21 | }; 22 | 23 | Q_INVOKABLE QString toHtml(const QString &s) 24 | { 25 | if (Qt::mightBeRichText(s)) { 26 | return s; 27 | } else { 28 | return ::HtmlUtils::linkify(Qt::convertFromPlainText(s)); 29 | } 30 | } 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /src/mail/mime/mailcrypto.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2016 Christian Mollekopf 2 | // SPDX-License-Identifier: LGPL-2.0-or-later 3 | 4 | #pragma once 5 | 6 | #include 7 | 8 | #include 9 | 10 | #include "../crypto.h" 11 | #include "../errors.h" 12 | 13 | namespace MailCrypto 14 | { 15 | 16 | Expected> 17 | processCrypto(std::unique_ptr content, const std::vector &signingKeys, const std::vector &encryptionKeys); 18 | 19 | }; 20 | -------------------------------------------------------------------------------- /src/mail/mime/messageparser.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2016 Christian Mollekopf 2 | // SPDX-License-Identifier: LGPL-2.0-or-later 3 | 4 | #pragma once 5 | #include 6 | #include 7 | 8 | #include 9 | #include 10 | 11 | #include 12 | 13 | class MessagePartPrivate; 14 | 15 | class MessageParser : public QObject 16 | { 17 | Q_OBJECT 18 | Q_PROPERTY(Akonadi::Item item READ item WRITE setItem NOTIFY htmlChanged) 19 | Q_PROPERTY(QAbstractItemModel *parts READ parts NOTIFY htmlChanged) 20 | Q_PROPERTY(QAbstractItemModel *attachments READ attachments NOTIFY htmlChanged) 21 | Q_PROPERTY(QString rawContent READ rawContent NOTIFY htmlChanged) 22 | Q_PROPERTY(QString structureAsString READ structureAsString NOTIFY htmlChanged) 23 | Q_PROPERTY(bool loaded READ loaded NOTIFY htmlChanged) 24 | 25 | public: 26 | explicit MessageParser(QObject *parent = Q_NULLPTR); 27 | ~MessageParser(); 28 | 29 | Akonadi::Item item() const; 30 | void setItem(const Akonadi::Item &item); 31 | QAbstractItemModel *parts() const; 32 | QAbstractItemModel *attachments() const; 33 | QString rawContent() const; 34 | QString structureAsString() const; 35 | bool loaded() const; 36 | 37 | Q_SIGNALS: 38 | void htmlChanged(); 39 | 40 | private: 41 | std::unique_ptr d; 42 | QString mRawContent; 43 | }; 44 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/README: -------------------------------------------------------------------------------- 1 | Most of this data has been imported from kdepim originally with the messagetreeparser. 2 | The .tree and .html files are anecdotal only. 3 | 4 | To generate new gpg encrypted content use an existing mime message to your liking, and then 5 | copy in ascii armored content in. The encrypted content can be created using: 6 | 7 | gpg2 --home /src/kube/framework/src/domain/mime/mimetreeparser/tests/gnupg_home/ -a -r test@kolab.org --encrypt toEncrypt.txt 8 | 9 | where toEncrypt.txt contains the to be encrypted content. 10 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/alternative-notext.mbox: -------------------------------------------------------------------------------- 1 | Return-Path: 2 | Date: Wed, 8 Jun 2016 20:34:44 -0700 3 | From: Konqi 4 | To: konqi@kde.org 5 | Subject: A random subject with a empty text alternative contenttype 6 | MIME-Version: 1.0 7 | Content-Type: multipart/alternative; 8 | boundary="----=_Part_12345678_12345678" 9 | 10 | 11 | ------=_Part_12345678_12345678 12 | Content-Transfer-Encoding: 7Bit 13 | Content-Type: text/html; charset="windows-1252" 14 | 15 | 16 | 19 |

Some HTML text

20 | 21 | 22 | ------=_Part_12345678_12345678-- 23 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/alternative-notext.mbox.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/alternative-notext.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::AlternativeMessagePart 3 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/alternative.mbox: -------------------------------------------------------------------------------- 1 | Return-Path: 2 | Date: Wed, 8 Jun 2016 20:34:44 -0700 3 | From: Konqi 4 | To: konqi@kde.org 5 | Subject: A random subject with alternative contenttype 6 | MIME-Version: 1.0 7 | Content-Type: multipart/alternative; 8 | boundary="----=_Part_12345678_12345678" 9 | 10 | 11 | ------=_Part_12345678_12345678 12 | Content-Type: text/plain; charset=utf-8 13 | Content-Transfer-Encoding: quoted-printable 14 | 15 | If you can see this text it means that your email client couldn't display o= 16 | ur newsletter properly. 17 | Please visit this link to view the newsletter on our website: http://www.go= 18 | g.com/newsletter/ 19 | 20 | 21 | ------=_Part_12345678_12345678 22 | Content-Transfer-Encoding: 7Bit 23 | Content-Type: text/html; charset="windows-1252" 24 | 25 |

HTML text

26 | 27 | 28 | ------=_Part_12345678_12345678-- 29 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/alternative.mbox.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
16 | 17 | 18 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/alternative.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::AlternativeMessagePart 3 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/crlf-encrypted-with-signature.mbox: -------------------------------------------------------------------------------- 1 | From test@kolab.org Wed, 08 Sep 2010 17:02:52 +0200 2 | From: OpenPGP Test 3 | To: test@kolab.org 4 | Subject: OpenPGP encrypted 5 | Date: Wed, 08 Sep 2010 17:02:52 +0200 6 | User-Agent: KMail/4.6 pre (Linux/2.6.34-rc2-2-default; KDE/4.5.60; x86_64; ; ) 7 | MIME-Version: 1.0 8 | Content-Transfer-Encoding: quoted-printable 9 | Content-Type: text/plain; charset=UTF-8; 10 | format=flowed 11 | 12 | -----BEGIN PGP MESSAGE----- 13 | 14 | hQEMAwzOQ1qnzNo7AQgAgXLGaohf4ZPJVDkpmpNsyXL/nccd+SyY3/deHQ8d8vp9 15 | Ye9Hr30Yz65+CAI7JCHKjIOaXjw1Nf1qqEDSyghKR0c16dLBGK37GlqOLaqScifZ 16 | /bC5WQu4V1a+dv1qnNOh3JNp5ynVpg22b5XaBggpAGCxCSrUsWWkRxTR+kBuPdn8 17 | EPMOlN3xKU1LFQfI+a3HMGpWo3PokVb4nrtuuwi261woSgKUSYjG86MJF1E28y+g 18 | bMC6rmRV+Jp0wpEmr7aogx4gELe17tglD41oLvNL9yZeEh/V8cMnnEDbO/oG+xba 19 | UjyM73V+TO2kXk0CTqItVbx6Q7kNWR/DfaJqGnzcy9KMAT1B8EpVCK/nN81mF8ia 20 | 4KFKQ1OGHhcQ2tT5ZXs6m1vJ5/sz/6g0n0CMtSsWUSvPzpM5F+LK+B7dzOeJEQee 21 | 3/S0wUFYpbAh1PyMPYobNLsEQCGtQ1PhsUXM7t1ai6jfM4k/lvbnIzUM11Q6vsnR 22 | LWS77CELfcW9WlQ755sNcwo3a/WySyU1C1gZdLw= 23 | =Fijx 24 | -----END PGP MESSAGE----- 25 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/encapsulated-with-attachment.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::MimeMessagePart 3 | * MimeTreeParser::TextMessagePart 4 | * MimeTreeParser::MessagePart 5 | * MimeTreeParser::EncapsulatedRfc822MessagePart 6 | * MimeTreeParser::MimeMessagePart 7 | * MimeTreeParser::AttachmentMessagePart 8 | * MimeTreeParser::MessagePart 9 | * MimeTreeParser::AttachmentMessagePart 10 | * MimeTreeParser::MessagePart 11 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/forward-openpgp-signed-encrypted.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::MimeMessagePart 3 | * MimeTreeParser::TextMessagePart 4 | * MimeTreeParser::MessagePart 5 | * MimeTreeParser::EncapsulatedRfc822MessagePart 6 | * MimeTreeParser::EncryptedMessagePart 7 | * MimeTreeParser::SignedMessagePart 8 | * MimeTreeParser::TextMessagePart 9 | * MimeTreeParser::MessagePart 10 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/headeronly/openpgp-encrypted-two-attachments.mbox.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/headeronly/openpgp-signed-no-protocol.mbox.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/hidden/openpgp-encrypted-noData.mbox.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 |
8 |
9 | 10 | 11 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/hidden/openpgp-encrypted-two-attachments.mbox.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
33 | 34 | 35 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/hidden/openpgp-signed-no-protocol.mbox.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/html-with-signature.mbox: -------------------------------------------------------------------------------- 1 | From foo@example.com Thu, 26 May 2011 01:16:54 +0100 2 | From: Thomas McGuire 3 | Subject: HTML test 4 | Date: Thu, 26 May 2011 01:16:54 +0100 5 | Message-ID: <1501334.pROlBb7MZF@herrwackelpudding.localhost> 6 | X-KMail-Transport: GMX 7 | X-KMail-Fcc: 28 8 | X-KMail-Drafts: 7 9 | X-KMail-Templates: 9 10 | User-Agent: KMail/4.6 beta5 (Linux/2.6.34.7-0.7-desktop; KDE/4.6.41; x86_64; git-0269848; 2011-04-19) 11 | MIME-Version: 1.0 12 | Content-Transfer-Encoding: 7Bit 13 | Content-Type: text/html; charset="windows-1252" 14 | 15 | 18 | 26 | 27 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/html.mbox: -------------------------------------------------------------------------------- 1 | From foo@example.com Thu, 26 May 2011 01:16:54 +0100 2 | From: Thomas McGuire 3 | Subject: HTML test 4 | Date: Thu, 26 May 2011 01:16:54 +0100 5 | Message-ID: <1501334.pROlBb7MZF@herrwackelpudding.localhost> 6 | X-KMail-Transport: GMX 7 | X-KMail-Fcc: 28 8 | X-KMail-Drafts: 7 9 | X-KMail-Templates: 9 10 | User-Agent: KMail/4.6 beta5 (Linux/2.6.34.7-0.7-desktop; KDE/4.6.41; x86_64; git-0269848; 2011-04-19) 11 | MIME-Version: 1.0 12 | Content-Transfer-Encoding: 7Bit 13 | Content-Type: text/html; charset="windows-1252" 14 | 15 |

HTML text

-------------------------------------------------------------------------------- /src/mail/mime/testdata/html.mbox.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/html.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::AlternativeMessagePart 3 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/htmlonly.mbox: -------------------------------------------------------------------------------- 1 | From foo@example.com Thu, 26 May 2011 01:16:54 +0100 2 | From: Thomas McGuire 3 | Subject: HTML test 4 | Date: Thu, 26 May 2011 01:16:54 +0100 5 | Message-ID: <1501334.pROlBb7MZF@herrwackelpudding.localhost> 6 | X-KMail-Transport: GMX 7 | X-KMail-Fcc: 28 8 | X-KMail-Drafts: 7 9 | X-KMail-Templates: 9 10 | User-Agent: KMail/4.6 beta5 (Linux/2.6.34.7-0.7-desktop; KDE/4.6.41; x86_64; git-0269848; 2011-04-19) 11 | MIME-Version: 1.0 12 | Content-Type: text/html 13 | Content-Transfer-Encoding: 7Bit 14 | 15 | 16 | 17 | 18 | 19 | SOME HTML text. 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/htmlonly.mbox.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/htmlonly.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::HtmlMessagePart 3 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/htmlonlyexternal.mbox: -------------------------------------------------------------------------------- 1 | From foo@example.com Thu, 26 May 2011 01:16:54 +0100 2 | From: Thomas McGuire 3 | Subject: HTML test 4 | Date: Thu, 26 May 2011 01:16:54 +0100 5 | Message-ID: <1501334.pROlBb7MZF@herrwackelpudding.localhost> 6 | X-KMail-Transport: GMX 7 | X-KMail-Fcc: 28 8 | X-KMail-Drafts: 7 9 | X-KMail-Templates: 9 10 | User-Agent: KMail/4.6 beta5 (Linux/2.6.34.7-0.7-desktop; KDE/4.6.41; x86_64; git-0269848; 2011-04-19) 11 | MIME-Version: 1.0 12 | Content-Type: text/html 13 | Content-Transfer-Encoding: 7Bit 14 | 15 | 16 | 17 | 18 | 19 | SOME HTML text. 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/inlinepgpencrypted-appendix.mbox: -------------------------------------------------------------------------------- 1 | From test@kolab.org Wed, 25 May 2011 23:49:40 +0100 2 | From: OpenPGP Test 3 | To: test@kolab.org 4 | Subject: inlinepgpencrypted 5 | Date: Wed, 25 May 2011 23:49:40 +0100 6 | Message-ID: <1786696.yKXrOjjflF@herrwackelpudding.localhost> 7 | X-KMail-Transport: GMX 8 | X-KMail-Fcc: 28 9 | X-KMail-Drafts: 7 10 | X-KMail-Templates: 9 11 | User-Agent: KMail/4.6 beta5 (Linux/2.6.34.7-0.7-desktop; KDE/4.6.41; x86_64; git-0269848; 2011-04-19) 12 | MIME-Version: 1.0 13 | Content-Transfer-Encoding: 7Bit 14 | Content-Type: text/plain; charset="us-ascii" 15 | 16 | -----BEGIN PGP MESSAGE----- 17 | Version: GnuPG v2.0.15 (GNU/Linux) 18 | 19 | hQEMAwzOQ1qnzNo7AQf/a3aNTLpQBfcUr+4AKsZQLj4h6z7e7a5AaCW8AG0wrbxN 20 | kBYB7E5jdZh45DX/99gvoZslthWryUCX2kKZ3LtIllxKVjqNuK5hSt+SAuKkwiMR 21 | Xcbf1KFKENKupgGSO9B2NJRbjoExdJ+fC3mGXnO3dT7xJJAo3oLE8Nivu+Bj1peY 22 | E1wCf+vcTwVHFrA7SV8eMRb9Z9wBXmU8Q8e9ekJ7ZsRX3tMeBs6jvscVvfMf6DYY 23 | N14snZBZuGNKT9a3DPny7IC1S0lHcaam34ogWwMi3FxPGJt/Lg52kARlkF5TDhcP 24 | N6H0EB/iqDRjOOUoEVm8um5XOSR1FpEiAdD0DON3y9JPATnrYq7sgYZz3BVImYY+ 25 | N/jV8fEiN0a34pcOq8NQedMuOsJHNBS5MtbQH/kJLq0MXBpXekGlHo4MKw0trISc 26 | Rw3pW6/BFfhPJLni29g9tw== 27 | =fRFW 28 | -----END PGP MESSAGE----- 29 | 30 | _______________________________________________ 31 | test mailing list 32 | test@lists.kde.org 33 | http://kde.org 34 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/inlinepgpencrypted-appendix.mbox.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/inlinepgpencrypted-appendix.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::TextMessagePart 3 | * MimeTreeParser::EncryptedMessagePart 4 | * MimeTreeParser::MessagePart 5 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/inlinepgpencrypted-error.mbox.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/inlinepgpencrypted-error.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::TextMessagePart 3 | * MimeTreeParser::EncryptedMessagePart 4 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/inlinepgpencrypted.mbox: -------------------------------------------------------------------------------- 1 | From test@kolab.org Wed, 25 May 2011 23:49:40 +0100 2 | From: OpenPGP Test 3 | To: test@kolab.org 4 | Subject: inlinepgpencrypted 5 | Date: Wed, 25 May 2011 23:49:40 +0100 6 | Message-ID: <1786696.yKXrOjjflF@herrwackelpudding.localhost> 7 | X-KMail-Transport: GMX 8 | X-KMail-Fcc: 28 9 | X-KMail-Drafts: 7 10 | X-KMail-Templates: 9 11 | User-Agent: KMail/4.6 beta5 (Linux/2.6.34.7-0.7-desktop; KDE/4.6.41; x86_64; git-0269848; 2011-04-19) 12 | MIME-Version: 1.0 13 | Content-Transfer-Encoding: 7Bit 14 | Content-Type: text/plain; charset="us-ascii" 15 | 16 | -----BEGIN PGP MESSAGE----- 17 | Version: GnuPG v2.0.15 (GNU/Linux) 18 | 19 | hQEMAwzOQ1qnzNo7AQf/a3aNTLpQBfcUr+4AKsZQLj4h6z7e7a5AaCW8AG0wrbxN 20 | kBYB7E5jdZh45DX/99gvoZslthWryUCX2kKZ3LtIllxKVjqNuK5hSt+SAuKkwiMR 21 | Xcbf1KFKENKupgGSO9B2NJRbjoExdJ+fC3mGXnO3dT7xJJAo3oLE8Nivu+Bj1peY 22 | E1wCf+vcTwVHFrA7SV8eMRb9Z9wBXmU8Q8e9ekJ7ZsRX3tMeBs6jvscVvfMf6DYY 23 | N14snZBZuGNKT9a3DPny7IC1S0lHcaam34ogWwMi3FxPGJt/Lg52kARlkF5TDhcP 24 | N6H0EB/iqDRjOOUoEVm8um5XOSR1FpEiAdD0DON3y9JPATnrYq7sgYZz3BVImYY+ 25 | N/jV8fEiN0a34pcOq8NQedMuOsJHNBS5MtbQH/kJLq0MXBpXekGlHo4MKw0trISc 26 | Rw3pW6/BFfhPJLni29g9tw== 27 | =fRFW 28 | -----END PGP MESSAGE----- 29 | 30 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/inlinepgpencrypted.mbox.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/inlinepgpencrypted.mbox.inProgress.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/inlinepgpencrypted.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::TextMessagePart 3 | * MimeTreeParser::EncryptedMessagePart 4 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/listmessage.mbox: -------------------------------------------------------------------------------- 1 | Return-Path: 2 | Date: Wed, 8 Jun 2016 20:34:44 -0700 3 | From: From 4 | Reply-To: List 5 | To: List , 6 | "To" 7 | Cc: CC 8 | List-Id: List 9 | Sender: List 10 | Subject: A random subject with alternative contenttype 11 | MIME-Version: 1.0 12 | Content-Type: text/plain; charset=utf-8 13 | Content-Transfer-Encoding: quoted-printable 14 | 15 | test 16 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/multirecipients.mbox: -------------------------------------------------------------------------------- 1 | Return-Path: 2 | Date: Wed, 8 Jun 2016 20:34:44 -0700 3 | From: From 4 | To: To , 5 | "To, 2" 6 | Cc: CC , CC2 7 | Subject: A random subject with alternative contenttype 8 | MIME-Version: 1.0 9 | Content-Type: text/plain; charset=utf-8 10 | Content-Transfer-Encoding: quoted-printable 11 | 12 | test 13 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/no-content-type.mbox: -------------------------------------------------------------------------------- 1 | From: hans@example.com 2 | To: karl@example.com 3 | Subject: Simple Mail Without Content-Type Header 4 | Date: Sat, 15 May 2010 10:52:24 +0200 5 | MIME-Version: 1.0 6 | 7 | asdfasdf -------------------------------------------------------------------------------- /src/mail/mime/testdata/no-content-type.mbox.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/no-content-type.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::TextMessagePart 3 | * MimeTreeParser::MessagePart 4 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/openpgp-encoded.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::TextMessagePart 3 | * MimeTreeParser::EncryptedMessagePart 4 | * MimeTreeParser::SignedMessagePart 5 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/openpgp-encrypted+signed.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::EncryptedMessagePart 3 | * MimeTreeParser::SignedMessagePart 4 | * MimeTreeParser::TextMessagePart 5 | * MimeTreeParser::MessagePart 6 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/openpgp-encrypted-applemail.mbox.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/openpgp-encrypted-applemail.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::MimeMessagePart 3 | * MimeTreeParser::TextMessagePart 4 | * MimeTreeParser::EncryptedMessagePart 5 | * MimeTreeParser::MimeMessagePart 6 | * MimeTreeParser::TextMessagePart 7 | * MimeTreeParser::MessagePart 8 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/openpgp-encrypted-attachment-and-non-encrypted-attachment.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::MimeMessagePart 3 | * MimeTreeParser::EncryptedMessagePart 4 | * MimeTreeParser::SignedMessagePart 5 | * MimeTreeParser::MimeMessagePart 6 | * MimeTreeParser::TextMessagePart 7 | * MimeTreeParser::MessagePart 8 | * MimeTreeParser::AttachmentMessagePart 9 | * MimeTreeParser::MessagePart 10 | * MimeTreeParser::AttachmentMessagePart 11 | * MimeTreeParser::MessagePart 12 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/openpgp-encrypted-attachment.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::EncryptedMessagePart 3 | * MimeTreeParser::SignedMessagePart 4 | * MimeTreeParser::MimeMessagePart 5 | * MimeTreeParser::TextMessagePart 6 | * MimeTreeParser::MessagePart 7 | * MimeTreeParser::AttachmentMessagePart 8 | * MimeTreeParser::MessagePart 9 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/openpgp-encrypted-enigmail1.6.mbox.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/openpgp-encrypted-enigmail1.6.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::EncryptedMessagePart 3 | * MimeTreeParser::MimeMessagePart 4 | * MimeTreeParser::TextMessagePart 5 | * MimeTreeParser::MessagePart 6 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/openpgp-encrypted-noData.mbox: -------------------------------------------------------------------------------- 1 | From test@kolab.org Wed, 08 Sep 2010 17:02:52 +0200 2 | From: OpenPGP Test 3 | To: test@kolab.org 4 | Subject: OpenPGP encrypted 5 | Date: Wed, 08 Sep 2010 17:02:52 +0200 6 | User-Agent: KMail/4.6 pre (Linux/2.6.34-rc2-2-default; KDE/4.5.60; x86_64; ; ) 7 | MIME-Version: 1.0 8 | Content-Type: multipart/encrypted; boundary="nextPart1357031.ppLHckZtsp"; protocol="application/pgp-encrypted" 9 | Content-Transfer-Encoding: 7Bit 10 | 11 | --nextPart1357031.ppLHckZtsp 12 | Content-Type: application/pgp-encrypted 13 | Content-Disposition: attachment 14 | 15 | Version: 1 16 | 17 | --nextPart1357031.ppLHckZtsp-- 18 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/openpgp-encrypted-noData.mbox.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 |
8 | 9 |
10 |
11 |
14 |
15 |
16 |
17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/openpgp-encrypted-noData.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::MimeMessagePart 3 | * MimeTreeParser::AttachmentMessagePart 4 | * MimeTreeParser::MessagePart 5 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/openpgp-encrypted-non-encrypted-attachment.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::MimeMessagePart 3 | * MimeTreeParser::EncryptedMessagePart 4 | * MimeTreeParser::SignedMessagePart 5 | * MimeTreeParser::MimeMessagePart 6 | * MimeTreeParser::TextMessagePart 7 | * MimeTreeParser::MessagePart 8 | * MimeTreeParser::AttachmentMessagePart 9 | * MimeTreeParser::MessagePart 10 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/openpgp-encrypted-partially-signed-attachments.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::MimeMessagePart 3 | * MimeTreeParser::EncryptedMessagePart 4 | * MimeTreeParser::SignedMessagePart 5 | * MimeTreeParser::MimeMessagePart 6 | * MimeTreeParser::TextMessagePart 7 | * MimeTreeParser::MessagePart 8 | * MimeTreeParser::AttachmentMessagePart 9 | * MimeTreeParser::MessagePart 10 | * MimeTreeParser::EncryptedMessagePart 11 | * MimeTreeParser::TextMessagePart 12 | * MimeTreeParser::MessagePart 13 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/openpgp-encrypted-two-attachments.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::EncryptedMessagePart 3 | * MimeTreeParser::MimeMessagePart 4 | * MimeTreeParser::TextMessagePart 5 | * MimeTreeParser::MessagePart 6 | * MimeTreeParser::AttachmentMessagePart 7 | * MimeTreeParser::MessagePart 8 | * MimeTreeParser::AttachmentMessagePart 9 | * MimeTreeParser::MessagePart 10 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/openpgp-encrypted.mbox.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/openpgp-encrypted.mbox.inProgress.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/openpgp-encrypted.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::EncryptedMessagePart 3 | * MimeTreeParser::TextMessagePart 4 | * MimeTreeParser::MessagePart 5 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/openpgp-inline-charset-encrypted.mbox.inProgress.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/openpgp-inline-charset-encrypted.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::TextMessagePart 3 | * MimeTreeParser::EncryptedMessagePart 4 | * MimeTreeParser::SignedMessagePart 5 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/openpgp-inline-encrypted+nonenc.mbox: -------------------------------------------------------------------------------- 1 | From test@kolab.org Wed, 25 May 2011 23:49:40 +0100 2 | From: OpenPGP Test 3 | To: test@kolab.org 4 | Subject: inlinepgpencrypted + non enc text 5 | Date: Wed, 25 May 2011 23:49:40 +0100 6 | Message-ID: <1786696.yKXrOjjflF@herrwackelpudding.localhost> 7 | X-KMail-Transport: GMX 8 | X-KMail-Fcc: 28 9 | X-KMail-Drafts: 7 10 | X-KMail-Templates: 9 11 | User-Agent: KMail/4.6 beta5 (Linux/2.6.34.7-0.7-desktop; KDE/4.6.41; x86_64; git-0269848; 2011-04-19) 12 | MIME-Version: 1.0 13 | Content-Transfer-Encoding: 7Bit 14 | Content-Type: text/plain; charset="us-ascii" 15 | 16 | Not encrypted not signed :( 17 | 18 | -----BEGIN PGP MESSAGE----- 19 | Version: GnuPG v2.0.15 (GNU/Linux) 20 | 21 | hQEMAwzOQ1qnzNo7AQf/a3aNTLpQBfcUr+4AKsZQLj4h6z7e7a5AaCW8AG0wrbxN 22 | kBYB7E5jdZh45DX/99gvoZslthWryUCX2kKZ3LtIllxKVjqNuK5hSt+SAuKkwiMR 23 | Xcbf1KFKENKupgGSO9B2NJRbjoExdJ+fC3mGXnO3dT7xJJAo3oLE8Nivu+Bj1peY 24 | E1wCf+vcTwVHFrA7SV8eMRb9Z9wBXmU8Q8e9ekJ7ZsRX3tMeBs6jvscVvfMf6DYY 25 | N14snZBZuGNKT9a3DPny7IC1S0lHcaam34ogWwMi3FxPGJt/Lg52kARlkF5TDhcP 26 | N6H0EB/iqDRjOOUoEVm8um5XOSR1FpEiAdD0DON3y9JPATnrYq7sgYZz3BVImYY+ 27 | N/jV8fEiN0a34pcOq8NQedMuOsJHNBS5MtbQH/kJLq0MXBpXekGlHo4MKw0trISc 28 | Rw3pW6/BFfhPJLni29g9tw== 29 | =fRFW 30 | -----END PGP MESSAGE----- 31 | 32 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/openpgp-inline-signed-broken.mbox: -------------------------------------------------------------------------------- 1 | From: test 2 | To: you@you.de 3 | Subject: test 4 | Date: Tue, 25 Aug 2015 16:47:10 +0200 5 | Message-ID: <1662097.O9NVKTC5pT@11b508545ba2> 6 | X-KMail-Identity: 1428848833 7 | User-Agent: KMail/4.13.0.3 (Linux/4.1.0-rc5-siduction-amd64; KDE/4.14.3; x86_64; git-7c86098; 2015-08-23) 8 | MIME-Version: 1.0 9 | Content-Transfer-Encoding: quoted-printable 10 | Content-Type: text/plain; charset="iso-8859-1" 11 | 12 | -----BEGIN PGP SIGNED MESSAGE----- 13 | Hash: SHA256 14 | 15 | ohno break it =F6=E4=FC 16 | -----BEGIN PGP SIGNATURE----- 17 | Version: GnuPG v2 18 | 19 | iQEcBAEBCAAGBQJV3H/vAAoJEI2YYMWPJG3mEZQH/2mbCDa60risTUsomEecasc7 20 | kIc8Ch+OjZwlEQWKEiFbpLCMVjMwf0oGFcpc/dqnIyIqeVvF6Em+v7iqKuyAaihu 21 | 7ZxxC816tDDI7UIpmyWu39McqGB/2hoA/q+QAMgBiaIuMwYJK9Aw08hXzoCds6O7 22 | Uor2Y6kMSwEiRnTSYvQHdoaZY3F9SFTLPgjvwfSu7scvp7xvH7bAVIqGGfkLjXpP 23 | OFkDhEqUI7ORwD5cvvzEu57XmbGB7Nj5LRCGcTq6IlaGeN6Pw5+hOdd6MQ4iISwy 24 | 870msP9NvktURnfXYC3fYnJaK/eUln7LYCBl/k04Z/3Um6dMYyQGh63oGv/2qxQ=3D 25 | =3D4ctb 26 | -----END PGP SIGNATURE----- 27 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/openpgp-inline-signed.mbox: -------------------------------------------------------------------------------- 1 | From: test 2 | To: you@you.de 3 | Subject: test 4 | Date: Tue, 25 Aug 2015 16:47:10 +0200 5 | Message-ID: <1662097.O9NVKTC5pT@11b508545ba2> 6 | X-KMail-Identity: 1428848833 7 | User-Agent: KMail/4.13.0.3 (Linux/4.1.0-rc5-siduction-amd64; KDE/4.14.3; x86_64; git-7c86098; 2015-08-23) 8 | MIME-Version: 1.0 9 | Content-Transfer-Encoding: quoted-printable 10 | Content-Type: text/plain; charset="iso-8859-1" 11 | 12 | -----BEGIN PGP SIGNED MESSAGE----- 13 | Hash: SHA256 14 | 15 | ohno =F6=E4=FC 16 | -----BEGIN PGP SIGNATURE----- 17 | Version: GnuPG v2 18 | 19 | iQEcBAEBCAAGBQJV3H/vAAoJEI2YYMWPJG3mEZQH/2mbCDa60risTUsomEecasc7 20 | kIc8Ch+OjZwlEQWKEiFbpLCMVjMwf0oGFcpc/dqnIyIqeVvF6Em+v7iqKuyAaihu 21 | 7ZxxC816tDDI7UIpmyWu39McqGB/2hoA/q+QAMgBiaIuMwYJK9Aw08hXzoCds6O7 22 | Uor2Y6kMSwEiRnTSYvQHdoaZY3F9SFTLPgjvwfSu7scvp7xvH7bAVIqGGfkLjXpP 23 | OFkDhEqUI7ORwD5cvvzEu57XmbGB7Nj5LRCGcTq6IlaGeN6Pw5+hOdd6MQ4iISwy 24 | 870msP9NvktURnfXYC3fYnJaK/eUln7LYCBl/k04Z/3Um6dMYyQGh63oGv/2qxQ=3D 25 | =3D4ctb 26 | -----END PGP SIGNATURE----- 27 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/openpgp-inline-signed.mbox.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/openpgp-inline-signed.mbox.inProgress.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/openpgp-inline-signed.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::TextMessagePart 3 | * MimeTreeParser::SignedMessagePart 4 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/openpgp-inline-wrong-charset-encrypted.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::TextMessagePart 3 | * MimeTreeParser::EncryptedMessagePart 4 | * MimeTreeParser::SignedMessagePart 5 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/openpgp-signed-apple.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::SignedMessagePart 3 | * MimeTreeParser::AlternativeMessagePart 4 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/openpgp-signed-base64-mailman-footer.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::MimeMessagePart 3 | * MimeTreeParser::SignedMessagePart 4 | * MimeTreeParser::TextMessagePart 5 | * MimeTreeParser::MessagePart 6 | * MimeTreeParser::AttachmentMessagePart 7 | * MimeTreeParser::MessagePart 8 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/openpgp-signed-encrypted-two-attachments.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::EncryptedMessagePart 3 | * MimeTreeParser::SignedMessagePart 4 | * MimeTreeParser::MimeMessagePart 5 | * MimeTreeParser::TextMessagePart 6 | * MimeTreeParser::MessagePart 7 | * MimeTreeParser::AttachmentMessagePart 8 | * MimeTreeParser::MessagePart 9 | * MimeTreeParser::AttachmentMessagePart 10 | * MimeTreeParser::MessagePart 11 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/openpgp-signed-encrypted.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::EncryptedMessagePart 3 | * MimeTreeParser::SignedMessagePart 4 | * MimeTreeParser::TextMessagePart 5 | * MimeTreeParser::MessagePart 6 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/openpgp-signed-mailinglist+additional-children.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::MimeMessagePart 3 | * MimeTreeParser::MimeMessagePart 4 | * MimeTreeParser::TextMessagePart 5 | * MimeTreeParser::MessagePart 6 | * MimeTreeParser::AttachmentMessagePart 7 | * MimeTreeParser::AttachmentMessagePart 8 | * MimeTreeParser::MessagePart 9 | * MimeTreeParser::AttachmentMessagePart 10 | * MimeTreeParser::MessagePart 11 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/openpgp-signed-mailinglist+old.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::MessagePartList 3 | * MimeTreeParser::MimeMessagePart 4 | * MimeTreeParser::TextMessagePart 5 | * MimeTreeParser::MessagePart 6 | * MimeTreeParser::MimeMessagePart 7 | * MimeTreeParser::EncapsulatedRfc822MessagePart 8 | * MimeTreeParser::SignedMessagePart 9 | * MimeTreeParser::TextMessagePart 10 | * MimeTreeParser::MessagePart 11 | * MimeTreeParser::MimeMessagePart 12 | * MimeTreeParser::TextMessagePart 13 | * MimeTreeParser::MessagePart 14 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/openpgp-signed-mailinglist.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::MimeMessagePart 3 | * MimeTreeParser::SignedMessagePart 4 | * MimeTreeParser::TextMessagePart 5 | * MimeTreeParser::MessagePart 6 | * MimeTreeParser::AttachmentMessagePart 7 | * MimeTreeParser::MessagePart 8 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/openpgp-signed-no-protocol.mbox: -------------------------------------------------------------------------------- 1 | Return-Path: 2 | Delivered-To: einar@heavensinferno.net 3 | Content-Type: multipart/signed; boundary="nextPart1996263.NlFDv9GTkA"; micalg="pgp-sha1"; protocol="application/broken-signature" 4 | 5 | 6 | --nextPart1996263.NlFDv9GTkA 7 | Content-Transfer-Encoding: 7Bit 8 | Content-Type: text/plain; charset="us-ascii" 9 | 10 | hi.. 11 | 12 | i noticed a new branch when i pulled kde-workspace today (finally!): 13 | activities_optional 14 | 15 | the lone commit in it was pushed on april 1, so maybe it's an april fools 16 | joke, but if it isn't, it looks like someone is trying to do something that 17 | makes no sense (and has no chance of being merged into master). so if this is 18 | a "for reals" branch, perhaps the motivation behind it can be shared? 19 | 20 | -- 21 | Aaron J. Seigo 22 | --nextPart1996263.NlFDv9GTkA 23 | Content-Type: application/broken-signature; name="signature.asc" 24 | Content-Description: This is a digitally signed message part. 25 | Content-Transfer-Encoding: 7Bit 26 | 27 | -----BEGIN PGP SIGNATURE----- 28 | Version: GnuPG v2.0.19 (GNU/Linux) 29 | 30 | iEUEABECAAYFAlFikxAACgkQ1rcusafx20MHbwCfeXOgTDwtR81XJwAdcQB40Lt7 31 | t2IAmJpIZxdU+SSruySeEfbQs3VXq/8= 32 | =BQPF 33 | -----END PGP SIGNATURE----- 34 | 35 | --nextPart1996263.NlFDv9GTkA-- 36 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/openpgp-signed-no-protocol.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::MimeMessagePart 3 | * MimeTreeParser::TextMessagePart 4 | * MimeTreeParser::MessagePart 5 | * MimeTreeParser::AttachmentMessagePart 6 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/openpgp-signed-two-attachments.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::SignedMessagePart 3 | * MimeTreeParser::MimeMessagePart 4 | * MimeTreeParser::TextMessagePart 5 | * MimeTreeParser::MessagePart 6 | * MimeTreeParser::AttachmentMessagePart 7 | * MimeTreeParser::MessagePart 8 | * MimeTreeParser::AttachmentMessagePart 9 | * MimeTreeParser::MessagePart 10 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/plaintext-with-signature.mbox: -------------------------------------------------------------------------------- 1 | Return-Path: 2 | Date: Wed, 8 Jun 2016 20:34:44 -0700 3 | From: Konqi 4 | To: konqi@kde.org 5 | Subject: A random subject with alternative contenttype 6 | MIME-Version: 1.0 7 | Content-Type: text/plain; charset=utf-8 8 | Content-Transfer-Encoding: quoted-printable 9 | 10 | If you can see this text it means that your email client couldn't display o= 11 | ur newsletter properly. 12 | Please visit this link to view the newsletter on our website: http://www.go= 13 | g.com/newsletter/ 14 | 15 | -- 16 | 17 | This is a signature 18 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/plaintext.mbox: -------------------------------------------------------------------------------- 1 | Return-Path: 2 | Date: Wed, 8 Jun 2016 20:34:44 -0700 3 | Message-ID: <1505824.VT1nqpAGu0@vkpc5> 4 | From: Konqi 5 | To: konqi@kde.org 6 | Subject: A random subject with alternative contenttype 7 | MIME-Version: 1.0 8 | Content-Type: text/plain; charset=utf-8 9 | Content-Transfer-Encoding: quoted-printable 10 | 11 | If you can see this text it means that your email client couldn't display o= 12 | ur newsletter properly. 13 | Please visit this link to view the newsletter on our website: http://www.go= 14 | g.com/newsletter/ 15 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/signed-forward-openpgp-signed-encrypted.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::SignedMessagePart 3 | * MimeTreeParser::MimeMessagePart 4 | * MimeTreeParser::TextMessagePart 5 | * MimeTreeParser::MessagePart 6 | * MimeTreeParser::EncapsulatedRfc822MessagePart 7 | * MimeTreeParser::EncryptedMessagePart 8 | * MimeTreeParser::SignedMessagePart 9 | * MimeTreeParser::TextMessagePart 10 | * MimeTreeParser::MessagePart 11 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/smime-cert.mbox: -------------------------------------------------------------------------------- 1 | From test@example.com Sat, 13 Apr 2013 01:54:30 +0200 2 | From: test 3 | To: you@you.com 4 | Subject: test 5 | Date: Sat, 13 Apr 2013 01:54:30 +0200 6 | Message-ID: <1576646.QQxzHWx8dA@tabin> 7 | X-KMail-Identity: 505942601 8 | User-Agent: KMail/4.10.2 (Linux/3.9.0-rc4-experimental-amd64; KDE/4.10.60; x86_64; git-fc9b82c; 2013-04-11) 9 | MIME-Version: 1.0 10 | Content-Type: application/pkcs7-mime; name="smime.crt"; smime-type="certs-only" 11 | Content-Transfer-Encoding: base64 12 | Content-Disposition: attachment; filename="smime.crt" 13 | 14 | asdfasdfasdfasdfasdfasdfasdfasdf 15 | asdfasdfadsfsadfasdf 16 | asdfasdf 17 | sadfas 18 | dfasdf 19 | sadf 20 | sadf 21 | adsf 22 | adsf 23 | asdf 24 | 25 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/smime-cert.mbox.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/smime-cert.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::CertMessagePart 3 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/smime-encrypted-octet-stream.mbox: -------------------------------------------------------------------------------- 1 | From test@example.com Sat, 13 Apr 2013 01:54:30 +0200 2 | From: test 3 | To: you@you.com 4 | Subject: test 5 | Date: Sat, 13 Apr 2013 01:54:30 +0200 6 | Message-ID: <1576646.QQxzHWx8dA@tabin> 7 | X-KMail-Identity: 505942601 8 | User-Agent: KMail/4.10.2 (Linux/3.9.0-rc4-experimental-amd64; KDE/4.10.60; x86_64; git-fc9b82c; 2013-04-11) 9 | MIME-Version: 1.0 10 | Content-Type: application/octet-stream; 11 | name="smime.p7m" 12 | Content-Transfer-Encoding: base64 13 | Content-Disposition: attachment; filename="smime.p7m" 14 | 15 | MIAGCSqGSIb3DQEHA6CAMIACAQAxgfwwgfkCAQAwYjBVMQswCQYDVQQGEwJVUzENMAsGA1UECgwE 16 | S0RBQjEWMBQGA1UEAwwNdW5pdHRlc3QgY2VydDEfMB0GCSqGSIb3DQEJARYQdGVzdEBleGFtcGxl 17 | LmNvbQIJANNFIDoYY4XJMA0GCSqGSIb3DQEBAQUABIGAJwmmaOeidXUHSQGOf2OBIsPYafVqdORe 18 | y54pEXbXiAfSVUWgI4a9CsiWwcDX8vlaX9ZLLr+L2VmOfr6Yc5214yxzausZVvnUFjy6LUXotuEX 19 | tSar4EW7XI9DjaZc1l985naMsTx9JUa5GyQ9J6PGqhosAKpKMGgKkFAHaOwE1/IwgAYJKoZIhvcN 20 | AQcBMBQGCCqGSIb3DQMHBAieDfmz3WGbN6CABHgEpsLrNn0PAZTDUfNomDypvSCl5bQH+9cKm80m 21 | upMV2r8RBiXS7OaP4SpCxq18afDTTPatvboHIoEX92taTbq8soiAgEs6raSGtEYZNvFL0IYqm7MA 22 | o5HCOmjiEcInyPf14lL3HnPk10FaP3hh58qTHUh4LPYtL7UECOZELYnUfUVhAAAAAAAAAAAAAA== 23 | 24 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/smime-encrypted-octet-stream.mbox.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/smime-encrypted-octet-stream.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::EncryptedMessagePart 3 | * MimeTreeParser::TextMessagePart 4 | * MimeTreeParser::MessagePart 5 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/smime-encrypted.mbox: -------------------------------------------------------------------------------- 1 | From test@example.com Sat, 13 Apr 2013 01:54:30 +0200 2 | From: test 3 | To: you@you.com 4 | Subject: test 5 | Date: Sat, 13 Apr 2013 01:54:30 +0200 6 | Message-ID: <1576646.QQxzHWx8dA@tabin> 7 | X-KMail-Identity: 505942601 8 | User-Agent: KMail/4.10.2 (Linux/3.9.0-rc4-experimental-amd64; KDE/4.10.60; x86_64; git-fc9b82c; 2013-04-11) 9 | MIME-Version: 1.0 10 | Content-Type: application/pkcs7-mime; name="smime.p7m"; smime-type="enveloped-data" 11 | Content-Transfer-Encoding: base64 12 | Content-Disposition: attachment; filename="smime.p7m" 13 | 14 | MIAGCSqGSIb3DQEHA6CAMIACAQAxgfwwgfkCAQAwYjBVMQswCQYDVQQGEwJVUzENMAsGA1UECgwE 15 | S0RBQjEWMBQGA1UEAwwNdW5pdHRlc3QgY2VydDEfMB0GCSqGSIb3DQEJARYQdGVzdEBleGFtcGxl 16 | LmNvbQIJANNFIDoYY4XJMA0GCSqGSIb3DQEBAQUABIGAJwmmaOeidXUHSQGOf2OBIsPYafVqdORe 17 | y54pEXbXiAfSVUWgI4a9CsiWwcDX8vlaX9ZLLr+L2VmOfr6Yc5214yxzausZVvnUFjy6LUXotuEX 18 | tSar4EW7XI9DjaZc1l985naMsTx9JUa5GyQ9J6PGqhosAKpKMGgKkFAHaOwE1/IwgAYJKoZIhvcN 19 | AQcBMBQGCCqGSIb3DQMHBAieDfmz3WGbN6CABHgEpsLrNn0PAZTDUfNomDypvSCl5bQH+9cKm80m 20 | upMV2r8RBiXS7OaP4SpCxq18afDTTPatvboHIoEX92taTbq8soiAgEs6raSGtEYZNvFL0IYqm7MA 21 | o5HCOmjiEcInyPf14lL3HnPk10FaP3hh58qTHUh4LPYtL7UECOZELYnUfUVhAAAAAAAAAAAAAA== 22 | 23 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/smime-encrypted.mbox.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/smime-encrypted.mbox.inProgress.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/smime-encrypted.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::EncryptedMessagePart 3 | * MimeTreeParser::TextMessagePart 4 | * MimeTreeParser::MessagePart 5 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/smime-opaque-enc+sign.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::EncryptedMessagePart 3 | * MimeTreeParser::SignedMessagePart 4 | * MimeTreeParser::TextMessagePart 5 | * MimeTreeParser::MessagePart 6 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/smime-opaque-sign.mbox: -------------------------------------------------------------------------------- 1 | From test@example.com Fri Sep 11 10:16:06 2015 2 | From: test 3 | To: you@you.com 4 | Subject: sign only 5 | Date: Fri, 11 Sep 2015 12:16:06 +0200 6 | Message-ID: <3182420.pXWeMPZlAJ@tabin.local> 7 | X-KMail-Identity: 792434561 8 | User-Agent: KMail/4.13.0.1 (Linux/4.1.5-towo.1-siduction-amd64; KDE/4.14.2; x86_64; ; ) 9 | MIME-Version: 1.0 10 | Content-Type: application/pkcs7-mime; name="smime.p7m"; smime-type="signed-data" 11 | Content-Transfer-Encoding: base64 12 | Content-Disposition: attachment; filename="smime.p7m" 13 | 14 | MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAaCAJIAEZUNvbnRl 15 | bnQtVHJhbnNmZXItRW5jb2Rpbmc6IDdCaXQKQ29udGVudC1UeXBlOiB0ZXh0L3BsYWluOyBjaGFy 16 | c2V0PSJ1dGYtOCIKCkEgc2ltcGxlIHNpZ25lZCBvbmx5IHRlc3QuAAAAAAAAMYIBkjCCAY4CAQEw 17 | YjBVMQswCQYDVQQGEwJVUzENMAsGA1UECgwES0RBQjEWMBQGA1UEAwwNdW5pdHRlc3QgY2VydDEf 18 | MB0GCSqGSIb3DQEJARYQdGVzdEBleGFtcGxlLmNvbQIJANNFIDoYY4XJMAkGBSsOAwIaBQCggYcw 19 | GAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTMwMTEwMTU0ODEyWjAj 20 | BgkqhkiG9w0BCQQxFgQUvJ5zI7oyv5fNx1H1wabIa6atsdcwKAYJKoZIhvcNAQkPMRswGTALBglg 21 | hkgBZQMEAQIwCgYIKoZIhvcNAwcwDQYJKoZIhvcNAQEBBQAEgYAHFCw88FPy1n2lu5ql5sD2J4Yi 22 | 2/N9gUQvNQF5F/kd48HncdihLPZRs7eEX7IzDZNeylTmyp2WIiGEwQrIHbxtqU32NRouc09Zv4bu 23 | iUwUoz1SM2s7qipikwayQMD3d5zWNhszNLBsw8z48uXAzjZAejBCfPP0/w3z7DZDJC2R2QAAAAAA 24 | AA== 25 | 26 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/smime-opaque-sign.mbox.inProgress.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/smime-opaque-sign.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::SignedMessagePart 3 | * MimeTreeParser::TextMessagePart 4 | * MimeTreeParser::MessagePart 5 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/smime-signed-apple.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::SignedMessagePart 3 | * MimeTreeParser::AlternativeMessagePart 4 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/smime-signed-encrypted.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::EncryptedMessagePart 3 | * MimeTreeParser::SignedMessagePart 4 | * MimeTreeParser::TextMessagePart 5 | * MimeTreeParser::MessagePart 6 | -------------------------------------------------------------------------------- /src/mail/mime/testdata/text+html-maillinglist.mbox.tree: -------------------------------------------------------------------------------- 1 | * MimeTreeParser::MessagePartList 2 | * MimeTreeParser::MimeMessagePart 3 | * MimeTreeParser::AlternativeMessagePart 4 | * MimeTreeParser::AttachmentMessagePart 5 | * MimeTreeParser::MessagePart 6 | -------------------------------------------------------------------------------- /src/mail/mime/tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2022 Carl Schwan 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | add_definitions( -DMAIL_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/../testdata" ) 5 | 6 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..) 7 | 8 | include(${CMAKE_SOURCE_DIR}/cmake/modules/add_gpg_crypto_test.cmake) 9 | 10 | add_executable(mailtemplatetest mailtemplatetest.cpp) 11 | 12 | add_gpg_crypto_test(mailtemplatetest mailtemplatetest) 13 | target_link_libraries(mailtemplatetest 14 | Qt::Test 15 | kalendar_mail_static 16 | ) 17 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/autotests/cryptohelpertest.h: -------------------------------------------------------------------------------- 1 | // Copyright 2009 Thomas McGuire 2 | // SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 3 | 4 | #pragma once 5 | 6 | #include 7 | 8 | namespace MimeTreeParser 9 | { 10 | 11 | class CryptoHelperTest : public QObject 12 | { 13 | Q_OBJECT 14 | 15 | private Q_SLOTS: 16 | void testPMFDEmpty(); 17 | void testPMFDWithNoPGPBlock(); 18 | void testPGPBlockType(); 19 | void testDeterminePGPBlockType(); 20 | void testEmbededPGPBlock(); 21 | void testClearSignedMessage(); 22 | void testMultipleBlockMessage(); 23 | }; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/autotests/setupenv.cpp: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2010 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.com 2 | // SPDX-FileCopyCopyright: 2010 Leo Franchi 3 | // SPDX-License-Identifier: GPL-2.0-or-later 4 | 5 | #include "setupenv.h" 6 | 7 | #include 8 | 9 | void MimeTreeParser::Test::setupEnv() 10 | { 11 | qputenv("LC_ALL", "en_US.UTF-8"); 12 | QStandardPaths::setTestModeEnabled(true); 13 | } 14 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/autotests/setupenv.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2010 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.com 2 | // SPDX-FileCopyrightText: 2010 Leo Franchi 3 | // SPDX-License-Identifier: LGPL-2.0-or-later 4 | 5 | #ifndef MESSAGECORE_TESTS_UTIL_H 6 | #define MESSAGECORE_TESTS_UTIL_H 7 | 8 | #include 9 | #include 10 | 11 | namespace MimeTreeParser 12 | { 13 | 14 | namespace Test 15 | { 16 | 17 | /** 18 | * setup a environment variables for tests: 19 | * * set LC_ALL to en_US.UTF-8 20 | */ 21 | void setupEnv(); 22 | 23 | } 24 | 25 | } 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/bodypartformatter.cpp: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2016 Sandro Knauß 2 | // SPDX-License-Identifier: LGPL-2.0-or-later 3 | 4 | #include "bodypartformatter.h" 5 | 6 | using namespace MimeTreeParser::Interface; 7 | 8 | namespace MimeTreeParser 9 | { 10 | namespace Interface 11 | { 12 | 13 | MessagePart::Ptr BodyPartFormatter::process(ObjectTreeParser *otp, KMime::Content *node) const 14 | { 15 | Q_UNUSED(otp) 16 | Q_UNUSED(node) 17 | return {}; 18 | } 19 | 20 | QVector BodyPartFormatter::processList(ObjectTreeParser *otp, KMime::Content *node) const 21 | { 22 | if (auto p = process(otp, node)) { 23 | return {p}; 24 | } 25 | return {}; 26 | } 27 | 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/bodypartformatter.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2004 Marc Mutz 2 | // SPDX-FileCopyrightText: 2004 Ingo Kloecker 3 | // SPDX-License-Identifier: GPL-2.0-or-later 4 | 5 | #pragma once 6 | 7 | #include "messagepart.h" 8 | 9 | namespace KMime 10 | { 11 | class Content; 12 | } 13 | 14 | namespace MimeTreeParser 15 | { 16 | class ObjectTreeParser; 17 | 18 | namespace Interface 19 | { 20 | 21 | class BodyPart; 22 | 23 | class BodyPartFormatter 24 | { 25 | public: 26 | virtual ~BodyPartFormatter() 27 | { 28 | } 29 | 30 | virtual MessagePart::Ptr process(ObjectTreeParser *otp, KMime::Content *node) const; 31 | virtual QVector processList(ObjectTreeParser *otp, KMime::Content *node) const; 32 | }; 33 | 34 | } // namespace Interface 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/bodypartformatterbasefactory_p.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2004 Marc Mutz 2 | // SPDX-FileCopyrightText: 2004 Ingo Kloecker 3 | // SPDX-License-Identifier: GPL-2.0-or-later 4 | 5 | #pragma once 6 | 7 | #include "bodypartformatterbasefactory.h" 8 | #include 9 | #include 10 | 11 | namespace MimeTreeParser 12 | { 13 | class BodyPartFormatterBaseFactory; 14 | class ObjectTreeParser; 15 | 16 | class BodyPartFormatterBaseFactoryPrivate 17 | { 18 | public: 19 | BodyPartFormatterBaseFactoryPrivate(BodyPartFormatterBaseFactory *factory); 20 | ~BodyPartFormatterBaseFactoryPrivate(); 21 | 22 | void setup(); 23 | void messageviewer_create_builtin_bodypart_formatters(); // defined in bodypartformatter.cpp 24 | void insert(const char *type, const char *subtype, Interface::BodyPartFormatter *formatter); 25 | 26 | BodyPartFormatterBaseFactory *q; 27 | std::optional all; 28 | ObjectTreeParser *mOtp; 29 | }; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/cryptohelper.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2015 Sandro Knauß 2 | // SPDX-FileCopyrightText: 2001,2002 the KPGP authors 3 | // SPDX-License-Identifier: GPL-2.0-or-later 4 | 5 | #pragma once 6 | 7 | #include 8 | #include 9 | 10 | namespace MimeTreeParser 11 | { 12 | 13 | enum PGPBlockType { 14 | UnknownBlock = -1, // BEGIN PGP ??? 15 | NoPgpBlock = 0, 16 | PgpMessageBlock = 1, // BEGIN PGP MESSAGE 17 | MultiPgpMessageBlock = 2, // BEGIN PGP MESSAGE, PART X[/Y] 18 | SignatureBlock = 3, // BEGIN PGP SIGNATURE 19 | ClearsignedBlock = 4, // BEGIN PGP SIGNED MESSAGE 20 | PublicKeyBlock = 5, // BEGIN PGP PUBLIC KEY BLOCK 21 | PrivateKeyBlock = 6 // BEGIN PGP PRIVATE KEY BLOCK (PGP 2.x: ...SECRET...) 22 | }; 23 | 24 | class Block 25 | { 26 | public: 27 | explicit Block(const QByteArray &m); 28 | 29 | Block(const QByteArray &m, PGPBlockType t); 30 | 31 | QByteArray text() const; 32 | PGPBlockType type() const; 33 | PGPBlockType determineType() const; 34 | 35 | QByteArray msg; 36 | PGPBlockType mType; 37 | }; 38 | 39 | /** Parses the given message and splits it into OpenPGP blocks and 40 | Non-OpenPGP blocks. 41 | */ 42 | QList prepareMessageForDecryption(const QByteArray &msg); 43 | 44 | } // namespace MimeTreeParser 45 | 46 | Q_DECLARE_TYPEINFO(MimeTreeParser::Block, Q_MOVABLE_TYPE); 47 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/enums.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2016 Sandro Knauß 2 | // SPDX-License-Identifier: GPL-2.0-or-later 3 | 4 | #ifndef __MIMETREEPARSER_ENUMS_H__ 5 | #define __MIMETREEPARSER_ENUMS_H__ 6 | 7 | namespace MimeTreeParser 8 | { 9 | 10 | /** 11 | * The display update mode: Force updates the display immediately, Delayed updates 12 | * after some time (150ms by default) 13 | */ 14 | enum UpdateMode { Force = 0, Delayed }; 15 | 16 | /** Flags for the encryption state. */ 17 | typedef enum { KMMsgEncryptionStateUnknown, KMMsgNotEncrypted, KMMsgPartiallyEncrypted, KMMsgFullyEncrypted, KMMsgEncryptionProblematic } KMMsgEncryptionState; 18 | 19 | /** Flags for the signature state. */ 20 | typedef enum { KMMsgSignatureStateUnknown, KMMsgNotSigned, KMMsgPartiallySigned, KMMsgFullySigned, KMMsgSignatureProblematic } KMMsgSignatureState; 21 | 22 | } 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/mimetreeparser_debug.cpp: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: none 2 | // SPDX-License-Identifier: CC0-1.0 3 | 4 | #include "mimetreeparser_debug.h" 5 | 6 | Q_LOGGING_CATEGORY(MIMETREEPARSER_LOG, "mimetreeparser") 7 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/mimetreeparser_debug.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: none 2 | // SPDX-License-Identifier: CC0-1.0 3 | 4 | #pragma once 5 | 6 | #include 7 | Q_DECLARE_LOGGING_CATEGORY(MIMETREEPARSER_LOG) 8 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/partmetadata.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2002-2003 Karl-Heinz Zimmer 2 | // SPDX-FileCopyrightText: 2003 Marc Mutz 3 | // SPDX-License-Identifier: GPL-2.0-or-later 4 | 5 | #pragma once 6 | 7 | #include 8 | #include 9 | 10 | namespace MimeTreeParser 11 | { 12 | 13 | class PartMetaData 14 | { 15 | public: 16 | bool keyMissing = false; 17 | bool keyExpired = false; 18 | bool keyRevoked = false; 19 | bool sigExpired = false; 20 | bool crlMissing = false; 21 | bool crlTooOld = false; 22 | QString signer; 23 | QStringList signerMailAddresses; 24 | QByteArray keyId; 25 | bool keyIsTrusted = false; 26 | QString status; // to be used for unknown plug-ins 27 | QString errorText; 28 | QDateTime creationTime; 29 | QString decryptionError; 30 | QString auditLog; 31 | bool isSigned = false; 32 | bool isGoodSignature = false; 33 | bool isEncrypted = false; 34 | bool isDecryptable = false; 35 | bool technicalProblem = false; 36 | bool isEncapsulatedRfc822Message = false; 37 | }; 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/testdata/README: -------------------------------------------------------------------------------- 1 | Most of this data has been imported from kdepim originally with the messagetreeparser. 2 | 3 | To generate new gpg encrypted content use an existing mime message to your liking, and then 4 | copy in ascii armored content in. The encrypted content can be created using: 5 | 6 | gpg2 --home /src/sink/mime/mimetreeparser/tests/gnupg_home/ -a -r test@kolab.org --encrypt toEncrypt.txt 7 | 8 | where toEncrypt.txt contains the to be encrypted content. 9 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/testdata/alternative-notext.mbox: -------------------------------------------------------------------------------- 1 | Return-Path: 2 | Date: Wed, 8 Jun 2016 20:34:44 -0700 3 | From: Konqi 4 | To: konqi@kde.org 5 | Subject: A random subject with a empty text alternative contenttype 6 | MIME-Version: 1.0 7 | Content-Type: multipart/alternative; 8 | boundary="----=_Part_12345678_12345678" 9 | 10 | 11 | ------=_Part_12345678_12345678 12 | Content-Transfer-Encoding: 7Bit 13 | Content-Type: text/html; charset="windows-1252" 14 | 15 | 16 | 19 |

Some HTML text

20 | 21 | 22 | ------=_Part_12345678_12345678-- 23 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/testdata/alternative.mbox: -------------------------------------------------------------------------------- 1 | Return-Path: 2 | Date: Wed, 8 Jun 2016 20:34:44 -0700 3 | From: Konqi 4 | To: konqi@kde.org 5 | Subject: A random subject with alternative contenttype 6 | MIME-Version: 1.0 7 | Content-Type: multipart/alternative; 8 | boundary="----=_Part_12345678_12345678" 9 | 10 | 11 | ------=_Part_12345678_12345678 12 | Content-Type: text/plain; charset=utf-8 13 | Content-Transfer-Encoding: quoted-printable 14 | 15 | If you can see this text it means that your email client couldn't display o= 16 | ur newsletter properly. 17 | Please visit this link to view the newsletter on our website: http://www.go= 18 | g.com/newsletter/ 19 | 20 | 21 | ------=_Part_12345678_12345678 22 | Content-Transfer-Encoding: 7Bit 23 | Content-Type: text/html; charset="windows-1252" 24 | 25 |

HTML text

26 | 27 | 28 | ------=_Part_12345678_12345678-- 29 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/testdata/crlf-encrypted-with-signature.mbox: -------------------------------------------------------------------------------- 1 | From test@kolab.org Wed, 08 Sep 2010 17:02:52 +0200 2 | From: OpenPGP Test 3 | To: test@kolab.org 4 | Subject: OpenPGP encrypted 5 | Date: Wed, 08 Sep 2010 17:02:52 +0200 6 | User-Agent: KMail/4.6 pre (Linux/2.6.34-rc2-2-default; KDE/4.5.60; x86_64; ; ) 7 | MIME-Version: 1.0 8 | Content-Transfer-Encoding: quoted-printable 9 | Content-Type: text/plain; charset=UTF-8; 10 | format=flowed 11 | 12 | -----BEGIN PGP MESSAGE----- 13 | 14 | hQEMAwzOQ1qnzNo7AQgAgXLGaohf4ZPJVDkpmpNsyXL/nccd+SyY3/deHQ8d8vp9 15 | Ye9Hr30Yz65+CAI7JCHKjIOaXjw1Nf1qqEDSyghKR0c16dLBGK37GlqOLaqScifZ 16 | /bC5WQu4V1a+dv1qnNOh3JNp5ynVpg22b5XaBggpAGCxCSrUsWWkRxTR+kBuPdn8 17 | EPMOlN3xKU1LFQfI+a3HMGpWo3PokVb4nrtuuwi261woSgKUSYjG86MJF1E28y+g 18 | bMC6rmRV+Jp0wpEmr7aogx4gELe17tglD41oLvNL9yZeEh/V8cMnnEDbO/oG+xba 19 | UjyM73V+TO2kXk0CTqItVbx6Q7kNWR/DfaJqGnzcy9KMAT1B8EpVCK/nN81mF8ia 20 | 4KFKQ1OGHhcQ2tT5ZXs6m1vJ5/sz/6g0n0CMtSsWUSvPzpM5F+LK+B7dzOeJEQee 21 | 3/S0wUFYpbAh1PyMPYobNLsEQCGtQ1PhsUXM7t1ai6jfM4k/lvbnIzUM11Q6vsnR 22 | LWS77CELfcW9WlQ755sNcwo3a/WySyU1C1gZdLw= 23 | =Fijx 24 | -----END PGP MESSAGE----- 25 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/testdata/html.mbox: -------------------------------------------------------------------------------- 1 | From foo@example.com Thu, 26 May 2011 01:16:54 +0100 2 | From: Thomas McGuire 3 | Subject: HTML test 4 | Date: Thu, 26 May 2011 01:16:54 +0100 5 | Message-ID: <1501334.pROlBb7MZF@herrwackelpudding.localhost> 6 | X-KMail-Transport: GMX 7 | X-KMail-Fcc: 28 8 | X-KMail-Drafts: 7 9 | X-KMail-Templates: 9 10 | User-Agent: KMail/4.6 beta5 (Linux/2.6.34.7-0.7-desktop; KDE/4.6.41; x86_64; git-0269848; 2011-04-19) 11 | MIME-Version: 1.0 12 | Content-Transfer-Encoding: 7Bit 13 | Content-Type: text/html; charset="windows-1252" 14 | 15 |

HTML text

-------------------------------------------------------------------------------- /src/mail/mimetreeparser/testdata/htmlonly.mbox: -------------------------------------------------------------------------------- 1 | From foo@example.com Thu, 26 May 2011 01:16:54 +0100 2 | From: Thomas McGuire 3 | Subject: HTML test 4 | Date: Thu, 26 May 2011 01:16:54 +0100 5 | Message-ID: <1501334.pROlBb7MZF@herrwackelpudding.localhost> 6 | X-KMail-Transport: GMX 7 | X-KMail-Fcc: 28 8 | X-KMail-Drafts: 7 9 | X-KMail-Templates: 9 10 | User-Agent: KMail/4.6 beta5 (Linux/2.6.34.7-0.7-desktop; KDE/4.6.41; x86_64; git-0269848; 2011-04-19) 11 | MIME-Version: 1.0 12 | Content-Type: text/html 13 | Content-Transfer-Encoding: 7Bit 14 | 15 | 16 | 17 | 18 | 19 | SOME HTML text. 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/testdata/htmlonlyexternal.mbox: -------------------------------------------------------------------------------- 1 | From foo@example.com Thu, 26 May 2011 01:16:54 +0100 2 | From: Thomas McGuire 3 | Subject: HTML test 4 | Date: Thu, 26 May 2011 01:16:54 +0100 5 | Message-ID: <1501334.pROlBb7MZF@herrwackelpudding.localhost> 6 | X-KMail-Transport: GMX 7 | X-KMail-Fcc: 28 8 | X-KMail-Drafts: 7 9 | X-KMail-Templates: 9 10 | User-Agent: KMail/4.6 beta5 (Linux/2.6.34.7-0.7-desktop; KDE/4.6.41; x86_64; git-0269848; 2011-04-19) 11 | MIME-Version: 1.0 12 | Content-Type: text/html 13 | Content-Transfer-Encoding: 7Bit 14 | 15 | 16 | 17 | 18 | 19 | SOME HTML text. 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/testdata/inlinepgpencrypted-appendix.mbox: -------------------------------------------------------------------------------- 1 | From test@kolab.org Wed, 25 May 2011 23:49:40 +0100 2 | From: OpenPGP Test 3 | To: test@kolab.org 4 | Subject: inlinepgpencrypted 5 | Date: Wed, 25 May 2011 23:49:40 +0100 6 | Message-ID: <1786696.yKXrOjjflF@herrwackelpudding.localhost> 7 | X-KMail-Transport: GMX 8 | X-KMail-Fcc: 28 9 | X-KMail-Drafts: 7 10 | X-KMail-Templates: 9 11 | User-Agent: KMail/4.6 beta5 (Linux/2.6.34.7-0.7-desktop; KDE/4.6.41; x86_64; git-0269848; 2011-04-19) 12 | MIME-Version: 1.0 13 | Content-Transfer-Encoding: 7Bit 14 | Content-Type: text/plain; charset="us-ascii" 15 | 16 | -----BEGIN PGP MESSAGE----- 17 | Version: GnuPG v2.0.15 (GNU/Linux) 18 | 19 | hQEMAwzOQ1qnzNo7AQf/a3aNTLpQBfcUr+4AKsZQLj4h6z7e7a5AaCW8AG0wrbxN 20 | kBYB7E5jdZh45DX/99gvoZslthWryUCX2kKZ3LtIllxKVjqNuK5hSt+SAuKkwiMR 21 | Xcbf1KFKENKupgGSO9B2NJRbjoExdJ+fC3mGXnO3dT7xJJAo3oLE8Nivu+Bj1peY 22 | E1wCf+vcTwVHFrA7SV8eMRb9Z9wBXmU8Q8e9ekJ7ZsRX3tMeBs6jvscVvfMf6DYY 23 | N14snZBZuGNKT9a3DPny7IC1S0lHcaam34ogWwMi3FxPGJt/Lg52kARlkF5TDhcP 24 | N6H0EB/iqDRjOOUoEVm8um5XOSR1FpEiAdD0DON3y9JPATnrYq7sgYZz3BVImYY+ 25 | N/jV8fEiN0a34pcOq8NQedMuOsJHNBS5MtbQH/kJLq0MXBpXekGlHo4MKw0trISc 26 | Rw3pW6/BFfhPJLni29g9tw== 27 | =fRFW 28 | -----END PGP MESSAGE----- 29 | 30 | _______________________________________________ 31 | test mailing list 32 | test@lists.kde.org 33 | http://kde.org 34 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/testdata/inlinepgpencrypted.mbox: -------------------------------------------------------------------------------- 1 | From test@kolab.org Wed, 25 May 2011 23:49:40 +0100 2 | From: OpenPGP Test 3 | To: test@kolab.org 4 | Subject: inlinepgpencrypted 5 | Date: Wed, 25 May 2011 23:49:40 +0100 6 | Message-ID: <1786696.yKXrOjjflF@herrwackelpudding.localhost> 7 | X-KMail-Transport: GMX 8 | X-KMail-Fcc: 28 9 | X-KMail-Drafts: 7 10 | X-KMail-Templates: 9 11 | User-Agent: KMail/4.6 beta5 (Linux/2.6.34.7-0.7-desktop; KDE/4.6.41; x86_64; git-0269848; 2011-04-19) 12 | MIME-Version: 1.0 13 | Content-Transfer-Encoding: 7Bit 14 | Content-Type: text/plain; charset="us-ascii" 15 | 16 | -----BEGIN PGP MESSAGE----- 17 | Version: GnuPG v2.0.15 (GNU/Linux) 18 | 19 | hQEMAwzOQ1qnzNo7AQf/a3aNTLpQBfcUr+4AKsZQLj4h6z7e7a5AaCW8AG0wrbxN 20 | kBYB7E5jdZh45DX/99gvoZslthWryUCX2kKZ3LtIllxKVjqNuK5hSt+SAuKkwiMR 21 | Xcbf1KFKENKupgGSO9B2NJRbjoExdJ+fC3mGXnO3dT7xJJAo3oLE8Nivu+Bj1peY 22 | E1wCf+vcTwVHFrA7SV8eMRb9Z9wBXmU8Q8e9ekJ7ZsRX3tMeBs6jvscVvfMf6DYY 23 | N14snZBZuGNKT9a3DPny7IC1S0lHcaam34ogWwMi3FxPGJt/Lg52kARlkF5TDhcP 24 | N6H0EB/iqDRjOOUoEVm8um5XOSR1FpEiAdD0DON3y9JPATnrYq7sgYZz3BVImYY+ 25 | N/jV8fEiN0a34pcOq8NQedMuOsJHNBS5MtbQH/kJLq0MXBpXekGlHo4MKw0trISc 26 | Rw3pW6/BFfhPJLni29g9tw== 27 | =fRFW 28 | -----END PGP MESSAGE----- 29 | 30 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/testdata/listmessage.mbox: -------------------------------------------------------------------------------- 1 | Return-Path: 2 | Date: Wed, 8 Jun 2016 20:34:44 -0700 3 | From: From 4 | Reply-To: List 5 | To: List , 6 | "To" 7 | Cc: CC 8 | List-Id: List 9 | Sender: List 10 | Subject: A random subject with alternative contenttype 11 | MIME-Version: 1.0 12 | Content-Type: text/plain; charset=utf-8 13 | Content-Transfer-Encoding: quoted-printable 14 | 15 | test 16 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/testdata/multirecipients.mbox: -------------------------------------------------------------------------------- 1 | Return-Path: 2 | Date: Wed, 8 Jun 2016 20:34:44 -0700 3 | From: From 4 | To: To , 5 | "To, 2" 6 | Cc: CC , CC2 7 | Subject: A random subject with alternative contenttype 8 | MIME-Version: 1.0 9 | Content-Type: text/plain; charset=utf-8 10 | Content-Transfer-Encoding: quoted-printable 11 | 12 | test 13 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/testdata/no-content-type.mbox: -------------------------------------------------------------------------------- 1 | From: hans@example.com 2 | To: karl@example.com 3 | Subject: Simple Mail Without Content-Type Header 4 | Date: Sat, 15 May 2010 10:52:24 +0200 5 | MIME-Version: 1.0 6 | 7 | asdfasdf -------------------------------------------------------------------------------- /src/mail/mimetreeparser/testdata/openpgp-encrypted-noData.mbox: -------------------------------------------------------------------------------- 1 | From test@kolab.org Wed, 08 Sep 2010 17:02:52 +0200 2 | From: OpenPGP Test 3 | To: test@kolab.org 4 | Subject: OpenPGP encrypted 5 | Date: Wed, 08 Sep 2010 17:02:52 +0200 6 | User-Agent: KMail/4.6 pre (Linux/2.6.34-rc2-2-default; KDE/4.5.60; x86_64; ; ) 7 | MIME-Version: 1.0 8 | Content-Type: multipart/encrypted; boundary="nextPart1357031.ppLHckZtsp"; protocol="application/pgp-encrypted" 9 | Content-Transfer-Encoding: 7Bit 10 | 11 | --nextPart1357031.ppLHckZtsp 12 | Content-Type: application/pgp-encrypted 13 | Content-Disposition: attachment 14 | 15 | Version: 1 16 | 17 | --nextPart1357031.ppLHckZtsp-- 18 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/testdata/openpgp-inline-encrypted+nonenc.mbox: -------------------------------------------------------------------------------- 1 | From test@kolab.org Wed, 25 May 2011 23:49:40 +0100 2 | From: OpenPGP Test 3 | To: test@kolab.org 4 | Subject: inlinepgpencrypted + non enc text 5 | Date: Wed, 25 May 2011 23:49:40 +0100 6 | Message-ID: <1786696.yKXrOjjflF@herrwackelpudding.localhost> 7 | X-KMail-Transport: GMX 8 | X-KMail-Fcc: 28 9 | X-KMail-Drafts: 7 10 | X-KMail-Templates: 9 11 | User-Agent: KMail/4.6 beta5 (Linux/2.6.34.7-0.7-desktop; KDE/4.6.41; x86_64; git-0269848; 2011-04-19) 12 | MIME-Version: 1.0 13 | Content-Transfer-Encoding: 7Bit 14 | Content-Type: text/plain; charset="us-ascii" 15 | 16 | Not encrypted not signed :( 17 | 18 | -----BEGIN PGP MESSAGE----- 19 | Version: GnuPG v2.0.15 (GNU/Linux) 20 | 21 | hQEMAwzOQ1qnzNo7AQf/a3aNTLpQBfcUr+4AKsZQLj4h6z7e7a5AaCW8AG0wrbxN 22 | kBYB7E5jdZh45DX/99gvoZslthWryUCX2kKZ3LtIllxKVjqNuK5hSt+SAuKkwiMR 23 | Xcbf1KFKENKupgGSO9B2NJRbjoExdJ+fC3mGXnO3dT7xJJAo3oLE8Nivu+Bj1peY 24 | E1wCf+vcTwVHFrA7SV8eMRb9Z9wBXmU8Q8e9ekJ7ZsRX3tMeBs6jvscVvfMf6DYY 25 | N14snZBZuGNKT9a3DPny7IC1S0lHcaam34ogWwMi3FxPGJt/Lg52kARlkF5TDhcP 26 | N6H0EB/iqDRjOOUoEVm8um5XOSR1FpEiAdD0DON3y9JPATnrYq7sgYZz3BVImYY+ 27 | N/jV8fEiN0a34pcOq8NQedMuOsJHNBS5MtbQH/kJLq0MXBpXekGlHo4MKw0trISc 28 | Rw3pW6/BFfhPJLni29g9tw== 29 | =fRFW 30 | -----END PGP MESSAGE----- 31 | 32 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/testdata/openpgp-inline-signed-broken.mbox: -------------------------------------------------------------------------------- 1 | From: test 2 | To: you@you.de 3 | Subject: test 4 | Date: Tue, 25 Aug 2015 16:47:10 +0200 5 | Message-ID: <1662097.O9NVKTC5pT@11b508545ba2> 6 | X-KMail-Identity: 1428848833 7 | User-Agent: KMail/4.13.0.3 (Linux/4.1.0-rc5-siduction-amd64; KDE/4.14.3; x86_64; git-7c86098; 2015-08-23) 8 | MIME-Version: 1.0 9 | Content-Transfer-Encoding: quoted-printable 10 | Content-Type: text/plain; charset="iso-8859-1" 11 | 12 | -----BEGIN PGP SIGNED MESSAGE----- 13 | Hash: SHA256 14 | 15 | ohno break it =F6=E4=FC 16 | -----BEGIN PGP SIGNATURE----- 17 | Version: GnuPG v2 18 | 19 | iQEcBAEBCAAGBQJV3H/vAAoJEI2YYMWPJG3mEZQH/2mbCDa60risTUsomEecasc7 20 | kIc8Ch+OjZwlEQWKEiFbpLCMVjMwf0oGFcpc/dqnIyIqeVvF6Em+v7iqKuyAaihu 21 | 7ZxxC816tDDI7UIpmyWu39McqGB/2hoA/q+QAMgBiaIuMwYJK9Aw08hXzoCds6O7 22 | Uor2Y6kMSwEiRnTSYvQHdoaZY3F9SFTLPgjvwfSu7scvp7xvH7bAVIqGGfkLjXpP 23 | OFkDhEqUI7ORwD5cvvzEu57XmbGB7Nj5LRCGcTq6IlaGeN6Pw5+hOdd6MQ4iISwy 24 | 870msP9NvktURnfXYC3fYnJaK/eUln7LYCBl/k04Z/3Um6dMYyQGh63oGv/2qxQ=3D 25 | =3D4ctb 26 | -----END PGP SIGNATURE----- 27 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/testdata/openpgp-inline-signed.mbox: -------------------------------------------------------------------------------- 1 | From: test 2 | To: you@you.de 3 | Subject: test 4 | Date: Tue, 25 Aug 2015 16:47:10 +0200 5 | Message-ID: <1662097.O9NVKTC5pT@11b508545ba2> 6 | X-KMail-Identity: 1428848833 7 | User-Agent: KMail/4.13.0.3 (Linux/4.1.0-rc5-siduction-amd64; KDE/4.14.3; x86_64; git-7c86098; 2015-08-23) 8 | MIME-Version: 1.0 9 | Content-Transfer-Encoding: quoted-printable 10 | Content-Type: text/plain; charset="iso-8859-1" 11 | 12 | -----BEGIN PGP SIGNED MESSAGE----- 13 | Hash: SHA256 14 | 15 | ohno =F6=E4=FC 16 | -----BEGIN PGP SIGNATURE----- 17 | Version: GnuPG v2 18 | 19 | iQEcBAEBCAAGBQJV3H/vAAoJEI2YYMWPJG3mEZQH/2mbCDa60risTUsomEecasc7 20 | kIc8Ch+OjZwlEQWKEiFbpLCMVjMwf0oGFcpc/dqnIyIqeVvF6Em+v7iqKuyAaihu 21 | 7ZxxC816tDDI7UIpmyWu39McqGB/2hoA/q+QAMgBiaIuMwYJK9Aw08hXzoCds6O7 22 | Uor2Y6kMSwEiRnTSYvQHdoaZY3F9SFTLPgjvwfSu7scvp7xvH7bAVIqGGfkLjXpP 23 | OFkDhEqUI7ORwD5cvvzEu57XmbGB7Nj5LRCGcTq6IlaGeN6Pw5+hOdd6MQ4iISwy 24 | 870msP9NvktURnfXYC3fYnJaK/eUln7LYCBl/k04Z/3Um6dMYyQGh63oGv/2qxQ=3D 25 | =3D4ctb 26 | -----END PGP SIGNATURE----- 27 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/testdata/openpgp-signed-no-protocol.mbox: -------------------------------------------------------------------------------- 1 | Return-Path: 2 | Delivered-To: einar@heavensinferno.net 3 | Content-Type: multipart/signed; boundary="nextPart1996263.NlFDv9GTkA"; micalg="pgp-sha1"; protocol="application/broken-signature" 4 | 5 | 6 | --nextPart1996263.NlFDv9GTkA 7 | Content-Transfer-Encoding: 7Bit 8 | Content-Type: text/plain; charset="us-ascii" 9 | 10 | hi.. 11 | 12 | i noticed a new branch when i pulled kde-workspace today (finally!): 13 | activities_optional 14 | 15 | the lone commit in it was pushed on april 1, so maybe it's an april fools 16 | joke, but if it isn't, it looks like someone is trying to do something that 17 | makes no sense (and has no chance of being merged into master). so if this is 18 | a "for reals" branch, perhaps the motivation behind it can be shared? 19 | 20 | -- 21 | Aaron J. Seigo 22 | --nextPart1996263.NlFDv9GTkA 23 | Content-Type: application/broken-signature; name="signature.asc" 24 | Content-Description: This is a digitally signed message part. 25 | Content-Transfer-Encoding: 7Bit 26 | 27 | -----BEGIN PGP SIGNATURE----- 28 | Version: GnuPG v2.0.19 (GNU/Linux) 29 | 30 | iEUEABECAAYFAlFikxAACgkQ1rcusafx20MHbwCfeXOgTDwtR81XJwAdcQB40Lt7 31 | t2IAmJpIZxdU+SSruySeEfbQs3VXq/8= 32 | =BQPF 33 | -----END PGP SIGNATURE----- 34 | 35 | --nextPart1996263.NlFDv9GTkA-- 36 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/testdata/plaintext.mbox: -------------------------------------------------------------------------------- 1 | Return-Path: 2 | Date: Wed, 8 Jun 2016 20:34:44 -0700 3 | From: Konqi 4 | To: konqi@kde.org 5 | Subject: A random subject with alternative contenttype 6 | MIME-Version: 1.0 7 | Content-Type: text/plain; charset=utf-8 8 | Content-Transfer-Encoding: quoted-printable 9 | 10 | If you can see this text it means that your email client couldn't display o= 11 | ur newsletter properly. 12 | Please visit this link to view the newsletter on our website: http://www.go= 13 | g.com/newsletter/ 14 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/testdata/smime-cert.mbox: -------------------------------------------------------------------------------- 1 | From test@example.com Sat, 13 Apr 2013 01:54:30 +0200 2 | From: test 3 | To: you@you.com 4 | Subject: test 5 | Date: Sat, 13 Apr 2013 01:54:30 +0200 6 | Message-ID: <1576646.QQxzHWx8dA@tabin> 7 | X-KMail-Identity: 505942601 8 | User-Agent: KMail/4.10.2 (Linux/3.9.0-rc4-experimental-amd64; KDE/4.10.60; x86_64; git-fc9b82c; 2013-04-11) 9 | MIME-Version: 1.0 10 | Content-Type: application/pkcs7-mime; name="smime.crt"; smime-type="certs-only" 11 | Content-Transfer-Encoding: base64 12 | Content-Disposition: attachment; filename="smime.crt" 13 | 14 | asdfasdfasdfasdfasdfasdfasdfasdf 15 | asdfasdfadsfsadfasdf 16 | asdfasdf 17 | sadfas 18 | dfasdf 19 | sadf 20 | sadf 21 | adsf 22 | adsf 23 | asdf 24 | 25 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/testdata/smime-encrypted-octet-stream.mbox: -------------------------------------------------------------------------------- 1 | From test@example.com Sat, 13 Apr 2013 01:54:30 +0200 2 | From: test 3 | To: you@you.com 4 | Subject: test 5 | Date: Sat, 13 Apr 2013 01:54:30 +0200 6 | Message-ID: <1576646.QQxzHWx8dA@tabin> 7 | X-KMail-Identity: 505942601 8 | User-Agent: KMail/4.10.2 (Linux/3.9.0-rc4-experimental-amd64; KDE/4.10.60; x86_64; git-fc9b82c; 2013-04-11) 9 | MIME-Version: 1.0 10 | Content-Type: application/octet-stream; 11 | name="smime.p7m" 12 | Content-Transfer-Encoding: base64 13 | Content-Disposition: attachment; filename="smime.p7m" 14 | 15 | MIAGCSqGSIb3DQEHA6CAMIACAQAxgfwwgfkCAQAwYjBVMQswCQYDVQQGEwJVUzENMAsGA1UECgwE 16 | S0RBQjEWMBQGA1UEAwwNdW5pdHRlc3QgY2VydDEfMB0GCSqGSIb3DQEJARYQdGVzdEBleGFtcGxl 17 | LmNvbQIJANNFIDoYY4XJMA0GCSqGSIb3DQEBAQUABIGAJwmmaOeidXUHSQGOf2OBIsPYafVqdORe 18 | y54pEXbXiAfSVUWgI4a9CsiWwcDX8vlaX9ZLLr+L2VmOfr6Yc5214yxzausZVvnUFjy6LUXotuEX 19 | tSar4EW7XI9DjaZc1l985naMsTx9JUa5GyQ9J6PGqhosAKpKMGgKkFAHaOwE1/IwgAYJKoZIhvcN 20 | AQcBMBQGCCqGSIb3DQMHBAieDfmz3WGbN6CABHgEpsLrNn0PAZTDUfNomDypvSCl5bQH+9cKm80m 21 | upMV2r8RBiXS7OaP4SpCxq18afDTTPatvboHIoEX92taTbq8soiAgEs6raSGtEYZNvFL0IYqm7MA 22 | o5HCOmjiEcInyPf14lL3HnPk10FaP3hh58qTHUh4LPYtL7UECOZELYnUfUVhAAAAAAAAAAAAAA== 23 | 24 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/testdata/smime-encrypted.mbox: -------------------------------------------------------------------------------- 1 | From test@example.com Sat, 13 Apr 2013 01:54:30 +0200 2 | From: test 3 | To: you@you.com 4 | Subject: test 5 | Date: Sat, 13 Apr 2013 01:54:30 +0200 6 | Message-ID: <1576646.QQxzHWx8dA@tabin> 7 | X-KMail-Identity: 505942601 8 | User-Agent: KMail/4.10.2 (Linux/3.9.0-rc4-experimental-amd64; KDE/4.10.60; x86_64; git-fc9b82c; 2013-04-11) 9 | MIME-Version: 1.0 10 | Content-Type: application/pkcs7-mime; name="smime.p7m"; smime-type="enveloped-data" 11 | Content-Transfer-Encoding: base64 12 | Content-Disposition: attachment; filename="smime.p7m" 13 | 14 | MIAGCSqGSIb3DQEHA6CAMIACAQAxgfwwgfkCAQAwYjBVMQswCQYDVQQGEwJVUzENMAsGA1UECgwE 15 | S0RBQjEWMBQGA1UEAwwNdW5pdHRlc3QgY2VydDEfMB0GCSqGSIb3DQEJARYQdGVzdEBleGFtcGxl 16 | LmNvbQIJANNFIDoYY4XJMA0GCSqGSIb3DQEBAQUABIGAJwmmaOeidXUHSQGOf2OBIsPYafVqdORe 17 | y54pEXbXiAfSVUWgI4a9CsiWwcDX8vlaX9ZLLr+L2VmOfr6Yc5214yxzausZVvnUFjy6LUXotuEX 18 | tSar4EW7XI9DjaZc1l985naMsTx9JUa5GyQ9J6PGqhosAKpKMGgKkFAHaOwE1/IwgAYJKoZIhvcN 19 | AQcBMBQGCCqGSIb3DQMHBAieDfmz3WGbN6CABHgEpsLrNn0PAZTDUfNomDypvSCl5bQH+9cKm80m 20 | upMV2r8RBiXS7OaP4SpCxq18afDTTPatvboHIoEX92taTbq8soiAgEs6raSGtEYZNvFL0IYqm7MA 21 | o5HCOmjiEcInyPf14lL3HnPk10FaP3hh58qTHUh4LPYtL7UECOZELYnUfUVhAAAAAAAAAAAAAA== 22 | 23 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/testdata/smime-opaque-sign.mbox: -------------------------------------------------------------------------------- 1 | From test@example.com Fri Sep 11 10:16:06 2015 2 | From: test 3 | To: you@you.com 4 | Subject: sign only 5 | Date: Fri, 11 Sep 2015 12:16:06 +0200 6 | Message-ID: <3182420.pXWeMPZlAJ@tabin.local> 7 | X-KMail-Identity: 792434561 8 | User-Agent: KMail/4.13.0.1 (Linux/4.1.5-towo.1-siduction-amd64; KDE/4.14.2; x86_64; ; ) 9 | MIME-Version: 1.0 10 | Content-Type: application/pkcs7-mime; name="smime.p7m"; smime-type="signed-data" 11 | Content-Transfer-Encoding: base64 12 | Content-Disposition: attachment; filename="smime.p7m" 13 | 14 | MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAaCAJIAEZUNvbnRl 15 | bnQtVHJhbnNmZXItRW5jb2Rpbmc6IDdCaXQKQ29udGVudC1UeXBlOiB0ZXh0L3BsYWluOyBjaGFy 16 | c2V0PSJ1dGYtOCIKCkEgc2ltcGxlIHNpZ25lZCBvbmx5IHRlc3QuAAAAAAAAMYIBkjCCAY4CAQEw 17 | YjBVMQswCQYDVQQGEwJVUzENMAsGA1UECgwES0RBQjEWMBQGA1UEAwwNdW5pdHRlc3QgY2VydDEf 18 | MB0GCSqGSIb3DQEJARYQdGVzdEBleGFtcGxlLmNvbQIJANNFIDoYY4XJMAkGBSsOAwIaBQCggYcw 19 | GAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTMwMTEwMTU0ODEyWjAj 20 | BgkqhkiG9w0BCQQxFgQUvJ5zI7oyv5fNx1H1wabIa6atsdcwKAYJKoZIhvcNAQkPMRswGTALBglg 21 | hkgBZQMEAQIwCgYIKoZIhvcNAwcwDQYJKoZIhvcNAQEBBQAEgYAHFCw88FPy1n2lu5ql5sD2J4Yi 22 | 2/N9gUQvNQF5F/kd48HncdihLPZRs7eEX7IzDZNeylTmyp2WIiGEwQrIHbxtqU32NRouc09Zv4bu 23 | iUwUoz1SM2s7qipikwayQMD3d5zWNhszNLBsw8z48uXAzjZAejBCfPP0/w3z7DZDJC2R2QAAAAAA 24 | AA== 25 | 26 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2017 Christian Mollekopf 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | add_subdirectory(gnupg_home) 5 | add_definitions( -DMAIL_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/../testdata" ) 6 | include(${CMAKE_SOURCE_DIR}/cmake/modules/add_gpg_crypto_test.cmake) 7 | include_directories( 8 | ${CMAKE_CURRENT_BINARY_DIR} 9 | ${CMAKE_CURRENT_SOURCE_DIR}/.. 10 | ) 11 | include_directories(${GPGME_INCLUDE_DIRS}) 12 | 13 | include(ECMAddTests) 14 | 15 | add_executable(mimetreeparsertest mimetreeparsertest.cpp) 16 | add_gpg_crypto_test(mimetreeparsertest mimetreeparsertest) 17 | target_link_libraries(mimetreeparsertest PUBLIC 18 | Qt::Test 19 | kalendar_mail_static 20 | ) 21 | 22 | add_executable(gpgerrortest gpgerrortest.cpp) 23 | target_link_libraries(gpgerrortest PUBLIC 24 | Qt::Test 25 | kalendar_mail_static 26 | ) 27 | add_test(NAME gpgerrortest COMMAND $) 28 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/tests/gnupg_home/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | configure_file( gpg-agent.conf.in 2 | "${CMAKE_CURRENT_BINARY_DIR}/gpg-agent.conf" @ONLY ) 3 | 4 | configure_file( gpgsm.conf.in 5 | "${CMAKE_CURRENT_BINARY_DIR}/gpgsm.conf" @ONLY ) 6 | 7 | file( COPY 8 | ${CMAKE_CURRENT_SOURCE_DIR} 9 | DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/../" 10 | ) 11 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/tests/gnupg_home/dirmngr-cache.d/DIR.txt: -------------------------------------------------------------------------------- 1 | v:1: 2 | c:4E31CEB57DDD4A7B9991AB05507B1ED4293FF952:CN=Test-ZS 7,O=Intevation GmbH,C=DE:ldap%3A//ca.intevation.org/cn=Test-ZS 7, o=Intevation GmbH, c=DE?certificateRevocationList:20100615T181523:20100707T181523:72FEF3FD88455A1D4C6796A6499D4422:::: 3 | c:7F2A402CBB016A9146D613568C89D3596A4111AA:CN=Wurzel ZS 3,O=Intevation GmbH,C=DE:ldap%3A//ca.intevation.org/cn=Wurzel ZS 3, o=Intevation GmbH, c=DE?certificateRevocationList:20100625T102134:20100814T102134:44E60EEC02EF2FBF7A5C77E9BD565667:::: 4 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/tests/gnupg_home/dirmngr-cache.d/crl-4E31CEB57DDD4A7B9991AB05507B1ED4293FF952.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/kalendar/4fbd4c3e65bfdc9f43deee59f1e5f709544b9ba8/src/mail/mimetreeparser/tests/gnupg_home/dirmngr-cache.d/crl-4E31CEB57DDD4A7B9991AB05507B1ED4293FF952.db -------------------------------------------------------------------------------- /src/mail/mimetreeparser/tests/gnupg_home/dirmngr.conf: -------------------------------------------------------------------------------- 1 | 2 | ###+++--- GPGConf ---+++### 3 | debug-level basic 4 | log-file socket:///home/leo/kde/src/kdepim/messagecomposer/tests/gnupg_home/log-socket 5 | ###+++--- GPGConf ---+++### Tue 29 Jun 2010 10:23:13 AM EDT 6 | # GPGConf edited this configuration file. 7 | # It will disable options before this marked block, but it will 8 | # never change anything below these lines. 9 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/tests/gnupg_home/gpg-agent.conf.in: -------------------------------------------------------------------------------- 1 | pinentry-program @CMAKE_CURRENT_BINARY_DIR@/pinentry-fake.sh 2 | ###+++--- GPGConf ---+++### 3 | allow-mark-trusted 4 | debug-level basic 5 | faked-system-time 20130110T154812 6 | log-file @CMAKE_CURRENT_BINARY_DIR@/gpg-agent.log 7 | ###+++--- GPGConf ---+++### Tue 29 Jun 2010 10:23:13 AM EDT 8 | # GPGConf edited this configuration file. 9 | # It will disable options before this marked block, but it will 10 | # never change anything below these lines. 11 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/tests/gnupg_home/gpgsm.conf.in: -------------------------------------------------------------------------------- 1 | 2 | ###+++--- GPGConf ---+++### 3 | disable-crl-checks 4 | debug-level basic 5 | faked-system-time 20130110T154812 6 | log-file @CMAKE_CURRENT_BINARY_DIR@/gpgsm.log 7 | ###+++--- GPGConf ---+++### Tue 29 Jun 2010 10:23:13 AM EDT 8 | # GPGConf edited this configuration file. 9 | # It will disable options before this marked block, but it will 10 | # never change anything below these lines. 11 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/tests/gnupg_home/pinentry-fake.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "OK Your orders please" 4 | while : 5 | do 6 | read cmd 7 | echo "OK" 8 | [ "$cmd" = "BYE" ] && break 9 | done 10 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/tests/gnupg_home/private-keys-v1.d/1AA8BA52430E51AE249AF0DA97D59F869E4101A8.key: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/kalendar/4fbd4c3e65bfdc9f43deee59f1e5f709544b9ba8/src/mail/mimetreeparser/tests/gnupg_home/private-keys-v1.d/1AA8BA52430E51AE249AF0DA97D59F869E4101A8.key -------------------------------------------------------------------------------- /src/mail/mimetreeparser/tests/gnupg_home/pubring.gpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/kalendar/4fbd4c3e65bfdc9f43deee59f1e5f709544b9ba8/src/mail/mimetreeparser/tests/gnupg_home/pubring.gpg -------------------------------------------------------------------------------- /src/mail/mimetreeparser/tests/gnupg_home/pubring.kbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/kalendar/4fbd4c3e65bfdc9f43deee59f1e5f709544b9ba8/src/mail/mimetreeparser/tests/gnupg_home/pubring.kbx -------------------------------------------------------------------------------- /src/mail/mimetreeparser/tests/gnupg_home/scdaemon.conf: -------------------------------------------------------------------------------- 1 | 2 | ###+++--- GPGConf ---+++### 3 | debug-level basic 4 | log-file socket:///home/leo/kde/src/kdepim/messagecomposer/tests/gnupg_home/log-socket 5 | ###+++--- GPGConf ---+++### Tue 29 Jun 2010 10:23:13 AM EDT 6 | # GPGConf edited this configuration file. 7 | # It will disable options before this marked block, but it will 8 | # never change anything below these lines. 9 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/tests/gnupg_home/secring.gpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/kalendar/4fbd4c3e65bfdc9f43deee59f1e5f709544b9ba8/src/mail/mimetreeparser/tests/gnupg_home/secring.gpg -------------------------------------------------------------------------------- /src/mail/mimetreeparser/tests/gnupg_home/trustdb.gpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/kalendar/4fbd4c3e65bfdc9f43deee59f1e5f709544b9ba8/src/mail/mimetreeparser/tests/gnupg_home/trustdb.gpg -------------------------------------------------------------------------------- /src/mail/mimetreeparser/tests/gnupg_home/trustlist.txt: -------------------------------------------------------------------------------- 1 | 5E:7C:B2:F4:9F:70:05:43:42:32:5D:75:74:70:00:09:B9:D8:08:61 S 2 | 3 | 4 | 5 | # CN=unittest cert 6 | # O=KDAB 7 | # C=US 8 | # EMail=test@example.com 9 | 24:D2:FC:A2:2E:B3:B8:0A:1E:37:71:D1:4C:C6:58:E3:21:2B:49:DC S 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/utils.cpp: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2016 Sandro Knauß 2 | // SPDX-License-Identifier: LGPL-2.0-or-later 3 | 4 | #include "utils.h" 5 | 6 | using namespace MimeTreeParser; 7 | 8 | KMime::Content *MimeTreeParser::findTypeInDirectChildren(KMime::Content *content, const QByteArray &mimeType) 9 | { 10 | const auto contents = content->contents(); 11 | for (const auto child : contents) { 12 | if ((!child->contentType()->isEmpty()) && (mimeType == child->contentType()->mimeType())) { 13 | return child; 14 | } 15 | } 16 | return nullptr; 17 | } 18 | -------------------------------------------------------------------------------- /src/mail/mimetreeparser/utils.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2016 Sandro Knauß 2 | // SPDX-License-Identifier: LGPL-2.0-or-later 3 | 4 | #pragma once 5 | 6 | #include 7 | 8 | namespace MimeTreeParser 9 | { 10 | KMime::Content *findTypeInDirectChildren(KMime::Content *content, const QByteArray &mimeType); 11 | } 12 | -------------------------------------------------------------------------------- /src/mail/qml/app/MenuBar.qml: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2021 Claudio Cambra 2 | // SPDX-License-Identifier: GPL-3.0-or-later 3 | 4 | import QtQuick 2.15 5 | import QtQuick.Controls 2.15 as QQC2 6 | import org.kde.kalendar.components 1.0 7 | import org.kde.kalendar.mail 1.0 8 | 9 | QQC2.MenuBar { 10 | id: bar 11 | 12 | FileMenu {} 13 | 14 | EditMenu {} 15 | 16 | QQC2.Menu { 17 | title: i18nc("@action:menu", "View") 18 | 19 | KActionFromAction { 20 | action: MailApplication.action('open_kcommand_bar') 21 | } 22 | } 23 | 24 | QQC2.Menu { 25 | title: i18nc("@action:menu", "Create") 26 | 27 | KActionFromAction { 28 | action: MailApplication.action("create_mail") 29 | } 30 | } 31 | 32 | WindowMenu {} 33 | 34 | SettingsMenu { 35 | application: MailApplication 36 | } 37 | 38 | HelpMenu { 39 | application: MailApplication 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/mail/qml/mailboxselector/MailBoxListPage.qml: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2022 Devin Lin 2 | // SPDX-License-Identifier: LGPL-2.0-or-later 3 | 4 | import QtQuick 2.15 5 | import QtQuick.Controls 2.15 as QQC2 6 | import QtQuick.Layouts 1.15 7 | 8 | import Qt.labs.qmlmodels 1.0 9 | 10 | import org.kde.kirigami 2.15 as Kirigami 11 | import org.kde.kitemmodels 1.0 12 | import org.kde.raven 1.0 13 | 14 | Kirigami.ScrollablePage { 15 | id: root 16 | title: i18n("Mailboxes") 17 | 18 | MailBoxList {} 19 | } 20 | -------------------------------------------------------------------------------- /src/mail/qml/mailpartview/ErrorPart.qml: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2016 Michael Bohlender 2 | // SPDX-FileCopyrightText: 2017 Christian Mollekopf, 3 | // SPDX-FileCopyrightText: 2022 Carl Schwan 4 | // SPDX-License-Identifier: GPL-2.0-or-later 5 | 6 | import QtQuick 2.4 7 | 8 | Item { 9 | id: root 10 | property variant errorType 11 | property string errorString 12 | property string searchString 13 | property bool autoLoadImages: false 14 | height: partListView.height 15 | width: parent.width 16 | 17 | Column { 18 | id: partListView 19 | anchors { 20 | top: parent.top 21 | left: parent.left 22 | } 23 | width: parent.width 24 | spacing: 5 25 | Text { 26 | text: i18n("An error occurred: %1", errorString) 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/mail/qml/mailpartview/ICalPart.qml: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2019 Christian Mollekopf, 2 | // SPDX-FileCopyrightText: 2022 Carl Schwan 3 | // SPDX-License-Identifier: GPL-2.0-or-later 4 | 5 | import QtQuick 2.15 6 | import QtQuick.Controls 2.15 as QQC2 7 | import QtQuick.Layouts 1.15 8 | import QtQml.Models 2.2 9 | import org.kde.kalendar.mail 1.0 10 | import org.kde.kirigami 2.19 as Kirigami 11 | 12 | ColumnLayout { 13 | id: root 14 | 15 | property string content 16 | property bool autoLoadImages: false 17 | 18 | property string searchString 19 | property int contentHeight: childrenRect.height 20 | 21 | spacing: Kirigami.Units.smallSpacing 22 | 23 | Kirigami.InlineMessage { 24 | id: signedButton 25 | Layout.fillWidth: true 26 | Layout.maximumWidth: parent.width 27 | visible: true 28 | text: i18n("This mail contains an invitation") 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/mail/qml/mailpartview/MailPartView.qml: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2021 Carl Schwan 2 | // SPDX-FileCopyrightText: 2016 Michael Bohlender 3 | // SPDX-License-Identifier: GPL-2.0-or-later 4 | 5 | import QtQuick 2.15 6 | import QtQuick.Layouts 1.15 7 | import org.kde.kirigami 2.14 as Kirigami 8 | import QtQuick.Controls 2.15 as Controls 9 | import org.kde.kalendar.mail 1.0 10 | import org.kde.kitemmodels 1.0 as KItemModels 11 | 12 | ListView { 13 | id: root 14 | 15 | implicitHeight: root.count === 0 ? Kirigami.Units.gridUnit * 20 : contentHeight 16 | property var item 17 | property alias rootIndex: visualModel.rootIndex 18 | property alias searchString: visualModel.searchString 19 | property alias autoLoadImages: visualModel.autoLoadImages 20 | property var attachmentModel: messageParser.attachments 21 | 22 | interactive: false 23 | spacing: Kirigami.Units.smallSpacing 24 | model: MailPartModel { 25 | id: visualModel 26 | model: messageParser.parts 27 | } 28 | 29 | Kirigami.PlaceholderMessage { 30 | anchors.centerIn: parent 31 | visible: root.count === 0 32 | text: i18n("Loading mail...") 33 | icon.name: "mail-folder-inbox" 34 | } 35 | 36 | MessageParser { 37 | id: messageParser 38 | item: root.item 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/mail/resources.qrc: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | qml/app/main.qml 8 | qml/app/MenuBar.qml 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/mail/tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2022 Carl Schwan 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | 4 | include(${CMAKE_SOURCE_DIR}/cmake/modules/add_gpg_crypto_test.cmake) 5 | 6 | add_executable(cryptotest cryptotest.cpp) 7 | target_include_directories(cryptotest PRIVATE 8 | $ 9 | ${CMAKE_CURRENT_BINARY_DIR} 10 | ${GPGME_INCLUDE_DIRS} 11 | ) 12 | add_gpg_crypto_test(cryptotest cryptotest) 13 | target_link_libraries(cryptotest 14 | Qt::Test 15 | kalendar_mail_static 16 | ) 17 | -------------------------------------------------------------------------------- /src/mail/windowcrypto.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2022 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-2.0-or-later 3 | -------------------------------------------------------------------------------- /src/quick/akonadiquickplugin.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2022 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-2.0-or-later 3 | 4 | #pragma once 5 | 6 | #include 7 | 8 | class AkonadiQuickPlugin : public QQmlExtensionPlugin 9 | { 10 | Q_OBJECT 11 | Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") 12 | 13 | public: 14 | void registerTypes(const char *uri) override; 15 | }; -------------------------------------------------------------------------------- /src/quick/collection.cpp: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2022 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-2.0-or-later 3 | 4 | #include "collection.h" 5 | -------------------------------------------------------------------------------- /src/quick/mimetypes.cpp: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2022 Carl Schwan 2 | // SPDX-License-Identifier: LGPL-2.0-or-later 3 | 4 | #include "mimetypes.h" 5 | 6 | #include 7 | #include 8 | 9 | using namespace Akonadi::Quick; 10 | 11 | MimeTypes::MimeTypes(QObject *parent) 12 | : QObject(parent) 13 | { 14 | } 15 | 16 | QString MimeTypes::calendar() const 17 | { 18 | return QStringLiteral("application/x-vnd.akonadi.calendar.event"); 19 | } 20 | 21 | QString MimeTypes::todo() const 22 | { 23 | return QStringLiteral("application/x-vnd.akonadi.calendar.todo"); 24 | } 25 | 26 | QString MimeTypes::address() const 27 | { 28 | return KContacts::Addressee::mimeType(); 29 | } 30 | 31 | QString MimeTypes::contactGroup() const 32 | { 33 | return KContacts::ContactGroup::mimeType(); 34 | } 35 | 36 | QString MimeTypes::mail() const 37 | { 38 | return QStringLiteral("message/rfc822"); 39 | } 40 | -------------------------------------------------------------------------------- /src/quick/mimetypes.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2007-2009 Tobias Koenig 2 | // SPDX-FileCopyrightText: 2022 Carl Schwan 3 | // SPDX-License-Identifier: LGPL-2.0-or-later 4 | 5 | #pragma once 6 | 7 | #include 8 | namespace Akonadi 9 | { 10 | namespace Quick 11 | { 12 | class MimeTypes : public QObject 13 | { 14 | Q_OBJECT 15 | Q_PROPERTY(QString calendar READ calendar CONSTANT) 16 | Q_PROPERTY(QString todo READ todo CONSTANT) 17 | Q_PROPERTY(QString address READ address CONSTANT) 18 | Q_PROPERTY(QString contactGroup READ contactGroup CONSTANT) 19 | Q_PROPERTY(QString mail READ mail CONSTANT) 20 | 21 | public: 22 | MimeTypes(QObject *parent = nullptr); 23 | QString calendar() const; 24 | QString todo() const; 25 | QString address() const; 26 | QString contactGroup() const; 27 | QString mail() const; 28 | }; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/quick/tagmanager.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2021 Claudio Cambra 2 | // SPDX-License-Identifier: LGPL-2.1-or-later 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | class TagManager : public QObject 12 | { 13 | Q_OBJECT 14 | Q_PROPERTY(QSortFilterProxyModel *tagModel READ tagModel NOTIFY tagModelChanged) 15 | 16 | public: 17 | explicit TagManager(QObject *parent = nullptr); 18 | ~TagManager() override = default; 19 | 20 | QSortFilterProxyModel *tagModel(); 21 | Q_INVOKABLE void createTag(const QString &name); 22 | Q_INVOKABLE void renameTag(Akonadi::Tag tag, const QString &newName); 23 | Q_INVOKABLE void deleteTag(Akonadi::Tag tag); 24 | 25 | Q_SIGNALS: 26 | void tagModelChanged(); 27 | 28 | private: 29 | QSortFilterProxyModel *m_tagModel = nullptr; 30 | }; 31 | --------------------------------------------------------------------------------