# HG changeset patch # User Dirk Olmes # Date 1510273601 -3600 # Node ID 5b6e65b90784aff19e1971c788852cc3afb679e8 # Parent bb8b1d9c52b2963b2b94d937b1ced6b3b57ad66e Port to PyQt5 diff -r bb8b1d9c52b2 -r 5b6e65b90784 RemoteViewer/ConnectionDialog.py --- a/RemoteViewer/ConnectionDialog.py Sat Oct 29 02:30:41 2016 +0200 +++ b/RemoteViewer/ConnectionDialog.py Fri Nov 10 01:26:41 2017 +0100 @@ -1,5 +1,4 @@ -from PyQt4.QtCore import Qt -from PyQt4.QtGui import QDialog +from PyQt5.QtWidgets import QDialog from .Connection import Connection from .Connection import Type from .Ui_ConnectionDialog import Ui_ConnectionDialog diff -r bb8b1d9c52b2 -r 5b6e65b90784 RemoteViewer/LogViewer.py --- a/RemoteViewer/LogViewer.py Sat Oct 29 02:30:41 2016 +0200 +++ b/RemoteViewer/LogViewer.py Fri Nov 10 01:26:41 2017 +0100 @@ -1,5 +1,5 @@ -from PyQt4.QtCore import Qt, pyqtSignal -from PyQt4.QtGui import QDialog +from PyQt5.QtCore import Qt, pyqtSignal +from PyQt5.QtWidgets import QDialog from .Ui_LogViewer import Ui_LogViewer class LogViewer(QDialog): diff -r bb8b1d9c52b2 -r 5b6e65b90784 RemoteViewer/Makefile --- a/RemoteViewer/Makefile Sat Oct 29 02:30:41 2016 +0200 +++ b/RemoteViewer/Makefile Fri Nov 10 01:26:41 2017 +0100 @@ -1,17 +1,18 @@ -# find all .ui files and generate corresponding filenames ending in .py -UI_PY_FILES=$(patsubst %.ui, Ui_%.py, $(wildcard *.ui)) + +UI_FILES = $(wildcard *.ui) +UI_PY_FILES = $(UI_FILES:%.ui=Ui_%.py) RC_FILES = $(patsubst %.qrc, %_rc.py, $(wildcard *.qrc)) all: $(UI_PY_FILES) $(RC_FILES) Ui_%.py: %.ui - pyuic4 --from-imports -o $@ $< + pyuic5 --from-imports -o $@ $< %_rc.py: %.qrc - pyrcc4 -py3 -o $@ $< + pyrcc5 -o $@ $< .PHONY: clean - clean: rm $(UI_PY_FILES) + rm $(RC_FILES) rm *.pyc diff -r bb8b1d9c52b2 -r 5b6e65b90784 RemoteViewer/PasswordDialog.py --- a/RemoteViewer/PasswordDialog.py Sat Oct 29 02:30:41 2016 +0200 +++ b/RemoteViewer/PasswordDialog.py Fri Nov 10 01:26:41 2017 +0100 @@ -1,4 +1,4 @@ -from PyQt4.QtGui import QDialog +from PyQt5.QtWidgets import QDialog from .Ui_PasswordDialog import Ui_PasswordDialog class PasswordDialog(QDialog): diff -r bb8b1d9c52b2 -r 5b6e65b90784 RemoteViewer/RemoteViewer.py --- a/RemoteViewer/RemoteViewer.py Sat Oct 29 02:30:41 2016 +0200 +++ b/RemoteViewer/RemoteViewer.py Fri Nov 10 01:26:41 2017 +0100 @@ -1,4 +1,4 @@ -from PyQt4.QtGui import QMainWindow +from PyQt5.QtWidgets import QMainWindow from PyQtLib.ExceptionSafeSlot import ExceptionSafeSlot from PyQtLib.GenericListModel import GenericListModel diff -r bb8b1d9c52b2 -r 5b6e65b90784 __main__.py --- a/__main__.py Sat Oct 29 02:30:41 2016 +0200 +++ b/__main__.py Fri Nov 10 01:26:41 2017 +0100 @@ -6,7 +6,7 @@ sip.setapi('QVariant', 2) import sys -from PyQt4.QtGui import QApplication +from PyQt5.QtWidgets import QApplication from RemoteViewer.RemoteViewer import RemoteViewer if __name__ == '__main__':