Skip to content

Commit

Permalink
Remove old fallback code for PyQt4
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreRaybaut committed Jul 24, 2024
1 parent 5387329 commit bbdd2a3
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions qwt/null_paintdevice.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,7 @@ def drawRects(self, rects, rectCount=None):
if device is None:
return
if device.mode() != QwtNullPaintDevice.NormalMode:
try:
QPaintEngine.drawRects(self, rects, rectCount)
except TypeError:
# PyQt <=4.9
QPaintEngine.drawRects(self, rects)
QPaintEngine.drawRects(self, rects, rectCount)
return
device.drawRects(rects, rectCount)

Expand All @@ -63,11 +59,7 @@ def drawLines(self, lines, lineCount=None):
if device is None:
return
if device.mode() != QwtNullPaintDevice.NormalMode and QT_API.startswith("pyqt"):
try:
QPaintEngine.drawLines(lines, lineCount)
except TypeError:
# PyQt <=4.9
QPaintEngine.drawLines(self, lines)
QPaintEngine.drawLines(lines, lineCount)
return
device.drawLines(lines, lineCount)

Expand All @@ -93,11 +85,7 @@ def drawPoints(self, points, pointCount=None):
if device is None:
return
if device.mode() != QwtNullPaintDevice.NormalMode:
try:
QPaintEngine.drawPoints(points, pointCount)
except TypeError:
# PyQt <=4.9
QPaintEngine.drawPoints(self, points)
QPaintEngine.drawPoints(points, pointCount)
return
device.drawPoints(points, pointCount)

Expand Down

0 comments on commit bbdd2a3

Please sign in to comment.