diff ui/mainwindow.cpp @ 1234:ad4fc3649ffb

(issue146) Always draw certificate item buttons as unchecked
author Andre Heinecke <andre.heinecke@intevation.de>
date Wed, 24 Sep 2014 16:25:27 +0200
parents 7da9ec20eae4
children 33a17569812a
line wrap: on
line diff
--- a/ui/mainwindow.cpp	Wed Sep 24 15:49:27 2014 +0200
+++ b/ui/mainwindow.cpp	Wed Sep 24 16:25:27 2014 +0200
@@ -33,6 +33,7 @@
 #include <QDesktopServices>
 
 #include "certificatelist.h"
+#include "certificateitemwidget.h"
 #include "downloader.h"
 #include "helpdialog.h"
 #include "aboutdialog.h"
@@ -1256,7 +1257,7 @@
             bool state = !mPreviouslyUnselected.contains(cert.base64Line());
             if (cert.isInstallCert()) {
                 oldInstallCerts.append(cert);
-                QToolButton* actionBtn = new QToolButton();
+                CheckLessToolBtn* actionBtn = new CheckLessToolBtn();
                 QIcon btnIcon;
                 if (!state) {
                     btnIcon.addFile(":/img/cert-to-be-installed-good-48.png", QSize(48, 48), QIcon::Normal, QIcon::Off);
@@ -1274,7 +1275,7 @@
             }
             else {
                 oldRemoveCerts.append(cert);
-                QToolButton* actionBtn = new QToolButton();
+                CheckLessToolBtn* actionBtn = new CheckLessToolBtn();
                 QIcon btnIcon;
                 actionBtn->setProperty("ToolTip_Off", tr("Certificate will be removed."));
                 actionBtn->setProperty("ToolTip_On", tr("Certificate has not been removed."));
@@ -1299,7 +1300,7 @@
                 if (mInstalledList.getCertificates().contains(cert)) {
                     // Was in the old list.
                     oldInstallCerts.append(cert);
-                    QToolButton* actionBtn = new QToolButton();
+                    CheckLessToolBtn* actionBtn = new CheckLessToolBtn();
                     QIcon btnIcon;
                     actionBtn->setProperty("ToolTip_Off", tr("Certificate is installed."));
                     actionBtn->setProperty("ToolTip_On", tr("Certifcate is not installed."));
@@ -1311,7 +1312,7 @@
                 else {
                     // Is a brand new certificate
                     newInstallCerts.append(cert);
-                    QToolButton* actionBtn = new QToolButton();
+                    CheckLessToolBtn* actionBtn = new CheckLessToolBtn();
                     QIcon btnIcon;
                     actionBtn->setProperty("ToolTip_Off", tr("Certificate will be installed."));
                     actionBtn->setProperty("ToolTip_On", tr("Certificate will not be installed."));
@@ -1327,7 +1328,7 @@
                     // Was in the old list.
                     oldRemoveCerts.append(cert);
                     // Is removed, so set editable to false.
-                    QToolButton* actionBtn = new QToolButton();
+                    CheckLessToolBtn* actionBtn = new CheckLessToolBtn();
                     QIcon btnIcon;
                     actionBtn->setProperty("ToolTip_Off", tr("Certificate will be removed."));
                     actionBtn->setProperty("ToolTip_On", tr("Certificate has not been removed."));
@@ -1345,7 +1346,7 @@
                     // Was in the old list with status "install" and now has the
                     // status "remove".
                     newRemoveCerts.append(cert);
-                    QToolButton* actionBtn = new QToolButton();
+                    CheckLessToolBtn* actionBtn = new CheckLessToolBtn();
                     QIcon btnIcon;
                     actionBtn->setProperty("ToolTip_Off", tr("Certificate will be removed."));
                     actionBtn->setProperty("ToolTip_On", tr("Certificate will not be removed."));

http://wald.intevation.org/projects/trustbridge/