Bug 102572 - [FR] port qpaeq to qt5
Summary: [FR] port qpaeq to qt5
Status: RESOLVED FIXED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: tools (show other bugs)
Version: unspecified
Hardware: Other All
: medium enhancement
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-07 06:15 UTC by Michael Shigorin
Modified: 2018-04-11 12:28 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
0001-Port-qpaeq-to-PyQt5.patch (9.04 KB, patch)
2017-11-20 20:00 UTC, Andrius Štikonas
Details | Splinter Review

Description Michael Shigorin 2017-09-07 06:15:36 UTC
Looks like Qt 4 is unsupported, is it like time to move qpaeq to PyQt5?
Comment 1 Tanu Kaskinen 2017-10-04 19:13:30 UTC
Yes, it would be nice to get qpaeq ported to Qt5. Patches welcome.
Comment 2 Andrius Štikonas 2017-11-20 20:00:54 UTC
Created attachment 135616 [details] [review]
0001-Port-qpaeq-to-PyQt5.patch

I don't know PyQt5 (or PyQt4), but this simple replacement seemed to work for me.
Comment 3 Tanu Kaskinen 2017-12-12 04:30:20 UTC
Great, thanks a lot! I'm not familiar with PyQt either, but the patch is straightforward and if it works for you, I'm sure it's good. I applied the patch now.
Comment 4 Felipe Sateler 2018-04-05 18:43:54 UTC
The patch is incomplete: dbus.mainloop.qt is part of pyqt4. Fortunately the fix is simple:

diff --git a/src/utils/qpaeq b/src/utils/qpaeq
index 508b233db..a319dad09 100755
--- a/src/utils/qpaeq
+++ b/src/utils/qpaeq
@@ -20,7 +20,7 @@ import os,math,sys
 try:
     import PyQt5,sip
     from PyQt5 import QtWidgets,QtCore
-    import dbus.mainloop.qt
+    import dbus.mainloop.pyqt5
     import dbus
 except ImportError as e:
     sys.stderr.write('There was an error importing needed libraries\n'
@@ -565,7 +565,7 @@ def subdivide(xs, t_points):
     return left+right
 
 def main():
-    dbus.mainloop.qt.DBusQtMainLoop(set_as_default=True)
+    dbus.mainloop.pyqt5.DBusQtMainLoop(set_as_default=True)
     app=QtWidgets.QApplication(sys.argv)
     qpaeq_main=QPaeq()
     qpaeq_main.show()
Comment 5 Andrius Štikonas 2018-04-08 20:18:23 UTC
Hi, thanks for fixing this! Maybe submit it via
https://patchwork.freedesktop.org/project/pulseaudio/patches/
so that pulseaudio developers might pull it quicker (I had to wait for a few weeks her on bugzilla)

(In reply to Felipe Sateler from comment #4)
> The patch is incomplete: dbus.mainloop.qt is part of pyqt4. Fortunately the
> fix is simple:
> 
> diff --git a/src/utils/qpaeq b/src/utils/qpaeq
> index 508b233db..a319dad09 100755
> --- a/src/utils/qpaeq
> +++ b/src/utils/qpaeq
> @@ -20,7 +20,7 @@ import os,math,sys
>  try:
>      import PyQt5,sip
>      from PyQt5 import QtWidgets,QtCore
> -    import dbus.mainloop.qt
> +    import dbus.mainloop.pyqt5
>      import dbus
>  except ImportError as e:
>      sys.stderr.write('There was an error importing needed libraries\n'
> @@ -565,7 +565,7 @@ def subdivide(xs, t_points):
>      return left+right
>  
>  def main():
> -    dbus.mainloop.qt.DBusQtMainLoop(set_as_default=True)
> +    dbus.mainloop.pyqt5.DBusQtMainLoop(set_as_default=True)
>      app=QtWidgets.QApplication(sys.argv)
>      qpaeq_main=QPaeq()
>      qpaeq_main.show()
Comment 6 Tanu Kaskinen 2018-04-11 12:28:43 UTC
Thanks! I applied the patch now.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.