From 458b2b333540a43bf89bb2eef6e9c92d802371ea Mon Sep 17 00:00:00 2001 From: Scott Wheeler Date: Wed, 30 Jan 2008 03:31:41 +0000 Subject: [PATCH] rename "remove()" to "strip()" to be consistent with MPEG::File git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@768450 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- taglib/mpc/mpcfile.cpp | 7 ++++++- taglib/mpc/mpcfile.h | 12 ++++++++++-- taglib/trueaudio/trueaudiofile.cpp | 2 +- taglib/trueaudio/trueaudiofile.h | 2 +- taglib/wavpack/wavpackfile.cpp | 2 +- taglib/wavpack/wavpackfile.h | 2 +- 6 files changed, 20 insertions(+), 7 deletions(-) diff --git a/taglib/mpc/mpcfile.cpp b/taglib/mpc/mpcfile.cpp index 72bd27da..0d9fe636 100644 --- a/taglib/mpc/mpcfile.cpp +++ b/taglib/mpc/mpcfile.cpp @@ -225,7 +225,7 @@ APE::Tag *MPC::File::APETag(bool create) return d->APETag; } -void MPC::File::remove(int tags) +void MPC::File::strip(int tags) { if(tags & ID3v1) { delete d->ID3v1Tag; @@ -253,6 +253,11 @@ void MPC::File::remove(int tags) } } +void MPC::File::remove(int tags) +{ + strip(tags); +} + //////////////////////////////////////////////////////////////////////////////// // private members diff --git a/taglib/mpc/mpcfile.h b/taglib/mpc/mpcfile.h index cf1c7083..7e34c863 100644 --- a/taglib/mpc/mpcfile.h +++ b/taglib/mpc/mpcfile.h @@ -142,12 +142,20 @@ namespace TagLib { * This will remove the tags that match the OR-ed together TagTypes from the * file. By default it removes all tags. * - * \note This will also invalidate pointers to the tags + * \warning This will also invalidate pointers to the tags * as their memory will be freed. - * \note In order to make the removal permanent save() still needs to be called + * + * \note In order to make the removal permanent save() still needs to be called. + */ + void strip(int tags = AllTags); + + /*! + * \deprecated + * \see strip */ void remove(int tags = AllTags); + private: File(const File &); File &operator=(const File &); diff --git a/taglib/trueaudio/trueaudiofile.cpp b/taglib/trueaudio/trueaudiofile.cpp index adbb6a44..c5bee76b 100644 --- a/taglib/trueaudio/trueaudiofile.cpp +++ b/taglib/trueaudio/trueaudiofile.cpp @@ -207,7 +207,7 @@ ID3v2::Tag *TrueAudio::File::ID3v2Tag(bool create) return d->ID3v2Tag; } -void TrueAudio::File::remove(int tags) +void TrueAudio::File::strip(int tags) { if(tags & ID3v1) { delete d->ID3v1Tag; diff --git a/taglib/trueaudio/trueaudiofile.h b/taglib/trueaudio/trueaudiofile.h index 6e6872c2..bd30baa8 100644 --- a/taglib/trueaudio/trueaudiofile.h +++ b/taglib/trueaudio/trueaudiofile.h @@ -160,7 +160,7 @@ namespace TagLib { * as their memory will be freed. * \note In order to make the removal permanent save() still needs to be called */ - void remove(int tags = AllTags); + void strip(int tags = AllTags); private: File(const File &); diff --git a/taglib/wavpack/wavpackfile.cpp b/taglib/wavpack/wavpackfile.cpp index 2c445ecf..37ea42e7 100644 --- a/taglib/wavpack/wavpackfile.cpp +++ b/taglib/wavpack/wavpackfile.cpp @@ -207,7 +207,7 @@ APE::Tag *WavPack::File::APETag(bool create) return d->APETag; } -void WavPack::File::remove(int tags) +void WavPack::File::strip(int tags) { if(tags & ID3v1) { delete d->ID3v1Tag; diff --git a/taglib/wavpack/wavpackfile.h b/taglib/wavpack/wavpackfile.h index 27d2c91f..e43a9878 100644 --- a/taglib/wavpack/wavpackfile.h +++ b/taglib/wavpack/wavpackfile.h @@ -144,7 +144,7 @@ namespace TagLib { * as their memory will be freed. * \note In order to make the removal permanent save() still needs to be called */ - void remove(int tags = AllTags); + void strip(int tags = AllTags); private: File(const File &);