Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Replace exec_ with exec and fix deprecations #887

Merged
merged 1 commit into from
Aug 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions orangecontrib/text/widgets/owguardian.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ def __init__(self):
self.api_dlg = self.CredentialsDialog(self)
self.api_dlg.accept(silent=True)
gui.button(self.controlArea, self, 'The Guardian API Key',
callback=self.api_dlg.exec_,
callback=self.api_dlg.exec,
focusPolicy=Qt.NoFocus)

# Query
query_box = gui.widgetBox(self.controlArea, 'Query', addSpace=True)
query_box = gui.widgetBox(self.controlArea, 'Query')
self.query_box = QueryBox(query_box, self, self.recent_queries,
callback=self.new_query_input)

Expand Down
2 changes: 1 addition & 1 deletion orangecontrib/text/widgets/owimportdocuments.py
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ def main(argv=sys.argv):
if path is not None:
w.setCurrentPath(path)

app.exec_()
app.exec()
w.saveSettings()
w.onDeleteWidget()
return 0
Expand Down
4 changes: 2 additions & 2 deletions orangecontrib/text/widgets/ownyt.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ def __init__(self):
# API key
self.api_dlg = self.APICredentialsDialog(self)
self.api_dlg.accept(silent=True)
gui.button(self.controlArea, self, 'Article API Key', callback=self.api_dlg.exec_,
gui.button(self.controlArea, self, 'Article API Key', callback=self.api_dlg.exec,
focusPolicy=Qt.NoFocus)

# Query
query_box = gui.widgetBox(self.controlArea, 'Query', addSpace=True)
query_box = gui.widgetBox(self.controlArea, 'Query')
self.query_box = QueryBox(query_box, self, self.recent_queries,
callback=self.new_query_input)

Expand Down
10 changes: 5 additions & 5 deletions orangecontrib/text/widgets/owpubmed.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def __init__(self):
# API key
self.email_dlg = self.EmailCredentialsDialog(self)
gui.button(self.controlArea, self, 'Email',
callback=self.email_dlg.exec_,
callback=self.email_dlg.exec,
focusPolicy=Qt.NoFocus)
gui.separator(self.controlArea)

Expand All @@ -146,7 +146,7 @@ def __init__(self):
# RECORD SEARCH
self.search_tabs = gui.tabWidget(self.controlArea)
# --- Regular search ---
regular_search_box = gui.widgetBox(self.controlArea, addSpace=True)
regular_search_box = gui.widgetBox(self.controlArea)

# Author
self.author_input = gui.lineEdit(regular_search_box, self, 'author',
Expand Down Expand Up @@ -207,7 +207,7 @@ def __init__(self):
regular_search_box.setMaximumSize(tab_height)

# --- Advanced search ---
advanced_search_box = gui.widgetBox(self.controlArea, addSpace=True)
advanced_search_box = gui.widgetBox(self.controlArea)
# Advanced search query.
h_box = gui.hBox(advanced_search_box)
self.advanced_query_input = QTextEdit(h_box)
Expand Down Expand Up @@ -243,7 +243,7 @@ def __init__(self):
# RECORD RETRIEVAL
# Text includes box.
text_includes_box = gui.widgetBox(
self.controlArea, 'Text includes', addSpace=True)
self.controlArea, 'Text includes')
self.authors_checkbox = gui.checkBox(
text_includes_box, self, 'includes_authors', 'Authors')
self.title_checkbox = gui.checkBox(
Expand Down Expand Up @@ -468,7 +468,7 @@ def set_keyword_list(self):

def open_calendar(self, widget):
cal_dlg = CalendarDialog(self, 'Date picker')
if cal_dlg.exec_():
if cal_dlg.exec():
widget.setText(cal_dlg.picked_date)

def send_report(self):
Expand Down
2 changes: 1 addition & 1 deletion orangecontrib/text/widgets/owtwitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def add_row(label, items):
self.setFocus() # to widget itself to show placeholder for query_edit

def open_key_dialog(self):
self.api_dlg.exec_()
self.api_dlg.exec()

def mode_toggle(self):
if self.mode == self.AUTHOR:
Expand Down