WIP: user/rcu: new aport #469

Draft
ayakael wants to merge 3 commits from rcu/initial into edge
2 changed files with 730 additions and 0 deletions

43
user/rcu/APKBUILD Normal file
View file

@ -0,0 +1,43 @@
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=rcu
pkgver=2023.3
_gittag="d2023.001(c)"
pkgrel=0
pkgdesc="RCU is a desktop client for all-in-one offline management of reMarkable e-paper tablet"
url="http://www.davisr.me/projects/rcu/"
license="AGPL-3.0-only"
arch="all"
depends="
py3-paramiko
py3-protobuf
py3-six
py3-pdfminer
py3-pillow
py3-certifi
py3-pikepdf
py3-pyside6
"
makedepends="py3-setuptools py3-gpep517 py3-wheel"
source="
https://lab.ilot.io/mirrors/rcu/-/archive/$_gittag/rcu-$_gittag.tar.gz
rcu-pyside6.patch
"
builddir="$srcdir"/$pkgname-$_gittag
options="!check"
build() {
gpep517 build-wheel \
--wheel-dir .dist \
--output-fd 3 3>&1 >&2
}
package() {
python3 -m installer -d "$pkgdir" \
.dist/*.whl
}
sha512sums="
60ad594b9140125225b8d8500d9efad1c8f48a61b9bdda9967154e3efe4d9d66d0df2d8d1c4f6cf9c839bc4a4031906a87dd4bfc674cbf18ac05dc4dda48b44e rcu-d2023.001(c).tar.gz
6a43037545ea1d1e0d4e0921f0fbd7f85802030a70eb42e7de4d9988adfcd267d6b94e2f9acf13b265c5006b5e330ce45f7d03b905b7299da380a60f2fa3a96b rcu-pyside6.patch
"

687
user/rcu/rcu-pyside6.patch Normal file
View file

@ -0,0 +1,687 @@
diff --git a/src/controllers/ConnectionDialogController.py b/src/controllers/ConnectionDialogController.py
index ad7ed727a..01c695510 100644
--- a/src/controllers/ConnectionDialogController.py
+++ b/src/controllers/ConnectionDialogController.py
@@ -4,7 +4,7 @@ The connection dialog allows a user to edit device connection
information and initiate a connection.
RCU is a management client for the reMarkable Tablet.
-Copyright (C) 2020-21 Davis Remmel
+Copyright (C) 2020-23 Davis Remmel
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
@@ -26,11 +26,11 @@ import sys
import pathlib
import controllers
import log
-from PySide2.QtCore import Qt, QSettings, QObject, QEvent, QPoint, \
+from PySide6.QtCore import Qt, QSettings, QObject, QEvent, QPoint, \
QCoreApplication
-from PySide2.QtWidgets import QMenu, QShortcut, QApplication, QAction, \
+from PySide6.QtWidgets import QMenu, QApplication, \
QInputDialog, QLineEdit, QMessageBox
-from PySide2.QtGui import QKeySequence
+from PySide6.QtGui import QKeySequence, QShortcut, QAction
class OptionButtonEventFilter(QObject):
def eventFilter(self, obj, event):
diff --git a/src/controllers/ConnectionUtilityController.py b/src/controllers/ConnectionUtilityController.py
index 0cce532e9..8a9589dbe 100644
--- a/src/controllers/ConnectionUtilityController.py
+++ b/src/controllers/ConnectionUtilityController.py
@@ -3,7 +3,7 @@ ConnectionUtilityController.py
This is the main window of the application.
RCU is a management client for the reMarkable Tablet.
-Copyright (C) 2020-22 Davis Remmel
+Copyright (C) 2020-23 Davis Remmel
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
@@ -19,10 +19,10 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
'''
-from PySide2.QtCore import Qt, QObject, QEvent, QCoreApplication, \
+from PySide6.QtCore import Qt, QObject, QEvent, QCoreApplication, \
QSettings, QTimer
-from PySide2.QtWidgets import QListWidgetItem, QShortcut, QApplication
-from PySide2.QtGui import QKeySequence, QPalette, QPixmap
+from PySide6.QtWidgets import QListWidgetItem, QApplication
+from PySide6.QtGui import QKeySequence, QPalette, QPixmap, QShortcut
from controllers import UIController
from panes import paneslist, IncompatiblePane
from pathlib import Path
diff --git a/src/controllers/RecoveryOSController.py b/src/controllers/RecoveryOSController.py
index ef177b26e..c645eee9d 100644
--- a/src/controllers/RecoveryOSController.py
+++ b/src/controllers/RecoveryOSController.py
@@ -23,7 +23,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
from . import UIController
from pathlib import Path
import log
-from PySide2.QtCore import QTimer
+from PySide6.QtCore import QTimer
class RecoveryOSController(UIController):
adir = Path(__file__).parent.parent
diff --git a/src/controllers/UIController.py b/src/controllers/UIController.py
index c71a76d69..c9b639735 100644
--- a/src/controllers/UIController.py
+++ b/src/controllers/UIController.py
@@ -21,8 +21,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
import pathlib
import sys
-from PySide2.QtCore import QFile, QCoreApplication
-from PySide2.QtUiTools import QUiLoader
+from PySide6.QtCore import QFile, QCoreApplication
+from PySide6.QtUiTools import QUiLoader
import log
import re
diff --git a/src/docrender/document_renderer.py b/src/docrender/document_renderer.py
index 8f51ed4da..752fc4556 100644
--- a/src/docrender/document_renderer.py
+++ b/src/docrender/document_renderer.py
@@ -25,11 +25,11 @@ from model.template import Template
from model.pens.textures import PencilTextures
from .document_renderer_page import DocumentPage
-from PySide2.QtGui import QPainter, QImage, QPen, QPixmap, \
+from PySide6.QtGui import QPainter, QImage, QPen, QPixmap, \
QPageSize, QColor, QBrush, QPainterPath, QTransform
-from PySide2.QtCore import Qt, QByteArray, QIODevice, QBuffer, QSizeF, \
+from PySide6.QtCore import Qt, QByteArray, QIODevice, QBuffer, QSizeF, \
QSettings, QRectF, QPointF, QCoreApplication
-from PySide2.QtPrintSupport import QPrinter
+from PySide6.QtPrintSupport import QPrinter
from pathlib import Path
import json
diff --git a/src/docrender/document_renderer_page.py b/src/docrender/document_renderer_page.py
index 1e5b1cd5d..08cff3f8e 100644
--- a/src/docrender/document_renderer_page.py
+++ b/src/docrender/document_renderer_page.py
@@ -24,11 +24,11 @@ from model.template import Template
from model import lines
from model.pens.textures import PencilTextures
-from PySide2.QtGui import QPainter, QImage, QPen, QPixmap, \
+from PySide6.QtGui import QPainter, QImage, QPen, QPixmap, \
QPageSize, QColor, QBrush, QPainterPath, QTransform
-from PySide2.QtCore import Qt, QByteArray, QIODevice, QBuffer, QSizeF, \
+from PySide6.QtCore import Qt, QByteArray, QIODevice, QBuffer, QSizeF, \
QSettings, QRectF, QPointF
-from PySide2.QtPrintSupport import QPrinter
+from PySide6.QtPrintSupport import QPrinter
from pathlib import Path
import json
@@ -833,7 +833,7 @@ class DocumentPageLayer:
devpx = width * height
bytepp = 4 # ARGB32
# This is the primary image buffer. It needs to be pre-allocated
- # to prevent memory access errors in PySide2. See:
+ # to prevent memory access errors in PySide6. See:
# https://github.com/matplotlib/matplotlib/issues/4283#issuecomment-95950441
image_ref = QByteArray()
image_ref.fill('\0', devpx * bytepp)
diff --git a/src/main.py b/src/main.py
index 03cbbb45c..f94dd1274 100644
--- a/src/main.py
+++ b/src/main.py
@@ -70,9 +70,9 @@ from docrender import DocRenderPrefs
from pathlib import Path
import sys
-from PySide2.QtWidgets import QApplication, QStyleFactory
-from PySide2.QtCore import QCoreApplication, Qt, QThreadPool, QSettings
-from PySide2.QtGui import QFont, QPalette, QColor, QIcon, QPixmap
+from PySide6.QtWidgets import QApplication, QStyleFactory
+from PySide6.QtCore import QCoreApplication, Qt, QThreadPool, QSettings
+from PySide6.QtGui import QFont, QPalette, QColor, QIcon, QPixmap
# Handle Ctrl-C
@@ -137,10 +137,10 @@ if args.cli:
# Start main application
if __name__ == '__main__':
- QCoreApplication.setAttribute(Qt.AA_DisableWindowContextHelpButton)
+ # QCoreApplication.setAttribute(Qt.AA_DisableWindowContextHelpButton)
QCoreApplication.setAttribute(Qt.AA_ShareOpenGLContexts)
- QCoreApplication.setAttribute(Qt.AA_EnableHighDpiScaling)
- QCoreApplication.setAttribute(Qt.AA_UseHighDpiPixmaps)
+ # QCoreApplication.setAttribute(Qt.AA_EnableHighDpiScaling)
+ # QCoreApplication.setAttribute(Qt.AA_UseHighDpiPixmaps)
QCoreApplication.setOrganizationName('davisr')
QCoreApplication.setOrganizationDomain('davisr.me')
QCoreApplication.setApplicationName('rcu')
diff --git a/src/model/display.py b/src/model/display.py
index e400e39dc..f91983ddb 100644
--- a/src/model/display.py
+++ b/src/model/display.py
@@ -45,8 +45,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
'''
import log
-from PySide2.QtCore import QByteArray, QBuffer, QIODevice
-from PySide2.QtGui import QImage, QMatrix
+from PySide6.QtCore import QByteArray, QBuffer, QIODevice
+from PySide6.QtGui import QImage, QMatrix3x3
import math
import gc
import ctypes
@@ -139,7 +139,7 @@ class DisplayRM1(DisplayRM):
QImage.Format_Grayscale8)
center = qimage.rect().center()
- matrix = QMatrix()
+ matrix = QMatrix3x3()
matrix.translate(center.x(), center.y())
matrix.rotate(90)
qimage_rot = qimage.transformed(matrix)
@@ -255,7 +255,7 @@ class DisplayRM2(DisplayRM):
# Rotate -90 deg.
center = qimage.rect().center()
- matrix = QMatrix()
+ matrix = QMatrix3x3()
matrix.translate(center.x(), center.y())
matrix.rotate(-90)
diff --git a/src/model/document.py b/src/model/document.py
index 465b2b70b..a6d6975c8 100644
--- a/src/model/document.py
+++ b/src/model/document.py
@@ -34,12 +34,12 @@ import re
import pikepdf
import urllib.request
-#from PySide2.QtWidgets import QGraphicsScene
-from PySide2.QtGui import QPainter, QImage, QPen, QPixmap, \
+#from PySide6.QtWidgets import QGraphicsScene
+from PySide6.QtGui import QPainter, QImage, QPen, QPixmap, \
QPageSize, QColor, QBrush, QPainterPath, QTransform
-from PySide2.QtCore import Qt, QByteArray, QIODevice, QBuffer, QSizeF, \
+from PySide6.QtCore import Qt, QByteArray, QIODevice, QBuffer, QSizeF, \
QSettings, QRectF, QPointF
-from PySide2.QtPrintSupport import QPrinter
+from PySide6.QtPrintSupport import QPrinter
import svgtools
diff --git a/src/model/pens/ballpoint.py b/src/model/pens/ballpoint.py
index e391c6334..c58bc0543 100644
--- a/src/model/pens/ballpoint.py
+++ b/src/model/pens/ballpoint.py
@@ -19,8 +19,8 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
'''
-from PySide2.QtCore import Qt, QLineF
-from PySide2.QtGui import QPen
+from PySide6.QtCore import Qt, QLineF
+from PySide6.QtGui import QPen
class BallpointPen(QPen):
def __init__(self, *args, **kwargs):
diff --git a/src/model/pens/calligraphy.py b/src/model/pens/calligraphy.py
index 7981b5b53..c6927c196 100644
--- a/src/model/pens/calligraphy.py
+++ b/src/model/pens/calligraphy.py
@@ -19,8 +19,8 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
'''
-from PySide2.QtCore import Qt, QLineF
-from PySide2.QtGui import QPen
+from PySide6.QtCore import Qt, QLineF
+from PySide6.QtGui import QPen
class CalligraphyPen(QPen):
def __init__(self, *args, **kwargs):
diff --git a/src/model/pens/erasearea.py b/src/model/pens/erasearea.py
index dd0ebf3d8..353541fe3 100644
--- a/src/model/pens/erasearea.py
+++ b/src/model/pens/erasearea.py
@@ -19,8 +19,8 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
'''
-from PySide2.QtCore import Qt
-from PySide2.QtGui import QPen
+from PySide6.QtCore import Qt
+from PySide6.QtGui import QPen
class EraseAreaPen(QPen):
def __init__(self, *args, **kwargs):
diff --git a/src/model/pens/eraser.py b/src/model/pens/eraser.py
index e0c1624ff..0e84542c0 100644
--- a/src/model/pens/eraser.py
+++ b/src/model/pens/eraser.py
@@ -19,8 +19,8 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
'''
-from PySide2.QtCore import Qt, QLineF
-from PySide2.QtGui import QPen, QPainter
+from PySide6.QtCore import Qt, QLineF
+from PySide6.QtGui import QPen, QPainter
class EraserPen(QPen):
# A PDF graphics state to be used during renders.
diff --git a/src/model/pens/fineliner.py b/src/model/pens/fineliner.py
index 547db3aff..0112a1b32 100644
--- a/src/model/pens/fineliner.py
+++ b/src/model/pens/fineliner.py
@@ -19,8 +19,8 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
'''
-from PySide2.QtCore import Qt, QLineF
-from PySide2.QtGui import QPen
+from PySide6.QtCore import Qt, QLineF
+from PySide6.QtGui import QPen
class FinelinerPen(QPen):
def __init__(self, *args, **kwargs):
diff --git a/src/model/pens/generic.py b/src/model/pens/generic.py
index c0efd9a1f..1dfc9d01d 100644
--- a/src/model/pens/generic.py
+++ b/src/model/pens/generic.py
@@ -19,8 +19,8 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
'''
-from PySide2.QtCore import Qt, QLineF
-from PySide2.QtGui import QPen
+from PySide6.QtCore import Qt, QLineF
+from PySide6.QtGui import QPen
class GenericPen(QPen):
def __init__(self, *args, **kwargs):
diff --git a/src/model/pens/highlighter.py b/src/model/pens/highlighter.py
index 507132e63..9e2c8d6fe 100644
--- a/src/model/pens/highlighter.py
+++ b/src/model/pens/highlighter.py
@@ -19,8 +19,8 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
'''
-from PySide2.QtCore import Qt
-from PySide2.QtGui import QPen, QColor, QPainterPath, QPainter, \
+from PySide6.QtCore import Qt
+from PySide6.QtGui import QPen, QColor, QPainterPath, QPainter, \
QPainterPathStroker
class HighlighterPen(QPen):
diff --git a/src/model/pens/marker.py b/src/model/pens/marker.py
index 6adadb5dc..088310e35 100644
--- a/src/model/pens/marker.py
+++ b/src/model/pens/marker.py
@@ -19,8 +19,8 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
'''
-from PySide2.QtCore import Qt, QLineF
-from PySide2.QtGui import QPen
+from PySide6.QtCore import Qt, QLineF
+from PySide6.QtGui import QPen
class MarkerPen(QPen):
def __init__(self, *args, **kwargs):
diff --git a/src/model/pens/mechanicalpencil.py b/src/model/pens/mechanicalpencil.py
index 24ea1753e..30fc6b3e6 100644
--- a/src/model/pens/mechanicalpencil.py
+++ b/src/model/pens/mechanicalpencil.py
@@ -19,8 +19,8 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
'''
-from PySide2.QtCore import Qt, QLineF
-from PySide2.QtGui import QPen, QBrush, QColor
+from PySide6.QtCore import Qt, QLineF
+from PySide6.QtGui import QPen, QBrush, QColor
from pathlib import Path
class MechanicalPencilPen(QPen):
diff --git a/src/model/pens/mechanicalpencil_1.py b/src/model/pens/mechanicalpencil_1.py
index 165bd8f2b..3466a6dce 100644
--- a/src/model/pens/mechanicalpencil_1.py
+++ b/src/model/pens/mechanicalpencil_1.py
@@ -20,8 +20,8 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
'''
-from PySide2.QtCore import Qt, QLineF
-from PySide2.QtGui import QPen, QBrush, QColor
+from PySide6.QtCore import Qt, QLineF
+from PySide6.QtGui import QPen, QBrush, QColor
from pathlib import Path
class MechanicalPencilPen1(QPen):
diff --git a/src/model/pens/paintbrush.py b/src/model/pens/paintbrush.py
index 1e35f084d..6033e67bc 100644
--- a/src/model/pens/paintbrush.py
+++ b/src/model/pens/paintbrush.py
@@ -19,8 +19,8 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
'''
-from PySide2.QtCore import Qt, QLineF
-from PySide2.QtGui import QPen, QBrush, QColor, QTransform
+from PySide6.QtCore import Qt, QLineF
+from PySide6.QtGui import QPen, QBrush, QColor, QTransform
import math
diff --git a/src/model/pens/pencil.py b/src/model/pens/pencil.py
index e66416c4f..ec5a9fbd8 100644
--- a/src/model/pens/pencil.py
+++ b/src/model/pens/pencil.py
@@ -19,8 +19,8 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
'''
-from PySide2.QtCore import Qt, QLineF
-from PySide2.QtGui import QPen, QBrush, QColor, QPainter, QPainterPath
+from PySide6.QtCore import Qt, QLineF
+from PySide6.QtGui import QPen, QBrush, QColor, QPainter, QPainterPath
import math
diff --git a/src/model/pens/textures.py b/src/model/pens/textures.py
index 16f0cdc9c..f5b85f3aa 100644
--- a/src/model/pens/textures.py
+++ b/src/model/pens/textures.py
@@ -19,8 +19,8 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
'''
-from PySide2.QtCore import Qt
-from PySide2.QtGui import QPen, QBrush, QImage, QBitmap
+from PySide6.QtCore import Qt
+from PySide6.QtGui import QPen, QBrush, QImage, QBitmap
from pathlib import Path
class PencilTextures:
diff --git a/src/model/rcu.py b/src/model/rcu.py
index c5e9efb60..47854660a 100644
--- a/src/model/rcu.py
+++ b/src/model/rcu.py
@@ -23,8 +23,8 @@ from .config import Config
import log
import urllib.request
-from PySide2.QtCore import QThreadPool, QSettings, QTimer
-from PySide2.QtGui import QImage
+from PySide6.QtCore import QThreadPool, QSettings, QTimer
+from PySide6.QtGui import QImage
from worker import Worker
import select
import base64
diff --git a/src/model/template.py b/src/model/template.py
index c29136c0d..d32b0c355 100644
--- a/src/model/template.py
+++ b/src/model/template.py
@@ -23,7 +23,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
from pathlib import Path
import log
import json
-from PySide2.QtCore import QByteArray
+from PySide6.QtCore import QByteArray
from worker import Worker
import tempfile
import uuid
diff --git a/src/optionals.txt b/src/optionals.txt
index 8da8651da..cc8a611e4 100644
--- a/src/optionals.txt
+++ b/src/optionals.txt
@@ -1,2 +1,2 @@
-pyside2>=5.14.2
+pyside6
pikepdf==7.2.0
diff --git a/src/panes/about/pane.py b/src/panes/about/pane.py
index c3bf59873..d08ac7165 100644
--- a/src/panes/about/pane.py
+++ b/src/panes/about/pane.py
@@ -26,9 +26,9 @@ import sys
from worker import Worker
-from PySide2.QtCore import QByteArray, QUrl, QSize, QCoreApplication
-from PySide2.QtGui import QIcon
-from PySide2.QtWidgets import QMessageBox
+from PySide6.QtCore import QByteArray, QUrl, QSize, QCoreApplication
+from PySide6.QtGui import QIcon
+from PySide6.QtWidgets import QMessageBox
import urllib.request
import hashlib
diff --git a/src/panes/deviceinfo/UploadFirmwareController.py b/src/panes/deviceinfo/UploadFirmwareController.py
index 4de61786f..84a2444b1 100644
--- a/src/panes/deviceinfo/UploadFirmwareController.py
+++ b/src/panes/deviceinfo/UploadFirmwareController.py
@@ -26,8 +26,8 @@ from pathlib import Path
from model.firmware import Firmware
-from PySide2.QtCore import QSettings
-from PySide2.QtWidgets import QFileDialog, QDialogButtonBox, QMessageBox
+from PySide6.QtCore import QSettings
+from PySide6.QtWidgets import QFileDialog, QDialogButtonBox, QMessageBox
from worker import Worker
diff --git a/src/panes/deviceinfo/backup/BackupController.py b/src/panes/deviceinfo/backup/BackupController.py
index 19f22d6dd..abe6da894 100644
--- a/src/panes/deviceinfo/backup/BackupController.py
+++ b/src/panes/deviceinfo/backup/BackupController.py
@@ -31,10 +31,10 @@ import platform
from .Backup import BackupFile
-from PySide2.QtWidgets import QTreeWidgetItem, QHeaderView, \
+from PySide6.QtWidgets import QTreeWidgetItem, QHeaderView, \
QMenu, QTreeWidget, QFrame, QAbstractItemView, QMessageBox, \
QSizePolicy
-from PySide2.QtCore import Qt, QRect
+from PySide6.QtCore import Qt, QRect
import hashlib
diff --git a/src/panes/deviceinfo/pane.py b/src/panes/deviceinfo/pane.py
index 7e767d8a9..226c92410 100644
--- a/src/panes/deviceinfo/pane.py
+++ b/src/panes/deviceinfo/pane.py
@@ -25,10 +25,10 @@ import controllers
import log
from worker import Worker
from . import backup
-from PySide2.QtWidgets import QInputDialog, QLineEdit, QMessageBox, \
+from PySide6.QtWidgets import QInputDialog, QLineEdit, QMessageBox, \
QMenu, QFileDialog
-from PySide2.QtGui import QIcon, QPixmap
-from PySide2.QtCore import Qt, QSize, QSettings, QCoreApplication
+from PySide6.QtGui import QIcon, QPixmap
+from PySide6.QtCore import Qt, QSize, QSettings, QCoreApplication
import time
import platform
from .BatteryInfoController import BatteryInfoController
diff --git a/src/panes/display/pane.py b/src/panes/display/pane.py
index 3ea5b261f..df35d068d 100644
--- a/src/panes/display/pane.py
+++ b/src/panes/display/pane.py
@@ -19,10 +19,10 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
'''
-from PySide2.QtCore import Qt, QSize, QObject, QEvent, QSettings, \
+from PySide6.QtCore import Qt, QSize, QObject, QEvent, QSettings, \
QCoreApplication
-from PySide2.QtGui import QImage, QPixmap, QColor, QIcon
-from PySide2.QtWidgets import QFileDialog, QWidget
+from PySide6.QtGui import QImage, QPixmap, QColor, QIcon
+from PySide6.QtWidgets import QFileDialog, QWidget
from pathlib import Path
from datetime import datetime
from controllers import UIController
diff --git a/src/panes/incompatible/pane.py b/src/panes/incompatible/pane.py
index 3bc272d8a..0bc4476d5 100644
--- a/src/panes/incompatible/pane.py
+++ b/src/panes/incompatible/pane.py
@@ -23,7 +23,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
from pathlib import Path
from controllers import UIController
import log
-from PySide2.QtGui import QPixmap
+from PySide6.QtGui import QPixmap
class IncompatiblePane(UIController):
adir = Path(__file__).parent.parent
diff --git a/src/panes/notebooks/pane.py b/src/panes/notebooks/pane.py
index abbe0dbe2..d18d8f458 100644
--- a/src/panes/notebooks/pane.py
+++ b/src/panes/notebooks/pane.py
@@ -36,12 +36,13 @@ import traceback
import pikepdf
from docrender import DocRenderPrefs
-from PySide2.QtCore import Qt, QRect, QSize, QTimer, QSettings, \
+from PySide6.QtCore import Qt, QRect, QSize, QTimer, QSettings, \
QObject, QEvent, QCoreApplication
-from PySide2.QtWidgets import QTreeWidget, QTreeWidgetItem, QMenu, \
+from PySide6.QtWidgets import QTreeWidget, QTreeWidgetItem, QMenu, \
QFrame, QAbstractItemView, QHeaderView, QFileDialog, QSizePolicy, \
- QColorDialog, QShortcut, QInputDialog, QLineEdit
-from PySide2.QtGui import QIcon, QColor, QPixmap, QKeySequence
+ QColorDialog, QInputDialog, QLineEdit
+from PySide6.QtGui import QIcon, QColor, QPixmap, QKeySequence, \
+ QShortcut, QAction
def prettydate(then, abs=False):
if not then:
@@ -1703,7 +1704,6 @@ class CollectionTreeWidgetItem(QTreeWidgetItem):
return False
-from PySide2.QtWidgets import QMenu, QAction, QMessageBox
class DocumentTreeWidgetItem(QTreeWidgetItem):
def __init__(self, controller, *args, **kwargs):
super(type(self), self).__init__(*args, **kwargs)
diff --git a/src/panes/software/pane.py b/src/panes/software/pane.py
index aed99d523..633dd0347 100644
--- a/src/panes/software/pane.py
+++ b/src/panes/software/pane.py
@@ -22,9 +22,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
import log
from controllers import UIController
from pathlib import Path
-from PySide2.QtCore import Qt, QSize, QRect, QSettings
-from PySide2.QtGui import QIcon
-from PySide2.QtWidgets import QListWidget, QListWidgetItem, \
+from PySide6.QtCore import Qt, QSize, QRect, QSettings
+from PySide6.QtGui import QIcon
+from PySide6.QtWidgets import QListWidget, QListWidgetItem, \
QFileDialog, QMessageBox, QSizePolicy
class SoftwarePane(UIController):
diff --git a/src/panes/splash/pane.py b/src/panes/splash/pane.py
index 16535a18d..9ce1f3b20 100644
--- a/src/panes/splash/pane.py
+++ b/src/panes/splash/pane.py
@@ -19,9 +19,9 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
'''
-from PySide2.QtCore import QSize, Qt, QObject, QEvent, QSettings
-from PySide2.QtGui import QPixmap, QImage, QIcon
-from PySide2.QtWidgets import QFileDialog
+from PySide6.QtCore import QSize, Qt, QObject, QEvent, QSettings
+from PySide6.QtGui import QPixmap, QImage, QIcon
+from PySide6.QtWidgets import QFileDialog
from pathlib import Path
from datetime import datetime
import log
diff --git a/src/panes/templates/importcontroller.py b/src/panes/templates/importcontroller.py
index 9faf0010d..9a05e523f 100644
--- a/src/panes/templates/importcontroller.py
+++ b/src/panes/templates/importcontroller.py
@@ -24,10 +24,10 @@ from controllers import UIController
from pathlib import Path
import log
-from PySide2.QtCore import QByteArray, QSize, Qt, QTimer, QBuffer, \
+from PySide6.QtCore import QByteArray, QSize, Qt, QTimer, QBuffer, \
QIODevice, QCoreApplication
-from PySide2.QtGui import QFontDatabase, QPixmap, QIcon, QImage, QMatrix
-from PySide2.QtWidgets import QListWidgetItem, QMessageBox
+from PySide6.QtGui import QFontDatabase, QPixmap, QIcon, QImage
+from PySide6.QtWidgets import QListWidgetItem, QMessageBox
from PIL import Image, ImageFont, ImageDraw, ImageOps
diff --git a/src/panes/templates/pane.py b/src/panes/templates/pane.py
index dfb8bd8e3..9ba1ab265 100644
--- a/src/panes/templates/pane.py
+++ b/src/panes/templates/pane.py
@@ -22,13 +22,13 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
from controllers import UIController
from pathlib import Path
import log
-from PySide2.QtWidgets import QTreeWidgetItem, QTreeWidget, QMenu, \
+from PySide6.QtWidgets import QTreeWidgetItem, QTreeWidget, QMenu, \
QFrame, QAbstractItemView, QMessageBox, QHeaderView, QFileDialog, \
QSizePolicy
-from PySide2.QtSvg import QSvgWidget
-from PySide2.QtCore import Qt, QRect, QByteArray, QSize, QObject, \
+from PySide6.QtSvgWidgets import QSvgWidget
+from PySide6.QtCore import Qt, QRect, QByteArray, QSize, QObject, \
QEvent, QSettings, QCoreApplication
-from PySide2.QtGui import QIcon
+from PySide6.QtGui import QIcon
from model.template import Template
import platform
import re
diff --git a/src/svgtools.py b/src/svgtools.py
index 5bf383293..68d705024 100644
--- a/src/svgtools.py
+++ b/src/svgtools.py
@@ -3,7 +3,7 @@ svgtools.py
This file provides functions for manipulating SVG and bitmap images.
RCU is a management client for the reMarkable Tablet.
-Copyright (C) 2020-22 Davis Remmel
+Copyright (C) 2020-23 Davis Remmel
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
@@ -19,9 +19,9 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
'''
-from PySide2.QtCore import QByteArray, QIODevice, QBuffer
-from PySide2.QtGui import QImage, QPainter, QPixmap
-from PySide2.QtSvg import QSvgRenderer
+from PySide6.QtCore import QByteArray, QIODevice, QBuffer
+from PySide6.QtGui import QImage, QPainter, QPixmap
+from PySide6.QtSvg import QSvgRenderer
import log
diff --git a/src/worker.py b/src/worker.py
index 362ec5658..a4d4e55b9 100644
--- a/src/worker.py
+++ b/src/worker.py
@@ -41,7 +41,7 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
'''
-from PySide2 import QtCore
+from PySide6 import QtCore
import traceback
import sys