Skip to content

Commit

Permalink
Replace deprecated QPixmap::grabWidget() by QWidget::grab()
Browse files Browse the repository at this point in the history
  • Loading branch information
Lastick committed Jan 20, 2020
1 parent 0147d88 commit def7161
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/gui/ReceiveFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void ReceiveFrame::copyAddress() {
void ReceiveFrame::saveQRcodeToFile() {
QString fileName = QFileDialog::getSaveFileName(&MainWindow::instance(), tr("Save QR Code"), QDir::homePath(), "PNG (*.png)");
if (!fileName.isEmpty()) {
QPixmap qrcode = QPixmap::grabWidget(m_ui->m_qrLabel);
QPixmap qrcode = m_ui->m_qrLabel->grab();
QFile f(fileName);
if (f.open(QIODevice::WriteOnly | QIODevice::Truncate)) {
QByteArray ba;
Expand Down
2 changes: 1 addition & 1 deletion src/gui/ShowPaymentRequestDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void ShowPaymentRequestDialog::saveUri() {
void ShowPaymentRequestDialog::saveQRcodeToFile() {
QString fileName = QFileDialog::getSaveFileName(&MainWindow::instance(), tr("New PNG file"), QDir::homePath(), "PNG (*.png)");
if (!fileName.isEmpty()) {
QPixmap qrcode = QPixmap::grabWidget(m_ui->m_requestQRlabel);
QPixmap qrcode = m_ui->m_requestQRlabel->grab();
QFile f(fileName);
if (f.open(QIODevice::WriteOnly | QIODevice::Truncate)) {
QByteArray ba;
Expand Down

0 comments on commit def7161

Please sign in to comment.