# HG changeset patch
# User Antonio Muci <
a....@inwind.it>
# Date 1777928751 -7200
# Mon May 04 23:05:51 2026 +0200
# Branch stable
# Node ID 97a8698d82fff3c6b87385904998337fb645e964
# Parent c92cd00dbfe34302c6ea6824a2636b28c92adcbc
qtlib: remove unused getpixmap() and _pixmapcache
While trying to debug the slow startup time of TortoiseHg, and in particular
qtlib.geticon() taking a lot of time, I've noted this unused snippet, which was
added on 2010-05-27, in 6d70ca99b9da.
Tempus fugit.
diff --git a/tortoisehg/hgqt/qtlib.py b/tortoisehg/hgqt/qtlib.py
--- a/tortoisehg/hgqt/qtlib.py
+++ b/tortoisehg/hgqt/qtlib.py
@@ -759,17 +759,6 @@ def getoverlaidicon(base: QIcon, overlay
return QIcon(pixmap)
-_pixmapcache: Dict[str, QPixmap] = {}
-
-def getpixmap(name: str, width: int = 16, height: int = 16) -> QPixmap:
- key = '%s_%sx%s' % (name, width, height)
- try:
- return _pixmapcache[key]
- except KeyError:
- pixmap = geticon(name).pixmap(width, height)
- _pixmapcache[key] = pixmap
- return pixmap
-
def getcheckboxpixmap(
state: QStyle.StateFlag,
bgcolor: Union[QColor, Qt.GlobalColor],