summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Harvey <[email protected]>2018-10-24 21:14:00 +0200
committerStefan BrĂ¼ns <[email protected]>2018-10-25 14:05:01 +0200
commiteb9c4c080427067e581decfea06efc5480be2bf1 (patch)
treee47e4155450e21a35319d82fef22ce4fe06189ef
parent9cf71f4249508896052f358fb33dd34d13e163c3 (diff)
Fully remove `Application Name` from Details panel
Summary: `Application Name` removed from PolicyKit details panel (backend code removed long ago) Addresses concern raised in R121:b340539eca13 Reviewers: ngraham, davidedmundson, sharvey Reviewed By: ngraham Subscribers: davidedmundson, bruns, ngraham, plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D12498
-rw-r--r--AuthDialog.cpp13
-rw-r--r--AuthDialog.h2
-rw-r--r--authdetails.ui50
3 files changed, 16 insertions, 49 deletions
diff --git a/AuthDialog.cpp b/AuthDialog.cpp
index 31e385b..07faeba 100644
--- a/AuthDialog.cpp
+++ b/AuthDialog.cpp
@@ -137,7 +137,7 @@ AuthDialog::AuthDialog(const QString &actionId,
}
}
- AuthDetails *detailsDialog = new AuthDetails(details, m_actionDescription, m_appname, this);
+ AuthDetails *detailsDialog = new AuthDetails(details, m_actionDescription, this);
detailsWidgetContainer->layout()->addWidget(detailsDialog);
userCB->hide();
@@ -318,22 +318,11 @@ void AuthDialog::authenticationFailure()
AuthDetails::AuthDetails(const PolkitQt1::Details &details,
const PolkitQt1::ActionDescription &actionDescription,
- const QString &appname,
QWidget *parent)
: QWidget(parent)
{
setupUi(this);
- // better N/A than a blank space
- if (appname.isEmpty()) {
- QFont nameFont = app_label->font();
- nameFont.setItalic(true);
- app_label->setFont(nameFont);
- app_label->setText(i18n("Not Applicable"));
- } else {
- app_label->setText(appname);
- }
-
foreach(const QString &key, details.keys()) { //krazy:exclude=foreach (Details is not a map/hash, but rather a method)
int row = gridLayout->rowCount() + 1;
diff --git a/AuthDialog.h b/AuthDialog.h
index eb22e9d..74e7009 100644
--- a/AuthDialog.h
+++ b/AuthDialog.h
@@ -69,7 +69,6 @@ private slots:
void on_userCB_currentIndexChanged(int index);
private:
- QString m_appname;
QString m_message;
void createUserCB(const PolkitQt1::Identity::List &identities);
@@ -81,7 +80,6 @@ class AuthDetails : public QWidget, private Ui::AuthDetails
public:
AuthDetails(const PolkitQt1::Details &details,
const PolkitQt1::ActionDescription &actionDescription,
- const QString &appname,
QWidget *parent);
private slots:
diff --git a/authdetails.ui b/authdetails.ui
index 4a808cc..3aff521 100644
--- a/authdetails.ui
+++ b/authdetails.ui
@@ -17,7 +17,7 @@
</sizepolicy>
</property>
<layout class="QGridLayout" name="gridLayout">
- <item row="2" column="0">
+ <item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="font">
<font>
@@ -33,28 +33,31 @@
</property>
</widget>
</item>
- <item row="2" column="1" colspan="3">
+ <item row="1" column="1" colspan="2">
<widget class="QLabel" name="action_label">
<property name="text">
<string>&lt;null&gt;</string>
</property>
<property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
- <item row="0" column="0" colspan="4">
+ <item row="0" column="0" colspan="3">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
- <item row="5" column="1" colspan="3">
+ <item row="4" column="1" colspan="2">
<widget class="KUrlLabel" name="vendorUL">
<property name="text">
<string>Vendor:</string>
</property>
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+ </property>
<property name="tipText">
<string/>
</property>
@@ -66,7 +69,7 @@
</property>
</widget>
</item>
- <item row="5" column="0">
+ <item row="4" column="0">
<widget class="QLabel" name="vendorL">
<property name="font">
<font>
@@ -82,33 +85,7 @@
</property>
</widget>
</item>
- <item row="1" column="0">
- <widget class="QLabel" name="label">
- <property name="font">
- <font>
- <weight>75</weight>
- <bold>true</bold>
- </font>
- </property>
- <property name="text">
- <string>Application:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item row="1" column="1" colspan="3">
- <widget class="QLabel" name="app_label">
- <property name="text">
- <string>Application:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
+ <item row="2" column="1" colspan="2">
<widget class="QLabel" name="action_id_label">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -116,12 +93,15 @@
<property name="text">
<string>Action ID:</string>
</property>
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+ </property>
<property name="textInteractionFlags">
<set>Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
- <item row="3" column="0">
+ <item row="2" column="0">
<widget class="QLabel" name="label_2">
<property name="font">
<font>
@@ -130,7 +110,7 @@
</font>
</property>
<property name="text">
- <string>Action ID:</string>
+ <string>ID:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>