diff --git a/events/x11/x11events.cpp b/events/x11/x11events.cpp index ac7040b1..4533cf73 100644 --- a/events/x11/x11events.cpp +++ b/events/x11/x11events.cpp @@ -44,18 +44,18 @@ public: EventData(); //keyboard - Display *dpy; - signed char modifiers[0x100]; - KeyCode keycodes[0x100]; - KeyCode leftShiftCode; - KeyCode rightShiftCode; - KeyCode altGrCode; - char modifierState; + Display *dpy = nullptr; + signed char modifiers[0x100] = {}; + KeyCode keycodes[0x100] = {}; + KeyCode leftShiftCode = 0; + KeyCode rightShiftCode = 0; + KeyCode altGrCode = 0; + char modifierState = 0; //mouse - int buttonMask; - int x; - int y; + int buttonMask = 0; + int x = 0; + int y = 0; private: void init(); diff --git a/events/xdp/xdpevents.cpp b/events/xdp/xdpevents.cpp index 609f1544..45534936 100644 --- a/events/xdp/xdpevents.cpp +++ b/events/xdp/xdpevents.cpp @@ -36,9 +36,9 @@ public: EventData(); //mouse - int buttonMask; - int x; - int y; + int buttonMask = 0; + int x = 0; + int y = 0; QScopedPointer dbusXdpRemoteDesktopService; @@ -55,8 +55,6 @@ EventData::EventData() void EventData::init() { - buttonMask = 0; - dbusXdpRemoteDesktopService.reset(new OrgFreedesktopPortalRemoteDesktopInterface(QLatin1String("org.freedesktop.portal.Desktop"), QLatin1String("/org/freedesktop/portal/desktop"), QDBusConnection::sessionBus())); } diff --git a/framebuffers/pipewire/pw_framebuffer.cpp b/framebuffers/pipewire/pw_framebuffer.cpp index 0299a277..764296dd 100644 --- a/framebuffers/pipewire/pw_framebuffer.cpp +++ b/framebuffers/pipewire/pw_framebuffer.cpp @@ -176,10 +176,10 @@ private: struct { quint32 width; quint32 height; - } screenGeometry; + } screenGeometry = {}; // Allowed devices - uint devices; + uint devices = 0; // sanity indicator bool isValid = true; diff --git a/krfb/framebuffer.h b/krfb/framebuffer.h index e7256f03..d9008d83 100644 --- a/krfb/framebuffer.h +++ b/krfb/framebuffer.h @@ -51,7 +51,7 @@ Q_SIGNALS: protected: WId win; - char *fb; + char *fb = nullptr; QList tiles; private: diff --git a/krfb/invitationsrfbclient.cpp b/krfb/invitationsrfbclient.cpp index a0f72445..7673dc35 100644 --- a/krfb/invitationsrfbclient.cpp +++ b/krfb/invitationsrfbclient.cpp @@ -41,7 +41,7 @@ struct PendingInvitationsRfbClient::Private {} rfbClientPtr client; - QSocketNotifier *notifier; + QSocketNotifier *notifier = nullptr; bool askOnConnect; }; diff --git a/krfb/invitationsrfbserver.h b/krfb/invitationsrfbserver.h index f5641e10..5f72fffc 100644 --- a/krfb/invitationsrfbserver.h +++ b/krfb/invitationsrfbserver.h @@ -63,11 +63,11 @@ private Q_SLOTS: void walletOpened(bool); private: - KDNSSD::PublicService *m_publicService; + KDNSSD::PublicService *m_publicService = nullptr; bool m_allowUnattendedAccess; QString m_desktopPassword; QString m_unattendedPassword; - KWallet::Wallet *m_wallet; + KWallet::Wallet *m_wallet = nullptr; QString readableRandomString(int); Q_DISABLE_COPY(InvitationsRfbServer)