Make filters Calligra-aware

This commit is contained in:
Anton Thomasson 2021-04-18 09:28:33 +02:00
parent 0346a9cc13
commit 1b62c663c8
3 changed files with 65 additions and 40 deletions

View file

@ -22,43 +22,4 @@ GalleryFilterUnion {
value: ".PS"
}
GalleryEndsWithFilter {
property: "fileName"
value: ".odt"
}
GalleryEndsWithFilter {
property: "fileName"
value: ".doc"
}
GalleryEndsWithFilter {
property: "fileName"
value: ".docx"
}
GalleryEndsWithFilter {
property: "fileName"
value: ".rtf"
}
GalleryEndsWithFilter {
property: "fileName"
value: ".ODT"
}
GalleryEndsWithFilter {
property: "fileName"
value: ".DOC"
}
GalleryEndsWithFilter {
property: "fileName"
value: ".DOCX"
}
GalleryEndsWithFilter {
property: "fileName"
value: ".RTF"
}
}

View file

@ -0,0 +1,64 @@
import QtDocGallery 5.0
GalleryFilterUnion {
GalleryEndsWithFilter {
property: "fileName"
value: ".pdf"
}
GalleryEndsWithFilter {
property: "fileName"
value: ".ps"
}
GalleryEndsWithFilter {
property: "fileName"
value: ".PDF"
}
GalleryEndsWithFilter {
property: "fileName"
value: ".PS"
}
GalleryEndsWithFilter {
property: "fileName"
value: ".odt"
}
GalleryEndsWithFilter {
property: "fileName"
value: ".doc"
}
GalleryEndsWithFilter {
property: "fileName"
value: ".docx"
}
GalleryEndsWithFilter {
property: "fileName"
value: ".rtf"
}
GalleryEndsWithFilter {
property: "fileName"
value: ".ODT"
}
GalleryEndsWithFilter {
property: "fileName"
value: ".DOC"
}
GalleryEndsWithFilter {
property: "fileName"
value: ".DOCX"
}
GalleryEndsWithFilter {
property: "fileName"
value: ".RTF"
}
}

View file

@ -407,7 +407,7 @@ Page {
allowedOrientations: Orientation.All
Component.onCompleted: {
var thingy = Qt.createComponent("../components/DocumentFilter.notqml");
var thingy = Qt.createComponent(ConvertChecker.calligra ? "../components/DocumentFilterOffice.notqml" : "../components/DocumentFilter.notqml");
if (thingy.status == Component.Ready) {
_contentModel.contentFilter = thingy.createObject(this);
}