Skip to content

Commit

Permalink
make QString std::hashable
Browse files Browse the repository at this point in the history
  • Loading branch information
vigsterkr committed Feb 10, 2021
1 parent 5edcf73 commit de8f99d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/library/browse/foldertreemodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,21 @@
#include <QThreadPool>
#include <QQueue>

#include <functional>
#include <unordered_map>

#include "library/treeitemmodel.h"
#include "library/treeitem.h"
#include "util/mutex.h"

namespace std {
template<> struct hash<QString> {
std::size_t operator()(const QString& s) const noexcept {
return (size_t) qHash(s);
}
};
}

class TreeItem;
// This class represents a folder item within the Browse Feature
// The class is derived from TreeItemModel to support lazy model
Expand Down

0 comments on commit de8f99d

Please sign in to comment.