New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Addview not working #1852
Comments
Is this a qt5 issue? just a kde/linux issue? |
Never seen this. |
Strange, I have had it consistently on qt5. The documentation implies this shouldn't be happening though: http://doc.qt.io/qt-5/qaction.html#QAction-1 stating that the action will use a stripped version of the text, although that's a bit vague and says that's for tool buttons. |
Ok, weird. It seems to happen for the actions passed via the "selected" slot, querying the menu action when it is added returns the plain text, but from the action to the slot has the accelerator. I see the output as shown in the screenshot. (Qt 5.5.1 Linux 64bit) |
What I really don't understand is those texts do not have shortcuts in them, they are defined in GcWindowRegistry.cpp |
And I build with QT 5.5.1 on OSX and have no issues. |
Aha, interesting, although that short testcase I wrote shows has nothing to do with designer. It looks like there's a deeper library issue there. I'll comment on that bug. |
Its the kde plugin |
No, it's a KDE runtime issue, since we're not relying on the designer-or its plugin for creating the resources, we're doing it programatically both in GC and in that short testcase. So well, yes, it is the kde plugin, but only because there's a deeper problem. :) |
ok, there's a simple workaround, adding:
to ~/.config/kdeglobals Fixes the problem, although that does mean that anyone running on KDE will not understand why the menus aren't working and might take some time to locate the fix. :( |
Why not just use the tooltip instead, or are there other issues with that? |
Nope no issues - misinterpreted your comments as "this is a platform issue" so implemented a platform fix. ;) |
oh lord, if the simple answer is to use the tooltip lets do that ! 👍 |
I think this proposed solution could also be applied here, since is it is simple and safe: #2930 (comment) |
To avoid issues with kde injecting them, it is not pretty but simple and safe. Fixes GoldenCheetah#1852 Fixes GoldenCheetah#2930
…tah#3298) To avoid issues with kde injecting them, it is not pretty but simple and safe. Fixes GoldenCheetah#1852 Fixes GoldenCheetah#2930
Under dev GoldenCheetah, on Linux, Qt5.5.1 the Add Chart menu from the main menu doesn't work for me. The small toolbar menu option does still work.
On my machine/config it appears that this is because the call to text() in MainWindow::addChart is returning a string with accelerator markup. (i.e. it returns "&Workout" rather than "Workout")
if (GcWindows[i].name == action->text()) {
Replacing this with a call to toolTip() instead returns the correct text and fixes the issue for me since this defaults to the original message text unless explicitly set.
if (GcWindows[i].name == action->toolTip()) {
The text was updated successfully, but these errors were encountered: