summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Krause <[email protected]>2017-10-29 17:16:49 +0100
committerVolker Krause <[email protected]>2017-10-29 17:16:49 +0100
commitc138c8918e50fc071566696de6b5a875133ca1ae (patch)
tree58ad5bc5c1bdef541682ee1c789af76ccff3e2f2
parentab79317caa16a83bf9295b2debe9a20818b42b65 (diff)
Register the Apple Wallet pass mimetype
Silences runtime warnings while processing pkpass attachments.
-rw-r--r--CMakeLists.txt2
-rw-r--r--plugins/messageviewer/bodypartformatter/pkpass/CMakeLists.txt3
-rw-r--r--plugins/messageviewer/bodypartformatter/pkpass/application-vnd-apple-pkpass.xml8
3 files changed, 12 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5a65835..9ef5326 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -127,7 +127,7 @@ add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
# Extra package
find_package(Gpgmepp 1.8.0 CONFIG)
set_package_properties(Gpgmepp PROPERTIES DESCRIPTION "GpgME library" URL "http://www.gnupg.org" TYPE REQUIRED)
-
+find_package(SharedMimeInfo REQUIRED)
if (KDEPIMADDONS_BUILD_EXAMPLES)
add_subdirectory(examples)
diff --git a/plugins/messageviewer/bodypartformatter/pkpass/CMakeLists.txt b/plugins/messageviewer/bodypartformatter/pkpass/CMakeLists.txt
index 73e3718..02649c6 100644
--- a/plugins/messageviewer/bodypartformatter/pkpass/CMakeLists.txt
+++ b/plugins/messageviewer/bodypartformatter/pkpass/CMakeLists.txt
@@ -14,3 +14,6 @@ target_link_libraries(messageviewer_bodypartformatter_pkpass
Grantlee5::Templates
)
install(TARGETS messageviewer_bodypartformatter_pkpass DESTINATION ${KDE_INSTALL_PLUGINDIR}/messageviewer/bodypartformatter)
+
+install(FILES application-vnd-apple-pkpass.xml DESTINATION ${XDG_MIME_INSTALL_DIR})
+update_xdg_mimetypes(${XDG_MIME_INSTALL_DIR})
diff --git a/plugins/messageviewer/bodypartformatter/pkpass/application-vnd-apple-pkpass.xml b/plugins/messageviewer/bodypartformatter/pkpass/application-vnd-apple-pkpass.xml
new file mode 100644
index 0000000..1ddec1d
--- /dev/null
+++ b/plugins/messageviewer/bodypartformatter/pkpass/application-vnd-apple-pkpass.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
+ <mime-type type="application/vnd.apple.pkpass">
+ <sub-class-of type="application/zip"/>
+ <comment>Apple Wallet pass</comment>
+ <glob pattern="*.pkpass"/>
+ </mime-type>
+</mime-info>