Changeset View
Changeset View
Standalone View
Standalone View
src/amarokurls/BookmarkGroup.cpp
Show First 20 Lines • Show All 205 Lines • ▼ Show 20 Line(s) | |||||
206 | void BookmarkGroup::setDescription( const QString &description ) | 206 | void BookmarkGroup::setDescription( const QString &description ) | ||
207 | { | 207 | { | ||
208 | m_description = description; | 208 | m_description = description; | ||
209 | save(); | 209 | save(); | ||
210 | } | 210 | } | ||
211 | 211 | | |||
212 | void BookmarkGroup::deleteChild( BookmarkViewItemPtr item ) | 212 | void BookmarkGroup::deleteChild( BookmarkViewItemPtr item ) | ||
213 | { | 213 | { | ||
214 | if ( typeid( * item ) == typeid( BookmarkGroup ) ) | 214 | if ( auto group = BookmarkGroupPtr::dynamicCast( item ) ) | ||
215 | { | 215 | { | ||
216 | BookmarkGroupPtr group = BookmarkGroupPtr::staticCast( item ); | | |||
217 | m_childGroups.removeAll( group ); | 216 | m_childGroups.removeAll( group ); | ||
218 | } | 217 | } | ||
219 | else if ( typeid( * item ) == typeid( AmarokUrl ) ) | 218 | else if ( auto bookmark = AmarokUrlPtr::dynamicCast( item ) ) | ||
220 | { | 219 | { | ||
221 | AmarokUrlPtr bookmark = AmarokUrlPtr::staticCast( item ); | | |||
222 | m_childBookmarks.removeAll( bookmark ); | 220 | m_childBookmarks.removeAll( bookmark ); | ||
223 | } | 221 | } | ||
224 | } | 222 | } | ||
225 | 223 | | |||
226 | void BookmarkGroup::removeFromDb() | 224 | void BookmarkGroup::removeFromDb() | ||
227 | { | 225 | { | ||
228 | DEBUG_BLOCK | 226 | DEBUG_BLOCK | ||
229 | 227 | | |||
Show All 17 Lines |