diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2018-05-28 12:13:28 +0200 |
---|---|---|
committer | Johan Helsing <johan.helsing@qt.io> | 2018-05-29 08:26:06 +0000 |
commit | 649fb15215f15736f53fab4f02be5dbd388512c0 (patch) | |
tree | f01dc6d947e0aa7406c0b76193cbf1b8007aa0ad /tests/auto/client/shared/mockcompositor.cpp | |
parent | d26abdb7a1a0265d09683c0259e1b5ea9a866b09 (diff) |
Client xdg-shell v6 tests: Fix dangling pointer usage
Fixes some flaky tests
Change-Id: Ifac7c95d12714d61afc37f879f4c70b2a7dbe0cf
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'tests/auto/client/shared/mockcompositor.cpp')
-rw-r--r-- | tests/auto/client/shared/mockcompositor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/client/shared/mockcompositor.cpp b/tests/auto/client/shared/mockcompositor.cpp index 11b40d9fc..077b8ee05 100644 --- a/tests/auto/client/shared/mockcompositor.cpp +++ b/tests/auto/client/shared/mockcompositor.cpp @@ -241,8 +241,8 @@ void MockCompositor::sendXdgToplevelV6Configure(const QSharedPointer<MockXdgTopl Command command = makeCommand(Impl::Compositor::sendXdgToplevelV6Configure, m_compositor); command.parameters << QVariant::fromValue(toplevel); command.parameters << QVariant::fromValue(size); - auto statesBytes = QByteArray::fromRawData(reinterpret_cast<const char *>(states.data()), - states.size() * static_cast<int>(sizeof(uint))); + QByteArray statesBytes(reinterpret_cast<const char *>(states.data()), + states.size() * static_cast<int>(sizeof(uint))); command.parameters << statesBytes; processCommand(command); } |