Logo Search packages:      
Sourcecode: kmess version File versions

EmoticonTheme::EmoticonTheme ( const EmoticonTheme other  ) 

Copy constructor

Also duplicates the list of emoticons: simply copying the source's list would cause our list to be deleted when the source theme is deleted

other The theme to duplicate

Definition at line 61 of file emoticontheme.cpp.

References getEmoticons(), Emoticon::update(), and updateCache().

  : QObject()
  , loadingTheme_(other.loadingTheme_)
  , isCustomTheme_(other.isCustomTheme_)
  , themePath_(other.themePath_)
  // Duplicate one by one the other theme's emoticons
  const QList<Emoticon*>emoticonList( other.getEmoticons() );
  foreach( Emoticon *emoticon, emoticonList )
    emoticon = new Emoticon( *emoticon );
    emoticons_.append( emoticon );

  // The caches cannot be easily copied (due to QHashs being implicitly shared), so regenerate them.

Generated by  Doxygen 1.6.0   Back to index