diff --git a/qml/components/DocumentFilter.notqml b/qml/components/DocumentFilter.notqml index 302fd8c..91d30be 100644 --- a/qml/components/DocumentFilter.notqml +++ b/qml/components/DocumentFilter.notqml @@ -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" - } } diff --git a/qml/components/DocumentFilterOffice.notqml b/qml/components/DocumentFilterOffice.notqml new file mode 100644 index 0000000..302fd8c --- /dev/null +++ b/qml/components/DocumentFilterOffice.notqml @@ -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" + } +} diff --git a/qml/pages/FirstPage.qml b/qml/pages/FirstPage.qml index dd7fd48..76f812f 100644 --- a/qml/pages/FirstPage.qml +++ b/qml/pages/FirstPage.qml @@ -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); }