Commit 083d1a59 authored by Scott Wheeler's avatar Scott Wheeler

get rid of the QFileInfo and fileName accessors in the tag class and remove

the QFileInfo from the tag altogether.

svn path=/trunk/kdemultimedia/juk/; revision=296013
parent e6315f87
......@@ -75,7 +75,7 @@ QString PlaylistItem::text(int column) const
case CommentColumn:
return d->fileHandle.tag()->comment();
case FileNameColumn:
return d->fileHandle.tag()->fileName();
return d->fileHandle.absFilePath();
default:
return KListViewItem::text(column);
}
......@@ -104,7 +104,7 @@ void PlaylistItem::guessTagInfo(TagGuesser::Type type)
switch(type) {
case TagGuesser::FileName:
{
TagGuesser guesser(d->fileHandle.tag()->fileName());
TagGuesser guesser(d->fileHandle.absFilePath());
if(!guesser.title().isNull())
d->fileHandle.tag()->setTitle(guesser.title());
......@@ -125,7 +125,7 @@ void PlaylistItem::guessTagInfo(TagGuesser::Type type)
{
#if HAVE_MUSICBRAINZ
MusicBrainzQuery *query = new MusicBrainzQuery(MusicBrainzQuery::File,
d->fileHandle.tag()->fileName());
d->fileHandle.absFilePath());
connect(query, SIGNAL(signalDone(const MusicBrainzQuery::TrackList &)),
SLOT(slotTagGuessResults(const MusicBrainzQuery::TrackList &)));
KMainWindow *win = dynamic_cast<KMainWindow *>(kapp->mainWidget());
......
......@@ -38,7 +38,6 @@
Tag::Tag(const QString &fileName) :
m_info(fileName),
m_fileName(fileName),
m_track(0),
m_year(0),
......@@ -174,7 +173,6 @@ CacheDataStream &Tag::read(CacheDataStream &s)
////////////////////////////////////////////////////////////////////////////////
Tag::Tag(const QString &fileName, bool) :
m_info(fileName),
m_fileName(fileName),
m_track(0),
m_year(0),
......
......@@ -65,10 +65,6 @@ public:
QString lengthString() const { return m_lengthString; }
CacheDataStream &read(CacheDataStream &s);
// TODO -- REMOVE THESE METHODS ONCE THE CACHE IS FILEHANDLE BASED
const QFileInfo &fileInfo() const { return m_info; }
const QString &fileName() const { return m_fileName; }
private:
/**
* Create an empty tag. Used in FileHandle for cache restoration.
......@@ -76,9 +72,6 @@ private:
Tag(const QString &fileName, bool);
void setup(TagLib::File *file);
// TODO -- remove m_info and prefer the one in the FileHandle
QFileInfo m_info;
QString m_fileName;
QString m_title;
QString m_artist;
......
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