#include <QTimer>
#include <QUuid>
#include <QFile>
+#include <QImageWriter>
#include <KDebug>
#include <KService>
namespace TaskManager
{
+#if QT_VERSION >= 0x041200
+static const QByteArray pixmapFormat = QImageWriter::defaultImageFormat();
+#else
+static const QByteArray pixmapFormat = "png";
+#endif
+
class GroupManagerPrivate
{
public:
} else if (item.length() >= 5) {
QPixmap pixmap;
QByteArray bytes = QByteArray::fromBase64(item.at(4).toAscii());
- pixmap.loadFromData(bytes);
+ pixmap.loadFromData(bytes, pixmapFormat);
icon.addPixmap(pixmap);
}
QString name(item.at(2));
QByteArray bytes;
QBuffer buffer(&bytes);
buffer.open(QIODevice::WriteOnly);
- pixmap.save(&buffer, "PNG");
+ pixmap.save(&buffer, pixmapFormat);
launcherProperties.append(bytes.toBase64());
}