Bug 367598 - Kmail needs to force platform xcb on Linux
Summary: Kmail needs to force platform xcb on Linux
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: general (show other bugs)
Version: Git (master)
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-20 07:20 UTC by Martin Flöser
Modified: 2017-07-25 15:16 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.3.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Flöser 2016-08-20 07:20:17 UTC
Due to Qt-Bug https://bugreports.qt.io/browse/QTBUG-55384 KMail crashes on startup on Wayland. If one specifies "--platform xcb" manually kmail starts and is usable.

As we cannot expect users to know that KMail cannot be used on Wayland, we should make kmail default to xcb.

Reproducible: Always

Steps to Reproduce:
1. Run Plasma Wayland session
2. Try to start kmail

Actual Results:  
KMail crashes

Expected Results:  
KMail does not crash

The easiest way to work around the Qt bug is to put a:
qputenv("QT_QPA_PLATFORM", "xcb");

before creating the QGuiApplication. This should of course only be done when running on Linux. An example how to do this is in KWin https://quickgit.kde.org/?p=kwin.git&a=blob&h=e4db348bf6dc01b431257e88129a8d7ea14ff92e&hb=a67ccc3529326e6ee8a615ede312aea3b33e844a&f=main_x11.cpp (line 404)
Comment 1 Laurent Montel 2016-08-20 12:25:05 UTC
Git commit fd05d3981ecbe880c429f60948dee12b2c7d5df2 by Montel Laurent.
Committed on 20/08/2016 at 12:24.
Pushed by mlaurent into branch 'Applications/16.08'.

Fix Bug 367598 - Kmail needs to force platform xcb on Linux

FIXED-IN: 5.3.1

M  +4    -0    kmail/src/main.cpp

http://commits.kde.org/kdepim/fd05d3981ecbe880c429f60948dee12b2c7d5df2
Comment 2 Volker Krause 2017-07-25 08:56:26 UTC
Since Qt 5.9 web engine works fine with Wayland, and thus so does KMail now, just tested in the Wayland BoF at Akademy :)
Comment 3 Martin Flöser 2017-07-25 15:16:11 UTC
(In reply to Volker Krause from comment #2)
> Since Qt 5.9 web engine works fine with Wayland, and thus so does KMail now,
> just tested in the Wayland BoF at Akademy :)

Just tested: I can confirm that web engine now works on Wayland.