Skip to content
This repository was archived by the owner on Nov 20, 2025. It is now read-only.

Commit 75675d8

Browse files
committed
2 parents 94740ea + c235fe6 commit 75675d8

File tree

9 files changed

+23
-23
lines changed

9 files changed

+23
-23
lines changed

QOpenScienceFramework/compat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def safe_encode(s, enc='utf-8', errors='strict'):
4343
def get_QUrl(url):
4444
""" Qt4 doesn url handling a bit different than Qt5, so check for that
4545
here."""
46-
if QtCore.QT_VERSION_STR < '5':
46+
if QtCore.PYQT_VERSION_STR < '5':
4747
return QtCore.QUrl.fromEncoded(url)
4848
else:
4949
return QtCore.QUrl(url)

QOpenScienceFramework/events.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ class EventDispatcher(QtCore.QObject):
3030
a login event, a listener should have the function handle_login."""
3131

3232
# List of possible events this dispatcher can emit
33-
logged_in = QtCore.pyqtSignal()
33+
logged_in = QtCore.Signal()
3434
""" PyQt Signal emitted when a user just logged in. """
35-
logged_out = QtCore.pyqtSignal()
35+
logged_out = QtCore.Signal()
3636
""" PyQt Signal emitted when a user just logged out. """
3737

3838
def __init__(self, *args, **kwargs):
@@ -141,7 +141,7 @@ def __init__(self):
141141
""" Constructor """
142142
super(Notifier,self).__init__()
143143

144-
@QtCore.pyqtSlot('QString', 'QString')
144+
@QtCore.Slot('QString', 'QString')
145145
def error(self, title, message):
146146
""" Show an error message in a 'critical' QMessageBox.
147147
@@ -157,7 +157,7 @@ def error(self, title, message):
157157
message
158158
)
159159

160-
@QtCore.pyqtSlot('QString', 'QString')
160+
@QtCore.Slot('QString', 'QString')
161161
def warning(self, title, message):
162162
""" Show a warning message in a 'warning' QMessageBox.
163163
@@ -173,7 +173,7 @@ def warning(self, title, message):
173173
message
174174
)
175175

176-
@QtCore.pyqtSlot('QString', 'QString')
176+
@QtCore.Slot('QString', 'QString')
177177
def info(self, title, message):
178178
""" Show an info message in an 'information' QMessageBox.
179179
@@ -189,7 +189,7 @@ def info(self, title, message):
189189
message
190190
)
191191

192-
@QtCore.pyqtSlot('QString', 'QString')
192+
@QtCore.Slot('QString', 'QString')
193193
def success(self, title, message):
194194
""" Show a success message in a 'success' QMessageBox.
195195

QOpenScienceFramework/loginwindow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class LoginWindow(WebView):
3535
""" A Login window for the OSF """
3636

3737
# Login event is emitted after successfull login
38-
logged_in = QtCore.pyqtSignal()
38+
logged_in = QtCore.Signal()
3939
""" Event fired when user successfully logged in. """
4040

4141
def __init__(self, *args, **kwargs):

QOpenScienceFramework/manager.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ class ConnectionManager(QtNetwork.QNetworkAccessManager):
4141

4242
# The maximum number of allowed redirects
4343
MAX_REDIRECTS = 5
44-
error_message = QtCore.pyqtSignal('QString','QString')
44+
error_message = QtCore.Signal('QString','QString')
4545
"""PyQt signal to send an error message."""
46-
warning_message = QtCore.pyqtSignal('QString','QString')
46+
warning_message = QtCore.Signal('QString','QString')
4747
"""PyQt signal to send a warning message."""
48-
info_message = QtCore.pyqtSignal('QString','QString')
48+
info_message = QtCore.Signal('QString','QString')
4949
"""PyQt signal to send an info message."""
50-
success_message = QtCore.pyqtSignal('QString','QString')
50+
success_message = QtCore.Signal('QString','QString')
5151
"""PyQt signal to send a success message."""
5252

5353
# Dictionary holding requests in progress, so that they can be repeated if
@@ -330,7 +330,7 @@ def get(self, url, callback, *args, **kwargs):
330330
The dialog to send the progress indication to. Will be included in the
331331
reply object so that it is accessible in the downloadProgress slot, by
332332
calling self.sender().property('progressDialog')
333-
abortSignal : QtCore.pyqtSignal
333+
abortSignal : QtCore.Signal
334334
This signal will be attached to the reply objects abort() slot, so that
335335
the operation can be aborted from outside if necessary.
336336
*args (optional)
@@ -435,15 +435,15 @@ def post(self, url, callback, data_to_send, *args, **kwargs):
435435

436436
# Sadly, Qt4 and Qt5 show some incompatibility in that QUrl no longer has the
437437
# addQueryItem function in Qt5. This has moved to a differen QUrlQuery object
438-
if QtCore.QT_VERSION_STR < '5':
438+
if QtCore.PYQT_VERSION_STR < '5':
439439
postdata = QtCore.QUrl()
440440
else:
441441
postdata = QtCore.QUrlQuery()
442442
# Add data
443443
for varname in data_to_send:
444444
postdata.addQueryItem(varname, data_to_send.get(varname))
445445
# Convert to QByteArray for transport
446-
if QtCore.QT_VERSION_STR < '5':
446+
if QtCore.PYQT_VERSION_STR < '5':
447447
final_postdata = postdata.encodedQuery()
448448
else:
449449
final_postdata = safe_encode(postdata.toString(QtCore.QUrl.FullyEncoded))
@@ -481,7 +481,7 @@ def put(self, url, callback, *args, **kwargs):
481481
The dialog to send the progress indication to. Will be included in the
482482
reply object so that it is accessible in the downloadProgress slot, by
483483
calling self.sender().property('progressDialog')
484-
abortSignal : QtCore.pyqtSignal
484+
abortSignal : QtCore.Signal
485485
This signal will be attached to the reply objects abort() slot, so that
486486
the operation can be aborted from outside if necessary.
487487
*args (optional)
@@ -544,7 +544,7 @@ def delete(self, url, callback, *args, **kwargs):
544544
function to call whenever an error occurs. Should be able to accept
545545
the reply object as an argument. This function is also called if the
546546
operation is aborted by the user him/herself.
547-
abortSignal : QtCore.pyqtSignal
547+
abortSignal : QtCore.Signal
548548
This signal will be attached to the reply objects abort() slot, so that
549549
the operation can be aborted from outside if necessary.
550550
*args (optional)

QOpenScienceFramework/widgets/loginwindow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class LoginWindow(WebView):
3535
""" A Login window for the OSF """
3636

3737
# Login event is emitted after successfull login
38-
logged_in = QtCore.pyqtSignal()
38+
logged_in = QtCore.Signal()
3939
""" Event fired when user successfully logged in. """
4040

4141
def __init__(self, *args, **kwargs):

QOpenScienceFramework/widgets/osfexplorer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class OSFExplorer(QtWidgets.QWidget):
5656
# The maximum size an image may have to be downloaded for preview
5757
preview_size_limit = 1024**2/2.0
5858
# Signal that is sent if image preview should be aborted
59-
abort_preview = QtCore.pyqtSignal()
59+
abort_preview = QtCore.Signal()
6060
""" PyQt signal emitted when an image preview is to be aborted. """
6161

6262
def __init__(self, manager, tree_widget=None, locale='en_us'):

QOpenScienceFramework/widgets/projecttree.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class ProjectTree(QtWidgets.QTreeWidget):
4747
in a treeview widget."""
4848

4949
# Event fired when refresh of tree is finished
50-
refreshFinished = QtCore.pyqtSignal()
50+
refreshFinished = QtCore.Signal()
5151
""" PyQt signal that emits when the tree is completely refreshed. """
5252
# Maximum of items to return per request (e.g. files in a folder). OSF
5353
# automatically paginates its results

QOpenScienceFramework/widgets/userbadge.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ class UserBadge(QtWidgets.QWidget):
3535

3636
# Class variables
3737
# Login and logout events
38-
logout_request = QtCore.pyqtSignal()
38+
logout_request = QtCore.Signal()
3939
""" PyQt signal to send a logout request. """
40-
login_request = QtCore.pyqtSignal()
40+
login_request = QtCore.Signal()
4141
""" PyQt signal to send a login request. """
4242

4343
def __init__(self, manager, icon_size=None):

example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def __init__(self):
118118
if __name__ == "__main__":
119119
app = QtWidgets.QApplication(sys.argv)
120120

121-
print("Using Qt {}".format(QtCore.QT_VERSION_STR))
121+
print("Using Qt {}".format(QtCore.PYQT_VERSION_STR))
122122

123123
# Enable High DPI display with PyQt5
124124
if hasattr(QtCore.Qt, 'AA_UseHighDpiPixmaps'):

0 commit comments

Comments
 (0)