Commit a0c0c160 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖

Workaround a Qt bug causing crash in freebusymodel tests

QtWebEngineWidgets automatically creates a QOpenGLContext from a
a Q_COREAPP_STARTUP_FUNCTION which will cause a crash when we are
using only a QCoreApplication (so no OpenGL). This happens when the
library is loaded, so even if linked indirectly by another lib
(libkdepim in this case) so there's nothing we can do to prevent it
from being loaded.

Temporary workaround is to use QGuiApplication, which makes WebEngine
happy. This has been fixed in Qt 5.6.1 (QTBUG-51789)
parent d0085ed4
......@@ -29,7 +29,14 @@
using namespace KPIM;
// Workaround QTBUG-51789 causing a crash when QtWebEngineWidgets
// is linked into a QCoreApplication.
// TODO: Remove once we hard-depend on Qt 5.7
#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 1)
QTEST_GUILESS_MAIN(FreeBusyItemModelTest)
#else
QTEST_MAIN(FreeBusyItemModelTest)
#endif
void FreeBusyItemModelTest::testModelValidity()
{
......
......@@ -29,7 +29,14 @@
using namespace KPIM;
// Workaround QTBUG-51789 causing a crash when QtWebEngineWidgets
// is linked into a QCoreApplication.
// TODO: Remove once we hard-depend on Qt 5.7
#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 1)
QTEST_GUILESS_MAIN(FreePeriodModelTest)
#else
QTEST_MAIN(FreePeriodModelTest)
#endif
void FreePeriodModelTest::testModelValidity()
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment