[Bug 309739] New: JJ:Code review: Use descriptive KGuiItem labels for buttons in calls to KMessageBox

Thomas Fischer fischer at unix-ag.uni-kl.de
Thu Nov 8 10:16:04 GMT 2012


https://bugs.kde.org/show_bug.cgi?id=309739

            Bug ID: 309739
          Severity: minor
           Version: unspecified
          Priority: NOR
          Assignee: unassigned-bugs at kde.org
           Summary: JJ:Code review: Use descriptive KGuiItem labels for
                    buttons in calls to KMessageBox
    Classification: Unclassified
                OS: Linux
          Reporter: fischer at unix-ag.uni-kl.de
          Hardware: Other
            Status: UNCONFIRMED
         Component: general
           Product: kde

>From a usability perspective, it would be beneficial if message box buttons
would contain a brief summary of the action that would follow instead of the
default text "Yes", "No", "Continue", ...
Example: For a message box that warns the user that a file will get
overwritten, the code may look like this:
KMessageBox::warningYesNo(this, i18n("Overwrite file?"));
showing only "Yes" and "No" as button labels.
Given that overwriting a file may imply loosing data, the user should be made
aware more clearly of the consequences. The box's buttons should be instead
labeled of the actions that will follow:
KMessageBox::warningYesNo(this, i18n("Overwrite file?"), QString(),
KGuiItem(i18n("Overwrite file")), KGuiItem(i18n("Keep file")));

This problem exists across all KDE applications. However, it can be easily
fixed and changes have virtually no effect of the surrounding code and can be
done by someone with only basic skills.
This makes this "bug" a perfect junior job.

As an enhancement, this bug can be enlarged by requiring that similar message
box have similar text and content across all KDE applications. There exist
multiple variants of "Overwrite file" message box in KDE.
Maybe the most common types of message boxs (again as an example "Overwrite
file") should be refactored into the KMessageBox class using a static function
where you would e.g. specify the filename as well.

Reproducible: Always

-- 
You are receiving this mail because:
You are the assignee for the bug.



More information about the Unassigned-bugs mailing list