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>
This commit is contained in:
Johan Klokkhammer Helsing 2018-05-28 12:13:28 +02:00 committed by Johan Helsing
parent 6482bf5075
commit 796b02d398

View File

@ -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);
}