Mercurial > trustbridge
diff ui/mainwindow.cpp @ 507:20973a56d5ec
Use is_admin to determine if UAC icon should be painted on the button
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Mon, 28 Apr 2014 09:22:12 +0000 |
parents | 077b4342d69b |
children | d1812e171d0c |
line wrap: on
line diff
--- 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:"));