Skip to content

Commit 2b41053

Browse files
committed
owcsvimport: Use PyOwned mixin
1 parent 644bb92 commit 2b41053

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Orange/widgets/data/owcsvimport.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
from xml.sax.saxutils import escape
2424
from functools import singledispatch
25-
from concurrent import futures
2625
from contextlib import ExitStack
2726

2827
import typing
@@ -51,6 +50,7 @@
5150
import Orange.data
5251

5352
from Orange.widgets import widget, gui, settings
53+
from Orange.widgets.utils.concurrent import PyOwned
5454
from Orange.widgets.utils import textimport, concurrent as qconcurrent
5555
from Orange.widgets.utils.overlay import OverlayWidget
5656
from Orange.widgets.utils.settings import (
@@ -866,9 +866,6 @@ def __cancel_task(self):
866866
w.progress.cancel = True
867867
w.done.disconnect(self.__handle_result)
868868
w.progress.progressChanged.disconnect(self.__set_read_progress)
869-
w.progress.deleteLater()
870-
# wait until completion
871-
futures.wait([w.future()])
872869
self.__watcher = None
873870

874871
def cancel(self):
@@ -1299,7 +1296,7 @@ def wrapper(*args, **kwargs):
12991296
return wrapper
13001297

13011298

1302-
class TaskState(QObject):
1299+
class TaskState(QObject, PyOwned):
13031300
class UserCancelException(BaseException):
13041301
"""User interrupt exception."""
13051302

0 commit comments

Comments
 (0)