Skip to content

Commit 49b797a

Browse files
committed
Fix documentation
1 parent 7950101 commit 49b797a

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

QOpenScienceFramework/manager.py

+5-8
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ def progress_icon(self):
130130

131131
@progress_icon.setter
132132
def progress_icon(self, val):
133-
""" The icon to show on the progress dialog. Should be a QIcon. """
134-
if not isinstance(val, QtGui.QIcon):
135-
raise TypeError('progress_icon should be a QIcon')
133+
""" The icon to show on the progress dialog."""
134+
if not isinstance(val, QtGui.QIcon) and not val is None:
135+
raise TypeError('progress_icon should be a QtGui.QIcon or None')
136136
self._progress_icon = val
137137

138138
### Private functions
@@ -857,18 +857,15 @@ def __reply_finished(self, callback, *args, **kwargs):
857857
reply.deleteLater()
858858

859859
def __create_progress_dialog(self, text, filesize):
860-
""" Creates a progress dialog.
860+
""" Creates a progress dialog. Uses manager.progress_icon (if set) to
861+
determine which icon to display on the dialog.
861862
862863
Parameters
863864
----------
864865
text : str
865866
The label to display on the dialog
866867
filesize : int
867868
The size of the file being transfered in bytes
868-
windowIcon : QIcon
869-
The icon which the progress dialog should show
870-
windowTitle : str
871-
The text next to the icon (relevant for Windows only)
872869
873870
Returns
874871
-------

0 commit comments

Comments
 (0)