Hello community, here is the log from the commit of package qtkeychain-qt5 for openSUSE:Factory checked in at 2016-02-11 12:37:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/qtkeychain-qt5 (Old) and /work/SRC/openSUSE:Factory/.qtkeychain-qt5.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qtkeychain-qt5" Changes: -------- --- /work/SRC/openSUSE:Factory/qtkeychain-qt5/qtkeychain-qt5.changes 2014-11-14 09:18:56.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.qtkeychain-qt5.new/qtkeychain-qt5.changes 2016-02-11 12:37:48.000000000 +0100 @@ -1,0 +2,6 @@ +Tue Feb 9 08:14:18 UTC 2016 - [email protected] + +- Update to 0.5.0 + Added support for KWallet5 + +------------------------------------------------------------------- Old: ---- v0.4.0.tar.gz New: ---- v0.5.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qtkeychain-qt5.spec ++++++ --- /var/tmp/diff_new_pack.zOcbfC/_old 2016-02-11 12:37:49.000000000 +0100 +++ /var/tmp/diff_new_pack.zOcbfC/_new 2016-02-11 12:37:49.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package qtkeychain-qt5 # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %define lname libqt5keychain0 Name: qtkeychain-qt5 -Version: 0.4.0 +Version: 0.5.0 Release: 0 Summary: A cross platform password store library License: BSD-2-Clause ++++++ v0.4.0.tar.gz -> v0.5.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtkeychain-0.4.0/CMakeLists.txt new/qtkeychain-0.5.0/CMakeLists.txt --- old/qtkeychain-0.4.0/CMakeLists.txt 2014-09-01 10:12:47.000000000 +0200 +++ new/qtkeychain-0.5.0/CMakeLists.txt 2015-05-04 21:12:44.000000000 +0200 @@ -3,7 +3,7 @@ ### -set(QTKEYCHAIN_VERSION 0.4.0) +set(QTKEYCHAIN_VERSION 0.5.0) set(QTKEYCHAIN_SOVERSION 0) ### diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtkeychain-0.4.0/ChangeLog new/qtkeychain-0.5.0/ChangeLog --- old/qtkeychain-0.4.0/ChangeLog 2014-09-01 10:12:47.000000000 +0200 +++ new/qtkeychain-0.5.0/ChangeLog 2015-05-04 21:12:44.000000000 +0200 @@ -1,6 +1,9 @@ ChangeLog ========= +version 0.5.0 (release 2015-05-04) + * Added support for KWallet5 (KDE5/KF) + version 0.4.0 (release 2014-09-01) * KWallet: Handle case where no wallet exists yet (Liviu Cristian Mirea Ghiban <[email protected]>) * Improved desktop environment detection at runtime (Daniel Molkentin <[email protected]>) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtkeychain-0.4.0/keychain.cpp new/qtkeychain-0.5.0/keychain.cpp --- old/qtkeychain-0.4.0/keychain.cpp 2014-09-01 10:12:47.000000000 +0200 +++ new/qtkeychain-0.5.0/keychain.cpp 2015-05-04 21:12:44.000000000 +0200 @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (C) 2011-2014 Frank Osterfeld <[email protected]> * + * Copyright (C) 2011-2015 Frank Osterfeld <[email protected]> * * * * This program is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtkeychain-0.4.0/keychain.h new/qtkeychain-0.5.0/keychain.h --- old/qtkeychain-0.4.0/keychain.h 2014-09-01 10:12:47.000000000 +0200 +++ new/qtkeychain-0.5.0/keychain.h 2015-05-04 21:12:44.000000000 +0200 @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (C) 2011-2014 Frank Osterfeld <[email protected]> * + * Copyright (C) 2011-2015 Frank Osterfeld <[email protected]> * * * * This program is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtkeychain-0.4.0/keychain_mac.cpp new/qtkeychain-0.5.0/keychain_mac.cpp --- old/qtkeychain-0.4.0/keychain_mac.cpp 2014-09-01 10:12:47.000000000 +0200 +++ new/qtkeychain-0.5.0/keychain_mac.cpp 2015-05-04 21:12:44.000000000 +0200 @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (C) 2011-2014 Frank Osterfeld <[email protected]> * + * Copyright (C) 2011-2015 Frank Osterfeld <[email protected]> * * * * This program is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtkeychain-0.4.0/keychain_p.h new/qtkeychain-0.5.0/keychain_p.h --- old/qtkeychain-0.4.0/keychain_p.h 2014-09-01 10:12:47.000000000 +0200 +++ new/qtkeychain-0.5.0/keychain_p.h 2015-05-04 21:12:44.000000000 +0200 @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (C) 2011-2014 Frank Osterfeld <[email protected]> * + * Copyright (C) 2011-2015 Frank Osterfeld <[email protected]> * * * * This program is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtkeychain-0.4.0/keychain_unix.cpp new/qtkeychain-0.5.0/keychain_unix.cpp --- old/qtkeychain-0.4.0/keychain_unix.cpp 2014-09-01 10:12:47.000000000 +0200 +++ new/qtkeychain-0.5.0/keychain_unix.cpp 2015-05-04 21:12:44.000000000 +0200 @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (C) 2011-2014 Frank Osterfeld <[email protected]> * + * Copyright (C) 2011-2015 Frank Osterfeld <[email protected]> * * * * This program is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * @@ -27,12 +27,14 @@ enum KeyringBackend { Backend_GnomeKeyring, - Backend_Kwallet + Backend_Kwallet4, + Backend_Kwallet5 }; enum DesktopEnvironment { DesktopEnv_Gnome, DesktopEnv_Kde4, + DesktopEnv_Plasma5, DesktopEnv_Unity, DesktopEnv_Xfce, DesktopEnv_Other @@ -41,28 +43,33 @@ // the following detection algorithm is derived from chromium, // licensed under BSD, see base/nix/xdg_util.cc -static const char kKDE4SessionEnvVar[] = "KDE_SESSION_VERSION"; +static DesktopEnvironment getKdeVersion() { + QString value = qgetenv("KDE_SESSION_VERSION"); + if ( value == "5" ) { + return DesktopEnv_Plasma5; + } else if (value == "4" ) { + return DesktopEnv_Kde4; + } else { + // most likely KDE3 + return DesktopEnv_Other; + } +} static DesktopEnvironment detectDesktopEnvironment() { QByteArray xdgCurrentDesktop = qgetenv("XDG_CURRENT_DESKTOP"); if ( xdgCurrentDesktop == "GNOME" ) { return DesktopEnv_Gnome; } else if ( xdgCurrentDesktop == "Unity" ) { - return DesktopEnv_Unity; + return DesktopEnv_Unity; } else if ( xdgCurrentDesktop == "KDE" ) { - return DesktopEnv_Kde4; + return getKdeVersion(); } QByteArray desktopSession = qgetenv("DESKTOP_SESSION"); if ( desktopSession == "gnome" ) { return DesktopEnv_Gnome; } else if ( desktopSession == "kde" ) { - if ( qgetenv(kKDE4SessionEnvVar).isEmpty() ) { - // most likely KDE3 - return DesktopEnv_Other; - } else { - return DesktopEnv_Kde4; - } + return getKdeVersion(); } else if ( desktopSession == "kde4" ) { return DesktopEnv_Kde4; } else if ( desktopSession.contains("xfce") || desktopSession == "xubuntu" ) { @@ -72,12 +79,7 @@ if ( !qgetenv("GNOME_DESKTOP_SESSION_ID").isEmpty() ) { return DesktopEnv_Gnome; } else if ( !qgetenv("KDE_FULL_SESSION").isEmpty() ) { - if ( qgetenv(kKDE4SessionEnvVar).isEmpty() ) { - // most likely KDE3 - return DesktopEnv_Other; - } else { - return DesktopEnv_Kde4; - } + return getKdeVersion(); } return DesktopEnv_Other; @@ -87,7 +89,10 @@ { switch (detectDesktopEnvironment()) { case DesktopEnv_Kde4: - return Backend_Kwallet; + return Backend_Kwallet4; + break; + case DesktopEnv_Plasma5: + return Backend_Kwallet5; break; // fall through case DesktopEnv_Gnome: @@ -98,7 +103,7 @@ if ( GnomeKeyring::isAvailable() ) { return Backend_GnomeKeyring; } else { - return Backend_Kwallet; + return Backend_Kwallet4; } } @@ -110,6 +115,22 @@ return backend; } +static void kwalletReadPasswordScheduledStartImpl(const char * service, const char * path, ReadPasswordJobPrivate * priv) { + if ( QDBusConnection::sessionBus().isConnected() ) + { + priv->iface = new org::kde::KWallet( QLatin1String(service), QLatin1String(path), QDBusConnection::sessionBus(), priv ); + const QDBusPendingReply<QString> reply = priv->iface->networkWallet(); + QDBusPendingCallWatcher* watcher = new QDBusPendingCallWatcher( reply, priv ); + priv->connect( watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), priv, SLOT(kwalletWalletFound(QDBusPendingCallWatcher*)) ); + } + else + { + // D-Bus is not reachable so none can tell us something about KWalletd + QDBusError err( QDBusError::NoServer, ReadPasswordJobPrivate::tr("D-Bus is not running") ); + priv->fallbackOnError( err ); + } +} + void ReadPasswordJobPrivate::scheduledStart() { switch ( getKeyringBackend() ) { case Backend_GnomeKeyring: @@ -119,20 +140,11 @@ q->emitFinishedWithError( OtherError, tr("Unknown error") ); break; - case Backend_Kwallet: - if ( QDBusConnection::sessionBus().isConnected() ) - { - iface = new org::kde::KWallet( QLatin1String("org.kde.kwalletd"), QLatin1String("/modules/kwalletd"), QDBusConnection::sessionBus(), this ); - const QDBusPendingReply<QString> reply = iface->networkWallet(); - QDBusPendingCallWatcher* watcher = new QDBusPendingCallWatcher( reply, this ); - connect( watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), this, SLOT(kwalletWalletFound(QDBusPendingCallWatcher*)) ); - } - else - { - // D-Bus is not reachable so none can tell us something about KWalletd - QDBusError err( QDBusError::NoServer, tr("D-Bus is not running") ); - fallbackOnError( err ); - } + case Backend_Kwallet4: + kwalletReadPasswordScheduledStartImpl("org.kde.kwalletd", "/modules/kwalletd", this); + break; + case Backend_Kwallet5: + kwalletReadPasswordScheduledStartImpl("org.kde.kwalletd5", "/modules/kwalletd5", this); break; } } @@ -326,6 +338,22 @@ q->emitFinished(); } +static void kwalletWritePasswordScheduledStart( const char * service, const char * path, WritePasswordJobPrivate * priv ) { + if ( QDBusConnection::sessionBus().isConnected() ) + { + priv->iface = new org::kde::KWallet( QLatin1String(service), QLatin1String(path), QDBusConnection::sessionBus(), priv ); + const QDBusPendingReply<QString> reply = priv->iface->networkWallet(); + QDBusPendingCallWatcher* watcher = new QDBusPendingCallWatcher( reply, priv ); + priv->connect( watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), priv, SLOT(kwalletWalletFound(QDBusPendingCallWatcher*)) ); + } + else + { + // D-Bus is not reachable so none can tell us something about KWalletd + QDBusError err( QDBusError::NoServer, WritePasswordJobPrivate::tr("D-Bus is not running") ); + priv->fallbackOnError( err ); + } +} + void WritePasswordJobPrivate::scheduledStart() { switch ( getKeyringBackend() ) { case Backend_GnomeKeyring: @@ -345,20 +373,12 @@ } break; - case Backend_Kwallet: - if ( QDBusConnection::sessionBus().isConnected() ) - { - iface = new org::kde::KWallet( QLatin1String("org.kde.kwalletd"), QLatin1String("/modules/kwalletd"), QDBusConnection::sessionBus(), this ); - const QDBusPendingReply<QString> reply = iface->networkWallet(); - QDBusPendingCallWatcher* watcher = new QDBusPendingCallWatcher( reply, this ); - connect( watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), this, SLOT(kwalletWalletFound(QDBusPendingCallWatcher*)) ); - } - else - { - // D-Bus is not reachable so none can tell us something about KWalletd - QDBusError err( QDBusError::NoServer, tr("D-Bus is not running") ); - fallbackOnError( err ); - } + case Backend_Kwallet4: + kwalletWritePasswordScheduledStart("org.kde.kwalletd", "/modules/kwalletd", this); + break; + case Backend_Kwallet5: + kwalletWritePasswordScheduledStart("org.kde.kwalletd5", "/modules/kwalletd5", this); + break; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtkeychain-0.4.0/keychain_win.cpp new/qtkeychain-0.5.0/keychain_win.cpp --- old/qtkeychain-0.4.0/keychain_win.cpp 2014-09-01 10:12:47.000000000 +0200 +++ new/qtkeychain-0.5.0/keychain_win.cpp 2015-05-04 21:12:44.000000000 +0200 @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (C) 2011-2014 Frank Osterfeld <[email protected]> * + * Copyright (C) 2011-2015 Frank Osterfeld <[email protected]> * * * * This program is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtkeychain-0.4.0/testclient.cpp new/qtkeychain-0.5.0/testclient.cpp --- old/qtkeychain-0.4.0/testclient.cpp 2014-09-01 10:12:47.000000000 +0200 +++ new/qtkeychain-0.5.0/testclient.cpp 2015-05-04 21:12:44.000000000 +0200 @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (C) 2011-2014 Frank Osterfeld <[email protected]> * + * Copyright (C) 2011-2015 Frank Osterfeld <[email protected]> * * * * This program is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
