Hello community, here is the log from the commit of package knotifications for openSUSE:Factory checked in at 2015-01-29 12:51:40 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/knotifications (Old) and /work/SRC/openSUSE:Factory/.knotifications.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "knotifications" Changes: -------- --- /work/SRC/openSUSE:Factory/knotifications/knotifications.changes 2014-12-21 11:58:26.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.knotifications.new/knotifications.changes 2015-01-29 12:51:41.000000000 +0100 @@ -1,0 +2,10 @@ +Sat Jan 3 18:03:22 UTC 2015 - [email protected] + +- Update to 5.6.0 + * Remove NotifyBySound. NotifyByAudio implements the "Sound" + notification already + * Fix crash accessing dangling pointer in NotifyByPopup + * For more details please see: + https://www.kde.org/announcements/kde-frameworks-5.6.0.php + +------------------------------------------------------------------- Old: ---- knotifications-5.5.0.tar.xz New: ---- knotifications-5.6.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ knotifications.spec ++++++ --- /var/tmp/diff_new_pack.Z3XETQ/_old 2015-01-29 12:51:42.000000000 +0100 +++ /var/tmp/diff_new_pack.Z3XETQ/_new 2015-01-29 12:51:42.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package knotifications # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products 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,11 +18,11 @@ %define lname libKF5Notifications5 Name: knotifications -Version: 5.5.0 +Version: 5.6.0 Release: 0 %define kf5_version %{version} BuildRequires: cmake >= 2.8.12 -BuildRequires: extra-cmake-modules >= 1.5.0 +BuildRequires: extra-cmake-modules >= 1.6.0 BuildRequires: fdupes BuildRequires: kcodecs-devel >= %{kf5_version} BuildRequires: kconfig-devel >= %{kf5_version} @@ -43,7 +43,7 @@ License: LGPL-2.1+ Group: System/GUI/KDE Url: http://www.kde.org -Source: http://download.kde.org/stable/frameworks/5.5/%{name}-%{version}.tar.xz +Source: http://download.kde.org/stable/frameworks/5.6/%{name}-%{version}.tar.xz Source1: baselibs.conf BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ knotifications-5.5.0.tar.xz -> knotifications-5.6.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.5.0/CMakeLists.txt new/knotifications-5.6.0/CMakeLists.txt --- old/knotifications-5.5.0/CMakeLists.txt 2014-12-06 13:42:22.000000000 +0100 +++ new/knotifications-5.6.0/CMakeLists.txt 2015-01-03 13:11:34.000000000 +0100 @@ -3,7 +3,7 @@ project(KNotifications) # ECM setup -find_package(ECM 1.5.0 REQUIRED NO_MODULE) +find_package(ECM 1.6.0 REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) include(FeatureSummary) @@ -13,8 +13,8 @@ include(ECMPoQmTools) -set(KF5_VERSION "5.5.0") # handled by release scripts -set(KF5_DEP_VERSION "5.5.0") # handled by release scripts +set(KF5_VERSION "5.6.0") # handled by release scripts +set(KF5_DEP_VERSION "5.6.0") # handled by release scripts ecm_setup_version(${KF5_VERSION} VARIABLE_PREFIX KNOTIFICATIONS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.5.0/po/ca/knotifications5_qt.po new/knotifications-5.6.0/po/ca/knotifications5_qt.po --- old/knotifications-5.5.0/po/ca/knotifications5_qt.po 2014-12-06 13:42:22.000000000 +0100 +++ new/knotifications-5.6.0/po/ca/knotifications5_qt.po 2015-01-03 13:11:34.000000000 +0100 @@ -4,7 +4,7 @@ # version 3 or later versions approved by the membership of KDE e.V. # # Sebastià Pla i Sanz <[email protected]>, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007. -# Antoni Bella Pérez <[email protected]>, 2003, 2006, 2011, 2012, 2013, 2014. +# Antoni Bella Pérez <[email protected]>, 2003, 2006, 2011, 2012, 2013, 2014. # Albert Astals Cid <[email protected]>, 2004, 2005, 2007. # Josep Ma. Ferrer <[email protected]>, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014. # Robert Millan <[email protected]>, 2009. @@ -15,7 +15,7 @@ "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2014-03-23 01:50+0000\n" "PO-Revision-Date: 2014-08-08 15:00+0200\n" -"Last-Translator: Antoni Bella Pérez <[email protected]>\n" +"Last-Translator: Antoni Bella Pérez <[email protected]>\n" "Language-Team: Catalan <[email protected]>\n" "Language: ca\n" "MIME-Version: 1.0\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.5.0/po/fi/knotifications5_qt.po new/knotifications-5.6.0/po/fi/knotifications5_qt.po --- old/knotifications-5.5.0/po/fi/knotifications5_qt.po 2014-12-06 13:42:22.000000000 +0100 +++ new/knotifications-5.6.0/po/fi/knotifications5_qt.po 2015-01-03 13:11:34.000000000 +0100 @@ -14,7 +14,7 @@ # Tommi Nieminen <[email protected]>, 2009, 2010, 2011. # Tommi Nieminen <[email protected]>, 2009. # Jorma Karvonen <[email protected]>, 2010. -# Lasse Liehu <[email protected]>, 2006, 2010, 2011, 2012, 2013, 2014. +# Lasse Liehu <[email protected]>, 2006, 2010, 2011, 2012, 2013, 2014, 2015. # # KDE Finnish translation sprint participants: # Author: Artnay @@ -29,7 +29,7 @@ "POT-Creation-Date: 2014-03-23 01:50+0000\n" "PO-Revision-Date: 2014-03-30 00:13+0200\n" "Last-Translator: Lasse Liehu <[email protected]>\n" -"Language-Team: Finnish <[email protected]>\n" +"Language-Team: Finnish <[email protected]>\n" "Language: fi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.5.0/po/gd/knotifications5_qt.po new/knotifications-5.6.0/po/gd/knotifications5_qt.po --- old/knotifications-5.5.0/po/gd/knotifications5_qt.po 1970-01-01 01:00:00.000000000 +0100 +++ new/knotifications-5.6.0/po/gd/knotifications5_qt.po 2015-01-03 13:11:34.000000000 +0100 @@ -0,0 +1,45 @@ +# GunChleoc <[email protected]>, 2014. +msgid "" +msgstr "" +"PO-Revision-Date: 2014-12-09 12:26+0100\n" +"Last-Translator: GunChleoc <[email protected]>\n" +"Language-Team: Fòram na Gàidhlig\n" +"Language: gd\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : " +"(n > 2 && n < 20) ? 2 : 3;\n" +"X-Generator: Virtaal 0.7.1\n" +"X-Qt-Contexts: true\n" + +#: knotificationrestrictions.cpp:184 +msgctxt "KNotificationRestrictions|" +msgid "Unknown Application" +msgstr "Aplacaid nach aithne dhuinn" + +#: kstatusnotifieritem.cpp:459 kstatusnotifieritem.cpp:899 +msgctxt "KStatusNotifierItem|" +msgid "&Minimize" +msgstr "&Fìor-lùghdaich" + +#: kstatusnotifieritem.cpp:724 +msgctxt "KStatusNotifierItem|" +msgid "Quit" +msgstr "Fàg an-seo" + +#: kstatusnotifieritem.cpp:897 +msgctxt "KStatusNotifierItem|" +msgid "&Restore" +msgstr "&Aisig" + +#: kstatusnotifieritem.cpp:911 +#, qt-format +msgctxt "KStatusNotifierItem|" +msgid "<qt>Are you sure you want to quit <b>%1</b>?</qt>" +msgstr "<qt>A bheil thu cinnteach gu bheil thu airson <b>%1</b> fhàgail?</qt>" + +#: kstatusnotifieritem.cpp:914 +msgctxt "KStatusNotifierItem|" +msgid "Confirm Quit From System Tray" +msgstr "Dearbhaich fàgail o threidhe an t-siostaim" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.5.0/po/ko/knotifications5_qt.po new/knotifications-5.6.0/po/ko/knotifications5_qt.po --- old/knotifications-5.5.0/po/ko/knotifications5_qt.po 2014-12-06 13:42:22.000000000 +0100 +++ new/knotifications-5.6.0/po/ko/knotifications5_qt.po 2015-01-03 13:11:34.000000000 +0100 @@ -18,7 +18,6 @@ "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" "X-Generator: Lokalize 1.5\n" -"X-Qt-Contexts: true\n" #: knotificationrestrictions.cpp:184 msgctxt "KNotificationRestrictions|" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.5.0/src/knotificationmanager.cpp new/knotifications-5.6.0/src/knotificationmanager.cpp --- old/knotifications-5.5.0/src/knotificationmanager.cpp 2014-12-06 13:42:22.000000000 +0100 +++ new/knotifications-5.6.0/src/knotificationmanager.cpp 2015-01-03 13:11:34.000000000 +0100 @@ -66,9 +66,8 @@ qDeleteAll(d->notifyPlugins); d->notifyPlugins.clear(); addPlugin(new NotifyByPopup(this)); - //FIXME: port and reenable -// addPlugin(new NotifyBySound(this)); addPlugin(new NotifyByExecute(this)); + //FIXME: port and reenable // addPlugin(new NotifyByLogfile(this)); addPlugin(new NotifyByAudio(this)); //TODO reactivate on Mac/Win when KWindowSystem::demandAttention will implemented on this system. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.5.0/src/notifybypopup.cpp new/knotifications-5.6.0/src/notifybypopup.cpp --- old/knotifications-5.5.0/src/notifybypopup.cpp 2014-12-06 13:42:22.000000000 +0100 +++ new/knotifications-5.6.0/src/notifybypopup.cpp 2015-01-03 13:11:34.000000000 +0100 @@ -154,7 +154,7 @@ //--------------------------------------------------------------------------------------- -NotifyByPopup::NotifyByPopup(QObject *parent) +NotifyByPopup::NotifyByPopup(QObject *parent) : KNotificationPlugin(parent), d(new NotifyByPopupPrivate(this)) { @@ -652,7 +652,8 @@ QDBusPendingCall notificationCall = QDBusConnection::sessionBus().asyncCall(dbusNotificationMessage, -1); - QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(notificationCall, q); + //parent is set to the notification so that no-one ever accesses a dangling pointer on the notificationObject property + QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(notificationCall, notification); watcher->setProperty("notificationObject", QVariant::fromValue<KNotification*>(notification)); QObject::connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.5.0/src/notifybysound.cpp new/knotifications-5.6.0/src/notifybysound.cpp --- old/knotifications-5.5.0/src/notifybysound.cpp 2014-12-06 13:42:22.000000000 +0100 +++ new/knotifications-5.6.0/src/notifybysound.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,326 +0,0 @@ -/* - Copyright (c) 1997 Christian Esken ([email protected]) - 2000 Charles Samuels ([email protected]) - 2000 Stefan Schimanski ([email protected]) - 2000 Matthias Ettrich ([email protected]) - 2000 Waldo Bastian <[email protected]> - 2000-2003 Carsten Pfeiffer <[email protected]> - 2005 Allan Sandfeld Jensen <[email protected]> - 2005-2006 by Olivier Goffart <ogoffart at kde.org> - - 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 - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ - - -#include "notifybysound.h" - -// QT headers -#include <QHash> -#include <QtCore/QBasicTimer> -#include <QtCore/QQueue> -#include <QtCore/QTimer> -#include <QtCore/QTimerEvent> -#include <QtCore/QStack> -#include <QSignalMapper> - -// KDE headers -#include <kdebug.h> -#include <klocale.h> -#include <kprocess.h> -#include <kstandarddirs.h> -#include <kconfiggroup.h> -#include <kurl.h> -#include <config-runtime.h> -#include <kcomponentdata.h> -#include <knotifyconfig.h> - -// Phonon headers -#include <phonon/mediaobject.h> -#include <phonon/path.h> -#include <phonon/audiooutput.h> - -struct Player -{ - Player() - : media(new Phonon::MediaObject), - output(new Phonon::AudioOutput(Phonon::NotificationCategory)) - { - Phonon::createPath(media, output); - } - - inline void play(const QString &file) { media->setCurrentSource(file); media->enqueue(Phonon::MediaSource()); media->play(); } - inline void stop() { media->stop(); } - inline void setVolume(float volume) { output->setVolume(volume); } - - ~Player() - { - output->deleteLater(); - media->deleteLater(); - } - - Phonon::MediaObject *const media; - Phonon::AudioOutput *const output; -}; - -class PlayerPool -{ - public: - PlayerPool() : m_idlePlayer(0), m_volume(1.0) {} - - Player *getPlayer(); - void returnPlayer(Player *); - void clear(); - - void setVolume(float volume); - - private: - Player *m_idlePlayer; - QList<Player *> m_playersInUse; - float m_volume; -}; - -Player *PlayerPool::getPlayer() -{ - Player *p = 0; - if (!m_idlePlayer) { - p = new Player; - } else { - p = m_idlePlayer; - m_idlePlayer = 0; - } - p->setVolume(m_volume); - m_playersInUse << p; - return p; -} - -void PlayerPool::returnPlayer(Player *p) -{ - m_playersInUse.removeAll(p); - if (m_idlePlayer) { - delete p; - } else { - m_idlePlayer = p; - } -} - -void PlayerPool::clear() -{ - delete m_idlePlayer; - m_idlePlayer = 0; -} - -void PlayerPool::setVolume(float v) -{ - m_volume = v; - foreach (Player *p, m_playersInUse) { - p->setVolume(v); - } -} - -class NotifyBySound::Private -{ - public: - enum { NoSound, UsePhonon, ExternalPlayer } playerMode; - QString externalPlayer; - - QHash<int, KProcess *> processes; - QHash<int, Player*> playerObjects; - QSignalMapper *signalmapper; - PlayerPool playerPool; - QBasicTimer poolTimer; - QQueue<int> closeQueue; - - int volume; - -}; - -NotifyBySound::NotifyBySound(QObject *parent) : KNotificationPlugin(parent),d(new Private) -{ - d->signalmapper = new QSignalMapper(this); - connect(d->signalmapper, SIGNAL(mapped(int)), this, SLOT(slotSoundFinished(int))); - - loadConfig(); -} - - -NotifyBySound::~NotifyBySound() -{ - delete d; -} - - -void NotifyBySound::loadConfig() -{ - // load external player settings - KSharedConfig::Ptr kc = KSharedConfig::openConfig(); - KConfigGroup cg(kc, "Sounds"); - - d->playerMode = Private::UsePhonon; - if(cg.readEntry( "Use external player", false )) - { - d->playerMode = Private::ExternalPlayer; - d->externalPlayer = cg.readPathEntry("External player", QString()); - // try to locate a suitable player if none is configured - if ( d->externalPlayer.isEmpty() ) { - QStringList players; - players << "wavplay" << "aplay" << "auplay" << "artsplay" << "akodeplay"; - QStringList::const_iterator it = players.constBegin(); - while ( d->externalPlayer.isEmpty() && it != players.constEnd() ) { - d->externalPlayer = KStandardDirs::findExe( *it ); - ++it; - } - } - } - else if(cg.readEntry( "No sound" , false )) - { - d->playerMode = Private::NoSound; - } - // load default volume - setVolume( cg.readEntry( "Volume", 100 ) ); -} - - - - -void NotifyBySound::notify( int eventId, KNotifyConfig * config ) -{ - if(d->playerMode == Private::NoSound) - { - finish( eventId ); - return; - } - - if(d->playerObjects.contains(eventId) || d->processes.contains(eventId) ) - { - //a sound is already playing for this notification, we don't support playing two sounds. - finish( eventId ); - return; - } - - KUrl soundFileURL = config->readEntry( "Sound" , true ); - QString soundFile = soundFileURL.toLocalFile(); - - if (soundFile.isEmpty()) - { - finish( eventId ); - return; - } - - // get file name - if ( KUrl::isRelativeUrl(soundFile) ) - { - QString search = QString("%1/sounds/%2").arg(config->appname).arg(soundFile); - search = KGlobal::mainComponent().dirs()->findResource("data", search); - if ( search.isEmpty() ) - soundFile = KStandardDirs::locate( "sound", soundFile ); - else - soundFile = search; - } - if ( soundFile.isEmpty() ) - { - finish( eventId ); - return; - } - - kDebug() << " going to play " << soundFile; - d->poolTimer.stop(); - - if(d->playerMode == Private::UsePhonon) - { - Player *player = d->playerPool.getPlayer(); - connect(player->media, SIGNAL(finished()), d->signalmapper, SLOT(map())); - d->signalmapper->setMapping(player->media, eventId); - player->play(soundFile); - d->playerObjects.insert(eventId, player); - } - else if (d->playerMode == Private::ExternalPlayer && !d->externalPlayer.isEmpty()) - { - // use an external player to play the sound - KProcess *proc = new KProcess( this ); - connect( proc, SIGNAL(finished(int, QProcess::ExitStatus)), - d->signalmapper, SLOT(map()) ); - d->signalmapper->setMapping( proc , eventId ); - - (*proc) << d->externalPlayer << soundFile; - proc->start(); - } -} - - -void NotifyBySound::setVolume( int volume ) -{ - if ( volume<0 ) volume=0; - if ( volume>=100 ) volume=100; - d->volume = volume; - d->playerPool.setVolume(d->volume / 100.0); -} - - -void NotifyBySound::timerEvent(QTimerEvent *e) -{ - if (e->timerId() == d->poolTimer.timerId()) { - d->poolTimer.stop(); - d->playerPool.clear(); - return; - } - KNotificationPlugin::timerEvent(e); -} - -void NotifyBySound::slotSoundFinished(int id) -{ - kDebug() << id; - if(d->playerObjects.contains(id)) - { - Player *player=d->playerObjects.take(id); - disconnect(player->media, SIGNAL(finished()), d->signalmapper, SLOT(map())); - d->playerPool.returnPlayer(player); - //d->poolTimer.start(1000, this); - } - if(d->processes.contains(id)) - { - d->processes[id]->deleteLater(); - d->processes.remove(id); - } - finish(id); -} - -void NotifyBySound::close(int id) -{ - // close in 1 min - ugly workaround for sounds getting cut off because the close call in kdelibs - // is hardcoded to 6 seconds - d->closeQueue.enqueue(id); - QTimer::singleShot(60000, this, SLOT(closeNow())); -} - -void NotifyBySound::closeNow() -{ - const int id = d->closeQueue.dequeue(); - if(d->playerObjects.contains(id)) - { - Player *p = d->playerObjects.take(id); - p->stop(); - d->playerPool.returnPlayer(p); - //d->poolTimer.start(1000, this); - } - if(d->processes.contains(id)) - { - d->processes[id]->kill(); - d->processes[id]->deleteLater(); - d->processes.remove(id); - } -} - -#include "notifybysound.moc" -// vim: ts=4 noet diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knotifications-5.5.0/src/notifybysound.h new/knotifications-5.6.0/src/notifybysound.h --- old/knotifications-5.5.0/src/notifybysound.h 2014-12-06 13:42:22.000000000 +0100 +++ new/knotifications-5.6.0/src/notifybysound.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,55 +0,0 @@ -/* - Copyright (C) 2005-2006 by Olivier Goffart <ogoffart at kde.org> - - - 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 - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - */ - - - -#ifndef NOTIFYBYSOUND_H -#define NOTIFYBYSOUND_H - -#include "knotificationplugin.h" - - -class NotifyBySound : public KNotificationPlugin -{ Q_OBJECT - public: - NotifyBySound(QObject *parent=0l); - virtual ~NotifyBySound(); - - virtual QString optionName() { return "Sound"; } - virtual void notify(int id , KNotifyConfig *config); - virtual void close(int id); - - private: - class Private; - Private* const d; - void loadConfig(); - - public: - void setVolume( int v ); - - protected: - void timerEvent(QTimerEvent *); - - private Q_SLOTS: - void slotSoundFinished(int id); - void closeNow(); -}; - -#endif -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
