[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdesupport/taglib
From:       Scott Wheeler <wheeler () kde ! org>
Date:       2004-06-23 18:45:26
Message-ID: 20040623184526.5BF314C4 () office ! kde ! org
[Download RAW message or body]

CVS commit by wheeler: 

oops -- forgot FLAC -- return bool for the FLAC::File::save() too to provide
some information on if the save was successful.


  M +7 -1      flac/flacfile.cpp   1.12
  M +3 -1      flac/flacfile.h   1.11
  M +2 -2      ogg/flac/oggflacfile.cpp   1.4
  M +2 -1      ogg/flac/oggflacfile.h   1.5


--- kdesupport/taglib/flac/flacfile.cpp  #1.11:1.12
@@ -123,6 +123,11 @@ FLAC::Properties *FLAC::File::audioPrope
 
 
-void FLAC::File::save()
+bool FLAC::File::save()
 {
+  if(readOnly()) {
+    debug("FLAC::File::save() - Cannot save to a read only file.");
+    return false;
+  }
+
   // Create new vorbis comments
 
@@ -215,4 +220,5 @@ void FLAC::File::save()
   }
 
+  return true;
 }
 

--- kdesupport/taglib/flac/flacfile.h  #1.10:1.11
@@ -109,6 +109,8 @@ namespace TagLib {
        * will also keep any old ID3-tags up to date. If the file
        * has no XiphComment, one will be constructed from the ID3-tags.
+       *
+       * This returns true if the save was successful.
        */
-      virtual void save();
+      virtual bool save();
 
       /*!

--- kdesupport/taglib/ogg/flac/oggflacfile.cpp  #1.3:1.4
@@ -88,5 +88,5 @@ Properties *Ogg::FLAC::File::audioProper
 
 
-void Ogg::FLAC::File::save()
+bool Ogg::FLAC::File::save()
 {
   d->xiphCommentData = d->comment->render();
@@ -111,5 +111,5 @@ void Ogg::FLAC::File::save()
   setPacket(d->commentPacket, v);
 
-  Ogg::File::save();
+  return Ogg::File::save();
 }
 

--- kdesupport/taglib/ogg/flac/oggflacfile.h  #1.4:1.5
@@ -84,6 +84,7 @@ namespace TagLib {
       /*!
        * Save the file.  This will primarily save and update the XiphComment.
+       * Returns true if the save is successful.
        */
-      virtual void save();
+      virtual bool save();
 
       /*!


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic