Skip to content

Commit

Permalink
Port away from obsolete QLabel method (#342)
Browse files Browse the repository at this point in the history
Qt provided a version of pixmap() which returned the pixmap by-pointer.
That version is now obsolete.
  • Loading branch information
luis-pereira authored Jun 23, 2023
1 parent 8ff321e commit c17ff59
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/ui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ void MainWindow::resizeEvent(QResizeEvent *event)

scaleSize.scale(_ui->scrLabel->contentsRect().size(), Qt::KeepAspectRatio);

if (!_ui->scrLabel->pixmap() || scaleSize != _ui->scrLabel->pixmap()->size())
const QPixmap pixmap = _ui->scrLabel->pixmap(Qt::ReturnByValue);
if (pixmap.isNull() || scaleSize != pixmap.size())
updatePixmap(Core::instance()->getPixmap());
}

Expand Down

0 comments on commit c17ff59

Please sign in to comment.