fixed dbus icon color

This commit is contained in:
Patrick von Reth 2010-08-10 10:27:16 +02:00
parent 2263cf252c
commit b750faf85e
4 changed files with 85 additions and 89 deletions

View File

@ -69,9 +69,7 @@ QString FreedesktopNotification_Frontend::getImagefromHint(const FreedesktopImag
QFile file(filename); QFile file(filename);
if(file.exists())return filename; if(file.exists())return filename;
QImage *qimage = img.toQImage(); img.toQImage().save(filename,"PNG");
qimage->save(filename,"PNG");
delete qimage;
qDebug()<<"Saving to "<<filename; qDebug()<<"Saving to "<<filename;
return filename; return filename;
} }

View File

@ -88,10 +88,8 @@ FreedesktopImageHint::FreedesktopImageHint(const QImage &img) {
} }
QImage *FreedesktopImageHint::toQImage() const { QImage FreedesktopImageHint::toQImage() const {
QImage *img = new QImage((uchar*)imageData.data(),width,height,QImage::Format_ARGB32 ); return QImage((uchar*)imageData.data(),width,height,QImage::Format_ARGB32 ).rgbSwapped();
img->rgbSwapped();
return img;
} }
QDBusArgument &operator<<(QDBusArgument &a, const FreedesktopImageHint &i) { QDBusArgument &operator<<(QDBusArgument &a, const FreedesktopImageHint &i) {

View File

@ -47,7 +47,7 @@ public:
FreedesktopImageHint(); FreedesktopImageHint();
FreedesktopImageHint(const QImage &img); FreedesktopImageHint(const QImage &img);
QImage* toQImage()const; QImage toQImage()const;
int width; int width;
int height; int height;