Bug 424658 - KStandardGuiItem::yes() and KStandardGuiItem::no() display pointless tooltips that mirror the buttons' visible text
Summary: KStandardGuiItem::yes() and KStandardGuiItem::no() display pointless tooltips...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kwidgetsaddons
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.80.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Christoph Feck
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-25 15:37 UTC by Patrick Silva
Modified: 2021-04-05 13:34 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.82
Sentry Crash Report:


Attachments
screen recording (821.04 KB, video/webm)
2020-07-25 15:37 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2020-07-25 15:37:03 UTC
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
Comment 1 Christoph Feck 2020-08-17 18:27:16 UTC
The buttons should also use verbs instead of yes/no.
Comment 2 Nate Graham 2021-04-01 19:03:17 UTC
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();
    }
}
Comment 3 Bug Janitor Service 2021-04-01 19:08:06 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kwidgetsaddons/-/merge_requests/63
Comment 4 Nate Graham 2021-04-05 13:25:21 UTC
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