revert didnt work ..

This commit is contained in:
Patrick von Reth 2011-07-21 19:56:36 +02:00
parent f01c61f622
commit f90397a370
1 changed files with 4 additions and 2 deletions

View File

@ -75,7 +75,7 @@ SnoreIcon::~SnoreIcon()
const QString &SnoreIcon::hash() const{
if(d->_hash.isEmpty()){
QCryptographicHash h(QCryptographicHash::Md5);
h.addData(QByteArray((const char*)d->_img.bits()));
h.addData(imageData());
d->_hash = h.result().toHex();
}
return d->_hash;
@ -98,7 +98,9 @@ const QString &SnoreIcon::localUrl()const{
const QByteArray &SnoreIcon::imageData() const{
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;
}