~ubuntu-branches/ubuntu/karmic/kid3/karmic

« back to all changes in this revision

Viewing changes to kid3/taggedfile.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Patrick Matthäi
  • Date: 2009-05-20 16:12:30 UTC
  • mfrom: (1.2.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 23.
  • Revision ID: james.westby@ubuntu.com-20090520161230-qetp532r8ydujkz2
Tags: upstream-1.2
Import upstream version 1.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
 */
49
49
TaggedFile::TaggedFile(const DirInfo* di, const QString& fn) :
50
50
        m_dirInfo(di), m_filename(fn), m_newFilename(fn),
51
 
        m_changedV1(false), m_changedV2(false), m_truncation(0)
 
51
        m_changedV1(false), m_changedFramesV1(0),
 
52
        m_changedV2(false), m_changedFramesV2(0), m_truncation(0)
52
53
{
53
54
}
54
55
 
265
266
}
266
267
 
267
268
/**
 
269
 * Mark tag 1 as changed.
 
270
 *
 
271
 * @param type type of changed frame
 
272
 */
 
273
void TaggedFile::markTag1Changed(Frame::Type type)
 
274
{
 
275
        m_changedV1 = true;
 
276
        if (static_cast<unsigned>(type) < sizeof(m_changedFramesV1) * 8) {
 
277
                m_changedFramesV1 |= (1 << type);
 
278
        }
 
279
}
 
280
 
 
281
/**
 
282
 * Mark tag 2 as changed.
 
283
 *
 
284
 * @param type type of changed frame
 
285
 */
 
286
void TaggedFile::markTag2Changed(Frame::Type type)
 
287
{
 
288
        m_changedV2 = true;
 
289
        if (static_cast<unsigned>(type) < sizeof(m_changedFramesV2) * 8) {
 
290
                m_changedFramesV2 |= (1 << type);
 
291
        }
 
292
}
 
293
 
 
294
/**
268
295
 * Remove artist part from album string.
269
296
 * This is used when only the album is needed, but the regexp in
270
297
 * getTagsFromFilename() matched a "artist - album" string.