Summary: | KStandardGuiItem::yes() and KStandardGuiItem::no() display pointless tooltips that mirror the buttons' visible text | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kwidgetsaddons | Reporter: | Patrick Silva <bugseforuns> |
Component: | general | Assignee: | Christoph Feck <cfeck> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kdelibs-bugs, nate |
Priority: | NOR | ||
Version: | 5.80.0 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/frameworks/kwidgetsaddons/commit/eeadf4513d30b35484728de15e878a8f96d1c7f1 | Version Fixed In: | 5.82 |
Sentry Crash Report: | |||
Attachments: | screen recording |
The buttons should also use verbs instead of yes/no. This is a standard KMessageBox::questionYesNo() with no fancy additions; moving to kwidgetsaddons. Code is: void Klipper::slotAskClearHistory() { int clearHist = KMessageBox::questionYesNo(nullptr, i18n("Really delete entire clipboard history?"), i18n("Delete clipboard history?"), KStandardGuiItem::yes(), KStandardGuiItem::no(), QStringLiteral("really_clear_history"), KMessageBox::Dangerous); if (clearHist == KMessageBox::Yes) { history()->slotClear(); saveHistory(); } } A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kwidgetsaddons/-/merge_requests/63 Git commit eeadf4513d30b35484728de15e878a8f96d1c7f1 by Nate Graham. Committed on 05/04/2021 at 13:25. Pushed by ngraham into branch 'master'. Remove pointless tooltip for yes and no KStandardGuiItems These buttons have tooltips with the exact same text that is shown on them, which is pointless. If this is not a mistake, I suspect that logic is that the application might override the text in a way that's unclear to the user, so the tooltip could provide clarity. However this too is false: in such a situation, the words "yes" and "no" cannot be guaranteed to map to clearly identifiable actions, so showing these tooltips would only muddy the situation even further. Let's trust application developers to write good text if they override the default text, and remove these tooltips. FIXED-IN: 5.81 M +2 -2 src/kstandardguiitem.cpp https://invent.kde.org/frameworks/kwidgetsaddons/commit/eeadf4513d30b35484728de15e878a8f96d1c7f1 |
Created attachment 130395 [details] screen recording SUMMARY The labels and tooltips of the buttons are the same. Watch the attached screen recording please. EXPECTED RESULT no tooltip SOFTWARE/OS VERSIONS Operating System: KDE neon Unstable Edition KDE Plasma Version: 5.19.80 KDE Frameworks Version: 5.73.0 Qt Version: 5.14.2