Allow building with Qt 5.12

master
Aleix Pol 2020-03-17 15:32:20 +01:00
parent cca0e15b45
commit 54c6acadf2
2 changed files with 5 additions and 1 deletions

View File

@ -4,7 +4,7 @@ project(KWin)
set(PROJECT_VERSION "5.18.80")
set(PROJECT_VERSION_MAJOR 5)
set(QT_MIN_VERSION "5.14.0")
set(QT_MIN_VERSION "5.12.0")
set(KF5_MIN_VERSION "5.66.0")
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})

View File

@ -731,7 +731,11 @@ quint32 WaylandServer::createWindowId(SurfaceInterface *surface)
quint16 WaylandServer::createClientId(ClientConnection *c)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
const QSet<unsigned short> ids(m_clientIds.constBegin(), m_clientIds.constEnd());
#else
const auto ids = m_clientIds.toSet();
#endif
quint16 id = 1;
if (!ids.isEmpty()) {
for (quint16 i = ids.count() + 1; i >= 1 ; i--) {