Commit 9cf71f42 authored by Stefan Brüns's avatar Stefan Brüns

Improve replacement text when action description is not provided

Summary:
The polkit rules specification mandates a description for actions,
https://www.freedesktop.org/software/polkit/docs/latest/polkit.8.html#polkit-declaring-actions

Split from D12498.

Reviewers: #plasma, ngraham, davidedmundson

Reviewed By: ngraham

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D16417
parent 2959f77c
......@@ -352,13 +352,11 @@ AuthDetails::AuthDetails(const PolkitQt1::Details &details,
gridLayout->addWidget(valueLabel, row, 1);
}
// replace blank description
// neither isEmpty() or isNull() worked (?)
if (actionDescription.description() == "") {
if (actionDescription.description().isEmpty()) {
QFont descrFont(action_label->font());
descrFont.setItalic(true);
action_label->setFont(descrFont);
action_label->setText(i18n("Not Applicable"));
action_label->setText(i18n("'Description' not provided"));
} else {
action_label->setText(actionDescription.description());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment