Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package kdesu for openSUSE:Factory checked 
in at 2021-02-17 18:10:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kdesu (Old)
 and      /work/SRC/openSUSE:Factory/.kdesu.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kdesu"

Wed Feb 17 18:10:43 2021 rev:87 rq:871688 version:5.79.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/kdesu/kdesu.changes      2021-01-13 
18:17:29.305034454 +0100
+++ /work/SRC/openSUSE:Factory/.kdesu.new.28504/kdesu.changes   2021-02-17 
18:11:55.157959222 +0100
@@ -1,0 +2,9 @@
+Mon Feb  8 08:46:14 UTC 2021 - Christophe Giboudeaux <christo...@krop.fr>
+
+- Update to 5.79.0
+  * New feature release
+  * For more details please see:
+  * https://kde.org/announcements/kde-frameworks-5.79.0
+- No code change since 5.78.0
+
+-------------------------------------------------------------------

Old:
----
  kdesu-5.78.0.tar.xz
  kdesu-5.78.0.tar.xz.sig

New:
----
  kdesu-5.79.0.tar.xz
  kdesu-5.79.0.tar.xz.sig

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

Other differences:
------------------
++++++ kdesu.spec ++++++
--- /var/tmp/diff_new_pack.i1PLrh/_old  2021-02-17 18:11:55.813959759 +0100
+++ /var/tmp/diff_new_pack.i1PLrh/_new  2021-02-17 18:11:55.817959762 +0100
@@ -17,14 +17,14 @@
 
 
 %define lname   libKF5Su5
-%define _tar_path 5.78
+%define _tar_path 5.79
 # Full KF5 version (e.g. 5.33.0)
 %{!?_kf5_version: %global _kf5_version %{version}}
 # Last major and minor KF5 version (e.g. 5.33)
 %{!?_kf5_bugfix_version: %define _kf5_bugfix_version %(echo %{_kf5_version} | 
awk -F. '{print $1"."$2}')}
 %bcond_without lang
 Name:           kdesu
-Version:        5.78.0
+Version:        5.79.0
 Release:        0
 Summary:        User interface for running shell commands with root privileges
 License:        LGPL-2.1-or-later


++++++ kdesu-5.78.0.tar.xz -> kdesu-5.79.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdesu-5.78.0/.gitignore new/kdesu-5.79.0/.gitignore
--- old/kdesu-5.78.0/.gitignore 2021-01-02 14:13:01.000000000 +0100
+++ new/kdesu-5.79.0/.gitignore 2021-02-06 19:15:10.000000000 +0100
@@ -20,3 +20,4 @@
 CMakeLists.txt.user*
 *.unc-backup*
 .cmake/
+/.clang-format
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdesu-5.78.0/CMakeLists.txt 
new/kdesu-5.79.0/CMakeLists.txt
--- old/kdesu-5.78.0/CMakeLists.txt     2021-01-02 14:13:01.000000000 +0100
+++ new/kdesu-5.79.0/CMakeLists.txt     2021-02-06 19:15:10.000000000 +0100
@@ -1,11 +1,11 @@
 cmake_minimum_required(VERSION 3.5)
 
-set(KF5_VERSION "5.78.0") # handled by release scripts
-set(KF5_DEP_VERSION "5.78.0") # handled by release scripts
-project(KDESu VERSION ${KF5_VERSION})
+set(KF_VERSION "5.79.0") # handled by release scripts
+set(KF_DEP_VERSION "5.79.0") # handled by release scripts
+project(KDESu VERSION ${KF_VERSION})
 
 include(FeatureSummary)
-find_package(ECM 5.78.0  NO_MODULE)
+find_package(ECM 5.79.0  NO_MODULE)
 set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake 
Modules." URL "https://commits.kde.org/extra-cmake-modules";)
 feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND 
FATAL_ON_MISSING_REQUIRED_PACKAGES)
 
@@ -18,10 +18,10 @@
 include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
 include(KDECMakeSettings)
 
-find_package(KF5CoreAddons ${KF5_DEP_VERSION} REQUIRED)
-find_package(KF5I18n ${KF5_DEP_VERSION} REQUIRED)
-find_package(KF5Service ${KF5_DEP_VERSION} REQUIRED)
-find_package(KF5Pty ${KF5_DEP_VERSION} REQUIRED)
+find_package(KF5CoreAddons ${KF_DEP_VERSION} REQUIRED)
+find_package(KF5I18n ${KF_DEP_VERSION} REQUIRED)
+find_package(KF5Service ${KF_DEP_VERSION} REQUIRED)
+find_package(KF5Pty ${KF_DEP_VERSION} REQUIRED)
 
 #optional features
 find_package(X11)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdesu-5.78.0/KF5SuConfig.cmake.in 
new/kdesu-5.79.0/KF5SuConfig.cmake.in
--- old/kdesu-5.78.0/KF5SuConfig.cmake.in       2021-01-02 14:13:01.000000000 
+0100
+++ new/kdesu-5.79.0/KF5SuConfig.cmake.in       2021-02-06 19:15:10.000000000 
+0100
@@ -1,7 +1,7 @@
 @PACKAGE_INIT@
 
 include(CMakeFindDependencyMacro)
-find_dependency(KF5Pty "@KF5_DEP_VERSION@")
+find_dependency(KF5Pty "@KF_DEP_VERSION@")
 
 include("${CMAKE_CURRENT_LIST_DIR}/KF5SuTargets.cmake")
 @PACKAGE_INCLUDE_QCHTARGETS@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdesu-5.78.0/po/zh_CN/kdesud5.po 
new/kdesu-5.79.0/po/zh_CN/kdesud5.po
--- old/kdesu-5.78.0/po/zh_CN/kdesud5.po        2021-01-02 14:13:01.000000000 
+0100
+++ new/kdesu-5.79.0/po/zh_CN/kdesud5.po        2021-02-06 19:15:10.000000000 
+0100
@@ -7,7 +7,7 @@
 "Project-Id-Version: kdeorg\n"
 "Report-Msgid-Bugs-To: https://bugs.kde.org\n";
 "POT-Creation-Date: 2020-08-09 02:04+0200\n"
-"PO-Revision-Date: 2021-01-01 14:21\n"
+"PO-Revision-Date: 2021-02-04 11:58\n"
 "Last-Translator: \n"
 "Language-Team: Chinese Simplified\n"
 "Language: zh_CN\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdesu-5.78.0/src/CMakeLists.txt 
new/kdesu-5.79.0/src/CMakeLists.txt
--- old/kdesu-5.78.0/src/CMakeLists.txt 2021-01-02 14:13:01.000000000 +0100
+++ new/kdesu-5.79.0/src/CMakeLists.txt 2021-02-06 19:15:10.000000000 +0100
@@ -39,7 +39,7 @@
     EXPORT_FILE_NAME kdesu/kdesu_export.h
     BASE_NAME KDESu
     GROUP_BASE_NAME KF
-    VERSION ${KF5_VERSION}
+    VERSION ${KF_VERSION}
     DEPRECATED_BASE_VERSION 0
     DEPRECATION_VERSIONS 5.0
     EXCLUDE_DEPRECATED_BEFORE_AND_AT ${EXCLUDE_DEPRECATED_BEFORE_AND_AT}
@@ -113,7 +113,7 @@
         KF5Su_QCH
         NAME KDESu
         BASE_NAME KF5Su
-        VERSION ${KF5_VERSION}
+        VERSION ${KF_VERSION}
         ORG_DOMAIN org.kde
         SOURCES # using only public headers, to cover only public API
             ${KDESu_HEADERS}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdesu-5.78.0/src/client.cpp 
new/kdesu-5.79.0/src/client.cpp
--- old/kdesu-5.78.0/src/client.cpp     2021-01-02 14:13:01.000000000 +0100
+++ new/kdesu-5.79.0/src/client.cpp     2021-02-06 19:15:10.000000000 +0100
@@ -28,7 +28,7 @@
 namespace KDESu
 {
 
-class Q_DECL_HIDDEN KDEsuClient::KDEsuClientPrivate
+class KDEsuClientPrivate
 {
 public:
     KDEsuClientPrivate() : sockfd(-1) {}
@@ -73,7 +73,6 @@
     if (d->sockfd >= 0) {
         close(d->sockfd);
     }
-    delete d;
 }
 
 int KDEsuClient::connect()
@@ -376,7 +375,7 @@
 
 static QString findDaemon()
 {
-    QString daemon = QFile::decodeName(CMAKE_INSTALL_FULL_LIBEXECDIR_KF5 
"/kdesud");
+    QString daemon = QFile::decodeName(KDE_INSTALL_FULL_LIBEXECDIR_KF5 
"/kdesud");
     if (!QFile::exists(daemon)) { // if not in libexec, find it in PATH
         daemon = QStandardPaths::findExecutable(QStringLiteral("kdesud"));
         if (daemon.isEmpty()) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdesu-5.78.0/src/client.h 
new/kdesu-5.79.0/src/client.h
--- old/kdesu-5.78.0/src/client.h       2021-01-02 14:13:01.000000000 +0100
+++ new/kdesu-5.79.0/src/client.h       2021-02-06 19:15:10.000000000 +0100
@@ -14,6 +14,7 @@
 
 #include <QList>
 #include <QByteArray>
+#include <memory>
 
 #ifdef Q_OS_UNIX
 
@@ -193,8 +194,8 @@
     int command(const QByteArray &cmd, QByteArray *result = nullptr);
     QByteArray escape(const QByteArray &str);
 
-    class KDEsuClientPrivate;
-    KDEsuClientPrivate *const d;
+private:
+    std::unique_ptr<class KDEsuClientPrivate> const d;
 };
 
 } //END namespace KDESu
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdesu-5.78.0/src/config-kdesu.h.cmake 
new/kdesu-5.79.0/src/config-kdesu.h.cmake
--- old/kdesu-5.78.0/src/config-kdesu.h.cmake   2021-01-02 14:13:01.000000000 
+0100
+++ new/kdesu-5.79.0/src/config-kdesu.h.cmake   2021-02-06 19:15:10.000000000 
+0100
@@ -5,4 +5,4 @@
 #cmakedefine01 HAVE_INITGROUPS
 #cmakedefine01 HAVE_SYS_SELECT_H
 #define CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}"
-#define CMAKE_INSTALL_FULL_LIBEXECDIR_KF5 
"${CMAKE_INSTALL_FULL_LIBEXECDIR_KF5}"
+#define KDE_INSTALL_FULL_LIBEXECDIR_KF5 "${KDE_INSTALL_FULL_LIBEXECDIR_KF5}"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdesu-5.78.0/src/kcookie.cpp 
new/kdesu-5.79.0/src/kcookie.cpp
--- old/kdesu-5.78.0/src/kcookie.cpp    2021-01-02 14:13:01.000000000 +0100
+++ new/kdesu-5.79.0/src/kcookie.cpp    2021-02-06 19:15:10.000000000 +0100
@@ -23,7 +23,7 @@
 namespace KDESuPrivate
 {
 
-class KCookie::KCookiePrivate
+class KCookiePrivate
 {
 public:
     QByteArray display;
@@ -40,10 +40,7 @@
 #endif
 }
 
-KCookie::~KCookie()
-{
-    delete d;
-}
+KCookie::~KCookie() = default;
 
 QByteArray KCookie::display() const
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdesu-5.78.0/src/kcookie_p.h 
new/kdesu-5.79.0/src/kcookie_p.h
--- old/kdesu-5.78.0/src/kcookie_p.h    2021-01-02 14:13:01.000000000 +0100
+++ new/kdesu-5.79.0/src/kcookie_p.h    2021-02-06 19:15:10.000000000 +0100
@@ -12,6 +12,8 @@
 
 #include <config-kdesu.h>
 
+#include <memory>
+
 namespace KDESu
 {
 
@@ -48,8 +50,8 @@
 private:
     void getXCookie();
 
-    class KCookiePrivate;
-    KCookiePrivate *const d;
+private:
+    std::unique_ptr<class KCookiePrivate> const d;
 };
 
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdesu-5.78.0/src/kdesud/CMakeLists.txt 
new/kdesu-5.79.0/src/kdesud/CMakeLists.txt
--- old/kdesu-5.78.0/src/kdesud/CMakeLists.txt  2021-01-02 14:13:01.000000000 
+0100
+++ new/kdesu-5.79.0/src/kdesud/CMakeLists.txt  2021-02-06 19:15:10.000000000 
+0100
@@ -41,7 +41,7 @@
 
 install(TARGETS kdesud DESTINATION ${KDE_INSTALL_LIBEXECDIR_KF5})
 install(CODE "
-    set(KDESUD_PATH 
\"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBEXECDIR_KF5}/kdesud\")
+    set(KDESUD_PATH 
\"\$ENV{DESTDIR}${KDE_INSTALL_FULL_LIBEXECDIR_KF5}/kdesud\")
     execute_process(COMMAND sh -c \"chgrp nogroup '\${KDESUD_PATH}' && chmod 
g+s '\${KDESUD_PATH}'\")
 ")
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdesu-5.78.0/src/ptyprocess.cpp 
new/kdesu-5.79.0/src/ptyprocess.cpp
--- old/kdesu-5.78.0/src/ptyprocess.cpp 2021-01-02 14:13:01.000000000 +0100
+++ new/kdesu-5.79.0/src/ptyprocess.cpp 2021-02-06 19:15:10.000000000 +0100
@@ -11,6 +11,7 @@
 */
 
 #include "ptyprocess.h"
+#include "ptyprocess_p.h"
 #include "kcookie_p.h"
 
 #include <ksu_debug.h>
@@ -110,31 +111,22 @@
     return NotExited;
 }
 
-class Q_DECL_HIDDEN PtyProcess::PtyProcessPrivate
-{
-public:
-    PtyProcessPrivate() : pty(nullptr) {}
-    ~PtyProcessPrivate()
-    {
-        delete pty;
-    }
-    QList<QByteArray> env;
-    KPty *pty;
-    QByteArray inputBuffer;
-};
 
 PtyProcess::PtyProcess()
-    : d(new PtyProcessPrivate)
+    : PtyProcess(*new PtyProcessPrivate)
 {
-    m_terminal = false;
-    m_erase = false;
 }
 
-PtyProcess::~PtyProcess()
+
+PtyProcess::PtyProcess(PtyProcessPrivate &dd)
+    : d(&dd)
 {
-    delete d;
+    m_terminal = false;
+    m_erase = false;
 }
 
+PtyProcess::~PtyProcess() = default;
+
 int PtyProcess::init()
 {
     delete d->pty;
@@ -421,7 +413,7 @@
         }
 
         if (ret) {
-            forever {
+            for (;;) {
             QByteArray output = readAll(false);
                 if (output.isEmpty())
                 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdesu-5.78.0/src/ptyprocess.h 
new/kdesu-5.79.0/src/ptyprocess.h
--- old/kdesu-5.78.0/src/ptyprocess.h   2021-01-02 14:13:01.000000000 +0100
+++ new/kdesu-5.79.0/src/ptyprocess.h   2021-02-06 19:15:10.000000000 +0100
@@ -5,10 +5,11 @@
     SPDX-License-Identifier: GPL-2.0-only
 */
 
-#ifndef KDESUPROCESS_H
-#define KDESUPROCESS_H
+#ifndef KDESUPTYPROCESS_H
+#define KDESUPTYPROCESS_H
 
 #include <sys/types.h>
+#include <memory>
 
 #include <QByteRef>
 #include <QString>
@@ -22,6 +23,8 @@
 namespace KDESu
 {
 
+class PtyProcessPrivate;
+
 /** \class PtyProcess ptyprocess.h KDESu/PtyProcess
  * Synchronous communication with tty programs.
  *
@@ -178,10 +181,13 @@
     static int checkPidExited(pid_t pid);
 
 protected:
+    explicit PtyProcess(PtyProcessPrivate &dd);
+
     /** Standard hack to add virtual methods in a BC way. Unused. */
     virtual void virtual_hook(int id, void *data);
     QList<QByteArray> environment() const;
 
+    // KF6 TODO: move to PtyProcessPrivate
     bool m_erase;           /**< @see setErase() */
     bool m_terminal;        /**< Indicates running in a terminal, causes 
additional
                                   newlines to be printed after output. Set to 
@c false
@@ -194,10 +200,14 @@
     int init();
     int setupTTY();
 
-    class PtyProcessPrivate;
-    PtyProcessPrivate *const d;
+private:
+    friend class StubProcess;
+    friend class SshProcess;
+    friend class SuProcess;
+    std::unique_ptr<PtyProcessPrivate> const d;
+    // KF6 TODO: change private d to protected d_ptr, use normal 
Q_DECLARE_PRIVATE, remove friend
 };
 
 }
 
-#endif //KDESUPROCESS_H
+#endif //KDESUPTYPROCESS_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdesu-5.78.0/src/ptyprocess_p.h 
new/kdesu-5.79.0/src/ptyprocess_p.h
--- old/kdesu-5.78.0/src/ptyprocess_p.h 1970-01-01 01:00:00.000000000 +0100
+++ new/kdesu-5.79.0/src/ptyprocess_p.h 2021-02-06 19:15:10.000000000 +0100
@@ -0,0 +1,36 @@
+/*
+    This file is part of the KDE project, module kdesu.
+    SPDX-FileCopyrightText: 1999, 2000 Geert Jansen <jan...@kde.org>
+    SPDX-FileCopyrightText: 1997, 1998 Lars Doelle <lars.doe...@on-line.de>
+
+    SPDX-License-Identifier: GPL-2.0-only
+*/
+
+#ifndef KDESUPTYPROCESS_P_H
+#define KDESUPTYPROCESS_P_H
+
+#include <KPty>
+
+#include <QList>
+#include <QByteArray>
+
+namespace KDESu
+{
+
+class PtyProcessPrivate
+{
+public:
+    PtyProcessPrivate() {}
+    virtual ~PtyProcessPrivate()
+    {
+        delete pty;
+    }
+
+    QList<QByteArray> env;
+    KPty *pty = nullptr;
+    QByteArray inputBuffer;
+};
+
+}
+
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdesu-5.78.0/src/sshprocess.cpp 
new/kdesu-5.79.0/src/sshprocess.cpp
--- old/kdesu-5.78.0/src/sshprocess.cpp 2021-01-02 14:13:01.000000000 +0100
+++ new/kdesu-5.79.0/src/sshprocess.cpp 2021-02-06 19:15:10.000000000 +0100
@@ -8,6 +8,8 @@
 */
 
 #include "sshprocess.h"
+
+#include "stubprocess_p.h"
 #include "kcookie_p.h"
 #include <ksu_debug.h>
 
@@ -22,7 +24,7 @@
 
 using namespace KDESuPrivate;
 
-class Q_DECL_HIDDEN SshProcess::SshProcessPrivate
+class SshProcessPrivate : public StubProcessPrivate
 {
 public:
     SshProcessPrivate(const QByteArray &host)
@@ -36,25 +38,26 @@
 };
 
 SshProcess::SshProcess(const QByteArray &host, const QByteArray &user, const 
QByteArray &command)
-    : d(new SshProcessPrivate(host))
+    : StubProcess(*new SshProcessPrivate(host))
 {
     m_user = user;
     m_command = command;
     srand(time(nullptr));
 }
 
-SshProcess::~SshProcess()
-{
-    delete d;
-}
+SshProcess::~SshProcess() = default;
 
 void SshProcess::setHost(const QByteArray &host)
 {
+    Q_D(SshProcess);
+
     d->host = host;
 }
 
 void SshProcess::setStub(const QByteArray &stub)
 {
+    Q_D(SshProcess);
+
     d->stub = stub;
 }
 
@@ -70,6 +73,8 @@
 
 int SshProcess::exec(const char *password, int check)
 {
+    Q_D(SshProcess);
+
     if (check) {
         setTerminal(true);
     }
@@ -129,11 +134,15 @@
 
 QByteArray SshProcess::prompt() const
 {
+    Q_D(const SshProcess);
+
     return d->prompt;
 }
 
 QByteArray SshProcess::error() const
 {
+    Q_D(const SshProcess);
+
     return d->error;
 }
 
@@ -151,6 +160,8 @@
 */
 int SshProcess::converseSsh(const char *password, int check)
 {
+    Q_D(SshProcess);
+
     unsigned i, j, colon;
 
     QByteArray line;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdesu-5.78.0/src/sshprocess.h 
new/kdesu-5.79.0/src/sshprocess.h
--- old/kdesu-5.78.0/src/sshprocess.h   2021-01-02 14:13:01.000000000 +0100
+++ new/kdesu-5.79.0/src/sshprocess.h   2021-02-06 19:15:10.000000000 +0100
@@ -5,8 +5,8 @@
     SPDX-License-Identifier: GPL-2.0-only
 */
 
-#ifndef KDESUSSH_H
-#define KDESUSSH_H
+#ifndef KDESUSSHPROCESS_H
+#define KDESUSSHPROCESS_H
 
 #include "stubprocess.h"
 
@@ -15,6 +15,8 @@
 namespace KDESu
 {
 
+class SshProcessPrivate;
+
 /** \class SshProcess sshprocess.h KDESu/SshProcess
  * Executes a remote command, using ssh.
  */
@@ -74,10 +76,14 @@
 private:
     int converseSsh(const char *password, int check);
 
-    class SshProcessPrivate;
-    SshProcessPrivate *const d;
+private:
+    Q_DECLARE_PRIVATE_D(PtyProcess::d, SshProcess)
+#if KDESU_BUILD_DEPRECATED_SINCE(5, 79)
+    // Unused, kept for ABI compatibility
+    const void * __kdesu_d_do_not_use;
+#endif
 };
 
 }
 
-#endif //KDESUSSH_H
+#endif //KDESUSSHPROCESS_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdesu-5.78.0/src/stubprocess.cpp 
new/kdesu-5.79.0/src/stubprocess.cpp
--- old/kdesu-5.78.0/src/stubprocess.cpp        2021-01-02 14:13:01.000000000 
+0100
+++ new/kdesu-5.79.0/src/stubprocess.cpp        2021-02-06 19:15:10.000000000 
+0100
@@ -8,6 +8,7 @@
 */
 
 #include "stubprocess.h"
+#include "stubprocess_p.h"
 #include "kcookie_p.h"
 
 #include <ksu_debug.h>
@@ -24,7 +25,12 @@
 using namespace KDESuPrivate;
 
 StubProcess::StubProcess()
-    : d(nullptr)
+    : StubProcess(*new StubProcessPrivate)
+{
+}
+
+StubProcess::StubProcess(StubProcessPrivate &dd)
+    : PtyProcess(dd)
 {
     m_user = "root";
     m_scheduler = SchedNormal;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdesu-5.78.0/src/stubprocess.h 
new/kdesu-5.79.0/src/stubprocess.h
--- old/kdesu-5.78.0/src/stubprocess.h  2021-01-02 14:13:01.000000000 +0100
+++ new/kdesu-5.79.0/src/stubprocess.h  2021-02-06 19:15:10.000000000 +0100
@@ -5,8 +5,8 @@
     SPDX-License-Identifier: GPL-2.0-only
 */
 
-#ifndef KDESUSTUB_H
-#define KDESUSTUB_H
+#ifndef KDESUSTUBPROCESS_H
+#define KDESUSTUBPROCESS_H
 
 #include "ptyprocess.h"
 
@@ -22,6 +22,7 @@
 {
 class KCookie;
 }
+class StubProcessPrivate;
 
 /** \class StubProcess stubprocess.h KDESu/StubProcess
  * Chat with kdesu_stub.
@@ -90,6 +91,7 @@
      */
     virtual QByteArray displayAuth();
 
+    // KF6 TODO: move to StubProcessPrivate
     bool m_XOnly;
     int m_priority;
     int m_scheduler;
@@ -101,10 +103,17 @@
     QByteArray commaSeparatedList(const QList<QByteArray> &lst);
     void writeString(const QByteArray &str);
 
-    class StubProcessPrivate;
-    StubProcessPrivate *const d;
+protected:
+    explicit StubProcess(StubProcessPrivate &dd);
+
+private:
+    Q_DECLARE_PRIVATE_D(PtyProcess::d, StubProcess)
+#if KDESU_BUILD_DEPRECATED_SINCE(5, 79)
+    // Unused, kept for ABI compatibility
+    const void * __kdesu_d_do_not_use;
+#endif
 };
 
 }
 
-#endif // KDESUSTUB_H
+#endif // KDESUSTUBPROCESS_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdesu-5.78.0/src/stubprocess_p.h 
new/kdesu-5.79.0/src/stubprocess_p.h
--- old/kdesu-5.78.0/src/stubprocess_p.h        1970-01-01 01:00:00.000000000 
+0100
+++ new/kdesu-5.79.0/src/stubprocess_p.h        2021-02-06 19:15:10.000000000 
+0100
@@ -0,0 +1,22 @@
+/*
+    This file is part of the KDE project, module kdesu.
+    SPDX-FileCopyrightText: 1999, 2000 Geert Jansen <jan...@kde.org>
+
+    SPDX-License-Identifier: GPL-2.0-only
+*/
+
+#ifndef KDESUSTUBPROCESS_P_H
+#define KDESUSTUBPROCESS_P_H
+
+#include "ptyprocess_p.h"
+
+namespace KDESu
+{
+
+class StubProcessPrivate : public PtyProcessPrivate
+{
+};
+
+}
+
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdesu-5.78.0/src/suprocess.cpp 
new/kdesu-5.79.0/src/suprocess.cpp
--- old/kdesu-5.78.0/src/suprocess.cpp  2021-01-02 14:13:01.000000000 +0100
+++ new/kdesu-5.79.0/src/suprocess.cpp  2021-02-06 19:15:10.000000000 +0100
@@ -11,6 +11,8 @@
 */
 
 #include "suprocess.h"
+
+#include "stubprocess_p.h"
 #include "kcookie_p.h"
 #include <ksu_debug.h>
 
@@ -35,14 +37,14 @@
 {
 using namespace KDESuPrivate;
 
-class Q_DECL_HIDDEN SuProcess::SuProcessPrivate
+class SuProcessPrivate : public StubProcessPrivate
 {
 public:
     bool isPrivilegeEscalation() const;
     QString superUserCommand;
 };
 
-bool SuProcess::SuProcessPrivate::isPrivilegeEscalation() const
+bool SuProcessPrivate::isPrivilegeEscalation() const
 {
     return (superUserCommand == QLatin1String("sudo")
             || superUserCommand == QLatin1String("doas"));
@@ -50,8 +52,10 @@
 
 
 SuProcess::SuProcess(const QByteArray &user, const QByteArray &command)
-    : d(new SuProcessPrivate)
+    : StubProcess(*new SuProcessPrivate)
 {
+    Q_D(SuProcess);
+
     m_user = user;
     m_command = command;
 
@@ -65,18 +69,19 @@
     }
 }
 
-SuProcess::~SuProcess()
-{
-    delete d;
-}
+SuProcess::~SuProcess() = default;
 
 QString SuProcess::superUserCommand()
 {
+    Q_D(SuProcess);
+
     return d->superUserCommand;
 }
 
 bool SuProcess::useUsersOwnPassword()
 {
+    Q_D(SuProcess);
+
     if (d->isPrivilegeEscalation() && m_user == "root") {
         return true;
     }
@@ -100,6 +105,8 @@
 */
 int SuProcess::exec(const char *password, int check)
 {
+    Q_D(SuProcess);
+
     if (check) {
         setTerminal(true);
     }
@@ -127,7 +134,7 @@
     // Get the kdesu_stub and su command from a config file if set, used in 
test
     KSharedConfig::Ptr config = KSharedConfig::openConfig();
     KConfigGroup group(config, "super-user-command");
-    const QString defaultPath = 
QStringLiteral(CMAKE_INSTALL_FULL_LIBEXECDIR_KF5) + 
QStringLiteral("/kdesu_stub");
+    const QString defaultPath = 
QStringLiteral(KDE_INSTALL_FULL_LIBEXECDIR_KF5) + QStringLiteral("/kdesu_stub");
     const QString kdesuStubPath = group.readEntry("kdesu_stub_path", 
defaultPath);
     args += kdesuStubPath.toLocal8Bit();
     args += "-"; // krazy:exclude=doublequote_chars (QList, not QString)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdesu-5.78.0/src/suprocess.h 
new/kdesu-5.79.0/src/suprocess.h
--- old/kdesu-5.78.0/src/suprocess.h    2021-01-02 14:13:01.000000000 +0100
+++ new/kdesu-5.79.0/src/suprocess.h    2021-02-06 19:15:10.000000000 +0100
@@ -5,8 +5,8 @@
     SPDX-License-Identifier: GPL-2.0-only
 */
 
-#ifndef KDESUSU_H
-#define KDESUSU_H
+#ifndef KDESUSUPROCESS_H
+#define KDESUSUPROCESS_H
 
 #include <kdesu/kdesu_export.h>
 
@@ -15,6 +15,8 @@
 namespace KDESu
 {
 
+class SuProcessPrivate;
+
 /** \class SuProcess suprocess.h KDESu/SuProcess
  * Executes a command under elevated privileges, using su.
  */
@@ -79,10 +81,14 @@
 
     int converseSU(const char *password);
 
-    class SuProcessPrivate;
-    SuProcessPrivate *const d;
+private:
+    Q_DECLARE_PRIVATE_D(PtyProcess::d, SuProcess)
+#if KDESU_BUILD_DEPRECATED_SINCE(5, 79)
+    // Unused, kept for ABI compatibility
+    const void * __kdesu_d_do_not_use;
+#endif
 };
 
 }
 
-#endif //KDESUSU_H
+#endif //KDESUSUPROCESS_H

Reply via email to