Use nullptr instead of 0 or NULL
Applied automatic fixes using clang-tidy's modernize-use-nullptr, and some manual cleanup to prevent QFlag macros to be affected. Change-Id: I88f94390185bc6e6f23693b68723cd5710815ae6 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This commit is contained in:
parent
8de7183ae1
commit
6eac43515d
@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
QWaylandClientExtensionPrivate::QWaylandClientExtensionPrivate()
|
||||
: QObjectPrivate()
|
||||
, waylandIntegration(NULL)
|
||||
, waylandIntegration(nullptr)
|
||||
, version(-1)
|
||||
, active(false)
|
||||
{
|
||||
|
@ -90,7 +90,7 @@ QWaylandClientBufferIntegration *QWaylandClientBufferIntegrationFactory::create(
|
||||
if (QWaylandClientBufferIntegration *ret = qLoadPlugin<QWaylandClientBufferIntegration, QWaylandClientBufferIntegrationPlugin>(loader(), name, args))
|
||||
return ret;
|
||||
#endif
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandClientBufferIntegrationPlugin : public QOb
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QWaylandClientBufferIntegrationPlugin(QObject *parent = 0);
|
||||
explicit QWaylandClientBufferIntegrationPlugin(QObject *parent = nullptr);
|
||||
~QWaylandClientBufferIntegrationPlugin();
|
||||
|
||||
virtual QWaylandClientBufferIntegration *create(const QString &key, const QStringList ¶mList) = 0;
|
||||
|
@ -44,7 +44,7 @@ QT_BEGIN_NAMESPACE
|
||||
namespace QtWaylandClient {
|
||||
|
||||
QWaylandServerBuffer::QWaylandServerBuffer()
|
||||
: m_user_data(0)
|
||||
: m_user_data(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,7 @@ QWaylandServerBufferIntegration *QWaylandServerBufferIntegrationFactory::create(
|
||||
if (QWaylandServerBufferIntegration *ret = qLoadPlugin<QWaylandServerBufferIntegration, QWaylandServerBufferIntegrationPlugin>(loader(), name, args))
|
||||
return ret;
|
||||
#endif
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandServerBufferIntegrationPlugin : public QOb
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QWaylandServerBufferIntegrationPlugin(QObject *parent = 0);
|
||||
explicit QWaylandServerBufferIntegrationPlugin(QObject *parent = nullptr);
|
||||
~QWaylandServerBufferIntegrationPlugin();
|
||||
|
||||
virtual QWaylandServerBufferIntegration *create(const QString &key, const QStringList ¶mList) = 0;
|
||||
|
@ -69,7 +69,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandInputDeviceIntegrationPlugin : public QObj
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QWaylandInputDeviceIntegrationPlugin(QObject *parent = 0);
|
||||
explicit QWaylandInputDeviceIntegrationPlugin(QObject *parent = nullptr);
|
||||
~QWaylandInputDeviceIntegrationPlugin();
|
||||
|
||||
virtual QWaylandInputDeviceIntegration *create(const QString &key, const QStringList ¶mList) = 0;
|
||||
|
@ -70,10 +70,10 @@ public:
|
||||
};
|
||||
|
||||
QWaylandAbstractDecorationPrivate::QWaylandAbstractDecorationPrivate()
|
||||
: m_window(0)
|
||||
, m_wayland_window(0)
|
||||
: m_window(nullptr)
|
||||
, m_wayland_window(nullptr)
|
||||
, m_isDirty(true)
|
||||
, m_decorationContentImage(0)
|
||||
, m_decorationContentImage(nullptr)
|
||||
, m_mouseButtons(Qt::NoButton)
|
||||
{
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE
|
||||
namespace QtWaylandClient {
|
||||
|
||||
QWaylandBuffer::QWaylandBuffer()
|
||||
: mBuffer(0)
|
||||
: mBuffer(nullptr)
|
||||
, mBusy(false)
|
||||
{
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ void QWaylandClipboard::setMimeData(QMimeData *data, QClipboard::Mode mode)
|
||||
static const QString utf8 = QStringLiteral("text/plain;charset=utf-8");
|
||||
if (data && data->hasFormat(plain) && !data->hasFormat(utf8))
|
||||
data->setData(utf8, data->data(plain));
|
||||
inputDevice->dataDevice()->setSelectionSource(data ? new QWaylandDataSource(mDisplay->dndSelectionHandler(), data) : 0);
|
||||
inputDevice->dataDevice()->setSelectionSource(data ? new QWaylandDataSource(mDisplay->dndSelectionHandler(), data) : nullptr);
|
||||
|
||||
emitChanged(mode);
|
||||
}
|
||||
@ -109,7 +109,7 @@ bool QWaylandClipboard::ownsMode(QClipboard::Mode mode) const
|
||||
if (!inputDevice || !inputDevice->dataDevice())
|
||||
return false;
|
||||
|
||||
return inputDevice->dataDevice()->selectionSource() != 0;
|
||||
return inputDevice->dataDevice()->selectionSource() != nullptr;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -79,13 +79,13 @@ QWaylandCursor::~QWaylandCursor()
|
||||
|
||||
struct wl_cursor_image *QWaylandCursor::cursorImage(Qt::CursorShape newShape)
|
||||
{
|
||||
struct wl_cursor *waylandCursor = 0;
|
||||
struct wl_cursor *waylandCursor = nullptr;
|
||||
|
||||
/* Hide cursor */
|
||||
if (newShape == Qt::BlankCursor)
|
||||
{
|
||||
mDisplay->setCursor(NULL, NULL);
|
||||
return NULL;
|
||||
mDisplay->setCursor(nullptr, nullptr);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (newShape < Qt::BitmapCursor) {
|
||||
@ -99,14 +99,14 @@ struct wl_cursor_image *QWaylandCursor::cursorImage(Qt::CursorShape newShape)
|
||||
|
||||
if (!waylandCursor) {
|
||||
qDebug("Could not find cursor for shape %d", newShape);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
struct wl_cursor_image *image = waylandCursor->images[0];
|
||||
struct wl_buffer *buffer = wl_cursor_image_get_buffer(image);
|
||||
if (!buffer) {
|
||||
qDebug("Could not find buffer for cursor");
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return image;
|
||||
@ -166,7 +166,7 @@ wl_cursor *QWaylandCursor::requestCursor(WaylandCursor shape)
|
||||
//If the cursor has not been loaded already, load it
|
||||
if (!cursor) {
|
||||
if (!mCursorTheme)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
QList<QByteArray> cursorNames = mCursorNamesMap.values(shape);
|
||||
foreach (const QByteArray &name, cursorNames) {
|
||||
|
@ -67,7 +67,7 @@ QWaylandDataDevice::QWaylandDataDevice(QWaylandDataDeviceManager *manager, QWayl
|
||||
, m_display(manager->display())
|
||||
, m_inputDevice(inputDevice)
|
||||
, m_enterSerial(0)
|
||||
, m_dragWindow(0)
|
||||
, m_dragWindow(nullptr)
|
||||
, m_dragPoint()
|
||||
, m_dragOffer()
|
||||
, m_selectionOffer()
|
||||
@ -135,7 +135,7 @@ void QWaylandDataDevice::data_device_drop()
|
||||
{
|
||||
QDrag *drag = static_cast<QWaylandDrag *>(QGuiApplicationPrivate::platformIntegration()->drag())->currentDrag();
|
||||
|
||||
QMimeData *dragData = 0;
|
||||
QMimeData *dragData = nullptr;
|
||||
Qt::DropActions supportedActions;
|
||||
if (drag) {
|
||||
dragData = drag->mimeData();
|
||||
@ -182,14 +182,14 @@ void QWaylandDataDevice::data_device_enter(uint32_t serial, wl_surface *surface,
|
||||
if (response.isAccepted()) {
|
||||
wl_data_offer_accept(m_dragOffer->object(), m_enterSerial, m_dragOffer->firstFormat().toUtf8().constData());
|
||||
} else {
|
||||
wl_data_offer_accept(m_dragOffer->object(), m_enterSerial, 0);
|
||||
wl_data_offer_accept(m_dragOffer->object(), m_enterSerial, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
void QWaylandDataDevice::data_device_leave()
|
||||
{
|
||||
if (m_dragWindow)
|
||||
QWindowSystemInterface::handleDrag(m_dragWindow, 0, QPoint(), Qt::IgnoreAction);
|
||||
QWindowSystemInterface::handleDrag(m_dragWindow, nullptr, QPoint(), Qt::IgnoreAction);
|
||||
|
||||
QDrag *drag = static_cast<QWaylandDrag *>(QGuiApplicationPrivate::platformIntegration()->drag())->currentDrag();
|
||||
if (!drag) {
|
||||
@ -227,7 +227,7 @@ void QWaylandDataDevice::data_device_motion(uint32_t time, wl_fixed_t x, wl_fixe
|
||||
if (response.isAccepted()) {
|
||||
wl_data_offer_accept(m_dragOffer->object(), m_enterSerial, m_dragOffer->firstFormat().toUtf8().constData());
|
||||
} else {
|
||||
wl_data_offer_accept(m_dragOffer->object(), m_enterSerial, 0);
|
||||
wl_data_offer_accept(m_dragOffer->object(), m_enterSerial, nullptr);
|
||||
}
|
||||
}
|
||||
#endif // QT_CONFIG(draganddrop)
|
||||
|
@ -91,7 +91,7 @@ QWaylandAbstractDecoration *QWaylandDecorationFactory::create(const QString &nam
|
||||
return ret;
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandDecorationPlugin : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QWaylandDecorationPlugin(QObject *parent = 0);
|
||||
explicit QWaylandDecorationPlugin(QObject *parent = nullptr);
|
||||
~QWaylandDecorationPlugin();
|
||||
|
||||
virtual QWaylandAbstractDecoration *create(const QString &key, const QStringList ¶mList) = 0;
|
||||
|
@ -89,7 +89,7 @@ struct wl_surface *QWaylandDisplay::createSurface(void *handle)
|
||||
QWaylandShellSurface *QWaylandDisplay::createShellSurface(QWaylandWindow *window)
|
||||
{
|
||||
if (!mWaylandIntegration->shellIntegration())
|
||||
return 0;
|
||||
return nullptr;
|
||||
return mWaylandIntegration->shellIntegration()->createShellSurface(window);
|
||||
}
|
||||
|
||||
@ -106,7 +106,7 @@ struct ::wl_region *QWaylandDisplay::createRegion(const QRegion &qregion)
|
||||
::wl_subsurface *QWaylandDisplay::createSubSurface(QWaylandWindow *window, QWaylandWindow *parent)
|
||||
{
|
||||
if (!mSubCompositor) {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return mSubCompositor->get_subsurface(window->object(), parent->object());
|
||||
@ -125,24 +125,24 @@ QWaylandWindowManagerIntegration *QWaylandDisplay::windowManagerIntegration() co
|
||||
QWaylandDisplay::QWaylandDisplay(QWaylandIntegration *waylandIntegration)
|
||||
: mWaylandIntegration(waylandIntegration)
|
||||
#if QT_CONFIG(wayland_datadevice)
|
||||
, mDndSelectionHandler(0)
|
||||
, mDndSelectionHandler(nullptr)
|
||||
#endif
|
||||
, mWindowExtension(0)
|
||||
, mSubCompositor(0)
|
||||
, mTouchExtension(0)
|
||||
, mQtKeyExtension(0)
|
||||
, mTextInputManager(0)
|
||||
, mHardwareIntegration(0)
|
||||
, mWindowExtension(nullptr)
|
||||
, mSubCompositor(nullptr)
|
||||
, mTouchExtension(nullptr)
|
||||
, mQtKeyExtension(nullptr)
|
||||
, mTextInputManager(nullptr)
|
||||
, mHardwareIntegration(nullptr)
|
||||
, mLastInputSerial(0)
|
||||
, mLastInputDevice(0)
|
||||
, mLastInputWindow(0)
|
||||
, mLastInputDevice(nullptr)
|
||||
, mLastInputWindow(nullptr)
|
||||
, mLastKeyboardFocus(nullptr)
|
||||
, mSyncCallback(nullptr)
|
||||
{
|
||||
qRegisterMetaType<uint32_t>("uint32_t");
|
||||
|
||||
mDisplay = wl_display_connect(NULL);
|
||||
if (mDisplay == NULL) {
|
||||
mDisplay = wl_display_connect(nullptr);
|
||||
if (mDisplay == nullptr) {
|
||||
qErrnoWarning(errno, "Failed to create display");
|
||||
::exit(1);
|
||||
}
|
||||
@ -219,7 +219,7 @@ QWaylandScreen *QWaylandDisplay::screenForOutput(struct wl_output *output) const
|
||||
if (screen->output() == output)
|
||||
return screen;
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void QWaylandDisplay::waitForScreens()
|
||||
@ -333,7 +333,7 @@ uint32_t QWaylandDisplay::currentTimeMillisec()
|
||||
{
|
||||
//### we throw away the time information
|
||||
struct timeval tv;
|
||||
int ret = gettimeofday(&tv, 0);
|
||||
int ret = gettimeofday(&tv, nullptr);
|
||||
if (ret == 0)
|
||||
return tv.tv_sec*1000 + tv.tv_usec/1000;
|
||||
return 0;
|
||||
|
@ -403,7 +403,7 @@ QWaylandInputContext::~QWaylandInputContext()
|
||||
|
||||
bool QWaylandInputContext::isValid() const
|
||||
{
|
||||
return mDisplay->textInputManager() != 0;
|
||||
return mDisplay->textInputManager() != nullptr;
|
||||
}
|
||||
|
||||
void QWaylandInputContext::reset()
|
||||
|
@ -121,7 +121,7 @@ public:
|
||||
};
|
||||
|
||||
QWaylandIntegration::QWaylandIntegration()
|
||||
: mClientBufferIntegration(0)
|
||||
: mClientBufferIntegration(nullptr)
|
||||
, mInputDeviceIntegration(nullptr)
|
||||
, mFontDb(new QGenericUnixFontDatabase())
|
||||
, mNativeInterface(new QWaylandNativeInterface(this))
|
||||
@ -198,7 +198,7 @@ QPlatformOpenGLContext *QWaylandIntegration::createPlatformOpenGLContext(QOpenGL
|
||||
{
|
||||
if (mDisplay->clientBufferIntegration())
|
||||
return mDisplay->clientBufferIntegration()->createPlatformOpenGLContext(context->format(), context->shareHandle());
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
#endif // opengl
|
||||
|
||||
|
@ -65,7 +65,7 @@ QWaylandScreen::QWaylandScreen(QWaylandDisplay *waylandDisplay, int version, uin
|
||||
, mOutputName(QStringLiteral("Screen%1").arg(id))
|
||||
, m_orientation(Qt::PrimaryOrientation)
|
||||
#if QT_CONFIG(cursor)
|
||||
, mWaylandCursor(0)
|
||||
, mWaylandCursor(nullptr)
|
||||
#endif
|
||||
{
|
||||
}
|
||||
|
@ -73,8 +73,8 @@ Q_LOGGING_CATEGORY(logCategory, "qt.qpa.wayland.backingstore")
|
||||
QWaylandShmBuffer::QWaylandShmBuffer(QWaylandDisplay *display,
|
||||
const QSize &size, QImage::Format format, int scale)
|
||||
: QWaylandBuffer()
|
||||
, mShmPool(0)
|
||||
, mMarginsImage(0)
|
||||
, mShmPool(nullptr)
|
||||
, mMarginsImage(nullptr)
|
||||
{
|
||||
int stride = size.width() * 4;
|
||||
int alloc = stride * size.height();
|
||||
@ -105,7 +105,7 @@ QWaylandShmBuffer::QWaylandShmBuffer(QWaylandDisplay *display,
|
||||
// map ourselves: QFile::map() will unmap when the object is destroyed,
|
||||
// but we want this mapping to persist (unmapping in destructor)
|
||||
uchar *data = (uchar *)
|
||||
mmap(NULL, alloc, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
|
||||
mmap(nullptr, alloc, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
|
||||
if (data == (uchar *) MAP_FAILED) {
|
||||
qErrnoWarning("QWaylandShmBuffer: mmap failed");
|
||||
return;
|
||||
@ -147,7 +147,7 @@ QImage *QWaylandShmBuffer::imageInsideMargins(const QMargins &marginsIn)
|
||||
}
|
||||
if (margins.isNull()) {
|
||||
delete mMarginsImage;
|
||||
mMarginsImage = 0;
|
||||
mMarginsImage = nullptr;
|
||||
}
|
||||
|
||||
mMargins = margins;
|
||||
@ -161,8 +161,8 @@ QImage *QWaylandShmBuffer::imageInsideMargins(const QMargins &marginsIn)
|
||||
QWaylandShmBackingStore::QWaylandShmBackingStore(QWindow *window)
|
||||
: QPlatformBackingStore(window)
|
||||
, mDisplay(QWaylandScreen::waylandScreenFromWindow(window)->display())
|
||||
, mFrontBuffer(0)
|
||||
, mBackBuffer(0)
|
||||
, mFrontBuffer(nullptr)
|
||||
, mBackBuffer(nullptr)
|
||||
, mPainting(false)
|
||||
{
|
||||
|
||||
@ -249,7 +249,7 @@ QWaylandShmBuffer *QWaylandShmBackingStore::getBuffer(const QSize &size)
|
||||
} else {
|
||||
mBuffers.removeOne(b);
|
||||
if (mBackBuffer == b)
|
||||
mBackBuffer = 0;
|
||||
mBackBuffer = nullptr;
|
||||
delete b;
|
||||
}
|
||||
}
|
||||
@ -262,7 +262,7 @@ QWaylandShmBuffer *QWaylandShmBackingStore::getBuffer(const QSize &size)
|
||||
mBuffers.prepend(b);
|
||||
return b;
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void QWaylandShmBackingStore::resize(const QSize &size)
|
||||
|
@ -48,11 +48,11 @@ namespace QtWaylandClient {
|
||||
QWaylandTouchExtension::QWaylandTouchExtension(QWaylandDisplay *display, uint32_t id)
|
||||
: QtWayland::qt_touch_extension(display->wl_registry(), id, 1),
|
||||
mDisplay(display),
|
||||
mTouchDevice(0),
|
||||
mTouchDevice(nullptr),
|
||||
mPointsLeft(0),
|
||||
mFlags(0),
|
||||
mMouseSourceId(-1),
|
||||
mInputDevice(0)
|
||||
mInputDevice(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -75,15 +75,15 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
namespace QtWaylandClient {
|
||||
|
||||
QWaylandWindow *QWaylandWindow::mMouseGrab = 0;
|
||||
QWaylandWindow *QWaylandWindow::mMouseGrab = nullptr;
|
||||
|
||||
QWaylandWindow::QWaylandWindow(QWindow *window)
|
||||
: QObject()
|
||||
, QPlatformWindow(window)
|
||||
, mDisplay(waylandScreen()->display())
|
||||
, mShellSurface(0)
|
||||
, mSubSurfaceWindow(0)
|
||||
, mWindowDecoration(0)
|
||||
, mShellSurface(nullptr)
|
||||
, mSubSurfaceWindow(nullptr)
|
||||
, mWindowDecoration(nullptr)
|
||||
, mMouseEventsInContentArea(false)
|
||||
, mMousePressedInContentArea(Qt::NoButton)
|
||||
, mWaitingForFrameSync(false)
|
||||
@ -124,7 +124,7 @@ QWaylandWindow::~QWaylandWindow()
|
||||
}
|
||||
|
||||
if (mMouseGrab == this) {
|
||||
mMouseGrab = 0;
|
||||
mMouseGrab = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@ -256,9 +256,9 @@ void QWaylandWindow::reset(bool sendDestroyEvent)
|
||||
QGuiApplication::sendEvent(window(), &e);
|
||||
}
|
||||
delete mShellSurface;
|
||||
mShellSurface = 0;
|
||||
mShellSurface = nullptr;
|
||||
delete mSubSurfaceWindow;
|
||||
mSubSurfaceWindow = 0;
|
||||
mSubSurfaceWindow = nullptr;
|
||||
if (isInitialized())
|
||||
destroy();
|
||||
|
||||
@ -285,7 +285,7 @@ void QWaylandWindow::setParent(const QPlatformWindow *parent)
|
||||
if (!window()->isVisible())
|
||||
return;
|
||||
|
||||
QWaylandWindow *oldparent = mSubSurfaceWindow ? mSubSurfaceWindow->parent() : 0;
|
||||
QWaylandWindow *oldparent = mSubSurfaceWindow ? mSubSurfaceWindow->parent() : nullptr;
|
||||
if (oldparent == parent)
|
||||
return;
|
||||
|
||||
@ -574,7 +574,7 @@ void QWaylandWindow::attach(QWaylandBuffer *buffer, int x, int y)
|
||||
|
||||
attach(buffer->buffer(), x, y);
|
||||
} else {
|
||||
QtWayland::wl_surface::attach(0, 0, 0);
|
||||
QtWayland::wl_surface::attach(nullptr, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -777,7 +777,7 @@ bool QWaylandWindow::createDecoration()
|
||||
}
|
||||
} else {
|
||||
delete mWindowDecoration;
|
||||
mWindowDecoration = 0;
|
||||
mWindowDecoration = nullptr;
|
||||
}
|
||||
|
||||
if (hadDecoration != (bool)mWindowDecoration) {
|
||||
@ -984,7 +984,7 @@ bool QWaylandWindow::setMouseGrabEnabled(bool grab)
|
||||
return false;
|
||||
}
|
||||
|
||||
mMouseGrab = grab ? this : 0;
|
||||
mMouseGrab = grab ? this : nullptr;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -127,14 +127,14 @@ void QWaylandWlShellSurface::setMaximized()
|
||||
{
|
||||
m_maximized = true;
|
||||
m_size = m_window->window()->geometry().size();
|
||||
set_maximized(0);
|
||||
set_maximized(nullptr);
|
||||
}
|
||||
|
||||
void QWaylandWlShellSurface::setFullscreen()
|
||||
{
|
||||
m_fullscreen = true;
|
||||
m_size = m_window->window()->geometry().size();
|
||||
set_fullscreen(WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT, 0, 0);
|
||||
set_fullscreen(WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT, 0, nullptr);
|
||||
}
|
||||
|
||||
void QWaylandWlShellSurface::setNormal()
|
||||
|
@ -69,7 +69,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandShellIntegrationPlugin : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QWaylandShellIntegrationPlugin(QObject *parent = 0);
|
||||
explicit QWaylandShellIntegrationPlugin(QObject *parent = nullptr);
|
||||
~QWaylandShellIntegrationPlugin();
|
||||
|
||||
virtual QWaylandShellIntegration *create(const QString &key, const QStringList ¶mList) = 0;
|
||||
|
@ -228,7 +228,7 @@ const WaylandArgument *newIdArgument(const QList<WaylandArgument> &arguments)
|
||||
if (arguments.at(i).type == "new_id")
|
||||
return &arguments.at(i);
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void printEvent(const WaylandEvent &e, bool omitNames = false, bool withResource = false)
|
||||
|
@ -295,9 +295,9 @@ void tst_WaylandClient::events()
|
||||
QTRY_COMPARE(QGuiApplication::focusWindow(), &window);
|
||||
|
||||
QCOMPARE(window.focusOutEventCount, 0);
|
||||
compositor->setKeyboardFocus(QSharedPointer<MockSurface>(0));
|
||||
compositor->setKeyboardFocus(QSharedPointer<MockSurface>(nullptr));
|
||||
QTRY_COMPARE(window.focusOutEventCount, 1);
|
||||
QTRY_COMPARE(QGuiApplication::focusWindow(), static_cast<QWindow *>(0));
|
||||
QTRY_COMPARE(QGuiApplication::focusWindow(), static_cast<QWindow *>(nullptr));
|
||||
|
||||
compositor->setKeyboardFocus(surface);
|
||||
QTRY_COMPARE(window.focusInEventCount, 2);
|
||||
@ -375,7 +375,7 @@ class DndWindow : public QWindow
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DndWindow(QWindow *parent = 0)
|
||||
DndWindow(QWindow *parent = nullptr)
|
||||
: QWindow(parent)
|
||||
, dragStarted(false)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user