Replace Q_NULLPTR with nullptr
Change-Id: I9699a957430b8d3574ce29acb91b7ada9ea6209b Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
parent
61510d62d1
commit
458b1bc6c1
@ -86,8 +86,8 @@ public:
|
||||
EglConfig,
|
||||
EglContext
|
||||
};
|
||||
virtual void *nativeResource(NativeResource /*resource*/) { return Q_NULLPTR; }
|
||||
virtual void *nativeResourceForContext(NativeResource /*resource*/, QPlatformOpenGLContext */*context*/) { return Q_NULLPTR; }
|
||||
virtual void *nativeResource(NativeResource /*resource*/) { return nullptr; }
|
||||
virtual void *nativeResourceForContext(NativeResource /*resource*/, QPlatformOpenGLContext */*context*/) { return nullptr; }
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ QWaylandInputDeviceIntegration *QWaylandInputDeviceIntegrationFactory::create(co
|
||||
if (QWaylandInputDeviceIntegration *ret = qLoadPlugin<QWaylandInputDeviceIntegration, QWaylandInputDeviceIntegrationPlugin>(loader(), name, args))
|
||||
return ret;
|
||||
#endif
|
||||
return Q_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ struct wl_cursor_image *QWaylandCursor::cursorImage(Qt::CursorShape newShape)
|
||||
waylandCursor = requestCursor((WaylandCursor)newShape);
|
||||
} else if (newShape == Qt::BitmapCursor) {
|
||||
// cannot create a wl_cursor_image for a CursorShape
|
||||
return Q_NULLPTR;
|
||||
return nullptr;
|
||||
} else {
|
||||
//TODO: Custom cursor logic (for resize arrows)
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ void QWaylandDataDevice::setSelectionSource(QWaylandDataSource *source)
|
||||
{
|
||||
if (source)
|
||||
connect(source, &QWaylandDataSource::cancelled, this, &QWaylandDataDevice::selectionSourceCancelled);
|
||||
set_selection(source ? source->object() : Q_NULLPTR, m_inputDevice->serial());
|
||||
set_selection(source ? source->object() : nullptr, m_inputDevice->serial());
|
||||
m_selectionSource.reset(source);
|
||||
}
|
||||
|
||||
@ -160,7 +160,7 @@ void QWaylandDataDevice::data_device_enter(uint32_t serial, wl_surface *surface,
|
||||
m_dragWindow = QWaylandWindow::fromWlSurface(surface)->window();
|
||||
m_dragPoint = calculateDragPosition(x, y, m_dragWindow);
|
||||
|
||||
QMimeData *dragData = Q_NULLPTR;
|
||||
QMimeData *dragData = nullptr;
|
||||
Qt::DropActions supportedActions;
|
||||
|
||||
m_dragOffer.reset(static_cast<QWaylandDataOffer *>(wl_data_offer_get_user_data(id)));
|
||||
|
@ -136,8 +136,8 @@ QWaylandDisplay::QWaylandDisplay(QWaylandIntegration *waylandIntegration)
|
||||
, mLastInputSerial(0)
|
||||
, mLastInputDevice(0)
|
||||
, mLastInputWindow(0)
|
||||
, mLastKeyboardFocus(Q_NULLPTR)
|
||||
, mSyncCallback(Q_NULLPTR)
|
||||
, mLastKeyboardFocus(nullptr)
|
||||
, mSyncCallback(nullptr)
|
||||
{
|
||||
qRegisterMetaType<uint32_t>("uint32_t");
|
||||
|
||||
@ -446,7 +446,7 @@ void QWaylandDisplay::handleWaylandSync()
|
||||
// This callback is used to set the window activation because we may get an activate/deactivate
|
||||
// pair, and the latter one would be lost in the QWindowSystemInterface queue, if we issue the
|
||||
// handleWindowActivated() calls immediately.
|
||||
QWindow *activeWindow = mActiveWindows.empty() ? Q_NULLPTR : mActiveWindows.last()->window();
|
||||
QWindow *activeWindow = mActiveWindows.empty() ? nullptr : mActiveWindows.last()->window();
|
||||
if (activeWindow != QGuiApplication::focusWindow())
|
||||
QWindowSystemInterface::handleWindowActivated(activeWindow);
|
||||
}
|
||||
@ -456,7 +456,7 @@ const wl_callback_listener QWaylandDisplay::syncCallbackListener = {
|
||||
Q_UNUSED(time);
|
||||
wl_callback_destroy(callback);
|
||||
QWaylandDisplay *display = static_cast<QWaylandDisplay *>(data);
|
||||
display->mSyncCallback = Q_NULLPTR;
|
||||
display->mSyncCallback = nullptr;
|
||||
display->handleWaylandSync();
|
||||
}
|
||||
};
|
||||
|
@ -122,7 +122,7 @@ public:
|
||||
|
||||
QWaylandIntegration::QWaylandIntegration()
|
||||
: mClientBufferIntegration(0)
|
||||
, mInputDeviceIntegration(Q_NULLPTR)
|
||||
, mInputDeviceIntegration(nullptr)
|
||||
, mFontDb(new QGenericUnixFontDatabase())
|
||||
, mNativeInterface(new QWaylandNativeInterface(this))
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
@ -171,7 +171,7 @@ QWaylandShmBackingStore::QWaylandShmBackingStore(QWindow *window)
|
||||
QWaylandShmBackingStore::~QWaylandShmBackingStore()
|
||||
{
|
||||
if (QWaylandWindow *w = waylandWindow())
|
||||
w->setBackingStore(Q_NULLPTR);
|
||||
w->setBackingStore(nullptr);
|
||||
|
||||
// if (mFrontBuffer == waylandWindow()->attached())
|
||||
// waylandWindow()->attach(0);
|
||||
|
@ -95,7 +95,7 @@ QWaylandWindow::QWaylandWindow(QWindow *window)
|
||||
, mScale(1)
|
||||
, mState(Qt::WindowNoState)
|
||||
, mMask()
|
||||
, mBackingStore(Q_NULLPTR)
|
||||
, mBackingStore(nullptr)
|
||||
, mUpdateRequested(false)
|
||||
{
|
||||
static WId id = 1;
|
||||
@ -240,7 +240,7 @@ bool QWaylandWindow::shouldCreateShellSurface() const
|
||||
|
||||
bool QWaylandWindow::shouldCreateSubSurface() const
|
||||
{
|
||||
return QPlatformWindow::parent() != Q_NULLPTR;
|
||||
return QPlatformWindow::parent() != nullptr;
|
||||
}
|
||||
|
||||
void QWaylandWindow::reset(bool sendDestroyEvent)
|
||||
|
@ -55,7 +55,7 @@ QWaylandWlShellIntegration *QWaylandWlShellIntegration::create(QWaylandDisplay *
|
||||
}
|
||||
|
||||
QWaylandWlShellIntegration::QWaylandWlShellIntegration(QWaylandDisplay *display)
|
||||
: m_wlShell(Q_NULLPTR)
|
||||
: m_wlShell(nullptr)
|
||||
{
|
||||
Q_FOREACH (QWaylandDisplay::RegistryGlobal global, display->globals()) {
|
||||
if (global.interface == QLatin1String("wl_shell")) {
|
||||
|
@ -58,7 +58,7 @@ QWaylandWlShellSurface::QWaylandWlShellSurface(struct ::wl_shell_surface *shell_
|
||||
, m_window(window)
|
||||
, m_maximized(false)
|
||||
, m_fullscreen(false)
|
||||
, m_extendedWindow(Q_NULLPTR)
|
||||
, m_extendedWindow(nullptr)
|
||||
{
|
||||
if (window->display()->windowExtension())
|
||||
m_extendedWindow = new QWaylandExtendedSurface(window);
|
||||
|
@ -57,7 +57,7 @@ QWaylandXdgShellIntegration *QWaylandXdgShellIntegration::create(QWaylandDisplay
|
||||
}
|
||||
|
||||
QWaylandXdgShellIntegration::QWaylandXdgShellIntegration(QWaylandDisplay *display)
|
||||
: m_xdgShell(Q_NULLPTR)
|
||||
: m_xdgShell(nullptr)
|
||||
{
|
||||
Q_FOREACH (QWaylandDisplay::RegistryGlobal global, display->globals()) {
|
||||
if (global.interface == QLatin1String("xdg_shell")) {
|
||||
|
@ -61,7 +61,7 @@ QWaylandXdgSurface::QWaylandXdgSurface(QWaylandXdgShell *shell, QWaylandWindow *
|
||||
, m_minimized(false)
|
||||
, m_fullscreen(false)
|
||||
, m_active(false)
|
||||
, m_extendedWindow(Q_NULLPTR)
|
||||
, m_extendedWindow(nullptr)
|
||||
{
|
||||
if (window->display()->windowExtension())
|
||||
m_extendedWindow = new QWaylandExtendedSurface(window);
|
||||
@ -105,7 +105,7 @@ void QWaylandXdgSurface::setMaximized()
|
||||
void QWaylandXdgSurface::setFullscreen()
|
||||
{
|
||||
if (!m_fullscreen)
|
||||
set_fullscreen(Q_NULLPTR);
|
||||
set_fullscreen(nullptr);
|
||||
}
|
||||
|
||||
void QWaylandXdgSurface::setNormal()
|
||||
|
@ -90,7 +90,7 @@ QWaylandShellIntegration *QWaylandShellIntegrationFactory::create(const QString
|
||||
if (QWaylandShellIntegration *ret = qLoadPlugin<QWaylandShellIntegration, QWaylandShellIntegrationPlugin>(loader(), name, args))
|
||||
return ret;
|
||||
#endif
|
||||
return Q_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -3,5 +3,5 @@
|
||||
int main()
|
||||
{
|
||||
// use symbol
|
||||
QtWaylandClient::QWaylandCursor cursor(Q_NULLPTR);
|
||||
QtWaylandClient::QWaylandCursor cursor(nullptr);
|
||||
}
|
||||
|
@ -239,8 +239,8 @@ void Seat::seat_get_touch(Resource *resource, uint32_t id)
|
||||
Keyboard::Keyboard(Compositor *compositor)
|
||||
: wl_keyboard()
|
||||
, m_compositor(compositor)
|
||||
, m_focusResource(Q_NULLPTR)
|
||||
, m_focus(Q_NULLPTR)
|
||||
, m_focusResource(nullptr)
|
||||
, m_focus(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
@ -293,8 +293,8 @@ void Keyboard::keyboard_destroy_resource(wl_keyboard::Resource *resource)
|
||||
Pointer::Pointer(Compositor *compositor)
|
||||
: wl_pointer()
|
||||
, m_compositor(compositor)
|
||||
, m_focusResource(Q_NULLPTR)
|
||||
, m_focus(Q_NULLPTR)
|
||||
, m_focusResource(nullptr)
|
||||
, m_focus(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ namespace Impl {
|
||||
|
||||
Surface::Surface(wl_client *client, uint32_t id, int v, Compositor *compositor)
|
||||
: QtWaylandServer::wl_surface(client, id, v)
|
||||
, m_buffer(Q_NULLPTR)
|
||||
, m_buffer(nullptr)
|
||||
, m_compositor(compositor)
|
||||
, m_mockSurface(new MockSurface(this))
|
||||
, m_mapped(false)
|
||||
|
Loading…
x
Reference in New Issue
Block a user