From kde-commits Thu Jun 19 08:49:46 2008 From: Thorsten Zachmann Date: Thu, 19 Jun 2008 08:49:46 +0000 To: kde-commits Subject: koffice/kpresenter Message-Id: <1213865386.477740.8053.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=121386541420900 SVN commit 822111 by zachmann: o Fix loading of sound event action. So finally the sound event action works. D part/KPrSharedLoadingData.cpp D part/KPrSharedLoadingData.h M +8 -7 plugins/eventactions/sound/KPrSoundEventAction.cpp --- trunk/koffice/kpresenter/plugins/eventactions/sound/KPrSoundEventAction.cpp #822110:822111 @@ -27,8 +27,9 @@ #include #include #include -#include +#include + KPrSoundEventAction::KPrSoundEventAction() : QObject() , KoEventAction( KPrSoundEventActionId ) @@ -50,17 +51,17 @@ bool retval = false; if ( ! sound.isNull() ) { - - KPrSharedLoadingData * sharedData = dynamic_cast( context.sharedData( KPRESENTER_SHARED_LOADING_ID ) ); - if ( sharedData && sharedData->soundCollection() ) { + KPrSoundCollection * soundCollection = dynamic_cast( context.dataCenter( "SoundCollection" ) ); + if ( soundCollection ) { QString href = sound.attributeNS( KoXmlNS::xlink, "href" ); - if ( href.isEmpty() ) { - m_soundData = new KPrSoundData( sharedData->soundCollection(), href ); + if ( !href.isEmpty() ) { + m_soundData = new KPrSoundData( soundCollection, href ); retval = true; } } else { - // TODO warning + kWarning(33000) << "sound collection could not be found"; + Q_ASSERT( soundCollection ); } }