[graphics/okular] /: PDF: Merge the certs settings page to the regular pdf settings page

Albert Astals Cid null at kde.org
Tue Dec 29 14:34:11 GMT 2020


Git commit 1f63f91dc4e121ad3defcda78ec0faa6f6dc6d52 by Albert Astals Cid.
Committed on 29/12/2020 at 13:34.
Pushed by aacid into branch 'master'.

PDF: Merge the certs settings page to the regular pdf settings page

M  +-    --    doc/config-pdf-digital-signatures.png
M  +3    -3    doc/index.docbook
M  +2    -8    generators/poppler/CMakeLists.txt
D  +0    -19   generators/poppler/conf/certsettings.kcfg
D  +0    -4    generators/poppler/conf/certsettings.kcfgc
D  +0    -94   generators/poppler/conf/certsettingswidget.ui
M  +11   -0    generators/poppler/conf/pdfsettings.kcfg
M  +113  -27   generators/poppler/conf/pdfsettingswidget.ui
M  +0    -1    generators/poppler/formfields.cpp
M  +5    -14   generators/poppler/generator_pdf.cpp
R  +28   -20   generators/poppler/pdfsettingswidget.cpp [from: generators/poppler/certificatetools.cpp - 066% similarity]
R  +8    -7    generators/poppler/pdfsettingswidget.h [from: generators/poppler/certificatetools.h - 071% similarity]

https://invent.kde.org/graphics/okular/commit/1f63f91dc4e121ad3defcda78ec0faa6f6dc6d52

diff --git a/doc/config-pdf-digital-signatures.png b/doc/config-pdf-digital-signatures.png
index 1efe5d889..37a68e598 100644
Binary files a/doc/config-pdf-digital-signatures.png and b/doc/config-pdf-digital-signatures.png differ
diff --git a/doc/index.docbook b/doc/index.docbook
index 5dacec5b3..2220914f9 100644
--- a/doc/index.docbook
+++ b/doc/index.docbook
@@ -486,7 +486,7 @@ Context menu actions like Rename Bookmarks etc.)
 						<listitem><para>The system-wide <filename>/etc/pki/nssdb</filename> certificate store.</para></listitem>
 						<listitem><para>The current user <filename>$HOME/.pki/nssdb</filename></para></listitem>
 					</itemizedlist>
-					If you want to use a custom certificate store you can do so by setting it in the <link linkend="config-pdf-digital-signatures">PDF Digital Signature Certificates</link> section of the <link linkend="configure-backends">Configure Backends...</link> dialog.
+					If you want to use a custom certificate store you can do so by setting it in the <link linkend="config-pdf-digital-signatures">&PDF; Backend Configuration</link> section of the <link linkend="configure-backends">Configure Backends...</link> dialog.
 				</para>
 				<note>
 					<para>
@@ -2463,8 +2463,7 @@ Context menu actions like Rename Bookmarks etc.)
 		</varlistentry>
 	      </variablelist>
 	    </para>
-	  </sect1>
-		<sect1 id="config-pdf-digital-signatures">
+		<sect2 id="config-pdf-digital-signatures">
 			<title>&PDF; Digital Signature Certificates</title>
 			<para>
 				<screenshot><mediaobject><imageobject><imagedata fileref="config-pdf-digital-signatures.png" format="PNG"/></imageobject></mediaobject></screenshot>
@@ -2473,6 +2472,7 @@ Context menu actions like Rename Bookmarks etc.)
 			<para>
 				It also lists the certificates available in the current Certificate Database (if any).
 			</para>
+		</sect2>
 	  </sect1>
 	</chapter>
 	<chapter id="configure">
diff --git a/generators/poppler/CMakeLists.txt b/generators/poppler/CMakeLists.txt
index 511ae67ea..88e2aca34 100644
--- a/generators/poppler/CMakeLists.txt
+++ b/generators/poppler/CMakeLists.txt
@@ -41,20 +41,14 @@ set(okularGenerator_poppler_PART_SRCS
    formfields.cpp
    annots.cpp
    pdfsignatureutils.cpp
+   pdfsettingswidget.cpp
 )
 
-if(HAVE_POPPLER_SIGNING)
-   set(okularGenerator_poppler_PART_SRCS
-       ${okularGenerator_poppler_PART_SRCS} certificatetools.cpp)
-endif()
-
 ki18n_wrap_ui(okularGenerator_poppler_PART_SRCS
    conf/pdfsettingswidget.ui
-   conf/certsettingswidget.ui
 )
 
-kconfig_add_kcfg_files(okularGenerator_poppler_PART_SRCS conf/pdfsettings.kcfgc )
-kconfig_add_kcfg_files(okularGenerator_poppler_PART_SRCS GENERATE_MOC conf/certsettings.kcfgc )
+kconfig_add_kcfg_files(okularGenerator_poppler_PART_SRCS GENERATE_MOC conf/pdfsettings.kcfgc )
 
 okular_add_generator(okularGenerator_poppler ${okularGenerator_poppler_PART_SRCS})
 
diff --git a/generators/poppler/conf/certsettings.kcfg b/generators/poppler/conf/certsettings.kcfg
deleted file mode 100644
index 26cc00ebb..000000000
--- a/generators/poppler/conf/certsettings.kcfg
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0"
-      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-      xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
-      http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
-    <kcfgfile name="okular-generator-popplercertsrc"/>
-    <signal name="useDefaultDBChanged" />
-    <signal name="dBCertificatePathChanged" />
-    <group name="Signatures" >
-      <entry key="UseDefaultDB" type="Bool">
-          <default>true</default>
-          <emit signal="useDefaultDBChanged" />
-      </entry>
-      <entry key="DBCertificatePath" type="String">
-          <emit signal="dBCertificatePathChanged" />
-      </entry>
-    </group>
-</kcfg>
-<!-- vim:set ts=4 -->
diff --git a/generators/poppler/conf/certsettings.kcfgc b/generators/poppler/conf/certsettings.kcfgc
deleted file mode 100644
index 5975c7842..000000000
--- a/generators/poppler/conf/certsettings.kcfgc
+++ /dev/null
@@ -1,4 +0,0 @@
-File=certsettings.kcfg
-ClassName=CertificateSettings
-Mutators=true
-Singleton=true
diff --git a/generators/poppler/conf/certsettingswidget.ui b/generators/poppler/conf/certsettingswidget.ui
deleted file mode 100644
index 4b9e1d201..000000000
--- a/generators/poppler/conf/certsettingswidget.ui
+++ /dev/null
@@ -1,94 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>DlgSignaturesBase</class>
- <widget class="QWidget" name="DlgSignaturesBase">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>675</width>
-    <height>225</height>
-   </rect>
-  </property>
-  <layout class="QVBoxLayout" name="verticalLayout_3">
-   <property name="leftMargin">
-    <number>0</number>
-   </property>
-   <property name="topMargin">
-    <number>0</number>
-   </property>
-   <property name="rightMargin">
-    <number>0</number>
-   </property>
-   <property name="bottomMargin">
-    <number>0</number>
-   </property>
-   <item>
-    <widget class="QGroupBox" name="DBGroupBox">
-     <property name="title">
-      <string>Certificate Database</string>
-     </property>
-     <layout class="QFormLayout" name="formLayout">
-      <property name="fieldGrowthPolicy">
-       <enum>QFormLayout::ExpandingFieldsGrow</enum>
-      </property>
-      <item row="0" column="0">
-       <widget class="QRadioButton" name="kcfg_UseDefaultDB">
-        <property name="text">
-         <string>Default:</string>
-        </property>
-       </widget>
-      </item>
-      <item row="1" column="0">
-       <widget class="QRadioButton" name="customRadioButton">
-        <property name="text">
-         <string>Custom:</string>
-        </property>
-       </widget>
-      </item>
-      <item row="0" column="1">
-       <widget class="QLabel" name="defaultLabel">
-        <property name="text">
-         <string notr="true"/>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </widget>
-   </item>
-   <item>
-    <widget class="QGroupBox" name="certificatesGroup">
-     <property name="title">
-      <string>Available Certificates</string>
-     </property>
-     <layout class="QVBoxLayout" name="certificatesPlaceholder"/>
-    </widget>
-   </item>
-   <item>
-    <widget class="QPushButton" name="loadSignaturesButton">
-     <property name="text">
-      <string>&Load Signatures</string>
-     </property>
-    </widget>
-   </item>
-   <item>
-    <spacer>
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeType">
-      <enum>QSizePolicy::Expanding</enum>
-     </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>20</width>
-       <height>4</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-  </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/generators/poppler/conf/pdfsettings.kcfg b/generators/poppler/conf/pdfsettings.kcfg
index 65ea82d8d..69204f630 100644
--- a/generators/poppler/conf/pdfsettings.kcfg
+++ b/generators/poppler/conf/pdfsettings.kcfg
@@ -4,6 +4,8 @@
       xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
       http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
     <kcfgfile name="okular-generator-popplerrc"/>
+    <signal name="useDefaultDBChanged" />
+    <signal name="dBCertificatePathChanged" />
     <group name="General">
         <entry key="EnhanceThinLines" type="Enum" >
             <default>No</default>
@@ -14,5 +16,14 @@
             </choices>
         </entry>
     </group>
+    <group name="Signatures" >
+      <entry key="UseDefaultCertDB" type="Bool">
+          <default>true</default>
+          <emit signal="useDefaultDBChanged" />
+      </entry>
+      <entry key="DBCertificatePath" type="String">
+          <emit signal="dBCertificatePathChanged" />
+      </entry>
+    </group>
 </kcfg>
 <!-- vim:set ts=4 -->
diff --git a/generators/poppler/conf/pdfsettingswidget.ui b/generators/poppler/conf/pdfsettingswidget.ui
index 488ad3099..c05f65967 100644
--- a/generators/poppler/conf/pdfsettingswidget.ui
+++ b/generators/poppler/conf/pdfsettingswidget.ui
@@ -1,40 +1,126 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <ui version="4.0">
- <class>PDFSettingsWidget</class>
- <widget class="QWidget" name="PDFSettingsWidget">
-  <layout class="QFormLayout" name="formLayout">
-   <property name="fieldGrowthPolicy">
-    <enum>QFormLayout::ExpandingFieldsGrow</enum>
-   </property>
-   <item row="0" column="0">
-    <widget class="QLabel" name="label">
-     <property name="text">
-      <string>Enhance thin lines:</string>
-     </property>
-     <property name="alignment">
-      <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
-     </property>
-    </widget>
-   </item>
-   <item row="0" column="1">
-    <widget class="KComboBox" name="kcfg_EnhanceThinLines">
+ <class>PDFSettingsWidgetBase</class>
+ <widget class="QWidget" name="PDFSettingsWidgetBase">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>721</width>
+    <height>431</height>
+   </rect>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <layout class="QHBoxLayout" name="horizontalLayout_2">
      <item>
-      <property name="text">
-       <string>No</string>
-      </property>
+      <widget class="QLabel" name="label">
+       <property name="text">
+        <string>Enhance thin lines:</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+       </property>
+      </widget>
      </item>
      <item>
-      <property name="text">
-       <string>Solid</string>
-      </property>
+      <widget class="KComboBox" name="kcfg_EnhanceThinLines">
+       <item>
+        <property name="text">
+         <string>No</string>
+        </property>
+       </item>
+       <item>
+        <property name="text">
+         <string>Solid</string>
+        </property>
+       </item>
+       <item>
+        <property name="text">
+         <string>Shape</string>
+        </property>
+       </item>
+      </widget>
      </item>
      <item>
-      <property name="text">
-       <string>Shape</string>
-      </property>
+      <spacer name="horizontalSpacer">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
      </item>
+    </layout>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="certDBGroupBox">
+     <property name="title">
+      <string>Certificate Database</string>
+     </property>
+     <layout class="QFormLayout" name="formLayout">
+      <property name="fieldGrowthPolicy">
+       <enum>QFormLayout::ExpandingFieldsGrow</enum>
+      </property>
+      <item row="0" column="0">
+       <widget class="QRadioButton" name="kcfg_UseDefaultCertDB">
+        <property name="text">
+         <string>Default:</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QRadioButton" name="customRadioButton">
+        <property name="text">
+         <string>Custom:</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QLabel" name="defaultLabel">
+        <property name="text">
+         <string notr="true"/>
+        </property>
+       </widget>
+      </item>
+     </layout>
     </widget>
    </item>
+   <item>
+    <widget class="QGroupBox" name="certificatesGroup">
+     <property name="title">
+      <string>Available Certificates</string>
+     </property>
+     <layout class="QVBoxLayout" name="certificatesPlaceholder"/>
+    </widget>
+   </item>
+   <item>
+    <widget class="QPushButton" name="loadSignaturesButton">
+     <property name="text">
+      <string>&Load Signatures</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <spacer>
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeType">
+      <enum>QSizePolicy::Expanding</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>4</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
   </layout>
  </widget>
  <customwidgets>
diff --git a/generators/poppler/formfields.cpp b/generators/poppler/formfields.cpp
index 62f135e2a..817d2cf0d 100644
--- a/generators/poppler/formfields.cpp
+++ b/generators/poppler/formfields.cpp
@@ -13,7 +13,6 @@
 
 #include "core/action.h"
 
-#include "certsettings.h"
 #include "pdfsignatureutils.h"
 
 #include <poppler-qt5.h>
diff --git a/generators/poppler/generator_pdf.cpp b/generators/poppler/generator_pdf.cpp
index d53f69884..c8e451521 100644
--- a/generators/poppler/generator_pdf.cpp
+++ b/generators/poppler/generator_pdf.cpp
@@ -52,10 +52,6 @@
 #include <core/utils.h>
 
 #include "pdfsettings.h"
-#include "ui_pdfsettingswidget.h"
-
-#include "certificatetools.h"
-#include "certsettings.h"
 
 #include <config-okular-poppler.h>
 
@@ -65,6 +61,7 @@
 #include "annots.h"
 #include "debug_pdf.h"
 #include "formfields.h"
+#include "pdfsettingswidget.h"
 #include "pdfsignatureutils.h"
 #include "popplerembeddedfile.h"
 
@@ -572,8 +569,8 @@ PDFGenerator::PDFGenerator(QObject *parent, const QVariantList &args)
     // so doing it all the time won't hurt either
     Poppler::setDebugErrorFunction(PDFGeneratorPopplerDebugFunction, QVariant());
 #ifdef HAVE_POPPLER_SIGNING
-    if (!CertificateSettings::useDefaultDB()) {
-        Poppler::setNSSDir(QUrl(CertificateSettings::dBCertificatePath()).toLocalFile());
+    if (!PDFSettings::useDefaultCertDB()) {
+        Poppler::setNSSDir(QUrl(PDFSettings::dBCertificatePath()).toLocalFile());
     }
 #endif
 }
@@ -1478,15 +1475,9 @@ bool PDFGenerator::reparseConfig()
 
 void PDFGenerator::addPages(KConfigDialog *dlg)
 {
-    Ui_PDFSettingsWidget pdfsw;
-    QWidget *w = new QWidget(dlg);
-    pdfsw.setupUi(w);
+    PDFSettingsWidget *w = new PDFSettingsWidget(dlg);
+    ;
     dlg->addPage(w, PDFSettings::self(), i18n("PDF"), QStringLiteral("application-pdf"), i18n("PDF Backend Configuration"));
-
-#ifdef HAVE_POPPLER_SIGNING
-    CertificateTools *certTools = new CertificateTools(dlg);
-    dlg->addPage(certTools, CertificateSettings::self(), i18n("PDF Certificates"), QStringLiteral("application-pkcs7-signature"), i18n("PDF Digital Signature Certificates"));
-#endif
 }
 
 bool PDFGenerator::setDocumentRenderHints()
diff --git a/generators/poppler/certificatetools.cpp b/generators/poppler/pdfsettingswidget.cpp
similarity index 66%
rename from generators/poppler/certificatetools.cpp
rename to generators/poppler/pdfsettingswidget.cpp
index c1607fb4a..93b6c6920 100644
--- a/generators/poppler/certificatetools.cpp
+++ b/generators/poppler/pdfsettingswidget.cpp
@@ -1,5 +1,6 @@
 /***************************************************************************
  *   Copyright (C) 2019 by Bubli <Katarina.Behrens at cib.de>                 *
+ *   Copyright (C) 2020 by Albert Astals Cid <albert.astals.cid at kdab.com>  *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -7,9 +8,9 @@
  *   (at your option) any later version.                                   *
  ***************************************************************************/
 
-#include "certificatetools.h"
+#include "pdfsettingswidget.h"
 
-#include "certsettings.h"
+#include "pdfsettings.h"
 #include "pdfsignatureutils.h"
 
 #include <KLocalizedString>
@@ -21,76 +22,83 @@
 #include <QTreeWidget>
 #include <QTreeWidgetItem>
 
-CertificateTools::CertificateTools(QWidget *parent)
+PDFSettingsWidget::PDFSettingsWidget(QWidget *parent)
     : QWidget(parent)
 {
+    m_pdfsw.setupUi(this);
+#ifdef HAVE_POPPLER_SIGNING
     if (Poppler::hasNSSSupport()) {
-        m_certsw.setupUi(this);
-        m_certsw.loadSignaturesButton->hide();
+        m_pdfsw.loadSignaturesButton->hide();
 
         KUrlRequester *pDlg = new KUrlRequester();
         pDlg->setObjectName(QStringLiteral("kcfg_DBCertificatePath"));
         pDlg->setMode(KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly);
         pDlg->setEnabled(false);
-        m_certsw.formLayout->setWidget(1, QFormLayout::FieldRole, pDlg);
+        m_pdfsw.formLayout->setWidget(1, QFormLayout::FieldRole, pDlg);
 
-        connect(m_certsw.customRadioButton, &QRadioButton::toggled, pDlg, &KUrlRequester::setEnabled);
+        connect(m_pdfsw.customRadioButton, &QRadioButton::toggled, pDlg, &KUrlRequester::setEnabled);
 
-        if (!CertificateSettings::useDefaultDB()) {
-            m_certsw.customRadioButton->setChecked(true);
-            m_certsw.defaultLabel->setVisible(false);
+        if (!PDFSettings::useDefaultCertDB()) {
+            m_pdfsw.customRadioButton->setChecked(true);
+            m_pdfsw.defaultLabel->setVisible(false);
         }
 
         m_tree = new QTreeWidget(this);
         m_tree->setHeaderLabels({i18nc("Name of the person to whom the cerficate was issued", "Issued to"), i18n("E-mail"), i18nc("Certificate expiration date", "Expiration date")});
         m_tree->setRootIsDecorated(false);
 
-        m_certsw.certificatesPlaceholder->addWidget(m_tree);
+        m_pdfsw.certificatesPlaceholder->addWidget(m_tree);
 
-        connect(CertificateSettings::self(), &CertificateSettings::useDefaultDBChanged, this, &CertificateTools::warnRestartNeeded);
-        connect(CertificateSettings::self(), &CertificateSettings::dBCertificatePathChanged, this, [this] {
-            if (!CertificateSettings::useDefaultDB()) {
+        connect(PDFSettings::self(), &PDFSettings::useDefaultDBChanged, this, &PDFSettingsWidget::warnRestartNeeded);
+        connect(PDFSettings::self(), &PDFSettings::dBCertificatePathChanged, this, [this] {
+            if (!PDFSettings::useDefaultCertDB()) {
                 warnRestartNeeded();
             }
         });
-        connect(m_certsw.loadSignaturesButton, &QPushButton::clicked, this, [this] {
+        connect(m_pdfsw.loadSignaturesButton, &QPushButton::clicked, this, [this] {
             m_certificatesAsked = false;
             update();
         });
     } else {
-        m_tree = nullptr;
         QHBoxLayout *lay = new QHBoxLayout(this);
         QLabel *l = new QLabel(i18n("You are using a Poppler library built without NSS support.\nAdding Digital Signatures isn't available for that reason"));
         l->setWordWrap(true);
         lay->addWidget(l);
     }
+#else
+    m_pdfsw.certDBGroupBox->hide();
+    m_pdfsw.certificatesGroup->hide();
+    m_pdfsw.loadSignaturesButton->hide();
+#endif
 }
 
-bool CertificateTools::event(QEvent *e)
+bool PDFSettingsWidget::event(QEvent *e)
 {
     if (m_tree && e->type() == QEvent::Paint && !m_certificatesAsked) {
         m_certificatesAsked = true;
 
+#ifdef HAVE_POPPLER_SIGNING
         PopplerCertificateStore st;
         bool userCancelled;
         const QList<Okular::CertificateInfo *> certs = st.signingCertificates(&userCancelled);
 
-        m_certsw.loadSignaturesButton->setVisible(userCancelled);
+        m_pdfsw.loadSignaturesButton->setVisible(userCancelled);
 
         for (auto cert : certs) {
             new QTreeWidgetItem(m_tree, {cert->subjectInfo(Okular::CertificateInfo::EntityInfoKey::CommonName), cert->subjectInfo(Okular::CertificateInfo::EntityInfoKey::EmailAddress), cert->validityEnd().toString("yyyy-MM-dd")});
         }
         qDeleteAll(certs);
 
-        m_certsw.defaultLabel->setText(Poppler::getNSSDir());
+        m_pdfsw.defaultLabel->setText(Poppler::getNSSDir());
 
         m_tree->resizeColumnToContents(1);
         m_tree->resizeColumnToContents(0);
+#endif
     }
     return QWidget::event(e);
 }
 
-void CertificateTools::warnRestartNeeded()
+void PDFSettingsWidget::warnRestartNeeded()
 {
     if (!m_warnedAboutRestart) {
         m_warnedAboutRestart = true;
diff --git a/generators/poppler/certificatetools.h b/generators/poppler/pdfsettingswidget.h
similarity index 71%
rename from generators/poppler/certificatetools.h
rename to generators/poppler/pdfsettingswidget.h
index ffc15efa8..4723e76ea 100644
--- a/generators/poppler/certificatetools.h
+++ b/generators/poppler/pdfsettingswidget.h
@@ -1,5 +1,6 @@
 /***************************************************************************
  *   Copyright (C) 2019 by Bubli <Katarina.Behrens at cib.de>                 *
+ *   Copyright (C) 2020 by Albert Astals Cid <albert.astals.cid at kdab.com>  *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -7,30 +8,30 @@
  *   (at your option) any later version.                                   *
  ***************************************************************************/
 
-#ifndef _CERTIFICATETOOLS_H_
-#define _CERTIFICATETOOLS_H_
+#ifndef PDFSETTINGSWIDGET_H
+#define PDFSETTINGSWIDGET_H
 
 #include <QWidget>
 
-#include "ui_certsettingswidget.h"
+#include "ui_pdfsettingswidget.h"
 
 class QTreeWidget;
 
-class CertificateTools : public QWidget
+class PDFSettingsWidget : public QWidget
 {
     Q_OBJECT
 
 public:
-    explicit CertificateTools(QWidget *parent = nullptr);
+    explicit PDFSettingsWidget(QWidget *parent = nullptr);
     bool event(QEvent *e) override;
 
 private:
     void warnRestartNeeded();
 
-    QTreeWidget *m_tree;
+    QTreeWidget *m_tree = nullptr;
     bool m_certificatesAsked = false;
     bool m_warnedAboutRestart = false;
-    Ui_DlgSignaturesBase m_certsw;
+    Ui_PDFSettingsWidgetBase m_pdfsw;
 };
 
 #endif


More information about the kde-doc-english mailing list