Commit b7a941bf authored by Halla Rempt's avatar Halla Rempt

Fix warning (and bug): QImage::convertToFormat returns the converted image, does not work in place.

parent 1dea298e
......@@ -63,7 +63,7 @@ KoTemplatesPane::KoTemplatesPane(QWidget* parent, const KComponentData &_compone
QPixmap preview = t->loadPicture();
QImage icon = preview.toImage();
icon = icon.scaled(IconExtent, IconExtent, Qt::KeepAspectRatio, Qt::SmoothTransformation);
icon.convertToFormat(QImage::Format_ARGB32);
icon = icon.convertToFormat(QImage::Format_ARGB32);
icon = icon.copy((icon.width() - IconExtent) / 2, (icon.height() - IconExtent) / 2, IconExtent, IconExtent);
QStandardItem* item = new QStandardItem(QPixmap::fromImage(icon), t->name());
item->setEditable(false);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment