# HG changeset patch # User Dirk Olmes # Date 1508636444 -7200 # Node ID 3ce39af93e775c61c13becda9dc1f552264a9fc9 # Parent f715378371ab0c53d38e9552b19cc13562299ee9 Update to PyQt5 diff -r f715378371ab -r 3ce39af93e77 AddFeed.py --- a/AddFeed.py Sat Oct 21 10:31:02 2017 +0200 +++ b/AddFeed.py Sun Oct 22 03:40:44 2017 +0200 @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from PyQt4.QtGui import QDialog +from PyQt5.QtWidgets import QDialog from Ui_AddFeed import Ui_AddFeed import logging diff -r f715378371ab -r 3ce39af93e77 FeedEntryItemDelegate.py --- a/FeedEntryItemDelegate.py Sat Oct 21 10:31:02 2017 +0200 +++ b/FeedEntryItemDelegate.py Sun Oct 22 03:40:44 2017 +0200 @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- -from PyQt4.QtGui import QFont, QStyledItemDelegate +from PyQt5.QtGui import QFont +from PyQt5.QtWidgets import QStyledItemDelegate class FeedEntryItemDelegate(QStyledItemDelegate): def __init__(self): diff -r f715378371ab -r 3ce39af93e77 FeedSettings.py --- a/FeedSettings.py Sat Oct 21 10:31:02 2017 +0200 +++ b/FeedSettings.py Sun Oct 22 03:40:44 2017 +0200 @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from PyQt4.QtGui import QDialog +from PyQt5.QtWidgets import QDialog from Ui_FeedSettings import Ui_FeedSettings """ diff -r f715378371ab -r 3ce39af93e77 MainWindow.py --- a/MainWindow.py Sat Oct 21 10:31:02 2017 +0200 +++ b/MainWindow.py Sun Oct 22 03:40:44 2017 +0200 @@ -5,8 +5,9 @@ from FeedEntryItemDelegate import FeedEntryItemDelegate from FeedSettings import FeedSettings from PreferencesDialog import PreferencesDialog -from PyQt4.QtCore import QUrl -from PyQt4.QtGui import QApplication, QDesktopServices, QMainWindow, QWidget +from PyQt5.QtCore import QUrl +from PyQt5.QtWidgets import QApplication, QMainWindow, QWidget +from PyQt5.QtGui import QDesktopServices from Ui_MainWindow import Ui_MainWindow STATUS_MESSAGE_DISPLAY_MILLIS = 20000 diff -r f715378371ab -r 3ce39af93e77 MainWindow.ui --- a/MainWindow.ui Sat Oct 21 10:31:02 2017 +0200 +++ b/MainWindow.ui Sun Oct 22 03:40:44 2017 +0200 @@ -116,7 +116,7 @@ 0 0 992 - 23 + 25 @@ -360,7 +360,7 @@ actionQuit - activated() + triggered() MainWindow close() @@ -376,7 +376,7 @@ actionAddFeed - activated() + triggered() MainWindow addFeed() @@ -424,7 +424,7 @@ actionMarkSelectedRead - activated() + triggered() MainWindow toggleReadOnSelectedEntry() @@ -440,7 +440,7 @@ actionOpenLink - activated() + triggered() MainWindow openLinkFromSelectedEntry() @@ -456,7 +456,7 @@ actionOpenInBrowser - activated() + triggered() MainWindow openSelectedEntryInBrowser() @@ -472,7 +472,7 @@ actionPreferences - activated() + triggered() MainWindow showPreferences() @@ -488,7 +488,7 @@ actionFeedSettings - activated() + triggered() MainWindow showFeedSettings() @@ -504,7 +504,7 @@ actionMarkFeedRead - activated() + triggered() MainWindow markSelectedFeedRead() @@ -520,7 +520,7 @@ actionDeleteFeed - activated() + triggered() MainWindow deleteFeed() @@ -552,7 +552,7 @@ actionMarkSelectedEntriesRead - activated() + triggered() MainWindow markSelectedEntriesRead() @@ -568,7 +568,7 @@ actionCopyArticleURL - activated() + triggered() MainWindow copyArticleURLToClipboard() @@ -584,7 +584,7 @@ actionZoomIn - activated() + triggered() MainWindow zoomIn() @@ -600,7 +600,7 @@ actionZoomOut - activated() + triggered() MainWindow zoomOut() @@ -616,7 +616,7 @@ actionAboutQt - activated() + triggered() MainWindow aboutQtClicked() diff -r f715378371ab -r 3ce39af93e77 Makefile --- a/Makefile Sat Oct 21 10:31:02 2017 +0200 +++ b/Makefile Sun Oct 22 03:40:44 2017 +0200 @@ -6,12 +6,12 @@ all: $(PY_FILES) $(RC_FILES) %.py: %.ui - pyuic4 -o Ui_$@ $< + pyuic5 -o Ui_$@ $< %_rc.py: %.qrc - pyrcc4 -o $@ $< + pyrcc5 -o $@ $< .PHONY: clean clean: - rm $(PY_FILES) + #rm $(PY_FILES) rm *.pyc diff -r f715378371ab -r 3ce39af93e77 PreferencesDialog.py --- a/PreferencesDialog.py Sat Oct 21 10:31:02 2017 +0200 +++ b/PreferencesDialog.py Sun Oct 22 03:40:44 2017 +0200 @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from PyQt4.QtGui import QDialog +from PyQt5.QtWidgets import QDialog from Ui_Preferences import Ui_Preferences class PreferencesDialog(QDialog): diff -r f715378371ab -r 3ce39af93e77 feedworm.py --- a/feedworm.py Sat Oct 21 10:31:02 2017 +0200 +++ b/feedworm.py Sun Oct 22 03:40:44 2017 +0200 @@ -6,8 +6,9 @@ sip.setapi('QVariant', 2) from MainWindow import MainWindow -from PyQt4 import QtGui -from PyQt4.QtNetwork import QNetworkProxy +from PyQt5 import QtGui +from PyQt5.QtWidgets import QApplication +from PyQt5.QtNetwork import QNetworkProxy import BackendFactory import logging import sys @@ -35,7 +36,7 @@ preferences = backend.preferences() setupProxy(preferences) - app = QtGui.QApplication(sys.argv) + app = QApplication(sys.argv) mainWindow = MainWindow(backend) maximized = preferences.startMaximized()