# HG changeset patch # User Dirk Olmes # Date 1510274736 -3600 # Node ID 8b1678851b54b5b7239f9aae22c20821fd022ba0 # Parent f715378371ab0c53d38e9552b19cc13562299ee9# Parent 39080a271bf37521135f826997086a5103d2468d merge the pyqt5 branch into the default branch diff -r f715378371ab -r 8b1678851b54 AddFeed.py --- a/AddFeed.py Sat Oct 21 10:31:02 2017 +0200 +++ b/AddFeed.py Fri Nov 10 01:45:36 2017 +0100 @@ -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 8b1678851b54 FeedEntryItemDelegate.py --- a/FeedEntryItemDelegate.py Sat Oct 21 10:31:02 2017 +0200 +++ b/FeedEntryItemDelegate.py Fri Nov 10 01:45:36 2017 +0100 @@ -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 8b1678851b54 FeedSettings.py --- a/FeedSettings.py Sat Oct 21 10:31:02 2017 +0200 +++ b/FeedSettings.py Fri Nov 10 01:45:36 2017 +0100 @@ -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 8b1678851b54 MainWindow.py --- a/MainWindow.py Sat Oct 21 10:31:02 2017 +0200 +++ b/MainWindow.py Fri Nov 10 01:45:36 2017 +0100 @@ -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 8b1678851b54 MainWindow.ui --- a/MainWindow.ui Sat Oct 21 10:31:02 2017 +0200 +++ b/MainWindow.ui Fri Nov 10 01:45:36 2017 +0100 @@ -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 8b1678851b54 Makefile --- a/Makefile Sat Oct 21 10:31:02 2017 +0200 +++ b/Makefile Fri Nov 10 01:45:36 2017 +0100 @@ -1,17 +1,18 @@ -# find all .ui files and generate corresponding filenames ending in .py -PY_FILES = $(patsubst %.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: $(PY_FILES) $(RC_FILES) +all: $(UI_PY_FILES) $(RC_FILES) -%.py: %.ui - pyuic4 -o Ui_$@ $< +Ui_%.py: %.ui + pyuic5 -o $@ $< %_rc.py: %.qrc - pyrcc4 -o $@ $< + pyrcc5 -o $@ $< .PHONY: clean clean: - rm $(PY_FILES) + rm $(UI_PY_FILES) + rm $(RC_FILES) rm *.pyc diff -r f715378371ab -r 8b1678851b54 PreferencesDialog.py --- a/PreferencesDialog.py Sat Oct 21 10:31:02 2017 +0200 +++ b/PreferencesDialog.py Fri Nov 10 01:45:36 2017 +0100 @@ -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 8b1678851b54 feedworm.py --- a/feedworm.py Sat Oct 21 10:31:02 2017 +0200 +++ b/feedworm.py Fri Nov 10 01:45:36 2017 +0100 @@ -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()