PyBitmessage icon indicating copy to clipboard operation
PyBitmessage copied to clipboard

Porting bitmessageqt to Qt5

Open g1itch opened this issue 7 years ago • 30 comments

Hello!

I realized that column width problem in QTableWidget was actually the Qt bug.

I mostly finished work in this branch though it still needs some testing.

g1itch avatar Nov 05 '18 14:11 g1itch

Can we have some sort of fallback qtpy bundled?

PeterSurda avatar Nov 09 '18 12:11 PeterSurda

The source doesn't look big, most of it are tests. And it's under MIT license.

PeterSurda avatar Nov 09 '18 12:11 PeterSurda

Probably yes. I thought of it, just forgot. I think it should be slim compatibility layer which just imports PyQt5.

BTW, I decided to finish UI refactoring in separate branch.

g1itch avatar Nov 09 '18 12:11 g1itch

I tried it, and it runs both with pyqt4 and pyqt5 and you can use the environment variable QT_API to override. Well done. I haven't looked at it in detail, but it seems pretty straightforward, just a lot of string replacements of Qt4 to QtPy. Please clean up the linter complaints and I'll try to do a full review asap.

PeterSurda avatar Nov 11 '18 17:11 PeterSurda

qt4 is being less and less supported by the main distros

hub229ox avatar Nov 13 '18 09:11 hub229ox

Perhaps now you can do a review.

g1itch avatar Feb 12 '19 10:02 g1itch

OK, I manually resolved pycodestyle warnings in bitmessageqt.settings module. pycodestyle devs refuse to implement per file ignore statements.

So, except for review, there are two questions remaining for this PR:

  1. maybe set wordWrap to false also for address book?
  2. #1435

g1itch avatar Apr 25 '19 09:04 g1itch

Ping? I intend to remove pybitmessage from pkgsrc, unless there will be added qt5 support in place.

krytarowski avatar Oct 27 '19 14:10 krytarowski

Ping? I intend to remove pybitmessage from pkgsrc, unless there will be added qt5 support in place.

Strange decision. The main application of PyBitmessage is daemon, not the bitmessageqt UI.

The main problem of this changeset is handling of myTableWidgetItem.data(). I'm trying to debug it in branches ui-refactoring and ui-changes using PyQt4. Then that changes will be rebased on top of this branch and I will require a review. But if you just need the PyQt5 based UI you may use this branch as qt5 support patch like I do in my ebuild and like gentoo does. What's a problem?

g1itch avatar Oct 28 '19 07:10 g1itch

I am not turning myself into developer, just a packager that picks tarballs from projects.

krytarowski avatar Oct 29 '19 03:10 krytarowski

Ping? I intend to remove pybitmessage from pkgsrc, unless there will be added qt5 support in place.

@krytarowski – – I never heard of pkgsrc in my life. turns out it is some AUR for NetBSD or sth..

dimyme avatar Nov 15 '19 00:11 dimyme

@dimyme, @krytarowski is probably maintaining a Bitmessage package for Arch Linux. Arch Linux uses the latest releases of software pretty much all the time, which makes supporting old libraries like Qt4 difficult. As an Arch Linux user and package maintainer myself, I feel his pain!

Maintainers can apply patches to make software work on Arch Linux but typically the "Arch way" is to use as close to upstream as possible. This is a preview to come for other distributions as Arch Linux usually leads with the way with cutting edge software.

At some point, I'm going to work on a Snap for Bitmessage, which will give linux users another option for install Bitmessage.

dmp1ce avatar Nov 15 '19 16:11 dmp1ce

it is not – @dmp1ce – that we don't know Qt4 is getting lese and less support. but "someone" gotta actually do the upgrading… so far it is W.I.P.

dimyme avatar Nov 15 '19 16:11 dimyme

I just use NetBSD and actually dropped bitmessage from pkgsrc. I can readd it in future once it will support Qt5 out of the box.

krytarowski avatar Nov 15 '19 17:11 krytarowski

Is this ready for a review?

PeterSurda avatar Nov 16 '19 09:11 PeterSurda

this branch generally worked OK for me but I just ran it briefly – did not fully analyse it.

dimyme avatar Nov 16 '19 21:11 dimyme

Is this ready for a review?

Yes. You may do a review but there is a known problem with myTableWidgetItem.data() which I planned to address in the next part of ui-refactoring PR series.

g1itch avatar Nov 18 '19 10:11 g1itch

It turns out that on Windows pyelliptic uses openssl dll bundled with PyQt4:

>>> from ctypes.util import find_library
>>> find_library('libeay32')
'C:\\Python27\\Lib\\site-packages\\PyQt4\\libeay32.dll'

g1itch avatar Oct 19 '20 12:10 g1itch

I need to allocate a couple of hours for review, and also to update buildbot. It may take a while.

PeterSurda avatar Jan 25 '21 09:01 PeterSurda

I like that it fixed a lot of code quality bugs.

PeterSurda avatar Jan 25 '21 09:01 PeterSurda

I will rebase it frequently because I have no more PyQt4 on my working PC.

g1itch avatar Feb 04 '21 16:02 g1itch

Needs to investigate how it affects the translation scripts.

PeterSurda avatar Feb 15 '21 18:02 PeterSurda

Needs to investigate how it affects the translation scripts.

How your translation bot is doing? He hasn't been seen for a long time.

g1itch avatar Feb 15 '21 18:02 g1itch

How your translation bot is doing? He hasn't been seen for a long time.

It's on a machine that's scheduled to be decommissioned, I haven't monitored it and think it's broken. It needs to be moved to buildbot. But one thing needs to be checked in this PR manually, and that is translating strings with arguments. I don't know if it supports format, at least the Qt4 version didn't.

PeterSurda avatar Feb 15 '21 19:02 PeterSurda

Updating: https://travis-ci.org/github/g1itch/PyBitmessage/jobs/759108941#L423 Settings dialog and NetworkStatus tab lost their translations - this is what I see on my desktop.

g1itch avatar Feb 15 '21 20:02 g1itch

I faced another bug similar to #1758 in this branch ): https://travis-ci.org/github/g1itch/PyBitmessage/jobs/771253480 It's surely introduced in 49f9620 or one of my quickfix commits, because when I remove them it passes the dry run test: https://travis-ci.org/github/g1itch/PyBitmessage/jobs/771261369 But it's harder to find the exact part because 49f9620 is squashed like hell.

g1itch avatar May 15 '21 20:05 g1itch

Can you make separate PRs of the components outside of bitmessageqt, if there are any left? If there aren't, then I'll start merging other work.

PeterSurda avatar Aug 30 '21 08:08 PeterSurda

Can you make separate PRs of the components outside of bitmessageqt, if there are any left?

I'll try. But I suspect that most of them are related to the _translate() result (Qt API v2).

Also, after separating the qidenticon work I changed my mind about the fallback: now I'm going to replace that from qtpy import .. by from PyQt5 import .. and fallback.qtpy by fallback.PyQt5 based on qtpy.

g1itch avatar Aug 30 '21 17:08 g1itch

Hi @g1itch , I've tested appimage builds of this PR based on instructions of @PeterSurda .

And while testing it on ubuntu 18 & 20 versions, I found that the appimage builds of this PR are not taking keyboard inputs.

kdcis avatar Sep 20 '21 10:09 kdcis

Hi @g1itch , I've tested appimage builds of this PR based on instructions of @PeterSurda .

And while testing it on ubuntu 18 & 20 versions, I found that the appimage builds of this PR are not taking keyboard inputs.

I know. I described it in https://github.com/g1itch/PyBitmessage/issues/12

g1itch avatar Sep 20 '21 13:09 g1itch