summaryrefslogtreecommitdiffstats
path: root/src/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/global/qwaylandclientextension.cpp4
-rw-r--r--src/client/global/qwaylandclientextension_p.h7
-rw-r--r--src/client/hardwareintegration/qwaylandserverbufferintegration.cpp1
-rw-r--r--src/client/hardwareintegration/qwaylandserverbufferintegration_p.h2
-rw-r--r--src/client/qwaylandabstractdecoration.cpp14
-rw-r--r--src/client/qwaylandbuffer.cpp2
-rw-r--r--src/client/qwaylandbuffer_p.h4
-rw-r--r--src/client/qwaylanddatadevice.cpp5
-rw-r--r--src/client/qwaylanddatadevice_p.h6
-rw-r--r--src/client/qwaylanddataoffer.cpp3
-rw-r--r--src/client/qwaylanddisplay.cpp14
-rw-r--r--src/client/qwaylanddisplay_p.h6
-rw-r--r--src/client/qwaylandinputcontext.cpp13
-rw-r--r--src/client/qwaylandinputcontext_p.h10
-rw-r--r--src/client/qwaylandinputdevice.cpp3
-rw-r--r--src/client/qwaylandintegration.cpp7
-rw-r--r--src/client/qwaylandintegration_p.h6
-rw-r--r--src/client/qwaylandscreen.cpp12
-rw-r--r--src/client/qwaylandscreen_p.h16
-rw-r--r--src/client/qwaylandshmbackingstore.cpp6
-rw-r--r--src/client/qwaylandshmbackingstore_p.h12
-rw-r--r--src/client/qwaylandsubsurface.cpp1
-rw-r--r--src/client/qwaylandsubsurface_p.h2
-rw-r--r--src/client/qwaylandwindow.cpp18
-rw-r--r--src/client/qwaylandwindow_p.h39
-rw-r--r--src/client/qwaylandwindowmanagerintegration.cpp8
-rw-r--r--src/client/qwaylandwlshellintegration.cpp1
-rw-r--r--src/client/qwaylandwlshellintegration_p.h2
-rw-r--r--src/client/qwaylandwlshellsurface.cpp3
-rw-r--r--src/client/qwaylandwlshellsurface_p.h6
-rw-r--r--src/client/qwaylandxdgpopup.cpp1
-rw-r--r--src/client/qwaylandxdgpopup_p.h2
-rw-r--r--src/client/qwaylandxdgshell.cpp2
-rw-r--r--src/client/qwaylandxdgshell_p.h2
-rw-r--r--src/client/qwaylandxdgshellintegration.cpp1
-rw-r--r--src/client/qwaylandxdgshellintegration_p.h2
-rw-r--r--src/client/qwaylandxdgshellv6.cpp3
-rw-r--r--src/client/qwaylandxdgshellv6_p.h6
-rw-r--r--src/client/qwaylandxdgshellv6integration.cpp1
-rw-r--r--src/client/qwaylandxdgshellv6integration_p.h2
-rw-r--r--src/client/qwaylandxdgsurface.cpp5
-rw-r--r--src/client/qwaylandxdgsurface_p.h10
42 files changed, 83 insertions, 187 deletions
diff --git a/src/client/global/qwaylandclientextension.cpp b/src/client/global/qwaylandclientextension.cpp
index 60a8944f8..125b1e19d 100644
--- a/src/client/global/qwaylandclientextension.cpp
+++ b/src/client/global/qwaylandclientextension.cpp
@@ -49,10 +49,6 @@
QT_BEGIN_NAMESPACE
QWaylandClientExtensionPrivate::QWaylandClientExtensionPrivate()
- : QObjectPrivate()
- , waylandIntegration(nullptr)
- , version(-1)
- , active(false)
{
// Keep the possibility to use a custom waylandIntegration as a plugin,
// but also add the possibility to run it as a QML component.
diff --git a/src/client/global/qwaylandclientextension_p.h b/src/client/global/qwaylandclientextension_p.h
index 0fd59b3f7..69cc46a0a 100644
--- a/src/client/global/qwaylandclientextension_p.h
+++ b/src/client/global/qwaylandclientextension_p.h
@@ -65,16 +65,15 @@ public:
static void handleRegistryGlobal(void *data, ::wl_registry *registry, uint32_t id,
const QString &interface, uint32_t version);
- QtWaylandClient::QWaylandIntegration *waylandIntegration;
- int version;
- bool active;
+ QtWaylandClient::QWaylandIntegration *waylandIntegration = nullptr;
+ int version = -1;
+ bool active = false;
};
class Q_WAYLAND_CLIENT_EXPORT QWaylandClientExtensionTemplatePrivate : public QWaylandClientExtensionPrivate
{
public:
QWaylandClientExtensionTemplatePrivate()
- : QWaylandClientExtensionPrivate()
{ }
};
diff --git a/src/client/hardwareintegration/qwaylandserverbufferintegration.cpp b/src/client/hardwareintegration/qwaylandserverbufferintegration.cpp
index 013ddae9f..d966a1919 100644
--- a/src/client/hardwareintegration/qwaylandserverbufferintegration.cpp
+++ b/src/client/hardwareintegration/qwaylandserverbufferintegration.cpp
@@ -44,7 +44,6 @@ QT_BEGIN_NAMESPACE
namespace QtWaylandClient {
QWaylandServerBuffer::QWaylandServerBuffer()
- : m_user_data(nullptr)
{
}
diff --git a/src/client/hardwareintegration/qwaylandserverbufferintegration_p.h b/src/client/hardwareintegration/qwaylandserverbufferintegration_p.h
index 3b8b3a6de..7439087d8 100644
--- a/src/client/hardwareintegration/qwaylandserverbufferintegration_p.h
+++ b/src/client/hardwareintegration/qwaylandserverbufferintegration_p.h
@@ -89,7 +89,7 @@ protected:
QSize m_size;
private:
- void *m_user_data;
+ void *m_user_data = nullptr;
};
class Q_WAYLAND_CLIENT_EXPORT QWaylandServerBufferIntegration
diff --git a/src/client/qwaylandabstractdecoration.cpp b/src/client/qwaylandabstractdecoration.cpp
index 6a7a2ef4c..c20b70e9e 100644
--- a/src/client/qwaylandabstractdecoration.cpp
+++ b/src/client/qwaylandabstractdecoration.cpp
@@ -60,21 +60,17 @@ public:
QWaylandAbstractDecorationPrivate();
~QWaylandAbstractDecorationPrivate();
- QWindow *m_window;
- QWaylandWindow *m_wayland_window;
+ QWindow *m_window = nullptr;
+ QWaylandWindow *m_wayland_window = nullptr;
- bool m_isDirty;
+ bool m_isDirty = true;
QImage m_decorationContentImage;
- Qt::MouseButtons m_mouseButtons;
+ Qt::MouseButtons m_mouseButtons = Qt::NoButton;
};
QWaylandAbstractDecorationPrivate::QWaylandAbstractDecorationPrivate()
- : m_window(nullptr)
- , m_wayland_window(nullptr)
- , m_isDirty(true)
- , m_decorationContentImage(nullptr)
- , m_mouseButtons(Qt::NoButton)
+ : m_decorationContentImage(nullptr)
{
}
diff --git a/src/client/qwaylandbuffer.cpp b/src/client/qwaylandbuffer.cpp
index 2dc99b3b7..9792cdd61 100644
--- a/src/client/qwaylandbuffer.cpp
+++ b/src/client/qwaylandbuffer.cpp
@@ -47,8 +47,6 @@ QT_BEGIN_NAMESPACE
namespace QtWaylandClient {
QWaylandBuffer::QWaylandBuffer()
- : mBuffer(nullptr)
- , mBusy(false)
{
}
diff --git a/src/client/qwaylandbuffer_p.h b/src/client/qwaylandbuffer_p.h
index 9e8cba2e4..156ea9530 100644
--- a/src/client/qwaylandbuffer_p.h
+++ b/src/client/qwaylandbuffer_p.h
@@ -77,10 +77,10 @@ public:
bool busy() const { return mBusy; }
protected:
- struct wl_buffer *mBuffer;
+ struct wl_buffer *mBuffer = nullptr;
private:
- bool mBusy;
+ bool mBusy = false;
static void release(void *data, wl_buffer *);
static const wl_buffer_listener listener;
diff --git a/src/client/qwaylanddatadevice.cpp b/src/client/qwaylanddatadevice.cpp
index 83912035a..4411ba65c 100644
--- a/src/client/qwaylanddatadevice.cpp
+++ b/src/client/qwaylanddatadevice.cpp
@@ -66,11 +66,6 @@ QWaylandDataDevice::QWaylandDataDevice(QWaylandDataDeviceManager *manager, QWayl
: QtWayland::wl_data_device(manager->get_data_device(inputDevice->wl_seat()))
, m_display(manager->display())
, m_inputDevice(inputDevice)
- , m_enterSerial(0)
- , m_dragWindow(nullptr)
- , m_dragPoint()
- , m_dragOffer()
- , m_selectionOffer()
{
}
diff --git a/src/client/qwaylanddatadevice_p.h b/src/client/qwaylanddatadevice_p.h
index 7fb0003b4..29461930b 100644
--- a/src/client/qwaylanddatadevice_p.h
+++ b/src/client/qwaylanddatadevice_p.h
@@ -117,9 +117,9 @@ private:
QPoint calculateDragPosition(int x, int y, QWindow *wnd) const;
#endif
- QWaylandDisplay *m_display;
- QWaylandInputDevice *m_inputDevice;
- uint32_t m_enterSerial;
+ QWaylandDisplay *m_display = nullptr;
+ QWaylandInputDevice *m_inputDevice = nullptr;
+ uint32_t m_enterSerial = 0;
QPointer<QWindow> m_dragWindow;
QPoint m_dragPoint;
QScopedPointer<QWaylandDataOffer> m_dragOffer;
diff --git a/src/client/qwaylanddataoffer.cpp b/src/client/qwaylanddataoffer.cpp
index 2491c658b..35085a7f0 100644
--- a/src/client/qwaylanddataoffer.cpp
+++ b/src/client/qwaylanddataoffer.cpp
@@ -87,8 +87,7 @@ void QWaylandDataOffer::data_offer_offer(const QString &mime_type)
}
QWaylandMimeData::QWaylandMimeData(QWaylandDataOffer *dataOffer, QWaylandDisplay *display)
- : QInternalMimeData()
- , m_dataOffer(dataOffer)
+ : m_dataOffer(dataOffer)
, m_display(display)
{
}
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp
index 179c0454e..abb084522 100644
--- a/src/client/qwaylanddisplay.cpp
+++ b/src/client/qwaylanddisplay.cpp
@@ -124,20 +124,6 @@ QWaylandWindowManagerIntegration *QWaylandDisplay::windowManagerIntegration() co
QWaylandDisplay::QWaylandDisplay(QWaylandIntegration *waylandIntegration)
: mWaylandIntegration(waylandIntegration)
-#if QT_CONFIG(wayland_datadevice)
- , mDndSelectionHandler(nullptr)
-#endif
- , mWindowExtension(nullptr)
- , mSubCompositor(nullptr)
- , mTouchExtension(nullptr)
- , mQtKeyExtension(nullptr)
- , mTextInputManager(nullptr)
- , mHardwareIntegration(nullptr)
- , mLastInputSerial(0)
- , mLastInputDevice(nullptr)
- , mLastInputWindow(nullptr)
- , mLastKeyboardFocus(nullptr)
- , mSyncCallback(nullptr)
{
qRegisterMetaType<uint32_t>("uint32_t");
diff --git a/src/client/qwaylanddisplay_p.h b/src/client/qwaylanddisplay_p.h
index 35d861760..0a7ea427a 100644
--- a/src/client/qwaylanddisplay_p.h
+++ b/src/client/qwaylanddisplay_p.h
@@ -217,12 +217,12 @@ private:
int mWritableNotificationFd;
QList<RegistryGlobal> mGlobals;
int mCompositorVersion;
- uint32_t mLastInputSerial;
- QWaylandInputDevice *mLastInputDevice;
+ uint32_t mLastInputSerial = 0;
+ QWaylandInputDevice *mLastInputDevice = nullptr;
QPointer<QWaylandWindow> mLastInputWindow;
QPointer<QWaylandWindow> mLastKeyboardFocus;
QVector<QWaylandWindow *> mActiveWindows;
- struct wl_callback *mSyncCallback;
+ struct wl_callback *mSyncCallback = nullptr;
static const wl_callback_listener syncCallbackListener;
void registry_global(uint32_t id, const QString &interface, uint32_t version) override;
diff --git a/src/client/qwaylandinputcontext.cpp b/src/client/qwaylandinputcontext.cpp
index 16ee057c5..58ad90d41 100644
--- a/src/client/qwaylandinputcontext.cpp
+++ b/src/client/qwaylandinputcontext.cpp
@@ -71,15 +71,6 @@ const Qt::InputMethodQueries supportedQueries = Qt::ImEnabled |
QWaylandTextInput::QWaylandTextInput(QWaylandDisplay *display, struct ::zwp_text_input_v2 *text_input)
: QtWayland::zwp_text_input_v2(text_input)
, m_display(display)
- , m_builder()
- , m_serial(0)
- , m_surface(nullptr)
- , m_preeditCommit()
- , m_inputPanelVisible(false)
- , m_keyboardRectangle()
- , m_locale()
- , m_inputDirection(Qt::LayoutDirectionAuto)
- , m_resetCallback(nullptr)
{
}
@@ -391,9 +382,7 @@ Qt::KeyboardModifiers QWaylandTextInput::modifiersToQtModifiers(uint32_t modifie
}
QWaylandInputContext::QWaylandInputContext(QWaylandDisplay *display)
- : QPlatformInputContext()
- , mDisplay(display)
- , mCurrentWindow()
+ : mDisplay(display)
{
}
diff --git a/src/client/qwaylandinputcontext_p.h b/src/client/qwaylandinputcontext_p.h
index a131bc5bd..a554f2301 100644
--- a/src/client/qwaylandinputcontext_p.h
+++ b/src/client/qwaylandinputcontext_p.h
@@ -112,17 +112,17 @@ private:
QVector<Qt::KeyboardModifier> m_modifiersMap;
- uint32_t m_serial;
- struct ::wl_surface *m_surface;
+ uint32_t m_serial = 0;
+ struct ::wl_surface *m_surface = nullptr;
QString m_preeditCommit;
- bool m_inputPanelVisible;
+ bool m_inputPanelVisible = false;
QRectF m_keyboardRectangle;
QLocale m_locale;
- Qt::LayoutDirection m_inputDirection;
+ Qt::LayoutDirection m_inputDirection = Qt::LayoutDirectionAuto;
- struct ::wl_callback *m_resetCallback;
+ struct ::wl_callback *m_resetCallback = nullptr;
static const wl_callback_listener callbackListener;
static void resetCallback(void *data, struct wl_callback *wl_callback, uint32_t time);
};
diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp
index b34504a1f..93344d13f 100644
--- a/src/client/qwaylandinputdevice.cpp
+++ b/src/client/qwaylandinputdevice.cpp
@@ -200,8 +200,7 @@ QWaylandInputDevice::Touch::~Touch()
}
QWaylandInputDevice::QWaylandInputDevice(QWaylandDisplay *display, int version, uint32_t id)
- : QObject()
- , QtWayland::wl_seat(display->wl_registry(), id, qMin(version, 4))
+ : QtWayland::wl_seat(display->wl_registry(), id, qMin(version, 4))
, mQDisplay(display)
, mDisplay(display->wl_display())
, mVersion(qMin(version, 4))
diff --git a/src/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp
index 267e481ac..fe1655c9f 100644
--- a/src/client/qwaylandintegration.cpp
+++ b/src/client/qwaylandintegration.cpp
@@ -121,16 +121,11 @@ public:
};
QWaylandIntegration::QWaylandIntegration()
- : mClientBufferIntegration(nullptr)
- , mInputDeviceIntegration(nullptr)
- , mFontDb(new QGenericUnixFontDatabase())
+ : mFontDb(new QGenericUnixFontDatabase())
, mNativeInterface(new QWaylandNativeInterface(this))
#if QT_CONFIG(accessibility)
, mAccessibility(new QPlatformAccessibility())
#endif
- , mClientBufferIntegrationInitialized(false)
- , mServerBufferIntegrationInitialized(false)
- , mShellIntegrationInitialized(false)
{
initializeInputDeviceIntegration();
mDisplay.reset(new QWaylandDisplay(this));
diff --git a/src/client/qwaylandintegration_p.h b/src/client/qwaylandintegration_p.h
index 17144b8d7..7ce79e6da 100644
--- a/src/client/qwaylandintegration_p.h
+++ b/src/client/qwaylandintegration_p.h
@@ -147,9 +147,9 @@ private:
QScopedPointer<QPlatformAccessibility> mAccessibility;
#endif
bool mFailed = false;
- bool mClientBufferIntegrationInitialized;
- bool mServerBufferIntegrationInitialized;
- bool mShellIntegrationInitialized;
+ bool mClientBufferIntegrationInitialized = false;
+ bool mServerBufferIntegrationInitialized = false;
+ bool mShellIntegrationInitialized = false;
friend class QWaylandDisplay;
};
diff --git a/src/client/qwaylandscreen.cpp b/src/client/qwaylandscreen.cpp
index 1c9ce23ba..38d97a91d 100644
--- a/src/client/qwaylandscreen.cpp
+++ b/src/client/qwaylandscreen.cpp
@@ -53,20 +53,10 @@ QT_BEGIN_NAMESPACE
namespace QtWaylandClient {
QWaylandScreen::QWaylandScreen(QWaylandDisplay *waylandDisplay, int version, uint32_t id)
- : QPlatformScreen()
- , QtWayland::wl_output(waylandDisplay->wl_registry(), id, qMin(version, 2))
+ : QtWayland::wl_output(waylandDisplay->wl_registry(), id, qMin(version, 2))
, m_outputId(id)
, mWaylandDisplay(waylandDisplay)
- , mScale(1)
- , mDepth(32)
- , mRefreshRate(60000)
- , mTransform(-1)
- , mFormat(QImage::Format_ARGB32_Premultiplied)
, mOutputName(QStringLiteral("Screen%1").arg(id))
- , m_orientation(Qt::PrimaryOrientation)
-#if QT_CONFIG(cursor)
- , mWaylandCursor(nullptr)
-#endif
{
}
diff --git a/src/client/qwaylandscreen_p.h b/src/client/qwaylandscreen_p.h
index 674e1a913..37c35cfff 100644
--- a/src/client/qwaylandscreen_p.h
+++ b/src/client/qwaylandscreen_p.h
@@ -116,21 +116,21 @@ private:
void output_done() override;
int m_outputId;
- QWaylandDisplay *mWaylandDisplay;
+ QWaylandDisplay *mWaylandDisplay = nullptr;
QString mManufacturer;
QString mModel;
QRect mGeometry;
- int mScale;
- int mDepth;
- int mRefreshRate;
- int mTransform;
- QImage::Format mFormat;
+ int mScale = 1;
+ int mDepth = 32;
+ int mRefreshRate = 60000;
+ int mTransform = -1;
+ QImage::Format mFormat = QImage::Format_ARGB32_Premultiplied;
QSize mPhysicalSize;
QString mOutputName;
- Qt::ScreenOrientation m_orientation;
+ Qt::ScreenOrientation m_orientation = Qt::PrimaryOrientation;
#if QT_CONFIG(cursor)
- QWaylandCursor *mWaylandCursor;
+ QWaylandCursor *mWaylandCursor = nullptr;
#endif
};
diff --git a/src/client/qwaylandshmbackingstore.cpp b/src/client/qwaylandshmbackingstore.cpp
index 24554ee44..cbfdf5157 100644
--- a/src/client/qwaylandshmbackingstore.cpp
+++ b/src/client/qwaylandshmbackingstore.cpp
@@ -72,9 +72,6 @@ Q_LOGGING_CATEGORY(logCategory, "qt.qpa.wayland.backingstore")
QWaylandShmBuffer::QWaylandShmBuffer(QWaylandDisplay *display,
const QSize &size, QImage::Format format, int scale)
- : QWaylandBuffer()
- , mShmPool(nullptr)
- , mMarginsImage(nullptr)
{
int stride = size.width() * 4;
int alloc = stride * size.height();
@@ -161,9 +158,6 @@ QImage *QWaylandShmBuffer::imageInsideMargins(const QMargins &marginsIn)
QWaylandShmBackingStore::QWaylandShmBackingStore(QWindow *window)
: QPlatformBackingStore(window)
, mDisplay(QWaylandScreen::waylandScreenFromWindow(window)->display())
- , mFrontBuffer(nullptr)
- , mBackBuffer(nullptr)
- , mPainting(false)
{
}
diff --git a/src/client/qwaylandshmbackingstore_p.h b/src/client/qwaylandshmbackingstore_p.h
index 251368efd..628d1858b 100644
--- a/src/client/qwaylandshmbackingstore_p.h
+++ b/src/client/qwaylandshmbackingstore_p.h
@@ -79,9 +79,9 @@ public:
QImage *imageInsideMargins(const QMargins &margins);
private:
QImage mImage;
- struct wl_shm_pool *mShmPool;
+ struct wl_shm_pool *mShmPool = nullptr;
QMargins mMargins;
- QImage *mMarginsImage;
+ QImage *mMarginsImage = nullptr;
};
class Q_WAYLAND_CLIENT_EXPORT QWaylandShmBackingStore : public QPlatformBackingStore
@@ -115,11 +115,11 @@ private:
void updateDecorations();
QWaylandShmBuffer *getBuffer(const QSize &size);
- QWaylandDisplay *mDisplay;
+ QWaylandDisplay *mDisplay = nullptr;
QLinkedList<QWaylandShmBuffer *> mBuffers;
- QWaylandShmBuffer *mFrontBuffer;
- QWaylandShmBuffer *mBackBuffer;
- bool mPainting;
+ QWaylandShmBuffer *mFrontBuffer = nullptr;
+ QWaylandShmBuffer *mBackBuffer = nullptr;
+ bool mPainting = false;
QMutex mMutex;
QSize mRequestedSize;
diff --git a/src/client/qwaylandsubsurface.cpp b/src/client/qwaylandsubsurface.cpp
index 36fdd1c7a..2ff966cbc 100644
--- a/src/client/qwaylandsubsurface.cpp
+++ b/src/client/qwaylandsubsurface.cpp
@@ -51,7 +51,6 @@ QWaylandSubSurface::QWaylandSubSurface(QWaylandWindow *window, QWaylandWindow *p
: QtWayland::wl_subsurface(sub_surface)
, m_window(window)
, m_parent(parent)
- , m_synchronized(false)
{
m_parent->mChildren << this;
setDeSync();
diff --git a/src/client/qwaylandsubsurface_p.h b/src/client/qwaylandsubsurface_p.h
index 00fb8d8ed..36a92a755 100644
--- a/src/client/qwaylandsubsurface_p.h
+++ b/src/client/qwaylandsubsurface_p.h
@@ -88,7 +88,7 @@ private:
void set_desync();
QWaylandWindow *m_window;
QWaylandWindow *m_parent;
- bool m_synchronized;
+ bool m_synchronized = false;
QMutex m_syncLock;
};
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index 75dfaa499..52461dc38 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -78,25 +78,9 @@ namespace QtWaylandClient {
QWaylandWindow *QWaylandWindow::mMouseGrab = nullptr;
QWaylandWindow::QWaylandWindow(QWindow *window)
- : QObject()
- , QPlatformWindow(window)
+ : QPlatformWindow(window)
, mDisplay(waylandScreen()->display())
- , mShellSurface(nullptr)
- , mSubSurfaceWindow(nullptr)
- , mWindowDecoration(nullptr)
- , mMouseEventsInContentArea(false)
- , mMousePressedInContentArea(Qt::NoButton)
- , mWaitingForFrameSync(false)
- , mRequestResizeSent(false)
- , mCanResize(true)
- , mResizeDirty(false)
, mResizeAfterSwap(qEnvironmentVariableIsSet("QT_WAYLAND_RESIZE_AFTER_SWAP"))
- , mSentInitialResize(false)
- , mScale(1)
- , mState(Qt::WindowNoState)
- , mMask()
- , mBackingStore(nullptr)
- , mUpdateRequested(false)
{
static WId id = 1;
mWindowId = id++;
diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h
index fca96f30d..a74f18827 100644
--- a/src/client/qwaylandwindow_p.h
+++ b/src/client/qwaylandwindow_p.h
@@ -81,9 +81,6 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandWindowConfigure
{
public:
QWaylandWindowConfigure()
- : width(0)
- , height(0)
- , edges(0)
{ }
void clear()
@@ -92,9 +89,9 @@ public:
bool isEmpty() const
{ return !height || !width; }
- int width;
- int height;
- uint32_t edges;
+ int width = 0;
+ int height = 0;
+ uint32_t edges = 0;
};
class Q_WAYLAND_CLIENT_EXPORT QWaylandWindow : public QObject, public QPlatformWindow, public QtWayland::wl_surface
@@ -214,39 +211,39 @@ protected:
void surface_leave(struct ::wl_output *output) override;
QVector<QWaylandScreen *> mScreens; //As seen by wl_surface.enter/leave events. Chronological order.
- QWaylandDisplay *mDisplay;
- QWaylandShellSurface *mShellSurface;
- QWaylandSubSurface *mSubSurfaceWindow;
+ QWaylandDisplay *mDisplay = nullptr;
+ QWaylandShellSurface *mShellSurface = nullptr;
+ QWaylandSubSurface *mSubSurfaceWindow = nullptr;
QVector<QWaylandSubSurface *> mChildren;
- QWaylandAbstractDecoration *mWindowDecoration;
- bool mMouseEventsInContentArea;
- Qt::MouseButtons mMousePressedInContentArea;
+ QWaylandAbstractDecoration *mWindowDecoration = nullptr;
+ bool mMouseEventsInContentArea = false;
+ Qt::MouseButtons mMousePressedInContentArea = Qt::NoButton;
WId mWindowId;
- bool mWaitingForFrameSync;
+ bool mWaitingForFrameSync = false;
struct ::wl_callback *mFrameCallback = nullptr;
QWaitCondition mFrameSyncWait;
QMutex mResizeLock;
QWaylandWindowConfigure mConfigure;
- bool mRequestResizeSent;
- bool mCanResize;
- bool mResizeDirty;
+ bool mRequestResizeSent = false;
+ bool mCanResize = true;
+ bool mResizeDirty = false;
bool mResizeAfterSwap;
QVariantMap m_properties;
- bool mSentInitialResize;
+ bool mSentInitialResize = false;
QPoint mOffset;
- int mScale;
+ int mScale = 1;
QIcon mWindowIcon;
- Qt::WindowStates mState;
+ Qt::WindowStates mState = Qt::WindowNoState;
Qt::WindowFlags mFlags;
QRegion mMask;
- QWaylandShmBackingStore *mBackingStore;
+ QWaylandShmBackingStore *mBackingStore = nullptr;
private slots:
void handleScreenRemoved(QScreen *qScreen);
@@ -266,7 +263,7 @@ private:
void handleMouseEventWithDecoration(QWaylandInputDevice *inputDevice, const QWaylandPointerEvent &e);
void handleScreenChanged();
- bool mUpdateRequested;
+ bool mUpdateRequested = false;
static const wl_callback_listener callbackListener;
static void frameCallback(void *data, struct wl_callback *wl_callback, uint32_t time);
diff --git a/src/client/qwaylandwindowmanagerintegration.cpp b/src/client/qwaylandwindowmanagerintegration.cpp
index c519126e5..785a0a44d 100644
--- a/src/client/qwaylandwindowmanagerintegration.cpp
+++ b/src/client/qwaylandwindowmanagerintegration.cpp
@@ -60,16 +60,14 @@ namespace QtWaylandClient {
class QWaylandWindowManagerIntegrationPrivate {
public:
QWaylandWindowManagerIntegrationPrivate(QWaylandDisplay *waylandDisplay);
- bool m_blockPropertyUpdates;
+ bool m_blockPropertyUpdates = false;
QWaylandDisplay *m_waylandDisplay;
QHash<QWindow*, QVariantMap> m_queuedProperties;
- bool m_showIsFullScreen;
+ bool m_showIsFullScreen = false;
};
QWaylandWindowManagerIntegrationPrivate::QWaylandWindowManagerIntegrationPrivate(QWaylandDisplay *waylandDisplay)
- : m_blockPropertyUpdates(false)
- , m_waylandDisplay(waylandDisplay)
- , m_showIsFullScreen(false)
+ : m_waylandDisplay(waylandDisplay)
{
}
diff --git a/src/client/qwaylandwlshellintegration.cpp b/src/client/qwaylandwlshellintegration.cpp
index e51637108..81c46be29 100644
--- a/src/client/qwaylandwlshellintegration.cpp
+++ b/src/client/qwaylandwlshellintegration.cpp
@@ -55,7 +55,6 @@ QWaylandWlShellIntegration *QWaylandWlShellIntegration::create(QWaylandDisplay *
}
QWaylandWlShellIntegration::QWaylandWlShellIntegration(QWaylandDisplay *display)
- : m_wlShell(nullptr)
{
Q_FOREACH (QWaylandDisplay::RegistryGlobal global, display->globals()) {
if (global.interface == QLatin1String("wl_shell")) {
diff --git a/src/client/qwaylandwlshellintegration_p.h b/src/client/qwaylandwlshellintegration_p.h
index 2e3ac3cc1..7a6b53524 100644
--- a/src/client/qwaylandwlshellintegration_p.h
+++ b/src/client/qwaylandwlshellintegration_p.h
@@ -70,7 +70,7 @@ public:
private:
QWaylandWlShellIntegration(QWaylandDisplay* display);
- QtWayland::wl_shell *m_wlShell;
+ QtWayland::wl_shell *m_wlShell = nullptr;
};
}
diff --git a/src/client/qwaylandwlshellsurface.cpp b/src/client/qwaylandwlshellsurface.cpp
index 7c8d51721..00b070f3f 100644
--- a/src/client/qwaylandwlshellsurface.cpp
+++ b/src/client/qwaylandwlshellsurface.cpp
@@ -56,9 +56,6 @@ QWaylandWlShellSurface::QWaylandWlShellSurface(struct ::wl_shell_surface *shell_
: QWaylandShellSurface(window)
, QtWayland::wl_shell_surface(shell_surface)
, m_window(window)
- , m_maximized(false)
- , m_fullscreen(false)
- , m_extendedWindow(nullptr)
{
if (window->display()->windowExtension())
m_extendedWindow = new QWaylandExtendedSurface(window);
diff --git a/src/client/qwaylandwlshellsurface_p.h b/src/client/qwaylandwlshellsurface_p.h
index 62583949b..708c6f113 100644
--- a/src/client/qwaylandwlshellsurface_p.h
+++ b/src/client/qwaylandwlshellsurface_p.h
@@ -105,10 +105,10 @@ private:
void setPopup(QWaylandWindow *parent, QWaylandInputDevice *device, uint serial);
QWaylandWindow *m_window;
- bool m_maximized;
- bool m_fullscreen;
+ bool m_maximized = false;
+ bool m_fullscreen = false;
QSize m_size;
- QWaylandExtendedSurface *m_extendedWindow;
+ QWaylandExtendedSurface *m_extendedWindow = nullptr;
void shell_surface_ping(uint32_t serial) override;
void shell_surface_configure(uint32_t edges,
diff --git a/src/client/qwaylandxdgpopup.cpp b/src/client/qwaylandxdgpopup.cpp
index d5fc49693..46a12a828 100644
--- a/src/client/qwaylandxdgpopup.cpp
+++ b/src/client/qwaylandxdgpopup.cpp
@@ -50,7 +50,6 @@ namespace QtWaylandClient {
QWaylandXdgPopup::QWaylandXdgPopup(struct ::xdg_popup *popup, QWaylandWindow *window)
: QWaylandShellSurface(window)
, QtWayland::xdg_popup(popup)
- , m_extendedWindow(nullptr)
, m_window(window)
{
if (window->display()->windowExtension())
diff --git a/src/client/qwaylandxdgpopup_p.h b/src/client/qwaylandxdgpopup_p.h
index f45e717a9..85bd589bf 100644
--- a/src/client/qwaylandxdgpopup_p.h
+++ b/src/client/qwaylandxdgpopup_p.h
@@ -80,7 +80,7 @@ protected:
void xdg_popup_popup_done() override;
private:
- QWaylandExtendedSurface *m_extendedWindow;
+ QWaylandExtendedSurface *m_extendedWindow = nullptr;
QWaylandWindow *m_window;
};
diff --git a/src/client/qwaylandxdgshell.cpp b/src/client/qwaylandxdgshell.cpp
index 6a9930608..8b252b953 100644
--- a/src/client/qwaylandxdgshell.cpp
+++ b/src/client/qwaylandxdgshell.cpp
@@ -54,13 +54,11 @@ namespace QtWaylandClient {
QWaylandXdgShell::QWaylandXdgShell(struct ::xdg_shell *shell)
: QtWayland::xdg_shell(shell)
- , m_popupSerial(0)
{
}
QWaylandXdgShell::QWaylandXdgShell(struct ::wl_registry *registry, uint32_t id)
: QtWayland::xdg_shell(registry, id, 1)
- , m_popupSerial(0)
{
use_unstable_version(QtWayland::xdg_shell::version_current);
}
diff --git a/src/client/qwaylandxdgshell_p.h b/src/client/qwaylandxdgshell_p.h
index f462f2828..e01104cad 100644
--- a/src/client/qwaylandxdgshell_p.h
+++ b/src/client/qwaylandxdgshell_p.h
@@ -85,7 +85,7 @@ private:
void xdg_shell_ping(uint32_t serial) override;
QVector<QWaylandWindow *> m_popups;
- uint m_popupSerial;
+ uint m_popupSerial = 0;
};
QT_END_NAMESPACE
diff --git a/src/client/qwaylandxdgshellintegration.cpp b/src/client/qwaylandxdgshellintegration.cpp
index 7c40d2dd7..5fa4385d6 100644
--- a/src/client/qwaylandxdgshellintegration.cpp
+++ b/src/client/qwaylandxdgshellintegration.cpp
@@ -57,7 +57,6 @@ QWaylandXdgShellIntegration *QWaylandXdgShellIntegration::create(QWaylandDisplay
}
QWaylandXdgShellIntegration::QWaylandXdgShellIntegration(QWaylandDisplay *display)
- : m_xdgShell(nullptr)
{
Q_FOREACH (QWaylandDisplay::RegistryGlobal global, display->globals()) {
if (global.interface == QLatin1String("xdg_shell")) {
diff --git a/src/client/qwaylandxdgshellintegration_p.h b/src/client/qwaylandxdgshellintegration_p.h
index cc4493e3e..ed307a5de 100644
--- a/src/client/qwaylandxdgshellintegration_p.h
+++ b/src/client/qwaylandxdgshellintegration_p.h
@@ -72,7 +72,7 @@ public:
private:
QWaylandXdgShellIntegration(QWaylandDisplay *display);
- QWaylandXdgShell *m_xdgShell;
+ QWaylandXdgShell *m_xdgShell = nullptr;
};
}
diff --git a/src/client/qwaylandxdgshellv6.cpp b/src/client/qwaylandxdgshellv6.cpp
index 1a60d6533..69bbf55b8 100644
--- a/src/client/qwaylandxdgshellv6.cpp
+++ b/src/client/qwaylandxdgshellv6.cpp
@@ -117,9 +117,6 @@ QWaylandXdgSurfaceV6::QWaylandXdgSurfaceV6(QWaylandXdgShellV6 *shell, ::zxdg_sur
, zxdg_surface_v6(surface)
, m_shell(shell)
, m_window(window)
- , m_toplevel(nullptr)
- , m_popup(nullptr)
- , m_configured(false)
{
}
diff --git a/src/client/qwaylandxdgshellv6_p.h b/src/client/qwaylandxdgshellv6_p.h
index 769f19837..122beed0c 100644
--- a/src/client/qwaylandxdgshellv6_p.h
+++ b/src/client/qwaylandxdgshellv6_p.h
@@ -125,9 +125,9 @@ private:
QWaylandXdgShellV6 *m_shell;
QWaylandWindow *m_window;
- Toplevel *m_toplevel;
- Popup *m_popup;
- bool m_configured;
+ Toplevel *m_toplevel = nullptr;
+ Popup *m_popup = nullptr;
+ bool m_configured = false;
QRegion m_exposeRegion;
};
diff --git a/src/client/qwaylandxdgshellv6integration.cpp b/src/client/qwaylandxdgshellv6integration.cpp
index a3dca70bf..cb82354b6 100644
--- a/src/client/qwaylandxdgshellv6integration.cpp
+++ b/src/client/qwaylandxdgshellv6integration.cpp
@@ -51,7 +51,6 @@ QT_BEGIN_NAMESPACE
namespace QtWaylandClient {
QWaylandXdgShellV6Integration::QWaylandXdgShellV6Integration(QWaylandDisplay *display)
- : m_xdgShell(nullptr)
{
for (QWaylandDisplay::RegistryGlobal global : display->globals()) {
if (global.interface == QLatin1String("zxdg_shell_v6")) {
diff --git a/src/client/qwaylandxdgshellv6integration_p.h b/src/client/qwaylandxdgshellv6integration_p.h
index f22b6a66a..bdfd19723 100644
--- a/src/client/qwaylandxdgshellv6integration_p.h
+++ b/src/client/qwaylandxdgshellv6integration_p.h
@@ -71,7 +71,7 @@ public:
private:
QWaylandXdgShellV6Integration(QWaylandDisplay *display);
- QWaylandXdgShellV6 *m_xdgShell;
+ QWaylandXdgShellV6 *m_xdgShell = nullptr;
};
}
diff --git a/src/client/qwaylandxdgsurface.cpp b/src/client/qwaylandxdgsurface.cpp
index 60266af68..40ed9f07a 100644
--- a/src/client/qwaylandxdgsurface.cpp
+++ b/src/client/qwaylandxdgsurface.cpp
@@ -57,11 +57,6 @@ QWaylandXdgSurface::QWaylandXdgSurface(QWaylandXdgShell *shell, QWaylandWindow *
, QtWayland::xdg_surface(shell->get_xdg_surface(window->object()))
, m_window(window)
, m_shell(shell)
- , m_maximized(false)
- , m_minimized(false)
- , m_fullscreen(false)
- , m_active(false)
- , m_extendedWindow(nullptr)
{
if (window->display()->windowExtension())
m_extendedWindow = new QWaylandExtendedSurface(window);
diff --git a/src/client/qwaylandxdgsurface_p.h b/src/client/qwaylandxdgsurface_p.h
index 00154ade0..fa7963206 100644
--- a/src/client/qwaylandxdgsurface_p.h
+++ b/src/client/qwaylandxdgsurface_p.h
@@ -112,13 +112,13 @@ private:
private:
QWaylandWindow *m_window;
QWaylandXdgShell* m_shell;
- bool m_maximized;
- bool m_minimized;
- bool m_fullscreen;
- bool m_active;
+ bool m_maximized = false;
+ bool m_minimized = false;
+ bool m_fullscreen = false;
+ bool m_active = false;
QSize m_normalSize;
QMargins m_margins;
- QWaylandExtendedSurface *m_extendedWindow;
+ QWaylandExtendedSurface *m_extendedWindow = nullptr;
void xdg_surface_configure(int32_t width,
int32_t height,