Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

General: Update MacOs to PySide6 #4255

Merged
merged 45 commits into from
Jan 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
4775bec
Merge branch 'release/3.15.x' into feature/OP-4634_Use-qtpy-in-tools
iLLiCiTiT Dec 21, 2022
227c61d
use qtpy in publisher tool
iLLiCiTiT Dec 21, 2022
fa48c9d
use qtpy in workfiles tool
iLLiCiTiT Dec 21, 2022
0b5b7f5
use qtpy in subset manager
iLLiCiTiT Dec 21, 2022
e6a7de5
use qtpy in scene inventory
iLLiCiTiT Dec 21, 2022
40d4489
use qtpy in pyblish pype
iLLiCiTiT Dec 21, 2022
d8d99f8
use qtpy in loader
iLLiCiTiT Dec 21, 2022
678f6c6
use qtpy in library loader
iLLiCiTiT Dec 21, 2022
9f616c2
use qtpy in mayalookassigner
iLLiCiTiT Dec 21, 2022
e9ca36d
use qtpy in creator
iLLiCiTiT Dec 21, 2022
8893954
use qtpy in attribute definitions
iLLiCiTiT Dec 21, 2022
3468a28
use qtpy in remaining qt utils
iLLiCiTiT Dec 21, 2022
5361cfa
use qtpy in style
iLLiCiTiT Dec 21, 2022
c45c1c7
non-python host launch script uses qtpy
iLLiCiTiT Dec 21, 2022
ab2299f
use qtpy in helper widgets
iLLiCiTiT Dec 21, 2022
b03947b
use qtpy in qargparse
iLLiCiTiT Dec 21, 2022
ddba174
scriptsmenu is using qtpy
iLLiCiTiT Dec 21, 2022
e514534
global loader plugins are using qtpy
iLLiCiTiT Dec 21, 2022
727b17b
added qtpy 1.11.3 into python 2 vendor
iLLiCiTiT Dec 21, 2022
8277adc
updated QtPy to 2.3.0
iLLiCiTiT Dec 21, 2022
8e19d09
use class attributes from classes instead of objects
iLLiCiTiT Dec 21, 2022
7cd57e0
support new method for regex filtering
iLLiCiTiT Dec 21, 2022
c849c83
added pyside6 resources
iLLiCiTiT Dec 21, 2022
1fdf261
added ability to define qtbinding per platform
iLLiCiTiT Dec 21, 2022
b5b8119
use class attributes from classes
iLLiCiTiT Dec 21, 2022
940cb35
fix usage of filteregexp
iLLiCiTiT Dec 21, 2022
7ce1dfb
fix center window 'maybe'
iLLiCiTiT Dec 21, 2022
dd8a7e5
fix usage of qtpy in assets widget
iLLiCiTiT Dec 21, 2022
fd611bd
changed PySide2 to PySide2 in pyproject toml
iLLiCiTiT Dec 21, 2022
0aa0111
fix checked int for pyside6
iLLiCiTiT Jan 6, 2023
679becc
fix work with checkstate constants
iLLiCiTiT Jan 6, 2023
77df80a
removed unused import
iLLiCiTiT Jan 6, 2023
aaf9be0
keep Pyside6 only for macos
iLLiCiTiT Jan 9, 2023
bc61b45
use right constants
iLLiCiTiT Jan 16, 2023
681364b
fix custom UserType items
iLLiCiTiT Jan 16, 2023
118d1ee
Fix 'QRegExpValidator' vs. 'QRegularExpressionValidator'
iLLiCiTiT Jan 16, 2023
1d2cf74
fix also 'QRegExp' vs. 'QRegularExpression'
iLLiCiTiT Jan 16, 2023
0aad4cd
ignore 'QT_API' before application launch
iLLiCiTiT Jan 16, 2023
2546274
Fix whitespace
iLLiCiTiT Jan 16, 2023
459ed76
fix access to 'CE_ItemViewItem' constant
iLLiCiTiT Jan 16, 2023
782957b
Merge branch 'release/3.15.x' into feature/OP-4634_Use-qtpy-in-tools
iLLiCiTiT Jan 16, 2023
da99fb2
update qtpy
iLLiCiTiT Jan 16, 2023
9c01caf
again fix constant changes
iLLiCiTiT Jan 17, 2023
aac0860
Merge branch 'release/3.15.x' into feature/OP-4634_Use-qtpy-in-tools
iLLiCiTiT Jan 17, 2023
0994795
fix another one constant usage
iLLiCiTiT Jan 17, 2023
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
25 changes: 13 additions & 12 deletions openpype/lib/applications.py
Original file line number Diff line number Diff line change
Expand Up @@ -908,24 +908,25 @@ def __init__(self, application, executable, env_group=None, **data):
self.launch_args.extend(self.data.pop("app_args"))

# Handle launch environemtns
env = self.data.pop("env", None)
if env is not None and not isinstance(env, dict):
src_env = self.data.pop("env", None)
if src_env is not None and not isinstance(src_env, dict):
self.log.warning((
"Passed `env` kwarg has invalid type: {}. Expected: `dict`."
" Using `os.environ` instead."
).format(str(type(env))))
env = None
).format(str(type(src_env))))
src_env = None

if env is None:
env = os.environ
if src_env is None:
src_env = os.environ

# subprocess.Popen keyword arguments
self.kwargs = {
"env": {
key: str(value)
for key, value in env.items()
}
ignored_env = {"QT_API", }
env = {
key: str(value)
for key, value in src_env.items()
if key not in ignored_env
}
# subprocess.Popen keyword arguments
self.kwargs = {"env": env}

if platform.system().lower() == "windows":
# Detach new process from currently running process on Windows
Expand Down
2 changes: 1 addition & 1 deletion openpype/modules/log_viewer/tray/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def __init__(self, parent=None, placeholder=""):
super(SearchComboBox, self).__init__(parent)

self.setEditable(True)
self.setInsertPolicy(self.NoInsert)
self.setInsertPolicy(QtWidgets.QComboBox.NoInsert)
self.lineEdit().setPlaceholderText(placeholder)

# Apply completer settings
Expand Down
12 changes: 8 additions & 4 deletions openpype/modules/sync_server/tray/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,10 @@ def refresh(self):
if selected_index and \
selected_index.isValid() and \
not self._selection_changed:
mode = QtCore.QItemSelectionModel.Select | \
QtCore.QItemSelectionModel.Rows
mode = (
QtCore.QItemSelectionModel.Select
| QtCore.QItemSelectionModel.Rows
)
self.project_list.selectionModel().select(selected_index, mode)

if self.current_project:
Expand Down Expand Up @@ -271,8 +273,10 @@ def _set_selection(self):
for selected_id in self._selected_ids:
index = self.model.get_index(selected_id)
if index and index.isValid():
mode = QtCore.QItemSelectionModel.Select | \
QtCore.QItemSelectionModel.Rows
mode = (
QtCore.QItemSelectionModel.Select
| QtCore.QItemSelectionModel.Rows
)
self.selection_model.select(index, mode)
existing_ids.add(selected_id)

Expand Down
2 changes: 1 addition & 1 deletion openpype/plugins/load/copy_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def load(self, context, name=None, namespace=None, data=None):

@staticmethod
def copy_file_to_clipboard(path):
from Qt import QtCore, QtWidgets
from qtpy import QtCore, QtWidgets

clipboard = QtWidgets.QApplication.clipboard()
assert clipboard, "Must have running QApplication instance"
Expand Down
2 changes: 1 addition & 1 deletion openpype/plugins/load/copy_file_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def load(self, context, name=None, namespace=None, data=None):

@staticmethod
def copy_path_to_clipboard(path):
from Qt import QtWidgets
from qtpy import QtWidgets

clipboard = QtWidgets.QApplication.clipboard()
assert clipboard, "Must have running QApplication instance"
Expand Down
2 changes: 1 addition & 1 deletion openpype/plugins/load/delete_old_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import clique
from pymongo import UpdateOne
import qargparse
from Qt import QtWidgets, QtCore
from qtpy import QtWidgets, QtCore

from openpype import style
from openpype.client import get_versions, get_representations
Expand Down
2 changes: 1 addition & 1 deletion openpype/plugins/load/delivery.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import copy
from collections import defaultdict

from Qt import QtWidgets, QtCore, QtGui
from qtpy import QtWidgets, QtCore, QtGui

from openpype.client import get_representations
from openpype.pipeline import load, Anatomy
Expand Down
2 changes: 1 addition & 1 deletion openpype/scripts/non_python_host_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

def show_error_messagebox(title, message, detail_message=None):
"""Function will show message and process ends after closing it."""
from Qt import QtWidgets, QtCore
from qtpy import QtWidgets, QtCore
from openpype import style

app = QtWidgets.QApplication([])
Expand Down
2 changes: 1 addition & 1 deletion openpype/style/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def _load_stylesheet():

def _load_font():
"""Load and register fonts into Qt application."""
from Qt import QtGui
from qtpy import QtGui

# Check if font ids are still loaded
if _Cache.font_ids is not None:
Expand Down
2 changes: 1 addition & 1 deletion openpype/style/color_defs.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def create_qcolor(*args):
*args (tuple): It is possible to pass initialization arguments for
Qcolor.
"""
from Qt import QtGui
from qtpy import QtGui

return QtGui.QColor(*args)

Expand Down
Loading