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);
if(file.exists())return filename;
QImage *qimage = img.toQImage();
qimage->save(filename,"PNG");
delete qimage;
img.toQImage().save(filename,"PNG");
qDebug()<<"Saving to "<<filename;
return filename;
}

View File

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

View File

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