electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit d0ab0039784d1d0faade548182f72aa6d47b7e82
parent 211118ae8113a26e2e966a0c108f5091647381b0
Author: SomberNight <somber.night@protonmail.com>
Date:   Sun,  7 Jun 2020 03:10:27 +0200

qt qrcode: fix DeprecationWarning (float->int conversion)

...\electrum\electrum\gui\qt\qrcodewidget.py:88: DeprecationWarning: an integer is required (got type float).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
  qp.drawRect(left+c*boxsize, top+r*boxsize, boxsize - 1, boxsize - 1)

Diffstat:
Melectrum/gui/qt/qrcodewidget.py | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/electrum/gui/qt/qrcodewidget.py b/electrum/gui/qt/qrcodewidget.py @@ -85,7 +85,8 @@ class QRCodeWidget(QWidget): for r in range(k): for c in range(k): if matrix[r][c]: - qp.drawRect(left+c*boxsize, top+r*boxsize, boxsize - 1, boxsize - 1) + qp.drawRect(int(left+c*boxsize), int(top+r*boxsize), + boxsize - 1, boxsize - 1) qp.end()