summaryrefslogtreecommitdiff
path: root/silx/gui/qt
diff options
context:
space:
mode:
authorPicca Frédéric-Emmanuel <picca@synchrotron-soleil.fr>2019-12-23 13:45:09 +0100
committerPicca Frédéric-Emmanuel <picca@synchrotron-soleil.fr>2019-12-23 13:45:09 +0100
commit5d647cf9a6159afd2933da594b9c79ad93d3cd9b (patch)
tree2571025a602f68fc8933b01104dc712d41f84034 /silx/gui/qt
parent654a6ac93513c3cc1ef97cacd782ff674c6f4559 (diff)
New upstream version 0.12.0~b0+dfsg
Diffstat (limited to 'silx/gui/qt')
-rw-r--r--silx/gui/qt/_utils.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/silx/gui/qt/_utils.py b/silx/gui/qt/_utils.py
index 912f08c..f5915ae 100644
--- a/silx/gui/qt/_utils.py
+++ b/silx/gui/qt/_utils.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2004-2017 European Synchrotron Radiation Facility
+# Copyright (c) 2004-2019 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -29,21 +29,22 @@ __authors__ = ["V. Valls"]
__license__ = "MIT"
__date__ = "30/11/2016"
-import sys
-from . import _qt as qt
+
+import sys as _sys
+from . import _qt
def supportedImageFormats():
"""Return a set of string of file format extensions supported by the
Qt runtime."""
- if sys.version_info[0] < 3 or qt.BINDING == 'PySide':
+ if _sys.version_info[0] < 3 or _qt.BINDING == 'PySide':
convert = str
- elif qt.BINDING == 'PySide2':
+ elif _qt.BINDING == 'PySide2':
def convert(data):
return str(data.data(), 'ascii')
else:
convert = lambda data: str(data, 'ascii')
- formats = qt.QImageReader.supportedImageFormats()
+ formats = _qt.QImageReader.supportedImageFormats()
return set([convert(data) for data in formats])
@@ -59,7 +60,7 @@ def silxGlobalThreadPool():
"""
global __globalThreadPoolInstance
if __globalThreadPoolInstance is None:
- tp = qt.QThreadPool()
+ tp = _qt.QThreadPool()
# This pointless command fixes a segfault with PyQt 5.9.1 on Windows
tp.setMaxThreadCount(tp.maxThreadCount())
__globalThreadPoolInstance = tp