Opened 10 years ago
Closed 10 years ago
#44798 closed defect (fixed)
kdepim4: fixes for menubar issues (1 fatal) in kmail
Reported by: | RJVB (René Bertin) | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | haspatch | Cc: | bjoern.ricks@…, NicosPavlov, mkae (Marko Käning) |
Port: | kdepim4 |
Description
kmail can trigger a bug which I think must be somewhere deep in Qt, when opening an email received on/from a mailing list, and when opening certain items of the View menu. This crash is caused by calling KMenu::addTitle on a menu in the application's main title bar.
I don't see how one would/could determine the kind of the target menu in KMenu::addTitle, so I present a workaround at the application level. I identified (hopefully) all incompatible calls to KMenu::addTitle, and replaced those calls (when building for Q_WS_MACX) with a few lines of code giving a comparable but supported/possible result. In other words, instead of using a "true" title menu item, an inactive regular menu item is added, with at least a separator underneath.
Attachments (2)
Change History (15)
Changed 10 years ago by RJVB (René Bertin)
Attachment: | emulate-addTitle.patch added |
---|
comment:1 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
Summary: | preventing menu-related a kmail crash → kdepim4: preventing menu-related a kmail crash |
---|
comment:2 Changed 10 years ago by mkae (Marko Käning)
Cc: | mk@… added |
---|
comment:3 Changed 10 years ago by mkae (Marko Käning)
Hi René, are your sure that the internationalisation works if you remove all those i18n()
calls and pass a parameter in menu->addTitle( i18n( titleText ) )
?
Apart from that I wonder whether bug somewhere deep in Qt can be described somewhat more and submitted to Qt's bug tracker?
comment:4 Changed 10 years ago by RJVB (René Bertin)
But .. I didn't change anything to the i18n calls, apart from moving them around slightly?!
As to the Qt bug: yeah, I've been thinking about that. Thing is, I'd have to figure out first what kind of formatting is being applied that's the culprit. I'm not sure I'm willing to spend time on that, as the whole issue should go away in KF5 if not already in kdepim 4.14. I'd also need a simple test case as I'm now using kmail as my main mail app...
comment:5 Changed 10 years ago by mkae (Marko Käning)
I meant that calling i18n("Text")
with a literal might work differently than when using i18n(t)
with a variable at runtime.
But I am not sure whether this code change is actually a problem. I just remember that I once ran into an issue with something similar quite a while ago with gettext...
comment:6 Changed 10 years ago by RJVB (René Bertin)
Well, that's a question one would have to ask the kdepim developers, but I'm guessing this works with the i18
function family used in KDE.
Or, you can simply install this port yourself (with my patch), a pack for a language you understand, and pick a primary non-english language for kmail . Like many KDE applications, kmail allows you to set language preferences from inside the application, without having to set it globally. For me this works for the French translation.
comment:7 Changed 10 years ago by RJVB (René Bertin)
Can someone tell me how I can change this ticket's title? I must have been wearing my Yoda glasses when I typed it in ...
comment:8 Changed 10 years ago by mkae (Marko Käning)
Good to hear that it works for you on French. In that case I withdraw my comment. (As I said, I wasn't sure there...)
Re title: Open the "Modify Ticket" link below! :)
comment:9 Changed 10 years ago by RJVB (René Bertin)
"Modify ticket" doesn't seem to give me access to editing the title (nor the keywords or other "fields") ... do I need special permissions?
comment:10 Changed 10 years ago by mkae (Marko Käning)
Oh, I see. you need to register and then log on to trac, of course, in order to change your tickets.
comment:11 Changed 10 years ago by RJVB (René Bertin)
You've never met me, so how can you assume I look like a dummy? :P
In short, it seems I can only add comments, edit older ones, and manage the attachments of the ticket.
Changed 10 years ago by mkae (Marko Käning)
Attachment: | OSX-menu-fixes.patch added |
---|
more extended patch
comment:12 Changed 10 years ago by mkae (Marko Käning)
Summary: | kdepim4: preventing menu-related a kmail crash → kdepim4: fixes for menubar issues (1 fatal) in kmail |
---|
René wrote on MACPORTS-DEVEL:
The other patches are companion changes to the systray and About/Preferences issues I'm working on. The kmail systray won't show a title for instance, even with the kdelibs4 changes I proposed, because kmail uses QMenu instead of KMenu. It also doesn't use KStandardActions to define the configure/Preferences menu item (presumably because it can run inside kontact), so there's a little setMenuRole(PreferencesRole) call at the right place that can only do good.
comment:13 Changed 10 years ago by NicosPavlov
Resolution: | → fixed |
---|---|
Status: | new → closed |
Committed in r126437, along with 4.13.3 update.
Cc Me!