summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbconnection.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-11-22 14:46:58 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-12-06 12:13:20 +0100
commitece0c0a5e7e0b18beb58ccd868bde54c7be64f78 (patch)
treefa4a0fdbda040d24f1a2d07a320635c76980f431 /src/plugins/platforms/xcb/qxcbconnection.cpp
parentb19220d17fa66de5ded41690ffff263ee2af5c63 (diff)
Tidy nullptr usage
Move away from using 0 as pointer literal. Done using clang-tidy. This is not complete as run-clang-tidy can't handle all of qtbase in one go. Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbconnection.cpp')
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
index cbc930387f..435c4aee93 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
@@ -184,7 +184,7 @@ QXcbWindow *QXcbConnection::platformWindowFromId(xcb_window_t id)
QXcbWindowEventListener *listener = m_mapper.value(id, 0);
if (listener)
return listener->toWindow();
- return 0;
+ return nullptr;
}
#define HANDLE_PLATFORM_WINDOW_EVENT(event_t, windowMember, handler) \
@@ -803,7 +803,7 @@ xcb_window_t QXcbConnection::getQtSelectionOwner()
XCB_WINDOW_CLASS_INPUT_OUTPUT, // window class
xcbScreen->root_visual, // visual
0, // value mask
- 0); // value list
+ nullptr); // value list
QXcbWindow::setWindowTitle(connection(), m_qtSelectionOwner,
QLatin1String("Qt Selection Owner for ") + QCoreApplication::applicationName());
@@ -830,7 +830,7 @@ xcb_window_t QXcbConnection::clientLeader()
0,
XCB_WINDOW_CLASS_INPUT_OUTPUT,
screen->screen()->root_visual,
- 0, 0);
+ 0, nullptr);
QXcbWindow::setWindowTitle(connection(), m_clientLeader,
@@ -1031,7 +1031,7 @@ void QXcbConnection::sync()
{
// from xcb_aux_sync
xcb_get_input_focus_cookie_t cookie = xcb_get_input_focus(xcb_connection());
- free(xcb_get_input_focus_reply(xcb_connection(), cookie, 0));
+ free(xcb_get_input_focus_reply(xcb_connection(), cookie, nullptr));
}
QXcbSystemTrayTracker *QXcbConnection::systemTrayTracker() const
@@ -1049,14 +1049,14 @@ QXcbSystemTrayTracker *QXcbConnection::systemTrayTracker() const
Qt::MouseButtons QXcbConnection::queryMouseButtons() const
{
int stateMask = 0;
- QXcbCursor::queryPointer(connection(), 0, 0, &stateMask);
+ QXcbCursor::queryPointer(connection(), nullptr, nullptr, &stateMask);
return translateMouseButtons(stateMask);
}
Qt::KeyboardModifiers QXcbConnection::queryKeyboardModifiers() const
{
int stateMask = 0;
- QXcbCursor::queryPointer(connection(), 0, 0, &stateMask);
+ QXcbCursor::queryPointer(connection(), nullptr, nullptr, &stateMask);
return keyboard()->translateModifiers(stateMask);
}
@@ -1114,7 +1114,7 @@ void QXcbSyncWindowRequest::invalidate()
{
if (m_window) {
m_window->clearSyncWindowRequest();
- m_window = 0;
+ m_window = nullptr;
}
}
@@ -1134,7 +1134,7 @@ void QXcbConnectionGrabber::release()
{
if (m_connection) {
m_connection->ungrabServer();
- m_connection = 0;
+ m_connection = nullptr;
}
}