Commit f708b248aec810a1dcad1f13e1c16390244c9834

  • avatar
  • Trond Kjernåsen <trond @trol…ech.com>
  • Fri Dec 18 17:48:10 CET 2009
Fixed QPixmap::load() to not modify referenced copies.

This is a bad regression from 4.5. QPixmap::load() would modify all
references to the same QPixmap object.

Task-number: QTBUG-6840
Reviewed-by: Kim
  
831831 if (QPixmapCache::find(key, *this))
832832 return true;
833833
834 if (!data)
835 data = QPixmapData::create(0, 0, QPixmapData::PixmapType);
836
837 if (data->fromFile(fileName, format, flags)) {
834 QPixmapData *tmp = QPixmapData::create(0, 0, QPixmapData::PixmapType);
835 if (tmp->fromFile(fileName, format, flags)) {
836 data = tmp;
838837 QPixmapCache::insert(key, *this);
839838 return true;
840839 }
841
840 delete tmp;
842841 return false;
843842}
844843