From cf1bf1b68471db4163d459e1930545f2bcbc4b66 Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Fri, 1 Jul 2016 09:44:46 +0200 Subject: [PATCH] Compositor: Rename shm to sharedMemory sharedMemory is much clearer and will increase the readability of the code and API. Change-Id: Ibb6d7424fa8d44a94a0f4ddf476a564eb235323f Reviewed-by: Pier Luigi Fiorini --- src/plugins/platforms/wayland/qwaylandshm.cpp | 6 +++--- ...er_p.h => qwaylandsharedmemoryformathelper_p.h} | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) rename src/plugins/platforms/wayland/shared/{qwaylandshmformathelper_p.h => qwaylandsharedmemoryformathelper_p.h} (92%) diff --git a/src/plugins/platforms/wayland/qwaylandshm.cpp b/src/plugins/platforms/wayland/qwaylandshm.cpp index 790a0e1b99f..e94357bb586 100644 --- a/src/plugins/platforms/wayland/qwaylandshm.cpp +++ b/src/plugins/platforms/wayland/qwaylandshm.cpp @@ -39,7 +39,7 @@ #include #include -#include "qwaylandshmformathelper_p.h" +#include "qwaylandsharedmemoryformathelper_p.h" QT_BEGIN_NAMESPACE @@ -73,12 +73,12 @@ bool QWaylandShm::formatSupported(QImage::Format format) const wl_shm_format QWaylandShm::formatFrom(QImage::Format format) { - return QWaylandShmFormatHelper::fromQImageFormat(format); + return QWaylandSharedMemoryFormatHelper::fromQImageFormat(format); } QImage::Format QWaylandShm::formatFrom(wl_shm_format format) { - return QWaylandShmFormatHelper::fromWaylandShmFormat(format); + return QWaylandSharedMemoryFormatHelper::fromWaylandShmFormat(format); } } diff --git a/src/plugins/platforms/wayland/shared/qwaylandshmformathelper_p.h b/src/plugins/platforms/wayland/shared/qwaylandsharedmemoryformathelper_p.h similarity index 92% rename from src/plugins/platforms/wayland/shared/qwaylandshmformathelper_p.h rename to src/plugins/platforms/wayland/shared/qwaylandsharedmemoryformathelper_p.h index 58db42e26f2..7f2f77cc3c8 100644 --- a/src/plugins/platforms/wayland/shared/qwaylandshmformathelper_p.h +++ b/src/plugins/platforms/wayland/shared/qwaylandsharedmemoryformathelper_p.h @@ -37,8 +37,8 @@ ** ****************************************************************************/ -#ifndef QWAYLANDSHMFORMATHELPER_H -#define QWAYLANDSHMFORMATHELPER_H +#ifndef QWAYLANDSHAREDMEMORYFORMATHELPER_H +#define QWAYLANDSHAREDMEMORYFORMATHELPER_H #include @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE -class QWaylandShmFormatHelper +class QWaylandSharedMemoryFormatHelper { public: static inline wl_shm_format fromQImageFormat(QImage::Format format); @@ -100,7 +100,7 @@ private: } }; -wl_shm_format QWaylandShmFormatHelper::fromQImageFormat(QImage::Format format) +wl_shm_format QWaylandSharedMemoryFormatHelper::fromQImageFormat(QImage::Format format) { Array array = getData(); if (array.size <= size_t(format)) @@ -108,7 +108,7 @@ wl_shm_format QWaylandShmFormatHelper::fromQImageFormat(QImage::Format format) return array.data[format]; } -QImage::Format QWaylandShmFormatHelper::fromWaylandShmFormat(wl_shm_format format) +QImage::Format QWaylandSharedMemoryFormatHelper::fromWaylandShmFormat(wl_shm_format format) { Array array = getData(); for (size_t i = 0; i < array.size; i++) { @@ -118,7 +118,7 @@ QImage::Format QWaylandShmFormatHelper::fromWaylandShmFormat(wl_shm_format forma return QImage::Format_Invalid; } -QVector QWaylandShmFormatHelper::supportedWaylandFormats() +QVector QWaylandSharedMemoryFormatHelper::supportedWaylandFormats() { QVector retFormats; Array array = getData(); @@ -133,4 +133,4 @@ QVector QWaylandShmFormatHelper::supportedWaylandFormats() QT_END_NAMESPACE -#endif //QWAYLANDSHMFORMATHELPER_H +#endif //QWAYLANDSHAREDMEMORYFORMATHELPER_H