diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2017-10-04 11:05:25 +0200 |
---|---|---|
committer | Johan Helsing <johan.helsing@qt.io> | 2017-10-05 07:29:25 +0000 |
commit | ee1181115961163a0ba6ac7a7661521c955ec16d (patch) | |
tree | d80215d9dccd9171f5bf3077763522493efeeabd /tests/auto/client | |
parent | 8bf81ea54f02f39ad1716567ee98102a2580a782 (diff) |
Fix -Wreorder warning by using default member initializers
Change-Id: I50f2928f1329fe45b4315baa33909b3227be1faa
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
Diffstat (limited to 'tests/auto/client')
-rw-r--r-- | tests/auto/client/client/mockcompositor.cpp | 2 | ||||
-rw-r--r-- | tests/auto/client/client/mockcompositor.h | 18 |
2 files changed, 9 insertions, 11 deletions
diff --git a/tests/auto/client/client/mockcompositor.cpp b/tests/auto/client/client/mockcompositor.cpp index 2c5f2541f..d8f3222f1 100644 --- a/tests/auto/client/client/mockcompositor.cpp +++ b/tests/auto/client/client/mockcompositor.cpp @@ -264,8 +264,6 @@ namespace Impl { Compositor::Compositor() : m_display(wl_display_create()) - , m_startDragSeen(false) - , m_time(0) { wl_list_init(&m_outputResources); diff --git a/tests/auto/client/client/mockcompositor.h b/tests/auto/client/client/mockcompositor.h index dd6450fc9..a9492921e 100644 --- a/tests/auto/client/client/mockcompositor.h +++ b/tests/auto/client/client/mockcompositor.h @@ -88,7 +88,7 @@ public: static void waitForStartDrag(void *data, const QList<QVariant> ¶meters); public: - bool m_startDragSeen; + bool m_startDragSeen = false; private: static void bindCompositor(wl_client *client, void *data, uint32_t version, uint32_t id); @@ -102,18 +102,18 @@ private: QRect m_outputGeometry; - wl_display *m_display; - wl_event_loop *m_loop; - wl_shm *m_shm; - int m_fd; + wl_display *m_display = nullptr; + wl_event_loop *m_loop = nullptr; + wl_shm *m_shm = nullptr; + int m_fd = -1; wl_list m_outputResources; - uint32_t m_time; + uint32_t m_time = 0; QScopedPointer<Seat> m_seat; - Pointer *m_pointer; - Keyboard *m_keyboard; - Touch *m_touch; + Pointer *m_pointer = nullptr; + Keyboard *m_keyboard = nullptr; + Touch *m_touch = nullptr; QScopedPointer<DataDeviceManager> m_data_device_manager; QVector<Surface *> m_surfaces; }; |