diff options
author | Didier Raboud <odyx@debian.org> | 2018-11-06 17:26:14 +0100 |
---|---|---|
committer | Didier Raboud <odyx@debian.org> | 2018-11-06 18:01:38 +0100 |
commit | 80f5e974af4d4bda8c5e1c1734275eb19178ae1b (patch) | |
tree | 40b28335bc32e730f2c21797ae09c051ed0b19dd | |
parent | 09a8dd9bff44932238596eed4036d4b70d740f24 (diff) | |
parent | dc0f9c2cb573df931e725dabb19e1a526a331c60 (diff) |
merge patched-debian/master into debian/master
26 files changed, 652 insertions, 56 deletions
@@ -326,9 +326,9 @@ def cleanup_spinner(): # Convert string to int and return a list. def xint(ver): try: - l = [int(x) for x in ver.split('.')] - except: - pass + l = [int(x.translate(None, '+~')) for x in ver.split('.')] + except ValueError: + l = [] return l # In case of import failure of extension modules, check whether its a mixed python environment issue. @@ -199,7 +199,7 @@ class DependenciesCheck(object): return elif d == 'hpaio' and not self.scanning_enabled: return - elif self.core.distro =="rhel" and "5." in self.distro_version: + elif self.core.distro_name =="rhel" and "5." in self.distro_version: if d in ['dbus','python-devel','python-dbus','pyqt4-dbus','libnetsnmp-devel','gcc','make','reportlab','policykit','sane-devel','cups-ddk']: return @@ -305,14 +305,14 @@ class DependenciesCheck(object): if self.core.distro_version not in vrs and len(vrs): supported_distro_vrs= vrs[len(vrs)-1] log.warn(log.bold("%s-%s version is not supported. Using %s-%s versions dependencies to verify and install..." \ - %(self.core.distro, self.core.distro_version, self.core.distro, supported_distro_vrs))) + %(self.core.distro_name, self.core.distro_version, self.core.distro_name, supported_distro_vrs))) tui.header("SYSTEM INFO") Sts, Kernel_info =utils.run("uname -r -v -o") Sts, Host_info =utils.run("uname -n") Sts, Proc_info =utils.run("uname -r -v -o") log.info(" Kernel: %s Host: %s Proc: %s Distribution: %s %s"\ - %(Kernel_info,Host_info,Proc_info,self.core.distro, self.core.distro_version)) + %(Kernel_info,Host_info,Proc_info,self.core.distro_name, self.core.distro_version)) log.info(" Bitness: %s bit\n"%utils.getBitness()) tui.header("HPLIP CONFIGURATION") v = sys_conf.get('hplip', 'version') @@ -323,7 +323,7 @@ class DependenciesCheck(object): if self.core.is_auto_installer_support(): log.info("HPLIP-Installation: Auto installation is supported for %s distro %s version " %(self.core.distro_name, self.core.distro_version)) else: - log.warn("HPLIP-Installation: Auto installation is not supported for %s distro %s version " %(self.core.distro, self.core.distro_version)) + log.warn("HPLIP-Installation: Auto installation is not supported for %s distro %s version " %(self.core.distro_name, self.core.distro_version)) log.info() log.info(log.bold("Current contents of '/etc/hp/hplip.conf' file:")) diff --git a/debian/.git-dpm b/debian/.git-dpm index 74a1212cf..e825acbe9 100644 --- a/debian/.git-dpm +++ b/debian/.git-dpm @@ -1,6 +1,6 @@ # see git-dpm(1) from git-dpm package -ebae5ba937093c66b97d604a54292594e3a9addc -ebae5ba937093c66b97d604a54292594e3a9addc +dc0f9c2cb573df931e725dabb19e1a526a331c60 +dc0f9c2cb573df931e725dabb19e1a526a331c60 fc0c12da30bd8d5267ae4dd8fab5ceb2f41f945b fc0c12da30bd8d5267ae4dd8fab5ceb2f41f945b hplip_3.18.10+dfsg0.orig.tar.xz diff --git a/debian/patches/0026-Call-QMessageBox-constructors-of-PyQT5-with-the-corr.patch b/debian/patches/0026-Call-QMessageBox-constructors-of-PyQT5-with-the-corr.patch new file mode 100644 index 000000000..8a0ee1f4f --- /dev/null +++ b/debian/patches/0026-Call-QMessageBox-constructors-of-PyQT5-with-the-corr.patch @@ -0,0 +1,473 @@ +From fd23b0daafc98cb9e039443ad7ed5323a7f54dbe Mon Sep 17 00:00:00 2001 +From: Till Kamppeter <till.kamppeter@gmail.com> +Date: Wed, 3 Oct 2018 15:13:00 +0200 +Subject: Call QMessageBox constructors of PyQT5 with the correct parameters + +The whole Python source code of HPLIP contains 40 incorrect calls of +the QMessageBox constructurs, mostly the list of buttons was given as +separate arguments instead of a bitwise OR of each button's +representation value. If the flow of the code hits one of these +calls (usually when some error or warnings message should be +displayed or an "Are you sure?" question asked) the GUI app crashes. +See https://pythonspot.com/pyqt5-messagebox/ for QMessageBox +documentation. +This patch corrects all these calls. + +Bug-Debian: https://bugs.debian.org/912768 +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1745383 +--- + ui/devmgr4.py | 16 ++++++++-------- + ui/faxaddrbookform.py | 6 +++--- + ui/faxsendjobform.py | 6 +++--- + ui/firmwaredialog.py | 2 +- + ui/makecopiesform.py | 4 ++-- + ui/nodevicesform.py | 2 +- + ui/pluginform2.py | 4 ++-- + ui/printerform.py | 2 +- + ui/settingsdialog.py | 4 ++-- + ui/setupform.py | 10 +++++----- + ui/unloadform.py | 2 +- + ui/upgradeform.py | 4 ++-- + ui5/devmgr5.py | 6 ++---- + ui5/fabwindow.py | 2 +- + ui5/nodevicesdialog.py | 3 +-- + ui5/plugindialog.py | 2 +- + ui5/queuesconf.py | 2 +- + ui5/setupdialog.py | 6 +++--- + 18 files changed, 40 insertions(+), 43 deletions(-) + +diff --git a/ui/devmgr4.py b/ui/devmgr4.py +index cc2552f91..a868ccac0 100644 +--- a/ui/devmgr4.py ++++ b/ui/devmgr4.py +@@ -1422,7 +1422,7 @@ class DevMgr4(DevMgr4_base): + QMessageBox.critical(self, + self.caption(), + 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.Ok |\ + QMessageBox.NoButton, + QMessageBox.NoButton) + else: +@@ -2854,7 +2854,7 @@ class DevMgr4(DevMgr4_base): + x = QMessageBox.critical(self, + self.caption(), + self.__tr("<b>Annoying Confirmation: Are you sure you want to remove this device?</b>"), +- QMessageBox.Yes, ++ QMessageBox.Yes |\ + QMessageBox.No | QMessageBox.Default, + QMessageBox.NoButton) + if x == QMessageBox.Yes: +@@ -2949,7 +2949,7 @@ class DevMgr4(DevMgr4_base): + QMessageBox.critical(self, + self.caption(), + error_text, +- QMessageBox.Ok, ++ QMessageBox.Ok |\ + QMessageBox.NoButton, + QMessageBox.NoButton) + +@@ -2958,7 +2958,7 @@ class DevMgr4(DevMgr4_base): + QMessageBox.warning(self, + self.caption(), + msg, +- QMessageBox.Ok, ++ QMessageBox.Ok |\ + QMessageBox.NoButton, + QMessageBox.NoButton) + +@@ -3115,7 +3115,7 @@ class ScrollTestpageView(ScrollView): + QMessageBox.information(self, + self.caption(), + self.__tr("<p><b>A test page should be printing on your printer.</b><p>If the page fails to print, please visit http://hplip.sourceforge.net for troubleshooting and support."), +- QMessageBox.Ok, ++ QMessageBox.Ok |\ + QMessageBox.NoButton, + QMessageBox.NoButton) + +@@ -3130,7 +3130,7 @@ class ScrollTestpageView(ScrollView): + QMessageBox.critical(self, + self.caption(), + error_text, +- QMessageBox.Ok, ++ QMessageBox.Ok |\ + QMessageBox.NoButton, + QMessageBox.NoButton) + +@@ -3272,7 +3272,7 @@ class ScrollColorCalView(ScrollView): + QMessageBox.information(self, + self.caption(), + self.__tr("<p><b>A test page should be printing on your printer.</b><p>If the page fails to print, please visit http://hplip.sourceforge.net for troubleshooting and support."), +- QMessageBox.Ok, ++ QMessageBox.Ok |\ + QMessageBox.NoButton, + QMessageBox.NoButton) + +@@ -3287,7 +3287,7 @@ class ScrollColorCalView(ScrollView): + QMessageBox.critical(self, + self.caption(), + error_text, +- QMessageBox.Ok, ++ QMessageBox.Ok |\ + QMessageBox.NoButton, + QMessageBox.NoButton) + +diff --git a/ui/faxaddrbookform.py b/ui/faxaddrbookform.py +index 109462207..b23364410 100644 +--- a/ui/faxaddrbookform.py ++++ b/ui/faxaddrbookform.py +@@ -228,7 +228,7 @@ class FaxAddrBookGroupsForm(FaxAddrBookGroupsForm_base): + x = QMessageBox.critical(self, + self.caption(), + self.__tr("<b>Annoying Confirmation: Are you sure you want to delete this group?</b>"), +- QMessageBox.Yes, ++ QMessageBox.Yes |\ + QMessageBox.No | QMessageBox.Default, + QMessageBox.NoButton) + if x == QMessageBox.Yes: +@@ -421,7 +421,7 @@ class FaxAddrBookForm(FaxAddrBookForm_base): + if QMessageBox.critical(self, + self.caption(), + self.__tr("<b>Annoying Confirmation: Are you sure you want to delete this address book entry?</b>"), +- QMessageBox.Yes, ++ QMessageBox.Yes |\ + QMessageBox.No | QMessageBox.Default, + QMessageBox.NoButton) == QMessageBox.Yes: + db.delete(self.current.entry['name']) +@@ -451,7 +451,7 @@ class FaxAddrBookForm(FaxAddrBookForm_base): + QMessageBox.critical(self, + self.caption(), + QString(error_text), +- QMessageBox.Ok, ++ QMessageBox.Ok |\ + QMessageBox.NoButton, + QMessageBox.NoButton) + +diff --git a/ui/faxsendjobform.py b/ui/faxsendjobform.py +index 106215c5e..69f424c42 100644 +--- a/ui/faxsendjobform.py ++++ b/ui/faxsendjobform.py +@@ -210,7 +210,7 @@ class FaxSendJobForm(QMainWindow): + QMessageBox.information(self, + self.caption(), + self.__tr("<p><b>Fax send completed successfully.</b>"), +- QMessageBox.Ok, ++ QMessageBox.Ok |\ + QMessageBox.NoButton, + QMessageBox.NoButton) + +@@ -219,7 +219,7 @@ class FaxSendJobForm(QMainWindow): + QMessageBox.critical(self, + self.caption(), + error_text, +- QMessageBox.Ok, ++ QMessageBox.Ok |\ + QMessageBox.NoButton, + QMessageBox.NoButton) + +@@ -228,7 +228,7 @@ class FaxSendJobForm(QMainWindow): + QMessageBox.warning(self, + self.caption(), + error_text, +- QMessageBox.Ok, ++ QMessageBox.Ok |\ + QMessageBox.NoButton, + QMessageBox.NoButton) + +diff --git a/ui/firmwaredialog.py b/ui/firmwaredialog.py +index 16b313374..0bcee1164 100644 +--- a/ui/firmwaredialog.py ++++ b/ui/firmwaredialog.py +@@ -109,7 +109,7 @@ class FirmwareDialog(QDialog, FirmwareDialog_Base): + QMessageBox.critical(self, + self.caption(), + error_text, +- QMessageBox.Ok, ++ QMessageBox.Ok |\ + QMessageBox.NoButton, + QMessageBox.NoButton) + +diff --git a/ui/makecopiesform.py b/ui/makecopiesform.py +index 27f144b36..0fbb573e3 100644 +--- a/ui/makecopiesform.py ++++ b/ui/makecopiesform.py +@@ -156,7 +156,7 @@ class MakeCopiesForm(QMainWindow): + QMessageBox.critical(self, + self.caption(), + error_text, +- QMessageBox.Ok, ++ QMessageBox.Ok |\ + QMessageBox.NoButton, + QMessageBox.NoButton) + +@@ -164,7 +164,7 @@ class MakeCopiesForm(QMainWindow): + QMessageBox.warning(self, + self.caption(), + msg, +- QMessageBox.Ok, ++ QMessageBox.Ok |\ + QMessageBox.NoButton, + QMessageBox.NoButton) + +diff --git a/ui/nodevicesform.py b/ui/nodevicesform.py +index 01f6ae53b..57a696375 100644 +--- a/ui/nodevicesform.py ++++ b/ui/nodevicesform.py +@@ -67,7 +67,7 @@ class NoDevicesForm(NoDevicesForm_base): + QMessageBox.critical(self, + self.caption(), + self.__tr("<b>An error occurred.</b><p>Please re-start the Device Manager and try again."), +- QMessageBox.Ok, ++ QMessageBox.Ok |\ + QMessageBox.NoButton, + QMessageBox.NoButton) + +diff --git a/ui/pluginform2.py b/ui/pluginform2.py +index 64e64aa77..76cb0238b 100644 +--- a/ui/pluginform2.py ++++ b/ui/pluginform2.py +@@ -173,7 +173,7 @@ class PluginForm2(PluginForm2_base): + QMessageBox.critical(self, + self.caption(), + error_text, +- QMessageBox.Ok, ++ QMessageBox.Ok |\ + QMessageBox.NoButton, + QMessageBox.NoButton) + +@@ -181,7 +181,7 @@ class PluginForm2(PluginForm2_base): + QMessageBox.information(self, + self.caption(), + text, +- QMessageBox.Ok, ++ QMessageBox.Ok |\ + QMessageBox.NoButton, + QMessageBox.NoButton) + +diff --git a/ui/printerform.py b/ui/printerform.py +index 0c6c4f39e..7c10ab07b 100644 +--- a/ui/printerform.py ++++ b/ui/printerform.py +@@ -154,7 +154,7 @@ class PrinterForm(QMainWindow): + QMessageBox.critical(self, + self.caption(), + error_text, +- QMessageBox.Ok, ++ QMessageBox.Ok |\ + QMessageBox.NoButton, + QMessageBox.NoButton) + +diff --git a/ui/settingsdialog.py b/ui/settingsdialog.py +index 92da22546..24f02fd84 100644 +--- a/ui/settingsdialog.py ++++ b/ui/settingsdialog.py +@@ -146,7 +146,7 @@ class SettingsDialog(SettingsDialog_base): + ## QMessageBox.warning(self, + ## self.caption(), + ## self.__tr("<b>One or more email addresses are missing.</b><p>Please enter this information and try again."), +-## QMessageBox.Ok, ++## QMessageBox.Ok |\ + ## QMessageBox.NoButton, + ## QMessageBox.NoButton) + ## return +@@ -163,7 +163,7 @@ class SettingsDialog(SettingsDialog_base): + ## QMessageBox.information(self, + ## self.caption(), + ## self.__tr("<p><b>Please check your email for a test message.</b><p>If the message doesn't arrive, please check your settings and try again."), +-## QMessageBox.Ok, ++## QMessageBox.Ok |\ + ## QMessageBox.NoButton, + ## QMessageBox.NoButton) + +diff --git a/ui/setupform.py b/ui/setupform.py +index 307917b02..78863fdd8 100644 +--- a/ui/setupform.py ++++ b/ui/setupform.py +@@ -602,7 +602,7 @@ class SetupForm(SetupForm_base): + if ( QMessageBox.warning(self, + self.caption(), + warn_text, +- QMessageBox.Yes, ++ QMessageBox.Yes |\ + QMessageBox.No, + QMessageBox.NoButton) == QMessageBox.Yes ): + +@@ -804,7 +804,7 @@ class SetupForm(SetupForm_base): + if QMessageBox.critical(self, + self.caption(), + error_text, +- QMessageBox.Retry | QMessageBox.Default, ++ QMessageBox.Retry | QMessageBox.Default |\ + QMessageBox.Cancel | QMessageBox.Escape, + QMessageBox.NoButton) == QMessageBox.Cancel: + break +@@ -832,7 +832,7 @@ class SetupForm(SetupForm_base): + if QMessageBox.critical(self, + self.caption(), + error_text, +- QMessageBox.Retry | QMessageBox.Default, ++ QMessageBox.Retry | QMessageBox.Default |\ + QMessageBox.Cancel | QMessageBox.Escape, + QMessageBox.NoButton) == QMessageBox.Cancel: + break +@@ -1003,7 +1003,7 @@ class SetupForm(SetupForm_base): + QMessageBox.critical(self, + self.caption(), + error_text, +- QMessageBox.Ok, ++ QMessageBox.Ok |\ + QMessageBox.NoButton, + QMessageBox.NoButton) + +@@ -1011,7 +1011,7 @@ class SetupForm(SetupForm_base): + QMessageBox.warning(self, + self.caption(), + error_text, +- QMessageBox.Ok, ++ QMessageBox.Ok |\ + QMessageBox.NoButton, + QMessageBox.NoButton) + +diff --git a/ui/unloadform.py b/ui/unloadform.py +index 8397a689c..ae363e01e 100644 +--- a/ui/unloadform.py ++++ b/ui/unloadform.py +@@ -135,7 +135,7 @@ class UnloadForm(QMainWindow): + QMessageBox.critical(self, + self.caption(), + error_text, +- QMessageBox.Ok, ++ QMessageBox.Ok |\ + QMessageBox.NoButton, + QMessageBox.NoButton) + +diff --git a/ui/upgradeform.py b/ui/upgradeform.py +index 6b9acf5cc..d0b418419 100644 +--- a/ui/upgradeform.py ++++ b/ui/upgradeform.py +@@ -118,7 +118,7 @@ class UpgradeForm(UpgradeForm_base): + QMessageBox.critical(self, + self.caption(), + error_text, +- QMessageBox.Ok, ++ QMessageBox.Ok |\ + QMessageBox.NoButton, + QMessageBox.NoButton) + +@@ -126,7 +126,7 @@ class UpgradeForm(UpgradeForm_base): + QMessageBox.information(self, + self.caption(), + text, +- QMessageBox.Ok, ++ QMessageBox.Ok |\ + QMessageBox.NoButton, + QMessageBox.NoButton) + +diff --git a/ui5/devmgr5.py b/ui5/devmgr5.py +index 495883f72..0ca016820 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/fabwindow.py b/ui5/fabwindow.py +index 488b6bbd5..0b95c94f1 100644 +--- a/ui5/fabwindow.py ++++ b/ui5/fabwindow.py +@@ -344,7 +344,7 @@ class FABWindow(QMainWindow, Ui_MainWindow): + new_name = to_unicode(self.NameLineEdit.text()) + if new_name != self.name: + if QMessageBox.question(self, self.__tr("Rename?"), "Rename '%s' to '%s'?"%(self.name,new_name), \ +- QMessageBox.Yes | QMessageBox.No) == QMessageBox.Yes: ++ QMessageBox.Yes | QMessageBox.No, QMessageBox.No) == QMessageBox.Yes: + + self.db.rename(self.name, new_name) + log.debug("Rename %s to %s" % (self.name, new_name)) +diff --git a/ui5/nodevicesdialog.py b/ui5/nodevicesdialog.py +index 6083f6d4b..ca86bfcda 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/plugindialog.py b/ui5/plugindialog.py +index e3007f911..1c6b33868 100644 +--- a/ui5/plugindialog.py ++++ b/ui5/plugindialog.py +@@ -252,7 +252,7 @@ class PluginDialog(QDialog, Ui_Dialog): + + if QMessageBox.question(self, " ", + self.__tr("<b>%s</b><p>Without this, it is not possible to authenticate and validate the plug-in prior to installation.</p>Do you still want to install the plug-in?" %error_str), +- QMessageBox.Yes | QMessageBox.No) != QMessageBox.Yes: ++ QMessageBox.Yes | QMessageBox.No, QMessageBox.No) != QMessageBox.Yes: + + self.pluginObj.deleteInstallationFiles(download_plugin_file) + self.close() +diff --git a/ui5/queuesconf.py b/ui5/queuesconf.py +index cf2206490..e3c2a0278 100644 +--- a/ui5/queuesconf.py ++++ b/ui5/queuesconf.py +@@ -245,7 +245,7 @@ class QueuesDiagnose(QDialog, Ui_Dialog): + + if QMessageBox.question(self, " ", + self.__tr("<b>%s</b><p>Without this, it is not possible to authenticate and validate this tool prior to installation.</p>Do you still want to run Smart Install disabler?" %error_str), +- QMessageBox.Yes | QMessageBox.No) == QMessageBox.Yes: ++ QMessageBox.Yes | QMessageBox.No, QMessageBox.No) == QMessageBox.Yes: + # Disabling without verification. + sts, out = utils.run("sh %s"%smart_install_run) + +diff --git a/ui5/setupdialog.py b/ui5/setupdialog.py +index fbfe5ac9b..120ee1587 100644 +--- a/ui5/setupdialog.py ++++ b/ui5/setupdialog.py +@@ -873,7 +873,7 @@ class SetupDialog(QDialog, Ui_Dialog): + self.windowTitle(), + warn_text, + QMessageBox.Yes|\ +- QMessageBox.No|\ ++ QMessageBox.No, + QMessageBox.NoButton) == QMessageBox.Yes ): + i = 2 + while True: +@@ -1108,7 +1108,7 @@ class SetupDialog(QDialog, Ui_Dialog): + if QMessageBox.critical(self, + self.windowTitle(), + error_text, +- QMessageBox.Retry | QMessageBox.Default, ++ QMessageBox.Retry | QMessageBox.Default |\ + QMessageBox.Cancel | QMessageBox.Escape, + QMessageBox.NoButton) == QMessageBox.Cancel: + break +@@ -1138,7 +1138,7 @@ class SetupDialog(QDialog, Ui_Dialog): + if QMessageBox.critical(self, + self.windowTitle(), + error_text, +- QMessageBox.Retry | QMessageBox.Default, ++ QMessageBox.Retry | QMessageBox.Default |\ + QMessageBox.Cancel | QMessageBox.Escape, + QMessageBox.NoButton) == QMessageBox.Cancel: + break diff --git a/debian/patches/0027-Fixed-incomplete-removal-of-hp-toolbox-features-whic.patch b/debian/patches/0027-Fixed-incomplete-removal-of-hp-toolbox-features-whic.patch new file mode 100644 index 000000000..b20b2cd5f --- /dev/null +++ b/debian/patches/0027-Fixed-incomplete-removal-of-hp-toolbox-features-whic.patch @@ -0,0 +1,41 @@ +From 53edf834b23c322895a12d59fd2b1b2e1ff4437e Mon Sep 17 00:00:00 2001 +From: Till Kamppeter <till.kamppeter@gmail.com> +Date: Wed, 3 Oct 2018 15:13:00 +0200 +Subject: Fixed incomplete removal of hp-toolbox features, which caused the + hp-toolbox not to start + +Looking into the ui5/devmgr5.py of the HPLIP Python source code it +seems that some features got removed by commenting them out, but this +removal seems not to have been completed, making non-existing objects +being called during the start of hp-toolbox and so it crashes right +away. + +This patch completes the commenting-out and so makes hp-toolbox start +up and work again. + +Bug-Debian: https://bugs.debian.org/912768 +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1789184 +--- + ui5/devmgr5.py | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/ui5/devmgr5.py b/ui5/devmgr5.py +index 0ca016820..9d4e82c58 100644 +--- a/ui5/devmgr5.py ++++ b/ui5/devmgr5.py +@@ -319,11 +319,11 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow): + self.PreferencesAction.setIcon(QIcon(load_pixmap('settings', '16x16'))) + self.PreferencesAction.triggered.connect(self.PreferencesAction_activated) + +- self.DiagnoseQueueAction.setIcon(QIcon(load_pixmap('warning', '16x16'))) +- self.DiagnoseQueueAction.triggered.connect(self.DiagnoseQueueAction_activated) ++ #self.DiagnoseQueueAction.setIcon(QIcon(load_pixmap('warning', '16x16'))) ++ #self.DiagnoseQueueAction.triggered.connect(self.DiagnoseQueueAction_activated) + +- self.DiagnoseHPLIPAction.setIcon(QIcon(load_pixmap('troubleshoot', '16x16'))) +- self.DiagnoseHPLIPAction.triggered.connect(self.DiagnoseHPLIP_activated) ++ #self.DiagnoseHPLIPAction.setIcon(QIcon(load_pixmap('troubleshoot', '16x16'))) ++ #self.DiagnoseHPLIPAction.triggered.connect(self.DiagnoseHPLIP_activated) + + self.ContentsAction.setIcon(QIcon(load_pixmap("help", "16x16"))) + self.ContentsAction.triggered.connect(self.helpContents) diff --git a/debian/patches/0028-hp-check-Fix-core.distro-vs.-core.distro_name-mixups.patch b/debian/patches/0028-hp-check-Fix-core.distro-vs.-core.distro_name-mixups.patch new file mode 100644 index 000000000..6d7cacdbf --- /dev/null +++ b/debian/patches/0028-hp-check-Fix-core.distro-vs.-core.distro_name-mixups.patch @@ -0,0 +1,52 @@ +From 384bab0dbdb9c5a9851a65d8d0a5082c50938096 Mon Sep 17 00:00:00 2001 +From: Francois Gouget <fgouget@free.fr> +Date: Sat, 6 May 2017 00:00:52 +0200 +Subject: hp-check: Fix core.distro vs. core.distro_name mixups. + +core.distro is the index of the distribution and is thus not suitable +for traces and information messages. + +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1688684 +--- + check.py | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/check.py b/check.py +index 5d3509477..81330b881 100755 +--- a/check.py ++++ b/check.py +@@ -199,7 +199,7 @@ class DependenciesCheck(object): + return + elif d == 'hpaio' and not self.scanning_enabled: + return +- elif self.core.distro =="rhel" and "5." in self.distro_version: ++ elif self.core.distro_name =="rhel" and "5." in self.distro_version: + if d in ['dbus','python-devel','python-dbus','pyqt4-dbus','libnetsnmp-devel','gcc','make','reportlab','policykit','sane-devel','cups-ddk']: + return + +@@ -305,14 +305,14 @@ class DependenciesCheck(object): + if self.core.distro_version not in vrs and len(vrs): + supported_distro_vrs= vrs[len(vrs)-1] + log.warn(log.bold("%s-%s version is not supported. Using %s-%s versions dependencies to verify and install..." \ +- %(self.core.distro, self.core.distro_version, self.core.distro, supported_distro_vrs))) ++ %(self.core.distro_name, self.core.distro_version, self.core.distro_name, supported_distro_vrs))) + + tui.header("SYSTEM INFO") + Sts, Kernel_info =utils.run("uname -r -v -o") + Sts, Host_info =utils.run("uname -n") + Sts, Proc_info =utils.run("uname -r -v -o") + log.info(" Kernel: %s Host: %s Proc: %s Distribution: %s %s"\ +- %(Kernel_info,Host_info,Proc_info,self.core.distro, self.core.distro_version)) ++ %(Kernel_info,Host_info,Proc_info,self.core.distro_name, self.core.distro_version)) + log.info(" Bitness: %s bit\n"%utils.getBitness()) + tui.header("HPLIP CONFIGURATION") + v = sys_conf.get('hplip', 'version') +@@ -323,7 +323,7 @@ class DependenciesCheck(object): + if self.core.is_auto_installer_support(): + log.info("HPLIP-Installation: Auto installation is supported for %s distro %s version " %(self.core.distro_name, self.core.distro_version)) + else: +- log.warn("HPLIP-Installation: Auto installation is not supported for %s distro %s version " %(self.core.distro, self.core.distro_version)) ++ log.warn("HPLIP-Installation: Auto installation is not supported for %s distro %s version " %(self.core.distro_name, self.core.distro_version)) + + log.info() + log.info(log.bold("Current contents of '/etc/hp/hplip.conf' file:")) diff --git a/debian/patches/0029-Make-base.g.xint-more-generous-in-what-it-can-take.patch b/debian/patches/0029-Make-base.g.xint-more-generous-in-what-it-can-take.patch new file mode 100644 index 000000000..25904d069 --- /dev/null +++ b/debian/patches/0029-Make-base.g.xint-more-generous-in-what-it-can-take.patch @@ -0,0 +1,29 @@ +From dc0f9c2cb573df931e725dabb19e1a526a331c60 Mon Sep 17 00:00:00 2001 +From: Didier Raboud <odyx@debian.org> +Date: Tue, 6 Nov 2018 17:57:40 +0100 +Subject: Make base.g.xint more generous in what it can take + +Fixes hp-doctor in python with version '2.7.15+' + +Closes: #912765 +--- + base/g.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/base/g.py b/base/g.py +index f73e23f97..15e67fc17 100644 +--- a/base/g.py ++++ b/base/g.py +@@ -326,9 +326,9 @@ def cleanup_spinner(): + # Convert string to int and return a list. + def xint(ver): + try: +- l = [int(x) for x in ver.split('.')] +- except: +- pass ++ l = [int(x.translate(None, '+~')) for x in ver.split('.')] ++ except ValueError: ++ l = [] + return l + + # In case of import failure of extension modules, check whether its a mixed python environment issue. diff --git a/debian/patches/series b/debian/patches/series index 17156a4e0..0a1698eea 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -23,3 +23,7 @@ ui-patch-upstream-like.patch 0023-Fix-handling-of-unicode-filenames-in-sixext.py.patch 0024-Make-dat2drv-and-locateppd-build-dependent-of-class-.patch 0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch +0026-Call-QMessageBox-constructors-of-PyQT5-with-the-corr.patch +0027-Fixed-incomplete-removal-of-hp-toolbox-features-whic.patch +0028-hp-check-Fix-core.distro-vs.-core.distro_name-mixups.patch +0029-Make-base.g.xint-more-generous-in-what-it-can-take.patch diff --git a/ui/devmgr4.py b/ui/devmgr4.py index cc2552f91..a868ccac0 100644 --- a/ui/devmgr4.py +++ b/ui/devmgr4.py @@ -1422,7 +1422,7 @@ class DevMgr4(DevMgr4_base): QMessageBox.critical(self, self.caption(), 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.Ok |\ QMessageBox.NoButton, QMessageBox.NoButton) else: @@ -2854,7 +2854,7 @@ class DevMgr4(DevMgr4_base): x = QMessageBox.critical(self, self.caption(), self.__tr("<b>Annoying Confirmation: Are you sure you want to remove this device?</b>"), - QMessageBox.Yes, + QMessageBox.Yes |\ QMessageBox.No | QMessageBox.Default, QMessageBox.NoButton) if x == QMessageBox.Yes: @@ -2949,7 +2949,7 @@ class DevMgr4(DevMgr4_base): QMessageBox.critical(self, self.caption(), error_text, - QMessageBox.Ok, + QMessageBox.Ok |\ QMessageBox.NoButton, QMessageBox.NoButton) @@ -2958,7 +2958,7 @@ class DevMgr4(DevMgr4_base): QMessageBox.warning(self, self.caption(), msg, - QMessageBox.Ok, + QMessageBox.Ok |\ QMessageBox.NoButton, QMessageBox.NoButton) @@ -3115,7 +3115,7 @@ class ScrollTestpageView(ScrollView): QMessageBox.information(self, self.caption(), self.__tr("<p><b>A test page should be printing on your printer.</b><p>If the page fails to print, please visit http://hplip.sourceforge.net for troubleshooting and support."), - QMessageBox.Ok, + QMessageBox.Ok |\ QMessageBox.NoButton, QMessageBox.NoButton) @@ -3130,7 +3130,7 @@ class ScrollTestpageView(ScrollView): QMessageBox.critical(self, self.caption(), error_text, - QMessageBox.Ok, + QMessageBox.Ok |\ QMessageBox.NoButton, QMessageBox.NoButton) @@ -3272,7 +3272,7 @@ class ScrollColorCalView(ScrollView): QMessageBox.information(self, self.caption(), self.__tr("<p><b>A test page should be printing on your printer.</b><p>If the page fails to print, please visit http://hplip.sourceforge.net for troubleshooting and support."), - QMessageBox.Ok, + QMessageBox.Ok |\ QMessageBox.NoButton, QMessageBox.NoButton) @@ -3287,7 +3287,7 @@ class ScrollColorCalView(ScrollView): QMessageBox.critical(self, self.caption(), error_text, - QMessageBox.Ok, + QMessageBox.Ok |\ QMessageBox.NoButton, QMessageBox.NoButton) diff --git a/ui/faxaddrbookform.py b/ui/faxaddrbookform.py index 109462207..b23364410 100644 --- a/ui/faxaddrbookform.py +++ b/ui/faxaddrbookform.py @@ -228,7 +228,7 @@ class FaxAddrBookGroupsForm(FaxAddrBookGroupsForm_base): x = QMessageBox.critical(self, self.caption(), self.__tr("<b>Annoying Confirmation: Are you sure you want to delete this group?</b>"), - QMessageBox.Yes, + QMessageBox.Yes |\ QMessageBox.No | QMessageBox.Default, QMessageBox.NoButton) if x == QMessageBox.Yes: @@ -421,7 +421,7 @@ class FaxAddrBookForm(FaxAddrBookForm_base): if QMessageBox.critical(self, self.caption(), self.__tr("<b>Annoying Confirmation: Are you sure you want to delete this address book entry?</b>"), - QMessageBox.Yes, + QMessageBox.Yes |\ QMessageBox.No | QMessageBox.Default, QMessageBox.NoButton) == QMessageBox.Yes: db.delete(self.current.entry['name']) @@ -451,7 +451,7 @@ class FaxAddrBookForm(FaxAddrBookForm_base): QMessageBox.critical(self, self.caption(), QString(error_text), - QMessageBox.Ok, + QMessageBox.Ok |\ QMessageBox.NoButton, QMessageBox.NoButton) diff --git a/ui/faxsendjobform.py b/ui/faxsendjobform.py index 106215c5e..69f424c42 100644 --- a/ui/faxsendjobform.py +++ b/ui/faxsendjobform.py @@ -210,7 +210,7 @@ class FaxSendJobForm(QMainWindow): QMessageBox.information(self, self.caption(), self.__tr("<p><b>Fax send completed successfully.</b>"), - QMessageBox.Ok, + QMessageBox.Ok |\ QMessageBox.NoButton, QMessageBox.NoButton) @@ -219,7 +219,7 @@ class FaxSendJobForm(QMainWindow): QMessageBox.critical(self, self.caption(), error_text, - QMessageBox.Ok, + QMessageBox.Ok |\ QMessageBox.NoButton, QMessageBox.NoButton) @@ -228,7 +228,7 @@ class FaxSendJobForm(QMainWindow): QMessageBox.warning(self, self.caption(), error_text, - QMessageBox.Ok, + QMessageBox.Ok |\ QMessageBox.NoButton, QMessageBox.NoButton) diff --git a/ui/firmwaredialog.py b/ui/firmwaredialog.py index 16b313374..0bcee1164 100644 --- a/ui/firmwaredialog.py +++ b/ui/firmwaredialog.py @@ -109,7 +109,7 @@ class FirmwareDialog(QDialog, FirmwareDialog_Base): QMessageBox.critical(self, self.caption(), error_text, - QMessageBox.Ok, + QMessageBox.Ok |\ QMessageBox.NoButton, QMessageBox.NoButton) diff --git a/ui/makecopiesform.py b/ui/makecopiesform.py index 27f144b36..0fbb573e3 100644 --- a/ui/makecopiesform.py +++ b/ui/makecopiesform.py @@ -156,7 +156,7 @@ class MakeCopiesForm(QMainWindow): QMessageBox.critical(self, self.caption(), error_text, - QMessageBox.Ok, + QMessageBox.Ok |\ QMessageBox.NoButton, QMessageBox.NoButton) @@ -164,7 +164,7 @@ class MakeCopiesForm(QMainWindow): QMessageBox.warning(self, self.caption(), msg, - QMessageBox.Ok, + QMessageBox.Ok |\ QMessageBox.NoButton, QMessageBox.NoButton) diff --git a/ui/nodevicesform.py b/ui/nodevicesform.py index 01f6ae53b..57a696375 100644 --- a/ui/nodevicesform.py +++ b/ui/nodevicesform.py @@ -67,7 +67,7 @@ class NoDevicesForm(NoDevicesForm_base): QMessageBox.critical(self, self.caption(), self.__tr("<b>An error occurred.</b><p>Please re-start the Device Manager and try again."), - QMessageBox.Ok, + QMessageBox.Ok |\ QMessageBox.NoButton, QMessageBox.NoButton) diff --git a/ui/pluginform2.py b/ui/pluginform2.py index 64e64aa77..76cb0238b 100644 --- a/ui/pluginform2.py +++ b/ui/pluginform2.py @@ -173,7 +173,7 @@ class PluginForm2(PluginForm2_base): QMessageBox.critical(self, self.caption(), error_text, - QMessageBox.Ok, + QMessageBox.Ok |\ QMessageBox.NoButton, QMessageBox.NoButton) @@ -181,7 +181,7 @@ class PluginForm2(PluginForm2_base): QMessageBox.information(self, self.caption(), text, - QMessageBox.Ok, + QMessageBox.Ok |\ QMessageBox.NoButton, QMessageBox.NoButton) diff --git a/ui/printerform.py b/ui/printerform.py index 0c6c4f39e..7c10ab07b 100644 --- a/ui/printerform.py +++ b/ui/printerform.py @@ -154,7 +154,7 @@ class PrinterForm(QMainWindow): QMessageBox.critical(self, self.caption(), error_text, - QMessageBox.Ok, + QMessageBox.Ok |\ QMessageBox.NoButton, QMessageBox.NoButton) diff --git a/ui/settingsdialog.py b/ui/settingsdialog.py index 92da22546..24f02fd84 100644 --- a/ui/settingsdialog.py +++ b/ui/settingsdialog.py @@ -146,7 +146,7 @@ class SettingsDialog(SettingsDialog_base): ## QMessageBox.warning(self, ## self.caption(), ## self.__tr("<b>One or more email addresses are missing.</b><p>Please enter this information and try again."), -## QMessageBox.Ok, +## QMessageBox.Ok |\ ## QMessageBox.NoButton, ## QMessageBox.NoButton) ## return @@ -163,7 +163,7 @@ class SettingsDialog(SettingsDialog_base): ## QMessageBox.information(self, ## self.caption(), ## self.__tr("<p><b>Please check your email for a test message.</b><p>If the message doesn't arrive, please check your settings and try again."), -## QMessageBox.Ok, +## QMessageBox.Ok |\ ## QMessageBox.NoButton, ## QMessageBox.NoButton) diff --git a/ui/setupform.py b/ui/setupform.py index 307917b02..78863fdd8 100644 --- a/ui/setupform.py +++ b/ui/setupform.py @@ -602,7 +602,7 @@ class SetupForm(SetupForm_base): if ( QMessageBox.warning(self, self.caption(), warn_text, - QMessageBox.Yes, + QMessageBox.Yes |\ QMessageBox.No, QMessageBox.NoButton) == QMessageBox.Yes ): @@ -804,7 +804,7 @@ class SetupForm(SetupForm_base): if QMessageBox.critical(self, self.caption(), error_text, - QMessageBox.Retry | QMessageBox.Default, + QMessageBox.Retry | QMessageBox.Default |\ QMessageBox.Cancel | QMessageBox.Escape, QMessageBox.NoButton) == QMessageBox.Cancel: break @@ -832,7 +832,7 @@ class SetupForm(SetupForm_base): if QMessageBox.critical(self, self.caption(), error_text, - QMessageBox.Retry | QMessageBox.Default, + QMessageBox.Retry | QMessageBox.Default |\ QMessageBox.Cancel | QMessageBox.Escape, QMessageBox.NoButton) == QMessageBox.Cancel: break @@ -1003,7 +1003,7 @@ class SetupForm(SetupForm_base): QMessageBox.critical(self, self.caption(), error_text, - QMessageBox.Ok, + QMessageBox.Ok |\ QMessageBox.NoButton, QMessageBox.NoButton) @@ -1011,7 +1011,7 @@ class SetupForm(SetupForm_base): QMessageBox.warning(self, self.caption(), error_text, - QMessageBox.Ok, + QMessageBox.Ok |\ QMessageBox.NoButton, QMessageBox.NoButton) diff --git a/ui/unloadform.py b/ui/unloadform.py index 8397a689c..ae363e01e 100644 --- a/ui/unloadform.py +++ b/ui/unloadform.py @@ -135,7 +135,7 @@ class UnloadForm(QMainWindow): QMessageBox.critical(self, self.caption(), error_text, - QMessageBox.Ok, + QMessageBox.Ok |\ QMessageBox.NoButton, QMessageBox.NoButton) diff --git a/ui/upgradeform.py b/ui/upgradeform.py index 6b9acf5cc..d0b418419 100644 --- a/ui/upgradeform.py +++ b/ui/upgradeform.py @@ -118,7 +118,7 @@ class UpgradeForm(UpgradeForm_base): QMessageBox.critical(self, self.caption(), error_text, - QMessageBox.Ok, + QMessageBox.Ok |\ QMessageBox.NoButton, QMessageBox.NoButton) @@ -126,7 +126,7 @@ class UpgradeForm(UpgradeForm_base): QMessageBox.information(self, self.caption(), text, - QMessageBox.Ok, + QMessageBox.Ok |\ QMessageBox.NoButton, QMessageBox.NoButton) diff --git a/ui5/devmgr5.py b/ui5/devmgr5.py index 495883f72..9d4e82c58 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) @@ -321,11 +319,11 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow): self.PreferencesAction.setIcon(QIcon(load_pixmap('settings', '16x16'))) self.PreferencesAction.triggered.connect(self.PreferencesAction_activated) - self.DiagnoseQueueAction.setIcon(QIcon(load_pixmap('warning', '16x16'))) - self.DiagnoseQueueAction.triggered.connect(self.DiagnoseQueueAction_activated) + #self.DiagnoseQueueAction.setIcon(QIcon(load_pixmap('warning', '16x16'))) + #self.DiagnoseQueueAction.triggered.connect(self.DiagnoseQueueAction_activated) - self.DiagnoseHPLIPAction.setIcon(QIcon(load_pixmap('troubleshoot', '16x16'))) - self.DiagnoseHPLIPAction.triggered.connect(self.DiagnoseHPLIP_activated) + #self.DiagnoseHPLIPAction.setIcon(QIcon(load_pixmap('troubleshoot', '16x16'))) + #self.DiagnoseHPLIPAction.triggered.connect(self.DiagnoseHPLIP_activated) self.ContentsAction.setIcon(QIcon(load_pixmap("help", "16x16"))) self.ContentsAction.triggered.connect(self.helpContents) diff --git a/ui5/fabwindow.py b/ui5/fabwindow.py index 488b6bbd5..0b95c94f1 100644 --- a/ui5/fabwindow.py +++ b/ui5/fabwindow.py @@ -344,7 +344,7 @@ class FABWindow(QMainWindow, Ui_MainWindow): new_name = to_unicode(self.NameLineEdit.text()) if new_name != self.name: if QMessageBox.question(self, self.__tr("Rename?"), "Rename '%s' to '%s'?"%(self.name,new_name), \ - QMessageBox.Yes | QMessageBox.No) == QMessageBox.Yes: + QMessageBox.Yes | QMessageBox.No, QMessageBox.No) == QMessageBox.Yes: self.db.rename(self.name, new_name) log.debug("Rename %s to %s" % (self.name, new_name)) diff --git a/ui5/nodevicesdialog.py b/ui5/nodevicesdialog.py index 6083f6d4b..ca86bfcda 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/plugindialog.py b/ui5/plugindialog.py index e3007f911..1c6b33868 100644 --- a/ui5/plugindialog.py +++ b/ui5/plugindialog.py @@ -252,7 +252,7 @@ class PluginDialog(QDialog, Ui_Dialog): if QMessageBox.question(self, " ", self.__tr("<b>%s</b><p>Without this, it is not possible to authenticate and validate the plug-in prior to installation.</p>Do you still want to install the plug-in?" %error_str), - QMessageBox.Yes | QMessageBox.No) != QMessageBox.Yes: + QMessageBox.Yes | QMessageBox.No, QMessageBox.No) != QMessageBox.Yes: self.pluginObj.deleteInstallationFiles(download_plugin_file) self.close() diff --git a/ui5/queuesconf.py b/ui5/queuesconf.py index cf2206490..e3c2a0278 100644 --- a/ui5/queuesconf.py +++ b/ui5/queuesconf.py @@ -245,7 +245,7 @@ class QueuesDiagnose(QDialog, Ui_Dialog): if QMessageBox.question(self, " ", self.__tr("<b>%s</b><p>Without this, it is not possible to authenticate and validate this tool prior to installation.</p>Do you still want to run Smart Install disabler?" %error_str), - QMessageBox.Yes | QMessageBox.No) == QMessageBox.Yes: + QMessageBox.Yes | QMessageBox.No, QMessageBox.No) == QMessageBox.Yes: # Disabling without verification. sts, out = utils.run("sh %s"%smart_install_run) diff --git a/ui5/setupdialog.py b/ui5/setupdialog.py index fbfe5ac9b..120ee1587 100644 --- a/ui5/setupdialog.py +++ b/ui5/setupdialog.py @@ -873,7 +873,7 @@ class SetupDialog(QDialog, Ui_Dialog): self.windowTitle(), warn_text, QMessageBox.Yes|\ - QMessageBox.No|\ + QMessageBox.No, QMessageBox.NoButton) == QMessageBox.Yes ): i = 2 while True: @@ -1108,7 +1108,7 @@ class SetupDialog(QDialog, Ui_Dialog): if QMessageBox.critical(self, self.windowTitle(), error_text, - QMessageBox.Retry | QMessageBox.Default, + QMessageBox.Retry | QMessageBox.Default |\ QMessageBox.Cancel | QMessageBox.Escape, QMessageBox.NoButton) == QMessageBox.Cancel: break @@ -1138,7 +1138,7 @@ class SetupDialog(QDialog, Ui_Dialog): if QMessageBox.critical(self, self.windowTitle(), error_text, - QMessageBox.Retry | QMessageBox.Default, + QMessageBox.Retry | QMessageBox.Default |\ QMessageBox.Cancel | QMessageBox.Escape, QMessageBox.NoButton) == QMessageBox.Cancel: break |