[PATCH 7 of 8] Use is_admin to determine if UAC icon should be painted on the button
Wald Commits
scm-commit at wald.intevation.org
Mon Apr 28 11:22:50 CEST 2014
# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1398676932 0
# Node ID 20973a56d5ece2bdaea4134a5de072482bd0d9f0
# Parent bfcfbae151ab01c675b95675c824c37b282a1ece
Use is_admin to determine if UAC icon should be painted on the button
diff -r bfcfbae151ab -r 20973a56d5ec ui/mainwindow.cpp
--- a/ui/mainwindow.cpp Mon Apr 28 09:21:27 2014 +0000
+++ b/ui/mainwindow.cpp Mon Apr 28 09:22:12 2014 +0000
@@ -50,6 +50,7 @@
#include "certificateitemdelegate.h"
#include "separatoritemdelegate.h"
#include "installwrapper.h"
+#include "util.h"
MainWindow::MainWindow(bool trayMode):
mTrayMode(trayMode)
@@ -414,6 +415,13 @@
bottomLayout->addWidget(quitButton);
bottomLayout->setAlignment(quitButton, Qt::AlignBottom);
+#ifdef Q_OS_WIN
+ if (is_admin()) {
+ QIcon uacShield = QApplication::style()->standardIcon(QStyle::SP_VistaShield);
+ installButton->setIcon(uacShield);
+ }
+#endif
+
// The certificate details
QGroupBox *detailBox = new QGroupBox(tr("Details"));
QLabel *subjectCN = new QLabel(tr("Subject Common Name:"));
More information about the Trustbridge-commits
mailing list