summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2023-02-21 12:02:17 +0100
committerMårten Nordheim <marten.nordheim@qt.io>2023-03-02 17:56:44 +0100
commitbca60ddb2cc8e2cc099a12fa0aba637f84b12563 (patch)
treeb0d4e6496d841384d00e0d8a9677bb155c325554 /src
parentcf07a7fd913d5a245d92254205b455fb27b8e3f3 (diff)
downloadqtwayland-bca60ddb2cc8e2cc099a12fa0aba637f84b12563.tar.gz
Suppress QSharedMemory deprecation warnings
Since some consumers/producers may be using the old API we will use that and suppress the warnings. Reverts 904b9d33dc0ac97b01c811f0bcb8f67f824b052b Change-Id: Ia59fcb241ca991b8f096a07de4946c49f7997d72 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.cpp2
-rw-r--r--src/hardwareintegration/compositor/shm-emulation-server/shmserverbufferintegration.cpp6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.cpp b/src/hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.cpp
index 0b25b9c8..38065dbd 100644
--- a/src/hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.cpp
+++ b/src/hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.cpp
@@ -13,7 +13,7 @@ QT_BEGIN_NAMESPACE
static QOpenGLTexture *createTextureFromShm(const QString &key, int w, int h, int bpl, int format)
{
- QSharedMemory shm(key);
+ QT_IGNORE_DEPRECATIONS(QSharedMemory shm(key);)
bool ok;
ok = shm.attach(QSharedMemory::ReadOnly);
if (!ok) {
diff --git a/src/hardwareintegration/compositor/shm-emulation-server/shmserverbufferintegration.cpp b/src/hardwareintegration/compositor/shm-emulation-server/shmserverbufferintegration.cpp
index 053e2117..6dc99e19 100644
--- a/src/hardwareintegration/compositor/shm-emulation-server/shmserverbufferintegration.cpp
+++ b/src/hardwareintegration/compositor/shm-emulation-server/shmserverbufferintegration.cpp
@@ -33,7 +33,8 @@ ShmServerBuffer::ShmServerBuffer(ShmServerBufferIntegration *integration, const
}
QString key = "qt_shm_emulation_" + QString::number(qimage.cacheKey());
- m_shm = new QSharedMemory(QSharedMemory::legacyNativeKey(key));
+ // ### Use proper native keys the next time we can break protocol compatibility
+ QT_IGNORE_DEPRECATIONS(m_shm = new QSharedMemory(key);)
qsizetype shm_size = qimage.sizeInBytes();
bool ok = m_shm->create(shm_size) && m_shm->lock();
if (ok) {
@@ -60,7 +61,8 @@ struct ::wl_resource *ShmServerBuffer::resourceForClient(struct ::wl_client *cli
}
struct ::wl_resource *shm_integration_resource = integrationResource->handle;
Resource *resource = add(client, 1);
- m_integration->send_server_buffer_created(shm_integration_resource, resource->handle, m_shm->key(), m_width, m_height, m_bpl, m_shm_format);
+ QT_IGNORE_DEPRECATIONS(const QString shmKey = m_shm->key();)
+ m_integration->send_server_buffer_created(shm_integration_resource, resource->handle, shmKey, m_width, m_height, m_bpl, m_shm_format);
return resource->handle;
}
return bufferResource->handle;