diff options
author | Kevin Funk <kevin.funk@kdab.com> | 2017-09-18 11:49:52 +0200 |
---|---|---|
committer | Kevin Funk <kevin.funk@kdab.com> | 2017-09-19 11:53:55 +0000 |
commit | 58c14c4a7edcecdd9d58b682a9360c83e2274ec5 (patch) | |
tree | 7f600686e4dd92681bec09ac745a9dcd4425844b /src/plugins/platforms/eglfs | |
parent | 47c92fbb0b588b443cead18a5aad5a2b5ad9e4d7 (diff) |
Replace Q_NULLPTR with nullptr where possible
Remaining uses of Q_NULLPTR are in:
src/corelib/global/qcompilerdetection.h
(definition and documentation of Q_NULLPTR)
tests/manual/qcursor/qcursorhighdpi/main.cpp
(a test executable compilable both under Qt4 and Qt5)
Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/plugins/platforms/eglfs')
7 files changed, 25 insertions, 25 deletions
diff --git a/src/plugins/platforms/eglfs/api/qeglfsdeviceintegration.cpp b/src/plugins/platforms/eglfs/api/qeglfsdeviceintegration.cpp index 7c279a6b77..0fc4cc54e0 100644 --- a/src/plugins/platforms/eglfs/api/qeglfsdeviceintegration.cpp +++ b/src/plugins/platforms/eglfs/api/qeglfsdeviceintegration.cpp @@ -103,7 +103,7 @@ QStringList QEglFSDeviceIntegrationFactory::keys(const QString &pluginPath) QEglFSDeviceIntegration *QEglFSDeviceIntegrationFactory::create(const QString &key, const QString &pluginPath) { - QEglFSDeviceIntegration *integration = Q_NULLPTR; + QEglFSDeviceIntegration *integration = nullptr; #if QT_CONFIG(library) if (!pluginPath.isEmpty()) { QCoreApplication::addLibraryPath(pluginPath); @@ -365,7 +365,7 @@ void *QEglFSDeviceIntegration::nativeResourceForIntegration(const QByteArray &na void *QEglFSDeviceIntegration::wlDisplay() const { - return Q_NULLPTR; + return nullptr; } EGLConfig QEglFSDeviceIntegration::chooseConfig(EGLDisplay display, const QSurfaceFormat &format) diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp index 800118362d..9bd7fee1fb 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp @@ -68,7 +68,7 @@ Q_DECLARE_LOGGING_CATEGORY(qLcEglfsKmsDebug) QEglFSKmsGbmCursor::QEglFSKmsGbmCursor(QEglFSKmsGbmScreen *screen) : m_screen(screen) , m_cursorSize(64, 64) // 64x64 is the old standard size, we now try to query the real size below - , m_bo(Q_NULLPTR) + , m_bo(nullptr) , m_cursorImage(0, 0, 0, 0, 0, 0) , m_state(CursorPendingVisible) { @@ -118,7 +118,7 @@ QEglFSKmsGbmCursor::~QEglFSKmsGbmCursor() if (m_bo) { gbm_bo_destroy(m_bo); - m_bo = Q_NULLPTR; + m_bo = nullptr; } } @@ -132,7 +132,7 @@ void QEglFSKmsGbmCursor::updateMouseStatus() m_state = visible ? CursorPendingVisible : CursorPendingHidden; #ifndef QT_NO_CURSOR - changeCursor(Q_NULLPTR, m_screen->topLevelAt(pos())); + changeCursor(nullptr, m_screen->topLevelAt(pos())); #endif } diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmdevice.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmdevice.cpp index e2dd8cf9ad..20127ae7f7 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmdevice.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmdevice.cpp @@ -55,15 +55,15 @@ Q_DECLARE_LOGGING_CATEGORY(qLcEglfsKmsDebug) QEglFSKmsGbmDevice::QEglFSKmsGbmDevice(QKmsScreenConfig *screenConfig, const QString &path) : QEglFSKmsDevice(screenConfig, path) - , m_gbm_device(Q_NULLPTR) - , m_globalCursor(Q_NULLPTR) + , m_gbm_device(nullptr) + , m_globalCursor(nullptr) { } bool QEglFSKmsGbmDevice::open() { Q_ASSERT(fd() == -1); - Q_ASSERT(m_gbm_device == Q_NULLPTR); + Q_ASSERT(m_gbm_device == nullptr); int fd = qt_safe_open(devicePath().toLocal8Bit().constData(), O_RDWR | O_CLOEXEC); if (fd == -1) { @@ -92,7 +92,7 @@ void QEglFSKmsGbmDevice::close() if (m_gbm_device) { gbm_device_destroy(m_gbm_device); - m_gbm_device = Q_NULLPTR; + m_gbm_device = nullptr; } if (fd() != -1) { @@ -123,7 +123,7 @@ void QEglFSKmsGbmDevice::destroyGlobalCursor() if (m_globalCursor) { qCDebug(qLcEglfsKmsDebug, "Destroying global GBM mouse cursor"); delete m_globalCursor; - m_globalCursor = Q_NULLPTR; + m_globalCursor = nullptr; } } diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp index 73342327cc..4742143121 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp @@ -102,7 +102,7 @@ QEglFSKmsGbmScreen::FrameBuffer *QEglFSKmsGbmScreen::framebufferForBufferObject( if (ret) { qWarning("Failed to create KMS FB!"); - return Q_NULLPTR; + return nullptr; } gbm_bo_set_user_data(bo, fb.data(), bufferDestroyedHandler); @@ -111,12 +111,12 @@ QEglFSKmsGbmScreen::FrameBuffer *QEglFSKmsGbmScreen::framebufferForBufferObject( QEglFSKmsGbmScreen::QEglFSKmsGbmScreen(QKmsDevice *device, const QKmsOutput &output, bool headless) : QEglFSKmsScreen(device, output, headless) - , m_gbm_surface(Q_NULLPTR) - , m_gbm_bo_current(Q_NULLPTR) - , m_gbm_bo_next(Q_NULLPTR) + , m_gbm_surface(nullptr) + , m_gbm_bo_current(nullptr) + , m_gbm_bo_next(nullptr) , m_flipPending(false) - , m_cursor(Q_NULLPTR) - , m_cloneSource(Q_NULLPTR) + , m_cursor(nullptr) + , m_cloneSource(nullptr) { } @@ -283,7 +283,7 @@ void QEglFSKmsGbmScreen::flip() qErrnoWarning("Could not queue DRM page flip on screen %s", qPrintable(name())); m_flipPending = false; gbm_surface_release_buffer(m_gbm_surface, m_gbm_bo_next); - m_gbm_bo_next = Q_NULLPTR; + m_gbm_bo_next = nullptr; return; } @@ -354,7 +354,7 @@ void QEglFSKmsGbmScreen::updateFlipStatus() m_gbm_bo_current); m_gbm_bo_current = m_gbm_bo_next; - m_gbm_bo_next = Q_NULLPTR; + m_gbm_bo_next = nullptr; } QT_END_NAMESPACE diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevice.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevice.cpp index cca413ff2d..8c8e6260f1 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevice.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevice.cpp @@ -58,7 +58,7 @@ bool QEglFSKmsEglDevice::open() { Q_ASSERT(fd() == -1); - int fd = drmOpen(devicePath().toLocal8Bit().constData(), Q_NULLPTR); + int fd = drmOpen(devicePath().toLocal8Bit().constData(), nullptr); if (Q_UNLIKELY(fd < 0)) qFatal("Could not open DRM (NV) device"); diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp index c04a5e1724..a67457a6a5 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp @@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE QEglFSKmsEglDeviceIntegration::QEglFSKmsEglDeviceIntegration() : m_egl_device(EGL_NO_DEVICE_EXT) - , m_funcs(Q_NULLPTR) + , m_funcs(nullptr) { qCDebug(qLcEglfsKmsDebug, "New DRM/KMS on EGLDevice integration created"); } @@ -75,7 +75,7 @@ EGLDisplay QEglFSKmsEglDeviceIntegration::createDisplay(EGLNativeDisplayType nat EGLDisplay display; if (m_funcs->has_egl_platform_device) { - display = m_funcs->get_platform_display(EGL_PLATFORM_DEVICE_EXT, nativeDisplay, Q_NULLPTR); + display = m_funcs->get_platform_display(EGL_PLATFORM_DEVICE_EXT, nativeDisplay, nullptr); } else { qWarning("EGL_EXT_platform_device not available, falling back to legacy path!"); display = eglGetDisplay(nativeDisplay); @@ -162,7 +162,7 @@ void QEglFSKmsEglDeviceWindow::resetSurface() qCDebug(qLcEglfsKmsDebug, "Could not query number of EGLStream FIFO frames"); } - if (!m_integration->m_funcs->get_output_layers(display, Q_NULLPTR, Q_NULLPTR, 0, &count) || count == 0) { + if (!m_integration->m_funcs->get_output_layers(display, nullptr, nullptr, 0, &count) || count == 0) { qWarning("No output layers found"); return; } @@ -172,7 +172,7 @@ void QEglFSKmsEglDeviceWindow::resetSurface() QVector<EGLOutputLayerEXT> layers; layers.resize(count); EGLint actualCount; - if (!m_integration->m_funcs->get_output_layers(display, Q_NULLPTR, layers.data(), count, &actualCount)) { + if (!m_integration->m_funcs->get_output_layers(display, nullptr, layers.data(), count, &actualCount)) { qWarning("Failed to get layers"); return; } diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsintegration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsintegration.cpp index 455a94d0d3..975b1947bf 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsintegration.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsintegration.cpp @@ -55,7 +55,7 @@ QT_BEGIN_NAMESPACE Q_LOGGING_CATEGORY(qLcEglfsKmsDebug, "qt.qpa.eglfs.kms") QEglFSKmsIntegration::QEglFSKmsIntegration() - : m_device(Q_NULLPTR), + : m_device(nullptr), m_screenConfig(new QKmsScreenConfig) { } @@ -78,7 +78,7 @@ void QEglFSKmsIntegration::platformDestroy() qCDebug(qLcEglfsKmsDebug, "platformDestroy: Closing DRM device"); m_device->close(); delete m_device; - m_device = Q_NULLPTR; + m_device = nullptr; } EGLNativeDisplayType QEglFSKmsIntegration::platformDisplay() const |