From: Teresa N. <mar...@de...> - 2016-06-07 11:53:49
|
Hi Carlos, the patch is applied to the develop branch. Regards, Teresa On 06/07/16 11:42, cpa...@ce... wrote: > From: cpascual <cpa...@ce...> > > getPixmap is deprecated in favour of getCachedPixmap, but should provide > backwards compatibility for keys using resource syntax. Implement the > same solution as already present in getIcon > --- > lib/taurus/qt/qtgui/resource/taurus_resource_utils.py | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/lib/taurus/qt/qtgui/resource/taurus_resource_utils.py b/lib/taurus/qt/qtgui/resource/taurus_resource_utils.py > index 87c84a2..982578e 100644 > --- a/lib/taurus/qt/qtgui/resource/taurus_resource_utils.py > +++ b/lib/taurus/qt/qtgui/resource/taurus_resource_utils.py > @@ -69,9 +69,16 @@ def getThemeMembers(): > return {} > > > -@deprecation_decorator(alt='getCachedPixmap', rel='4.0') > def getPixmap(key, size=None): > - return getCachedPixmap(key, size=size) > + # handle resource syntax (deprecated) > + if key.startswith(':'): > + head, tail = os.path.split(key[1:]) > + # logos used to be in the resource root. Now they are in 'logos' > + prefix = sanitizePrefix(head or 'logos') > + alt = 'getCachedPixmap("%s:%s [, size]")' % (prefix, tail) > + ret = getCachedPixmap('%s:%s' % (prefix, tail), size) > + deprecated(dep='getPixmap("%s" [, size])' % key, alt=alt, rel='4.0') > + return ret > > > def getIcon(key): |