Commit 85fa729a authored by Michael Pyne's avatar Michael Pyne

cache: Remove unneeded FileHandleHash class.

parent c26f12e6
......@@ -31,6 +31,7 @@
#include "playlistsearch.h"
#include "tagguesser.h"
#include "playlistinterface.h"
#include "filehandle.h"
class KMenu;
class KActionMenu;
......
......@@ -36,6 +36,7 @@ class DynamicPlaylist;
class PlaylistItem;
class Playlist;
class PlayerManager;
class FileHandle;
template<class T>
class QList;
......
......@@ -18,8 +18,6 @@
#include <QSet>
#include "filehandle.h"
/**
* A simple hash representing an (un-mapped) set of data.
*/
......@@ -41,22 +39,6 @@ public:
};
typedef Hash<QString> StringHash;
typedef Hash<void *> PtrHash;
// cannot be a Hash<FileHandle> because it needs "FileHandle value(QString)"
class FileHandleHash : public QHash<QString, FileHandle>
{
public:
inline bool insert(const FileHandle &value)
{
if(contains(value))
return true;
QHash<QString, FileHandle>::insert(value.absFilePath(), value);
return false;
}
inline bool contains(const FileHandle &value) { return QHash<QString, FileHandle>::contains(value.absFilePath()); }
inline bool remove(const FileHandle &value) { return QHash<QString, FileHandle>::remove(value.absFilePath()); }
};
#endif
......
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