Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/dont_crash_useractions_menu.cpp
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Line(s) | |||||
57 | 57 | | |||
58 | void TestDontCrashUseractionsMenu::initTestCase() | 58 | void TestDontCrashUseractionsMenu::initTestCase() | ||
59 | { | 59 | { | ||
60 | qRegisterMetaType<KWin::ShellClient*>(); | 60 | qRegisterMetaType<KWin::ShellClient*>(); | ||
61 | qRegisterMetaType<KWin::AbstractClient*>(); | 61 | qRegisterMetaType<KWin::AbstractClient*>(); | ||
62 | QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); | 62 | QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); | ||
63 | QVERIFY(workspaceCreatedSpy.isValid()); | 63 | QVERIFY(workspaceCreatedSpy.isValid()); | ||
64 | kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); | 64 | kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); | ||
65 | QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); | | |||
66 | QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); | 65 | QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); | ||
66 | QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); | ||||
67 | 67 | | |||
68 | // force style to breeze as that's the one which triggered the crash | 68 | // force style to breeze as that's the one which triggered the crash | ||
69 | QVERIFY(kwinApp()->setStyle(QStringLiteral("breeze"))); | 69 | QVERIFY(kwinApp()->setStyle(QStringLiteral("breeze"))); | ||
70 | 70 | | |||
71 | kwinApp()->start(); | 71 | kwinApp()->start(); | ||
72 | QVERIFY(workspaceCreatedSpy.wait()); | 72 | QVERIFY(workspaceCreatedSpy.wait()); | ||
73 | QCOMPARE(screens()->count(), 2); | 73 | QCOMPARE(screens()->count(), 2); | ||
74 | QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); | 74 | QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); | ||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |