Merge lp:~santi73/encuentro/qt5 into lp:encuentro

Proposed by Santiago Torres Batan
Status: Needs review
Proposed branch: lp:~santi73/encuentro/qt5
Merge into: lp:encuentro
Diff against target: 367 lines (+49/-43)
17 files modified
LEEME.txt (+2/-2)
debian/control (+1/-1)
encuentro/__init__.py (+2/-2)
encuentro/main.py (+2/-1)
encuentro/network.py (+1/-1)
encuentro/ui/central_panel.py (+14/-12)
encuentro/ui/dialogs.py (+2/-2)
encuentro/ui/main.py (+9/-5)
encuentro/ui/preferences.py (+3/-3)
encuentro/ui/remembering.py (+2/-2)
encuentro/ui/systray.py (+2/-1)
encuentro/ui/throbber.py (+3/-5)
encuentro/ui/wizard.py (+2/-2)
encuentro/update.py (+1/-1)
encuentro/utils.py (+1/-1)
setup.py (+1/-1)
source_encuentro.py (+1/-1)
To merge this branch: bzr merge lp:~santi73/encuentro/qt5
Reviewer Review Type Date Requested Status
Facundo Batista Pending
Review via email: mp+360976@code.launchpad.net

Commit message

- Encuentro Qt5 Port

Description of the change

- Encuentro Qt5 Port

To post a comment you must log in.

Unmerged revisions

304. By Santiago Torres Batan

- Encuentro QT5 Port.
- Modified all files to include and use Qt5. Also description files.
- Functional version, although backends are still broken.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'LEEME.txt'
--- LEEME.txt 2015-06-23 01:50:11 +0000
+++ LEEME.txt 2018-12-16 20:31:43 +0000
@@ -39,7 +39,7 @@
39 python 2.6.639 python 2.6.6
40 python-requests 2.2.140 python-requests 2.2.1
41 python-defer 1.0.641 python-defer 1.0.6
42 python-qt4 4.9.142 python-qt5 5.7
43 python-xdg 0.1543 python-xdg 0.15
44 python-bs4 4.1.044 python-bs4 4.1.0
45 python-notify 0.1.145 python-notify 0.1.1
@@ -57,7 +57,7 @@
57cualquier otra causa, tenés que seguir los siguientes pasos:57cualquier otra causa, tenés que seguir los siguientes pasos:
5858
59Es necesario hacer un branch del proyecto, o descargar el tarball,59Es necesario hacer un branch del proyecto, o descargar el tarball,
60tener instalado python-qt4 y python-notify. Al generar el virtualenv tenés60tener instalado python-qt5 y python-notify. Al generar el virtualenv tenés
61que utilizar la opción '--system-site-packages'.61que utilizar la opción '--system-site-packages'.
6262
63Crear el virtualenv:63Crear el virtualenv:
6464
=== modified file 'debian/control'
--- debian/control 2016-01-05 01:43:08 +0000
+++ debian/control 2018-12-16 20:31:43 +0000
@@ -14,7 +14,7 @@
14 python (>=2.7),14 python (>=2.7),
15 python-requests (>= 0.12.1),15 python-requests (>= 0.12.1),
16 python-defer (>= 1.0.6),16 python-defer (>= 1.0.6),
17 python-qt4 (>= 4.9.1),17 python-qt5 (>= 4.9.1),
18 python-xdg (>= 0.15),18 python-xdg (>= 0.15),
19 python-notify (>= 0.1.1),19 python-notify (>= 0.1.1),
20 python-bs4 (>= 4.1.0),20 python-bs4 (>= 4.1.0),
2121
=== modified file 'encuentro/__init__.py'
--- encuentro/__init__.py 2015-12-21 18:03:34 +0000
+++ encuentro/__init__.py 2018-12-16 20:31:43 +0000
@@ -73,7 +73,7 @@
73 import xdg # NOQA73 import xdg # NOQA
74with NiceImporter('requests', 'python-requests', '2.2.1'):74with NiceImporter('requests', 'python-requests', '2.2.1'):
75 import requests # NOQA75 import requests # NOQA
76with NiceImporter('PyQt4.QtCore', 'PyQt4', '4.9.1'):76with NiceImporter('PyQt5.QtCore', 'PyQt5', '4.9.1'):
77 import PyQt4.QtCore # NOQA77 import PyQt5.QtCore # NOQA
78with NiceImporter('defer', 'python-defer', '1.0.6'):78with NiceImporter('defer', 'python-defer', '1.0.6'):
79 import defer # NOQA79 import defer # NOQA
8080
=== modified file 'encuentro/main.py'
--- encuentro/main.py 2017-06-23 00:35:18 +0000
+++ encuentro/main.py 2018-12-16 20:31:43 +0000
@@ -30,7 +30,8 @@
30# will try to load EpisodeData from this namespace30# will try to load EpisodeData from this namespace
31from encuentro.data import EpisodeData # NOQA31from encuentro.data import EpisodeData # NOQA
3232
33from PyQt4.QtGui import QApplication, QIcon33from PyQt5.QtGui import QIcon
34from PyQt5.QtWidgets import QApplication
3435
35logger = logging.getLogger('encuentro.init')36logger = logging.getLogger('encuentro.init')
3637
3738
=== modified file 'encuentro/network.py'
--- encuentro/network.py 2017-06-23 00:35:18 +0000
+++ encuentro/network.py 2018-12-16 20:31:43 +0000
@@ -43,7 +43,7 @@
43 for n in "QDate QDateTime QString QTextStream QTime QUrl QVariant".split():43 for n in "QDate QDateTime QString QTextStream QTime QUrl QVariant".split():
44 sip.setapi(n, 2) # API v2 FTW!44 sip.setapi(n, 2) # API v2 FTW!
4545
46from PyQt4 import QtNetwork, QtCore # NOQA (import not at the top)46from PyQt5 import QtNetwork, QtCore # NOQA (import not at the top)
4747
48from encuentro import multiplatform, utils # NOQA (import not at the top)48from encuentro import multiplatform, utils # NOQA (import not at the top)
49from encuentro.config import config # NOQA (import not at the top)49from encuentro.config import config # NOQA (import not at the top)
5050
=== modified file 'encuentro/ui/central_panel.py'
--- encuentro/ui/central_panel.py 2015-12-31 04:19:10 +0000
+++ encuentro/ui/central_panel.py 2018-12-16 20:31:43 +0000
@@ -23,28 +23,30 @@
23import logging23import logging
24import operator24import operator
2525
26from PyQt4.QtGui import (26from PyQt5.QtWidgets import (
27 QAbstractItemView,27 QAbstractItemView,
28 QAbstractTextDocumentLayout,
29 QApplication,28 QApplication,
30 QBrush,
31 QColor,
32 QHBoxLayout,29 QHBoxLayout,
33 QImage,
34 QLabel,30 QLabel,
35 QMenu,31 QMenu,
36 QPixmap,
37 QPushButton,32 QPushButton,
38 QStyle,33 QStyle,
39 QStyleOptionViewItemV4,34 QStyleOptionViewItem,
40 QStyledItemDelegate,35 QStyledItemDelegate,
41 QTextDocument,
42 QTextEdit,36 QTextEdit,
43 QTreeWidgetItem,37 QTreeWidgetItem,
44 QVBoxLayout,38 QVBoxLayout,
45 QWidget,39 QWidget,
46)40)
47from PyQt4.QtCore import Qt, QSize, QAbstractTableModel41from PyQt5.QtGui import (
42 QAbstractTextDocumentLayout,
43 QBrush,
44 QColor,
45 QImage,
46 QPixmap,
47 QTextDocument,
48)
49from PyQt5.QtCore import Qt, QSize, QAbstractTableModel
4850
49from encuentro import data, image51from encuentro import data, image
50from encuentro.config import config, signal52from encuentro.config import config, signal
@@ -213,7 +215,7 @@
213 if index.column() != self._html_column:215 if index.column() != self._html_column:
214 return QStyledItemDelegate.paint(self, painter, option, index)216 return QStyledItemDelegate.paint(self, painter, option, index)
215217
216 options = QStyleOptionViewItemV4(option)218 options = QStyleOptionViewItem(option)
217 self.initStyleOption(options, index)219 self.initStyleOption(options, index)
218220
219 if options.widget is None:221 if options.widget is None:
@@ -238,7 +240,7 @@
238240
239 def sizeHint(self, option, index):241 def sizeHint(self, option, index):
240 """Calculate the needed size."""242 """Calculate the needed size."""
241 options = QStyleOptionViewItemV4(option)243 options = QStyleOptionViewItem(option)
242 self.initStyleOption(options, index)244 self.initStyleOption(options, index)
243245
244 doc = QTextDocument()246 doc = QTextDocument()
@@ -377,7 +379,7 @@
377 self.verticalHeader().hide()379 self.verticalHeader().hide()
378 header = self.horizontalHeader()380 header = self.horizontalHeader()
379 header.setStretchLastSection(False)381 header.setStretchLastSection(False)
380 header.setResizeMode(2, header.Stretch)382 header.setSectionResizeMode(2, header.Stretch)
381 header.sortIndicatorChanged.connect(self._model.sort)383 header.sortIndicatorChanged.connect(self._model.sort)
382384
383 # other behaviour configs385 # other behaviour configs
384386
=== modified file 'encuentro/ui/dialogs.py'
--- encuentro/ui/dialogs.py 2015-12-21 18:03:34 +0000
+++ encuentro/ui/dialogs.py 2018-12-16 20:31:43 +0000
@@ -20,7 +20,7 @@
2020
21"""Several dialogs."""21"""Several dialogs."""
2222
23from PyQt4.QtGui import (23from PyQt5.QtWidgets import (
24 QDialog,24 QDialog,
25 QDialogButtonBox,25 QDialogButtonBox,
26 QLabel,26 QLabel,
@@ -93,7 +93,7 @@
93if __name__ == '__main__':93if __name__ == '__main__':
94 import sys94 import sys
9595
96 from PyQt4.QtGui import QApplication96 from PyQt5.QtGui import QApplication
97 app = QApplication(sys.argv)97 app = QApplication(sys.argv)
9898
99 frame = UpdateDialog()99 frame = UpdateDialog()
100100
=== modified file 'encuentro/ui/main.py'
--- encuentro/ui/main.py 2017-06-23 00:35:18 +0000
+++ encuentro/ui/main.py 2018-12-16 20:31:43 +0000
@@ -26,10 +26,9 @@
2626
27import defer27import defer
2828
29from PyQt4.QtGui import (29from PyQt5.QtWidgets import (
30 QAction,30 QAction,
31 QCheckBox,31 QCheckBox,
32 QKeySequence,
33 QLabel,32 QLabel,
34 QLineEdit,33 QLineEdit,
35 QMessageBox,34 QMessageBox,
@@ -38,6 +37,9 @@
38 QStyle,37 QStyle,
39 QWidget,38 QWidget,
40)39)
40from PyQt5.QtGui import (
41 QKeySequence,
42)
4143
42from encuentro import multiplatform, data, update44from encuentro import multiplatform, data, update
43from encuentro.config import config, signal45from encuentro.config import config, signal
@@ -312,7 +314,9 @@
312 # stuff pending314 # stuff pending
313 m = "Hay programas todavía en proceso de descarga!\n¿Seguro quiere salir del programa?"315 m = "Hay programas todavía en proceso de descarga!\n¿Seguro quiere salir del programa?"
314 QMB = QMessageBox316 QMB = QMessageBox
315 dlg = QMB("Guarda!", m, QMB.Question, QMB.Yes, QMB.No, QMB.NoButton)317 dlg = QMB(QMB.Question, "Guarda!", m,
318 QMB.Yes | QMB.No, None)
319 #dlg = QMB("Guarda!", m, QMB.Question, QMB.Yes, QMB.No, QMB.NoButton)
316 opt = dlg.exec_()320 opt = dlg.exec_()
317 if opt != QMB.Yes:321 if opt != QMB.Yes:
318 logger.info("Quit cancelled")322 logger.info("Quit cancelled")
@@ -344,8 +348,8 @@
344 text = repr(text)348 text = repr(text)
345349
346 QMB = QMessageBox350 QMB = QMessageBox
347 dlg = QMB("Atención: " + err_type, text, QMB.Warning,351 dlg = QMB(QMB.Warning, "Atención: " + err_type, text,
348 QMB.Ok, QMB.NoButton, QMB.NoButton)352 QMB.Ok | QMB.NoButton, None)
349 dlg.exec_()353 dlg.exec_()
350354
351 def refresh_episodes(self, _=None):355 def refresh_episodes(self, _=None):
352356
=== modified file 'encuentro/ui/preferences.py'
--- encuentro/ui/preferences.py 2015-12-21 18:03:34 +0000
+++ encuentro/ui/preferences.py 2018-12-16 20:31:43 +0000
@@ -24,7 +24,7 @@
24import sys24import sys
25import logging25import logging
2626
27from PyQt4.QtGui import (27from PyQt5.QtWidgets import (
28 QCheckBox,28 QCheckBox,
29 QCompleter,29 QCompleter,
30 QDialog,30 QDialog,
@@ -39,7 +39,7 @@
39 QVBoxLayout,39 QVBoxLayout,
40 QWidget,40 QWidget,
41)41)
42from PyQt4.QtCore import Qt, QDir42from PyQt5.QtCore import Qt, QDir
4343
44from encuentro.config import config44from encuentro.config import config
4545
@@ -212,7 +212,7 @@
212 os.path.realpath(sys.argv[0]))))212 os.path.realpath(sys.argv[0]))))
213 sys.path.insert(0, project_basedir)213 sys.path.insert(0, project_basedir)
214214
215 from PyQt4.QtGui import QApplication215 from PyQt5.QtWidgets import QApplication
216 app = QApplication(sys.argv)216 app = QApplication(sys.argv)
217217
218 frame = PreferencesDialog()218 frame = PreferencesDialog()
219219
=== modified file 'encuentro/ui/remembering.py'
--- encuentro/ui/remembering.py 2015-12-21 18:03:34 +0000
+++ encuentro/ui/remembering.py 2018-12-16 20:31:43 +0000
@@ -18,8 +18,8 @@
1818
19"""The remembering widgets."""19"""The remembering widgets."""
2020
21from PyQt4.QtCore import Qt21from PyQt5.QtCore import Qt
22from PyQt4.QtGui import (22from PyQt5.QtWidgets import (
23 QMainWindow,23 QMainWindow,
24 QSplitter,24 QSplitter,
25 QTableView,25 QTableView,
2626
=== modified file 'encuentro/ui/systray.py'
--- encuentro/ui/systray.py 2015-12-21 18:03:34 +0000
+++ encuentro/ui/systray.py 2018-12-16 20:31:43 +0000
@@ -22,7 +22,8 @@
2222
23from encuentro import multiplatform23from encuentro import multiplatform
2424
25from PyQt4.QtGui import QSystemTrayIcon, QIcon, QMenu25from PyQt5.QtWidgets import QSystemTrayIcon, QMenu
26from PyQt5.QtGui import QIcon
2627
27logger = logging.getLogger("encuentro.systray")28logger = logging.getLogger("encuentro.systray")
2829
2930
=== modified file 'encuentro/ui/throbber.py'
--- encuentro/ui/throbber.py 2014-04-26 02:36:13 +0000
+++ encuentro/ui/throbber.py 2018-12-16 20:31:43 +0000
@@ -18,11 +18,9 @@
1818
19"""A throbber."""19"""A throbber."""
2020
21from PyQt4.QtGui import (21from PyQt5.QtWidgets import QLabel
22 QLabel,22from PyQt5.QtGui import QMovie
23 QMovie,23from PyQt5.QtCore import Qt
24)
25from PyQt4.QtCore import Qt
2624
27from encuentro import multiplatform25from encuentro import multiplatform
2826
2927
=== modified file 'encuentro/ui/wizard.py'
--- encuentro/ui/wizard.py 2015-12-21 18:03:34 +0000
+++ encuentro/ui/wizard.py 2018-12-16 20:31:43 +0000
@@ -22,7 +22,7 @@
2222
23import logging23import logging
2424
25from PyQt4.QtGui import (25from PyQt5.QtWidgets import (
26 QCheckBox,26 QCheckBox,
27 QDialog,27 QDialog,
28 QDialogButtonBox,28 QDialogButtonBox,
@@ -184,7 +184,7 @@
184if __name__ == '__main__':184if __name__ == '__main__':
185 import sys185 import sys
186186
187 from PyQt4.QtGui import QApplication187 from PyQt5.QtWidgets import QApplication
188 app = QApplication(sys.argv)188 app = QApplication(sys.argv)
189 app.have_metadata = lambda: False189 app.have_metadata = lambda: False
190 app.have_config = lambda: False190 app.have_config = lambda: False
191191
=== modified file 'encuentro/update.py'
--- encuentro/update.py 2017-06-23 00:35:18 +0000
+++ encuentro/update.py 2018-12-16 20:31:43 +0000
@@ -29,7 +29,7 @@
2929
30import defer30import defer
3131
32from PyQt4.QtGui import QApplication32from PyQt5.QtWidgets import QApplication
3333
34from encuentro import utils34from encuentro import utils
35from encuentro.config import config35from encuentro.config import config
3636
=== modified file 'encuentro/utils.py'
--- encuentro/utils.py 2016-01-04 16:20:52 +0000
+++ encuentro/utils.py 2018-12-16 20:31:43 +0000
@@ -21,7 +21,7 @@
21import defer21import defer
22import os22import os
2323
24from PyQt4 import QtNetwork, QtCore24from PyQt5 import QtNetwork, QtCore
2525
26_qt_network_manager = QtNetwork.QNetworkAccessManager()26_qt_network_manager = QtNetwork.QNetworkAccessManager()
2727
2828
=== modified file 'setup.py'
--- setup.py 2016-01-04 21:45:26 +0000
+++ setup.py 2018-12-16 20:31:43 +0000
@@ -23,7 +23,7 @@
23 python 2.723 python 2.7
24 python-requests 0.12.124 python-requests 0.12.1
25 python-defer 1.0.625 python-defer 1.0.6
26 python-qt4 4.9.126 python-qt5 5.7
27 python-xdg 0.1527 python-xdg 0.15
28 python-notify 0.1.1 # not really needed, but provides notifications28 python-notify 0.1.1 # not really needed, but provides notifications
29 python-bs4 4.1.029 python-bs4 4.1.0
3030
=== modified file 'source_encuentro.py'
--- source_encuentro.py 2014-05-02 14:03:39 +0000
+++ source_encuentro.py 2018-12-16 20:31:43 +0000
@@ -29,5 +29,5 @@
29 attach_file_if_exists(report, fname, "EncuentroLog")29 attach_file_if_exists(report, fname, "EncuentroLog")
3030
31 # info about dependencies31 # info about dependencies
32 packages = ["python-requests", "python-defer", "python-qt4", "python-xdg"]32 packages = ["python-requests", "python-defer", "python-qt5", "python-xdg"]
33 attach_related_packages(report, packages)33 attach_related_packages(report, packages)

Subscribers

People subscribed via source and target branches