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
1=== modified file 'LEEME.txt'
2--- LEEME.txt 2015-06-23 01:50:11 +0000
3+++ LEEME.txt 2018-12-16 20:31:43 +0000
4@@ -39,7 +39,7 @@
5 python 2.6.6
6 python-requests 2.2.1
7 python-defer 1.0.6
8- python-qt4 4.9.1
9+ python-qt5 5.7
10 python-xdg 0.15
11 python-bs4 4.1.0
12 python-notify 0.1.1
13@@ -57,7 +57,7 @@
14 cualquier otra causa, tenés que seguir los siguientes pasos:
15
16 Es necesario hacer un branch del proyecto, o descargar el tarball,
17-tener instalado python-qt4 y python-notify. Al generar el virtualenv tenés
18+tener instalado python-qt5 y python-notify. Al generar el virtualenv tenés
19 que utilizar la opción '--system-site-packages'.
20
21 Crear el virtualenv:
22
23=== modified file 'debian/control'
24--- debian/control 2016-01-05 01:43:08 +0000
25+++ debian/control 2018-12-16 20:31:43 +0000
26@@ -14,7 +14,7 @@
27 python (>=2.7),
28 python-requests (>= 0.12.1),
29 python-defer (>= 1.0.6),
30- python-qt4 (>= 4.9.1),
31+ python-qt5 (>= 4.9.1),
32 python-xdg (>= 0.15),
33 python-notify (>= 0.1.1),
34 python-bs4 (>= 4.1.0),
35
36=== modified file 'encuentro/__init__.py'
37--- encuentro/__init__.py 2015-12-21 18:03:34 +0000
38+++ encuentro/__init__.py 2018-12-16 20:31:43 +0000
39@@ -73,7 +73,7 @@
40 import xdg # NOQA
41 with NiceImporter('requests', 'python-requests', '2.2.1'):
42 import requests # NOQA
43-with NiceImporter('PyQt4.QtCore', 'PyQt4', '4.9.1'):
44- import PyQt4.QtCore # NOQA
45+with NiceImporter('PyQt5.QtCore', 'PyQt5', '4.9.1'):
46+ import PyQt5.QtCore # NOQA
47 with NiceImporter('defer', 'python-defer', '1.0.6'):
48 import defer # NOQA
49
50=== modified file 'encuentro/main.py'
51--- encuentro/main.py 2017-06-23 00:35:18 +0000
52+++ encuentro/main.py 2018-12-16 20:31:43 +0000
53@@ -30,7 +30,8 @@
54 # will try to load EpisodeData from this namespace
55 from encuentro.data import EpisodeData # NOQA
56
57-from PyQt4.QtGui import QApplication, QIcon
58+from PyQt5.QtGui import QIcon
59+from PyQt5.QtWidgets import QApplication
60
61 logger = logging.getLogger('encuentro.init')
62
63
64=== modified file 'encuentro/network.py'
65--- encuentro/network.py 2017-06-23 00:35:18 +0000
66+++ encuentro/network.py 2018-12-16 20:31:43 +0000
67@@ -43,7 +43,7 @@
68 for n in "QDate QDateTime QString QTextStream QTime QUrl QVariant".split():
69 sip.setapi(n, 2) # API v2 FTW!
70
71-from PyQt4 import QtNetwork, QtCore # NOQA (import not at the top)
72+from PyQt5 import QtNetwork, QtCore # NOQA (import not at the top)
73
74 from encuentro import multiplatform, utils # NOQA (import not at the top)
75 from encuentro.config import config # NOQA (import not at the top)
76
77=== modified file 'encuentro/ui/central_panel.py'
78--- encuentro/ui/central_panel.py 2015-12-31 04:19:10 +0000
79+++ encuentro/ui/central_panel.py 2018-12-16 20:31:43 +0000
80@@ -23,28 +23,30 @@
81 import logging
82 import operator
83
84-from PyQt4.QtGui import (
85+from PyQt5.QtWidgets import (
86 QAbstractItemView,
87- QAbstractTextDocumentLayout,
88 QApplication,
89- QBrush,
90- QColor,
91 QHBoxLayout,
92- QImage,
93 QLabel,
94 QMenu,
95- QPixmap,
96 QPushButton,
97 QStyle,
98- QStyleOptionViewItemV4,
99+ QStyleOptionViewItem,
100 QStyledItemDelegate,
101- QTextDocument,
102 QTextEdit,
103 QTreeWidgetItem,
104 QVBoxLayout,
105 QWidget,
106 )
107-from PyQt4.QtCore import Qt, QSize, QAbstractTableModel
108+from PyQt5.QtGui import (
109+ QAbstractTextDocumentLayout,
110+ QBrush,
111+ QColor,
112+ QImage,
113+ QPixmap,
114+ QTextDocument,
115+)
116+from PyQt5.QtCore import Qt, QSize, QAbstractTableModel
117
118 from encuentro import data, image
119 from encuentro.config import config, signal
120@@ -213,7 +215,7 @@
121 if index.column() != self._html_column:
122 return QStyledItemDelegate.paint(self, painter, option, index)
123
124- options = QStyleOptionViewItemV4(option)
125+ options = QStyleOptionViewItem(option)
126 self.initStyleOption(options, index)
127
128 if options.widget is None:
129@@ -238,7 +240,7 @@
130
131 def sizeHint(self, option, index):
132 """Calculate the needed size."""
133- options = QStyleOptionViewItemV4(option)
134+ options = QStyleOptionViewItem(option)
135 self.initStyleOption(options, index)
136
137 doc = QTextDocument()
138@@ -377,7 +379,7 @@
139 self.verticalHeader().hide()
140 header = self.horizontalHeader()
141 header.setStretchLastSection(False)
142- header.setResizeMode(2, header.Stretch)
143+ header.setSectionResizeMode(2, header.Stretch)
144 header.sortIndicatorChanged.connect(self._model.sort)
145
146 # other behaviour configs
147
148=== modified file 'encuentro/ui/dialogs.py'
149--- encuentro/ui/dialogs.py 2015-12-21 18:03:34 +0000
150+++ encuentro/ui/dialogs.py 2018-12-16 20:31:43 +0000
151@@ -20,7 +20,7 @@
152
153 """Several dialogs."""
154
155-from PyQt4.QtGui import (
156+from PyQt5.QtWidgets import (
157 QDialog,
158 QDialogButtonBox,
159 QLabel,
160@@ -93,7 +93,7 @@
161 if __name__ == '__main__':
162 import sys
163
164- from PyQt4.QtGui import QApplication
165+ from PyQt5.QtGui import QApplication
166 app = QApplication(sys.argv)
167
168 frame = UpdateDialog()
169
170=== modified file 'encuentro/ui/main.py'
171--- encuentro/ui/main.py 2017-06-23 00:35:18 +0000
172+++ encuentro/ui/main.py 2018-12-16 20:31:43 +0000
173@@ -26,10 +26,9 @@
174
175 import defer
176
177-from PyQt4.QtGui import (
178+from PyQt5.QtWidgets import (
179 QAction,
180 QCheckBox,
181- QKeySequence,
182 QLabel,
183 QLineEdit,
184 QMessageBox,
185@@ -38,6 +37,9 @@
186 QStyle,
187 QWidget,
188 )
189+from PyQt5.QtGui import (
190+ QKeySequence,
191+)
192
193 from encuentro import multiplatform, data, update
194 from encuentro.config import config, signal
195@@ -312,7 +314,9 @@
196 # stuff pending
197 m = "Hay programas todavía en proceso de descarga!\n¿Seguro quiere salir del programa?"
198 QMB = QMessageBox
199- dlg = QMB("Guarda!", m, QMB.Question, QMB.Yes, QMB.No, QMB.NoButton)
200+ dlg = QMB(QMB.Question, "Guarda!", m,
201+ QMB.Yes | QMB.No, None)
202+ #dlg = QMB("Guarda!", m, QMB.Question, QMB.Yes, QMB.No, QMB.NoButton)
203 opt = dlg.exec_()
204 if opt != QMB.Yes:
205 logger.info("Quit cancelled")
206@@ -344,8 +348,8 @@
207 text = repr(text)
208
209 QMB = QMessageBox
210- dlg = QMB("Atención: " + err_type, text, QMB.Warning,
211- QMB.Ok, QMB.NoButton, QMB.NoButton)
212+ dlg = QMB(QMB.Warning, "Atención: " + err_type, text,
213+ QMB.Ok | QMB.NoButton, None)
214 dlg.exec_()
215
216 def refresh_episodes(self, _=None):
217
218=== modified file 'encuentro/ui/preferences.py'
219--- encuentro/ui/preferences.py 2015-12-21 18:03:34 +0000
220+++ encuentro/ui/preferences.py 2018-12-16 20:31:43 +0000
221@@ -24,7 +24,7 @@
222 import sys
223 import logging
224
225-from PyQt4.QtGui import (
226+from PyQt5.QtWidgets import (
227 QCheckBox,
228 QCompleter,
229 QDialog,
230@@ -39,7 +39,7 @@
231 QVBoxLayout,
232 QWidget,
233 )
234-from PyQt4.QtCore import Qt, QDir
235+from PyQt5.QtCore import Qt, QDir
236
237 from encuentro.config import config
238
239@@ -212,7 +212,7 @@
240 os.path.realpath(sys.argv[0]))))
241 sys.path.insert(0, project_basedir)
242
243- from PyQt4.QtGui import QApplication
244+ from PyQt5.QtWidgets import QApplication
245 app = QApplication(sys.argv)
246
247 frame = PreferencesDialog()
248
249=== modified file 'encuentro/ui/remembering.py'
250--- encuentro/ui/remembering.py 2015-12-21 18:03:34 +0000
251+++ encuentro/ui/remembering.py 2018-12-16 20:31:43 +0000
252@@ -18,8 +18,8 @@
253
254 """The remembering widgets."""
255
256-from PyQt4.QtCore import Qt
257-from PyQt4.QtGui import (
258+from PyQt5.QtCore import Qt
259+from PyQt5.QtWidgets import (
260 QMainWindow,
261 QSplitter,
262 QTableView,
263
264=== modified file 'encuentro/ui/systray.py'
265--- encuentro/ui/systray.py 2015-12-21 18:03:34 +0000
266+++ encuentro/ui/systray.py 2018-12-16 20:31:43 +0000
267@@ -22,7 +22,8 @@
268
269 from encuentro import multiplatform
270
271-from PyQt4.QtGui import QSystemTrayIcon, QIcon, QMenu
272+from PyQt5.QtWidgets import QSystemTrayIcon, QMenu
273+from PyQt5.QtGui import QIcon
274
275 logger = logging.getLogger("encuentro.systray")
276
277
278=== modified file 'encuentro/ui/throbber.py'
279--- encuentro/ui/throbber.py 2014-04-26 02:36:13 +0000
280+++ encuentro/ui/throbber.py 2018-12-16 20:31:43 +0000
281@@ -18,11 +18,9 @@
282
283 """A throbber."""
284
285-from PyQt4.QtGui import (
286- QLabel,
287- QMovie,
288-)
289-from PyQt4.QtCore import Qt
290+from PyQt5.QtWidgets import QLabel
291+from PyQt5.QtGui import QMovie
292+from PyQt5.QtCore import Qt
293
294 from encuentro import multiplatform
295
296
297=== modified file 'encuentro/ui/wizard.py'
298--- encuentro/ui/wizard.py 2015-12-21 18:03:34 +0000
299+++ encuentro/ui/wizard.py 2018-12-16 20:31:43 +0000
300@@ -22,7 +22,7 @@
301
302 import logging
303
304-from PyQt4.QtGui import (
305+from PyQt5.QtWidgets import (
306 QCheckBox,
307 QDialog,
308 QDialogButtonBox,
309@@ -184,7 +184,7 @@
310 if __name__ == '__main__':
311 import sys
312
313- from PyQt4.QtGui import QApplication
314+ from PyQt5.QtWidgets import QApplication
315 app = QApplication(sys.argv)
316 app.have_metadata = lambda: False
317 app.have_config = lambda: False
318
319=== modified file 'encuentro/update.py'
320--- encuentro/update.py 2017-06-23 00:35:18 +0000
321+++ encuentro/update.py 2018-12-16 20:31:43 +0000
322@@ -29,7 +29,7 @@
323
324 import defer
325
326-from PyQt4.QtGui import QApplication
327+from PyQt5.QtWidgets import QApplication
328
329 from encuentro import utils
330 from encuentro.config import config
331
332=== modified file 'encuentro/utils.py'
333--- encuentro/utils.py 2016-01-04 16:20:52 +0000
334+++ encuentro/utils.py 2018-12-16 20:31:43 +0000
335@@ -21,7 +21,7 @@
336 import defer
337 import os
338
339-from PyQt4 import QtNetwork, QtCore
340+from PyQt5 import QtNetwork, QtCore
341
342 _qt_network_manager = QtNetwork.QNetworkAccessManager()
343
344
345=== modified file 'setup.py'
346--- setup.py 2016-01-04 21:45:26 +0000
347+++ setup.py 2018-12-16 20:31:43 +0000
348@@ -23,7 +23,7 @@
349 python 2.7
350 python-requests 0.12.1
351 python-defer 1.0.6
352- python-qt4 4.9.1
353+ python-qt5 5.7
354 python-xdg 0.15
355 python-notify 0.1.1 # not really needed, but provides notifications
356 python-bs4 4.1.0
357
358=== modified file 'source_encuentro.py'
359--- source_encuentro.py 2014-05-02 14:03:39 +0000
360+++ source_encuentro.py 2018-12-16 20:31:43 +0000
361@@ -29,5 +29,5 @@
362 attach_file_if_exists(report, fname, "EncuentroLog")
363
364 # info about dependencies
365- packages = ["python-requests", "python-defer", "python-qt4", "python-xdg"]
366+ packages = ["python-requests", "python-defer", "python-qt5", "python-xdg"]
367 attach_related_packages(report, packages)

Subscribers

People subscribed via source and target branches