diff --git a/konsole/konsole.cpp b/konsole/konsole.cpp index 7671eb1b..6c55cdd0 100644 --- a/konsole/konsole.cpp +++ b/konsole/konsole.cpp @@ -1715,8 +1715,7 @@ void Konsole::pixmap_menu_activated(int item, TEWidget* tewidget) tewidget->setBackgroundPixmap(pm); break; case 3: // center - { QPixmap bgPixmap; - bgPixmap.resize(tewidget->size()); + { QPixmap bgPixmap( tewidget->size() ); bgPixmap.fill(tewidget->getDefaultBackColor()); bitBlt( &bgPixmap, ( tewidget->size().width() - pm.width() ) / 2, ( tewidget->size().height() - pm.height() ) / 2, @@ -3210,9 +3209,9 @@ void Konsole::notifySessionState(TESession* session, int state) // make sure they are not larger than 16x16 if (normal.width() > 16 || normal.height() > 16) - normal.convertFromImage(normal.toImage().scaled(16,16, Qt::IgnoreAspectRatio, Qt::SmoothTransformation)); + normal = QPixmap::fromImage(normal.toImage().scaled(16,16, Qt::IgnoreAspectRatio, Qt::SmoothTransformation)); if (active.width() > 16 || active.height() > 16) - active.convertFromImage(active.toImage().scaled(16,16, Qt::IgnoreAspectRatio, Qt::SmoothTransformation)); + active = QPixmap::fromImage(active.toImage().scaled(16,16, Qt::IgnoreAspectRatio, Qt::SmoothTransformation)); QIcon iconset; iconset.setPixmap(normal, QIcon::Small, QIcon::Normal); diff --git a/konsole/konsole_part.cpp b/konsole/konsole_part.cpp index a93d442a..87381324 100644 --- a/konsole/konsole_part.cpp +++ b/konsole/konsole_part.cpp @@ -805,8 +805,7 @@ void konsolePart::pixmap_menu_activated(int item) te->setBackgroundPixmap(pm); break; case 3: // center - { QPixmap bgPixmap; - bgPixmap.resize(te->size()); + { QPixmap bgPixmap( te->size() ); bgPixmap.fill(te->getDefaultBackColor()); bitBlt( &bgPixmap, ( te->size().width() - pm.width() ) / 2, ( te->size().height() - pm.height() ) / 2, diff --git a/settings/schemaeditor.cpp b/settings/schemaeditor.cpp index 0ff51ad7..6128f397 100644 --- a/settings/schemaeditor.cpp +++ b/settings/schemaeditor.cpp @@ -173,8 +173,7 @@ void SchemaEditor::updatePreview() float rx = (100.0 - shadeSlide->value()) / 100; QImage ima(pix.toImage()); ima = KImageEffect::fade(ima, rx, shadeColor->color()); - QPixmap pm; - pm.convertFromImage(ima); + QPixmap pm = QPixmap::fromImage( ima ); previewPixmap->setPixmap(pm); previewPixmap->setScaledContents(true); }