Move to the new rating structure
This commit is contained in:
parent
25ee41c5e8
commit
f22c0b6d94
2 changed files with 14 additions and 17 deletions
|
@ -37,7 +37,7 @@
|
|||
namespace Danbooru
|
||||
{
|
||||
|
||||
const QMap<QString, Rating> DanbooruPost::RATING_MAP = initRatingMap();
|
||||
const QMap<QString, DanbooruPost::Rating> DanbooruPost::RATING_MAP = initRatingMap();
|
||||
|
||||
DanbooruPost::DanbooruPost(QVariantMap postData, QPixmap pixmap,
|
||||
QObject* parent):
|
||||
|
@ -76,15 +76,13 @@ DanbooruPost::DanbooruPost(QXmlStreamAttributes& postData, QPixmap pixmap, QObje
|
|||
|
||||
DanbooruPost::~DanbooruPost()
|
||||
{
|
||||
delete m_pixmap;
|
||||
m_pixmap = 0;
|
||||
}
|
||||
|
||||
|
||||
const QMap< QString, Rating > DanbooruPost::initRatingMap()
|
||||
const QMap< QString, DanbooruPost::Rating > DanbooruPost::initRatingMap()
|
||||
{
|
||||
|
||||
QMap<QString, Rating> map;
|
||||
QMap<QString, DanbooruPost::Rating> map;
|
||||
map.insert("s", Safe);
|
||||
map.insert("q", Questionable);
|
||||
map.insert("e", Explicit);
|
||||
|
@ -100,7 +98,7 @@ bool DanbooruPost::operator==(const Danbooru::DanbooruPost& other)
|
|||
}
|
||||
|
||||
|
||||
void DanbooruPost::setPixmap(const QPixmap pixmap)
|
||||
void DanbooruPost::setPixmap(const QPixmap &pixmap)
|
||||
{
|
||||
m_pixmap = pixmap;
|
||||
}
|
||||
|
@ -137,7 +135,7 @@ const QUrl DanbooruPost::thumbnailUrl() const
|
|||
return m_thumbnailUrl;
|
||||
}
|
||||
|
||||
const QPixmap DanbooruPost::pixmap() const
|
||||
QPixmap DanbooruPost::pixmap() const
|
||||
{
|
||||
return m_pixmap;
|
||||
}
|
||||
|
@ -152,7 +150,7 @@ const QUrl DanbooruPost::fileUrl() const
|
|||
return m_url;
|
||||
}
|
||||
|
||||
const Ratings DanbooruPost::rating() const
|
||||
const Danbooru::DanbooruPost::Rating DanbooruPost::rating() const
|
||||
{
|
||||
return m_rating;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue