Commit 3cc39ba3 authored by Jimi Huotari's avatar Jimi Huotari Committed by Andreas Sturmlechner

Fix plugins/qpa build with Qt 5.13

Summary:
Upstream moved screen maintenance functions from
QPlatformIntegration to QWSI.

BUG: 406056
See also: https://code.qt.io/cgit/qt/qtbase.git/commit/?h=5.13&id=01e1df90

Test Plan: Built fine with Qt 5.12.2 and Qt 5.13 stable branch.

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, arojas, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D20239
parent 1e2a0028
......@@ -97,7 +97,11 @@ void Integration::initialize()
);
QPlatformIntegration::initialize();
auto dummyScreen = new Screen(-1);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 13, 0))
QWindowSystemInterface::handleScreenAdded(dummyScreen);
#else
screenAdded(dummyScreen);
#endif
m_screens << dummyScreen;
m_inputContext.reset(QPlatformInputContextFactory::create(QStringLiteral("qtvirtualkeyboard")));
qunsetenv("QT_IM_MODULE");
......@@ -200,16 +204,28 @@ void Integration::initScreens()
newScreens.reserve(qMax(screens()->count(), 1));
for (int i = 0; i < screens()->count(); i++) {
auto screen = new Screen(i);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 13, 0))
QWindowSystemInterface::handleScreenAdded(screen);
#else
screenAdded(screen);
#endif
newScreens << screen;
}
if (newScreens.isEmpty()) {
auto dummyScreen = new Screen(-1);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 13, 0))
QWindowSystemInterface::handleScreenAdded(dummyScreen);
#else
screenAdded(dummyScreen);
#endif
newScreens << dummyScreen;
}
while (!m_screens.isEmpty()) {
#if (QT_VERSION >= QT_VERSION_CHECK(5, 13, 0))
QWindowSystemInterface::handleScreenRemoved(m_screens.takeLast());
#else
destroyScreen(m_screens.takeLast());
#endif
}
m_screens = newScreens;
}
......
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