diff options
| author | Ross Nicoll <[email protected]> | 2014-10-04 20:49:47 +0100 |
|---|---|---|
| committer | Ross Nicoll <[email protected]> | 2014-10-04 20:49:47 +0100 |
| commit | 66ba4b436acc8355a5f8d017d26a1e25f789cce5 (patch) | |
| tree | 97c75cd85fcfdf5b7b095f946e58f0f81dd0ba20 /src | |
| parent | Merge pull request #721 from rnicoll/1.8.1-dev-orphan (diff) | |
| download | discoin-66ba4b436acc8355a5f8d017d26a1e25f789cce5.tar.xz discoin-66ba4b436acc8355a5f8d017d26a1e25f789cce5.zip | |
Switched to older QT API calls to that paper wallet printing is compatible with Qt 4.6.4.
Diffstat (limited to 'src')
| -rw-r--r-- | src/qt/utilitydialog.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/qt/utilitydialog.cpp b/src/qt/utilitydialog.cpp index 1545e7666..72477748b 100644 --- a/src/qt/utilitydialog.cpp +++ b/src/qt/utilitydialog.cpp @@ -147,14 +147,14 @@ void PaperWalletDialog::on_getNewAddress_clicked() ui->addressQRCode->setText(tr("Error encoding Address into QR Code.")); return; } - QImage myImage = QImage(code->width, code->width, QImage::Format_ARGB32); - myImage.fill(QColor(0,0,0,0)); + QImage publicKeyImage = QImage(code->width, code->width, QImage::Format_ARGB32); + publicKeyImage.fill(0x000000); unsigned char *p = code->data; for (int y = 0; y < code->width; y++) { for (int x = 0; x < code->width; x++) { - myImage.setPixel(x, y, ((*p & 1) ? 0xff000000 : 0x0)); + publicKeyImage.setPixel(x, y, ((*p & 1) ? 0xff000000 : 0x0)); p++; } } @@ -168,22 +168,22 @@ void PaperWalletDialog::on_getNewAddress_clicked() ui->privateKeyQRCode->setText(tr("Error encoding private key into QR Code.")); return; } - QImage myImagePriv = QImage(code->width, code->width, QImage::Format_ARGB32); - myImagePriv.fill(QColor(0,0,0,0)); + QImage privateKeyImage = QImage(code->width, code->width, QImage::Format_ARGB32); + privateKeyImage.fill(0x000000); p = code->data; for (int y = 0; y < code->width; y++) { for (int x = 0; x < code->width; x++) { - myImagePriv.setPixel(x, y, ((*p & 1) ? 0xff000000 : 0x0)); + privateKeyImage.setPixel(x, y, ((*p & 1) ? 0xff000000 : 0x0)); p++; } } QRcode_free(code); // Populate the QR Codes - ui->addressQRCode->setPixmap(QPixmap::fromImage(myImage).scaled(ui->addressQRCode->width(), ui->addressQRCode->height())); - ui->privateKeyQRCode->setPixmap(QPixmap::fromImage(myImagePriv).scaled(ui->privateKeyQRCode->width(), ui->privateKeyQRCode->height())); + ui->addressQRCode->setPixmap(QPixmap::fromImage(publicKeyImage).scaled(ui->addressQRCode->width(), ui->addressQRCode->height())); + ui->privateKeyQRCode->setPixmap(QPixmap::fromImage(privateKeyImage).scaled(ui->privateKeyQRCode->width(), ui->privateKeyQRCode->height())); #endif // Populate the Texts |