Changeset View
Changeset View
Standalone View
Standalone View
AuthDialog.cpp
Show First 20 Lines • Show All 346 Lines • ▼ Show 20 Line(s) | 337 | foreach(const QString &key, details.keys()) { //krazy:exclude=foreach (Details is not a map/hash, but rather a method) | |||
---|---|---|---|---|---|
347 | lblFont.setBold(true); | 347 | lblFont.setBold(true); | ||
348 | keyLabel->setFont(lblFont); | 348 | keyLabel->setFont(lblFont); | ||
349 | 349 | | |||
350 | QLabel *valueLabel = new QLabel(this); | 350 | QLabel *valueLabel = new QLabel(this); | ||
351 | valueLabel->setText(details.lookup(key)); | 351 | valueLabel->setText(details.lookup(key)); | ||
352 | gridLayout->addWidget(valueLabel, row, 1); | 352 | gridLayout->addWidget(valueLabel, row, 1); | ||
353 | } | 353 | } | ||
354 | 354 | | |||
355 | // replace blank description | 355 | if (actionDescription.description().isEmpty()) { | ||
356 | // neither isEmpty() or isNull() worked (?) | | |||
ngraham: So I gather `.isEmpty()` works now? | |||||
bruns: Yes. | |||||
357 | if (actionDescription.description() == "") { | | |||
358 | QFont descrFont(action_label->font()); | 356 | QFont descrFont(action_label->font()); | ||
359 | descrFont.setItalic(true); | 357 | descrFont.setItalic(true); | ||
360 | action_label->setFont(descrFont); | 358 | action_label->setFont(descrFont); | ||
361 | action_label->setText(i18n("Not Applicable")); | 359 | action_label->setText(i18n("'Description' not provided")); | ||
I would prefer "not available" over "not provided", but I won't choose this as my hill to die on. :) Do we actually need to repeat the word 'Description' here? ngraham: I would prefer "not available" over "not provided", but I won't choose this as my hill to die… | |||||
There is no repetition here - the Polkit "<description>" is labeled "Action:" in the dialog. bruns: There is no repetition here - the Polkit "<description>" is labeled "Action:" in the dialog. | |||||
bruns: Btw, "not provided" is your own proposal ;-) | |||||
ngraham: What!? I must be going senile already... | |||||
362 | } else { | 360 | } else { | ||
363 | action_label->setText(actionDescription.description()); | 361 | action_label->setText(actionDescription.description()); | ||
364 | } | 362 | } | ||
365 | 363 | | |||
366 | action_id_label->setText(actionDescription.actionId()); | 364 | action_id_label->setText(actionDescription.actionId()); | ||
367 | 365 | | |||
368 | QString vendor = actionDescription.vendorName(); | 366 | QString vendor = actionDescription.vendorName(); | ||
369 | QString vendorUrl = actionDescription.vendorUrl(); | 367 | QString vendorUrl = actionDescription.vendorUrl(); | ||
Show All 21 Lines |
So I gather .isEmpty() works now?