Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.3
nepomuk-core
emit-the-current-signals-in-propertychanged.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File emit-the-current-signals-in-propertychanged.diff of Package nepomuk-core
commit 27605e21e4dd0b6ed3ed4b2ec5ae92af22822b63 Author: Vishesh Handa <me@vhanda.in> Date: Tue Feb 5 18:34:43 2013 +0530 ResourceWatcher: Emit the current signals in propertyChanged We were accidentally emitting the wrong paramaters for propertyRemoved and propertyAdded. diff --git a/libnepomukcore/datamanagement/resourcewatcher.cpp b/libnepomukcore/datamanagement/resourcewatcher.cpp index 4a741f2..f394ae8 100644 --- a/libnepomukcore/datamanagement/resourcewatcher.cpp +++ b/libnepomukcore/datamanagement/resourcewatcher.cpp @@ -318,20 +318,20 @@ namespace { } } -void Nepomuk2::ResourceWatcher::slotPropertyChanged(const QString& resUri, const QString& propUri, const QVariantList& oldObjs, const QVariantList& newObjs) +void Nepomuk2::ResourceWatcher::slotPropertyChanged(const QString& res_, const QString& prop_, const QVariantList& addedObjs, const QVariantList& removedObjs) { - const Resource res = Resource::fromResourceUri(KUrl(resUri)); - const Types::Property prop = KUrl(propUri); + const Resource res = Resource::fromResourceUri(KUrl(res_)); + const Types::Property prop = KUrl(prop_); - foreach( const QVariant& v, oldObjs ) { - emit propertyRemoved( res, prop, v ); + foreach( const QVariant& v, addedObjs ) { + emit propertyAdded( res, prop, convertType(prop, v) ); } - foreach( const QVariant& v, newObjs ) { - emit propertyAdded( res, prop, v ); + foreach( const QVariant& v, removedObjs ) { + emit propertyRemoved( res, prop, convertType(prop, v) ); } - emit propertyChanged( res, prop, oldObjs, newObjs ); + emit propertyChanged( res, prop, addedObjs, removedObjs ); } #include "resourcewatcher.moc" diff --git a/libnepomukcore/datamanagement/resourcewatcher.h b/libnepomukcore/datamanagement/resourcewatcher.h index 621fbf6..05e3710 100644 --- a/libnepomukcore/datamanagement/resourcewatcher.h +++ b/libnepomukcore/datamanagement/resourcewatcher.h @@ -352,9 +352,7 @@ namespace Nepomuk2 { void slotResourceRemoved(const QString& res, const QStringList& types); void slotResourceTypesAdded(const QString& res, const QStringList& types); void slotResourceTypesRemoved(const QString& res, const QStringList& types); - void slotPropertyChanged(const QString& res, const QString& prop, - const QVariantList & oldObjs, - const QVariantList & newObjs); + void slotPropertyChanged(const QString& res, const QString& prop_, const QVariantList& addedObjs, const QVariantList& removedObjs); private: class Private; Private * d;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor