#4 1594602 - Fix typos in QMessageBox constructor calls
Merged 3 years ago by zdohnal. Opened 3 years ago by tkorbar.
Unknown source rhbz1594602  into  master

@@ -0,0 +1,68 @@

+ commit 7623eb3c83d91405471177d750ab0ae8fd05a0d6

+ Author: Tomas Korbar <tkorbar@redhat.com>

+ Date:   Mon Oct 1 16:27:36 2018 +0200

+ 

+     Fix typos in QMessageBox constructors

+ 

+ diff --git a/ui5/devmgr5.py b/ui5/devmgr5.py

+ index 35bdcb7..267cfba 100644

+ --- a/ui5/devmgr5.py

+ +++ b/ui5/devmgr5.py

+ @@ -139,8 +139,7 @@ class PluginInstall(QObject):

+              install_plugin = QMessageBox.warning(self.parent,

+                                  self.parent.windowTitle(),

+                                  self.__tr("<b>The HPLIP plugin is already installed.</b><p>Do you want to continue and re-install it?"),

+ -                                QMessageBox.Yes,

+ -                                QMessageBox.No,

+ +                                QMessageBox.Yes | QMessageBox.No,

+                                  QMessageBox.NoButton) == QMessageBox.Yes

+  

+          if install_plugin:

+ @@ -149,8 +148,7 @@ class PluginInstall(QObject):

+                  QMessageBox.critical(self.parent,

+                      self.parent.windowTitle(),

+                      self.__tr("<b>Unable to find an appropriate su/sudo utility to run hp-plugin.</b><p>Install kdesu, gnomesu, or gksu.</p>"),

+ -                    QMessageBox.Ok,

+ -                    QMessageBox.NoButton,

+ +                    QMessageBox.Ok | QMessageBox.NoButton,

+                      QMessageBox.NoButton)

+  

+  

+ diff --git a/ui5/nodevicesdialog.py b/ui5/nodevicesdialog.py

+ index 6083f6d..ca86bfc 100644

+ --- a/ui5/nodevicesdialog.py

+ +++ b/ui5/nodevicesdialog.py

+ @@ -64,8 +64,7 @@ class NoDevicesDialog(QDialog, Ui_NoDevicesDialog_base):

+              QMessageBox.critical(self,

+                                      self.windowTitle(),

+                                      self.__tr("<b>An error occurred.</b><p>Please re-start the Device Manager and try again."),

+ -                                    QMessageBox.Ok,

+ -                                    QMessageBox.NoButton,

+ +                                    QMessageBox.Ok | QMessageBox.NoButton,

+                                      QMessageBox.NoButton)

+  

+  

+ diff --git a/ui5/setupdialog.py b/ui5/setupdialog.py

+ index fbfe5ac..05e2b1d 100644

+ --- a/ui5/setupdialog.py

+ +++ b/ui5/setupdialog.py

+ @@ -1108,8 +1108,7 @@ class SetupDialog(QDialog, Ui_Dialog):

+                      if QMessageBox.critical(self,

+                                             self.windowTitle(),

+                                             error_text,

+ -                                           QMessageBox.Retry | QMessageBox.Default,

+ -                                           QMessageBox.Cancel | QMessageBox.Escape,

+ +                                           QMessageBox.Retry | QMessageBox.Default | QMessageBox.Cancel | QMessageBox.Escape,

+                                             QMessageBox.NoButton) == QMessageBox.Cancel:

+                          break

+  

+ @@ -1138,8 +1137,7 @@ class SetupDialog(QDialog, Ui_Dialog):

+                                  if QMessageBox.critical(self,

+                                                         self.windowTitle(),

+                                                         error_text,

+ -                                                       QMessageBox.Retry | QMessageBox.Default,

+ -                                                       QMessageBox.Cancel | QMessageBox.Escape,

+ +                                                       QMessageBox.Retry | QMessageBox.Default | QMessageBox.Cancel | QMessageBox.Escape,

+                                                         QMessageBox.NoButton) == QMessageBox.Cancel:

+                                      break

+  

file modified
+11 -1
@@ -7,7 +7,7 @@

  Summary: HP Linux Imaging and Printing Project

  Name: hplip

  Version: 3.18.6

- Release: 8%{?dist}

+ Release: 9%{?dist}

  License: GPLv2+ and MIT and BSD and IJG and Public Domain and GPLv2+ with exceptions and ISC

  

  Url: https://developers.hp.com/hp-linux-imaging-and-printing
@@ -52,6 +52,7 @@

  Patch33: hplip-error-print.patch

  Patch34: hplip-hpfax-importerror-print.patch

  Patch35: hplip-wifisetup.patch

+ Patch36: hplip-qmsgbox-typos.patch

  

  Requires: %{name}-libs%{?_isa} = %{version}-%{release}

  Requires: python3-pillow
@@ -271,6 +272,12 @@

  # bug caused by typo in wifisetupdialog wifiObj property call

  %patch35 -p1 -b .wifisetup-bad-call-fix

  

+ # TypeError: argument 5 has unexpected type 'StandardButtons' (bug #1594602)

+ # upstream bug: https://bugs.launchpad.net/ubuntu/+source/hplip/+bug/1745383

+ # bug caused by typo in QMessageBox constructor call

+ # this patch fixes more of those typos

+ %patch36 -p1 -b .qmsgbox-typos-fix

+ 

  sed -i.duplex-constraints \

      -e 's,\(UIConstraints.* \*Duplex\),//\1,' \

      prnt/drv/hpcups.drv.in
@@ -556,6 +563,9 @@

  %config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio

  

  %changelog

+ * Mon Oct 01 2018 Tomas Korbar <tkorbar@redhat.com> - 3.18.6-9

+ - 1594602 - Fix typos in QMessageBox constructor calls

+ 

  * Mon Oct 01 2018 Tomas Korbar <tkorbar@redhat.com> - 3.18.6-8 

  - 1626877 - Fix AttributeError when connecting to printer via wifi

  

This bug is caused by typo in QMessageBox constructor call. Patch i added fixes all those typos i could find.

LGTM, thank you for the patch.

Pull-Request has been merged by zdohnal

3 years ago