Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package okular for openSUSE:Factory checked 
in at 2023-11-02 20:20:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/okular (Old)
 and      /work/SRC/openSUSE:Factory/.okular.new.17445 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "okular"

Thu Nov  2 20:20:18 2023 rev:167 rq:1122748 version:23.08.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/okular/okular.changes    2023-10-12 
23:41:57.264561499 +0200
+++ /work/SRC/openSUSE:Factory/.okular.new.17445/okular.changes 2023-11-02 
20:20:22.105403865 +0100
@@ -1,0 +2,9 @@
+Mon Oct 30 13:27:08 UTC 2023 - Antonio Larrosa <alarr...@suse.com>
+
+- Rework patch that informs the user about missing postscript
+  support and how to install it. Replace patch:
+  * 0001-Inform-users-about-the-okular-spectre-package-in-the.patch
+  with
+  * 0001-Inform-users-about-the-okular-spectre-package.patch
+
+-------------------------------------------------------------------

Old:
----
  0001-Inform-users-about-the-okular-spectre-package-in-the.patch

New:
----
  0001-Inform-users-about-the-okular-spectre-package.patch

BETA DEBUG BEGIN:
  Old:  support and how to install it. Replace patch:
  * 0001-Inform-users-about-the-okular-spectre-package-in-the.patch
  with
BETA DEBUG END:

BETA DEBUG BEGIN:
  New:  with
  * 0001-Inform-users-about-the-okular-spectre-package.patch
BETA DEBUG END:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ okular.spec ++++++
--- /var/tmp/diff_new_pack.UdYch8/_old  2023-11-02 20:20:22.881432420 +0100
+++ /var/tmp/diff_new_pack.UdYch8/_new  2023-11-02 20:20:22.881432420 +0100
@@ -29,11 +29,8 @@
 Source1:        
https://download.kde.org/stable/release-service/%{version}/src/%{name}-%{version}.tar.xz.sig
 Source2:        applications.keyring
 %endif
-%if 0
 # PATCH-FEATURE-OPENSUSE
-# PATCH-NEEDS-REBASE DISABLED as of 2021-04-10: needs rework (underlying code 
changed)
-Patch1000:      0001-Inform-users-about-the-okular-spectre-package-in-the.patch
-%endif
+Patch1000:      0001-Inform-users-about-the-okular-spectre-package.patch
 BuildRequires:  chmlib-devel
 BuildRequires:  extra-cmake-modules
 BuildRequires:  freetype2-devel

++++++ 0001-Inform-users-about-the-okular-spectre-package-in-the.patch -> 
0001-Inform-users-about-the-okular-spectre-package.patch ++++++
--- 
/work/SRC/openSUSE:Factory/okular/0001-Inform-users-about-the-okular-spectre-package-in-the.patch
   2021-08-19 13:06:40.939980801 +0200
+++ 
/work/SRC/openSUSE:Factory/.okular.new.17445/0001-Inform-users-about-the-okular-spectre-package.patch
       2023-11-02 20:20:22.053401952 +0100
@@ -1,30 +1,30 @@
-From e0e5a2f668941c03421fb0ce36e881b927a634df Mon Sep 17 00:00:00 2001
-From: Fabian Vogt <fab...@ritter-vogt.de>
-Date: Wed, 16 Sep 2020 16:29:53 +0200
-Subject: [PATCH] Inform users about the okular-spectre package in the print
- preview
+From: Antonio Larrosa <alarr...@suse.com>
+Date: Mon, 30 Oct 2023 11:29:53 +0100
+Subject: [PATCH] Inform users about the okular-spectre package
 
----
- ui/fileprinterpreview.cpp | 6 ++++++
- 1 file changed, 6 insertions(+)
+Show a message box informing the user that postscript support isn't
+installed by default because of security reasons and what package
+should be installed in order to let print preview and postscript
+support work correctly.
 
-diff --git a/ui/fileprinterpreview.cpp b/ui/fileprinterpreview.cpp
-index 6bac0cc8c..b06046d6d 100644
---- a/part/fileprinterpreview.cpp
-+++ b/part/fileprinterpreview.cpp
-@@ -92,6 +92,12 @@ void FilePrinterPreviewPrivate::getPart()
-     }
- 
-     KService::List::ConstIterator it = offers.constBegin();
-+    if (filename.endsWith(QStringLiteral(".ps")) && it == offers.constEnd()) {
-+        failMessage = new QLabel(i18n("Ghostscript is needed for the print 
preview, but it has security issues and is not installed by default.\n"
-+                                      "If you only open trusted documents, 
you can install the 'okular-spectre' package."), q);
-+        return;
+Index: okular-23.08.2/part/part.cpp
+===================================================================
+--- okular-23.08.2.orig/part/part.cpp
++++ okular-23.08.2/part/part.cpp
+@@ -1594,6 +1594,16 @@ bool Part::openFile()
+     QMimeType mime;
+     Document::OpenResult openResult = Document::OpenError;
+     bool isCompressedFile = false;
++
++    if (!mimes.isEmpty() && 
mimes[0].inherits(QStringLiteral("application/postscript"))
++      && 
!m_document->supportedMimeTypes().contains(QStringLiteral("application/postscript")))
 {
++        KMessageBox::information(widget(),
++                                 i18n("Ghostscript is needed for the print 
preview and postscript support but it has security issues and is not installed 
by default.\n"
++                                      "If you only open trusted documents, 
you can install the 'okular-spectre' package."),
++                                 i18n("Postscript support package isn't 
installed"));
++      return false;
 +    }
 +
-     while (!factory && it != offers.constEnd()) {
-         KPluginLoader loader(**it);
-         factory = loader.factory();
--- 
-2.25.1
-
+     while (!mimes.isEmpty() && openResult == Document::OpenError) {
+         mime = mimes.takeFirst();
+         openResult = doOpenFile(mime, fileNameToOpen, &isCompressedFile);

Reply via email to