mirror of
https://github.com/status-im/snorenotify.git
synced 2025-02-17 10:56:25 +00:00
revert didnt work ..
This commit is contained in:
parent
f01c61f622
commit
f90397a370
@ -75,7 +75,7 @@ SnoreIcon::~SnoreIcon()
|
|||||||
const QString &SnoreIcon::hash() const{
|
const QString &SnoreIcon::hash() const{
|
||||||
if(d->_hash.isEmpty()){
|
if(d->_hash.isEmpty()){
|
||||||
QCryptographicHash h(QCryptographicHash::Md5);
|
QCryptographicHash h(QCryptographicHash::Md5);
|
||||||
h.addData(QByteArray((const char*)d->_img.bits()));
|
h.addData(imageData());
|
||||||
d->_hash = h.result().toHex();
|
d->_hash = h.result().toHex();
|
||||||
}
|
}
|
||||||
return d->_hash;
|
return d->_hash;
|
||||||
@ -98,7 +98,9 @@ const QString &SnoreIcon::localUrl()const{
|
|||||||
|
|
||||||
const QByteArray &SnoreIcon::imageData() const{
|
const QByteArray &SnoreIcon::imageData() const{
|
||||||
if(d->_data.isEmpty()){
|
if(d->_data.isEmpty()){
|
||||||
d->_data = QByteArray((const char*)d->_img.bits());
|
QBuffer buffer( &d->_data );
|
||||||
|
buffer.open( QBuffer::WriteOnly );
|
||||||
|
d->_img.save( &buffer, "PNG" );
|
||||||
}
|
}
|
||||||
return d->_data;
|
return d->_data;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user