Commit e93b8512 authored by Scott Wheeler's avatar Scott Wheeler
Browse files

Removing more unused code.

svn path=/trunk/kdemultimedia/juk/; revision=262473
parent fb0fa2af
......@@ -28,9 +28,8 @@
////////////////////////////////////////////////////////////////////////////////
CachedTag::CachedTag(const QString &file) : Tag(file),
m_externalTag(0), m_tagTrackNumber(0),
m_tagYear(0), m_tagSeconds(0),
m_tagExists(false)
m_externalTag(0), m_tagTrackNumber(0),
m_tagYear(0), m_tagSeconds(0)
{
}
......@@ -118,14 +117,6 @@ QString CachedTag::comment() const
return m_tagComment;
}
bool CachedTag::hasTag() const
{
if(m_externalTag)
return m_externalTag->hasTag();
else
return m_tagExists;
}
void CachedTag::setTrack(const QString &value)
{
proxiedTag()->setTrack(value);
......@@ -185,16 +176,13 @@ bool CachedTag::current() const
QDataStream &CachedTag::read(QDataStream &s)
{
QString dummy;
/// TODO: Use Q_UINT32 in place of all integers.
#if 0 /// TODO: This should be included the next time that the cache format changes
s >> m_tagExists
#else
int tagExists;
s >> tagExists;
m_tagExists = tagExists;
#endif
s >> m_tagTrack
static QString dummyString;
static int dummyInt;
// TODO: Use Q_UINT32 in place of all integers.
s >> dummyInt // TODO: remove
>> m_tagTrack
>> m_tagArtist
>> m_tagAlbum
>> m_tagGenre
......@@ -208,7 +196,7 @@ QDataStream &CachedTag::read(QDataStream &s)
>> m_tagLengthString
>> m_tagSeconds
>> dummy //Was filename, not really needed - the base has it already
>> dummyString // TODO: remove
>> m_modificationTime;
//Try to reduce memory usage: share tags that frequently repeat, squeeze others
......
......@@ -29,7 +29,6 @@ public:
virtual ~CachedTag();
virtual void save();
virtual bool hasTag() const;
virtual QString track() const;
virtual QString artist() const;
......@@ -79,8 +78,6 @@ private:
QString m_tagLengthString;
int m_tagSeconds;
bool m_tagExists;
QDateTime m_modificationTime;
};
......
......@@ -164,11 +164,6 @@ void ID3Tag::save()
}
}
bool ID3Tag::hasTag() const
{
return m_tagExists;
}
QString ID3Tag::track() const // The song's name, not it's track number
{
return m_tagTrack;
......
......@@ -31,7 +31,6 @@ public:
virtual ~ID3Tag();
virtual void save();
virtual bool hasTag() const;
virtual QString track() const;
virtual QString artist() const;
......
......@@ -43,14 +43,6 @@ void OggTag::save()
m_metaInfo.applyChanges();
}
bool OggTag::hasTag() const
{
if(m_metaInfo.isValid() && !m_metaInfo.isEmpty())
return true;
else
return false;
}
QString OggTag::track() const
{
QString s = readCommentString("Title");
......
......@@ -29,7 +29,6 @@ public:
virtual ~OggTag();
virtual void save();
virtual bool hasTag() const;
virtual QString track() const;
virtual QString artist() const;
......
......@@ -104,11 +104,8 @@ int Tag::readSeconds(const KFileMetaInfo &metaInfo)
QDataStream &operator<<(QDataStream &s, const Tag &t)
{
/// TODO: Use Q_UINT32 in place of all integers.
#if 0 /// TODO: This should be included the next time that the cache format changes
s << t.hasTag()
#else
s << int(t.hasTag())
#endif
s << 0 // TODO: remove
<< t.track()
<< t.artist()
<< t.album()
......@@ -118,12 +115,10 @@ QDataStream &operator<<(QDataStream &s, const Tag &t)
<< t.year()
<< t.yearString()
<< t.comment()
<< t.bitrateString()
<< t.lengthString()
<< t.seconds()
<< t.absFilePath()
<< QString::null // TODO: remove
<< t.lastModified();
return s;
......
......@@ -48,7 +48,6 @@ public:
virtual ~Tag();
virtual void save() = 0;
virtual bool hasTag() const = 0;
virtual QString track() const = 0;
virtual QString artist() const = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment