Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/dont_crash_useractions_menu.cpp
Show All 12 Lines | |||||
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | GNU General Public License for more details. | 15 | GNU General Public License for more details. | ||
16 | 16 | | |||
17 | You should have received a copy of the GNU General Public License | 17 | You should have received a copy of the GNU General Public License | ||
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | *********************************************************************/ | 19 | *********************************************************************/ | ||
20 | #include "kwin_wayland_test.h" | 20 | #include "kwin_wayland_test.h" | ||
21 | #include "abstract_client.h" | ||||
21 | #include "cursor.h" | 22 | #include "cursor.h" | ||
22 | #include "keyboard_input.h" | 23 | #include "keyboard_input.h" | ||
23 | #include "platform.h" | 24 | #include "platform.h" | ||
24 | #include "pointer_input.h" | 25 | #include "pointer_input.h" | ||
25 | #include "xdgshellclient.h" | | |||
26 | #include "screens.h" | 26 | #include "screens.h" | ||
27 | #include "useractions.h" | 27 | #include "useractions.h" | ||
28 | #include "wayland_server.h" | 28 | #include "wayland_server.h" | ||
29 | #include "workspace.h" | 29 | #include "workspace.h" | ||
30 | 30 | | |||
31 | #include <KWayland/Client/compositor.h> | 31 | #include <KWayland/Client/compositor.h> | ||
32 | #include <KWayland/Client/keyboard.h> | 32 | #include <KWayland/Client/keyboard.h> | ||
33 | #include <KWayland/Client/pointer.h> | 33 | #include <KWayland/Client/pointer.h> | ||
Show All 17 Lines | 49 | private Q_SLOTS: | |||
51 | void init(); | 51 | void init(); | ||
52 | void cleanup(); | 52 | void cleanup(); | ||
53 | 53 | | |||
54 | void testShowHideShowUseractionsMenu(); | 54 | void testShowHideShowUseractionsMenu(); | ||
55 | }; | 55 | }; | ||
56 | 56 | | |||
57 | void TestDontCrashUseractionsMenu::initTestCase() | 57 | void TestDontCrashUseractionsMenu::initTestCase() | ||
58 | { | 58 | { | ||
59 | qRegisterMetaType<KWin::XdgShellClient *>(); | | |||
60 | qRegisterMetaType<KWin::AbstractClient*>(); | 59 | qRegisterMetaType<KWin::AbstractClient*>(); | ||
61 | QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); | 60 | QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); | ||
62 | QVERIFY(workspaceCreatedSpy.isValid()); | 61 | QVERIFY(workspaceCreatedSpy.isValid()); | ||
63 | kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); | 62 | kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); | ||
64 | QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); | 63 | QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); | ||
65 | QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); | 64 | QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); | ||
66 | 65 | | |||
67 | // force style to breeze as that's the one which triggered the crash | 66 | // force style to breeze as that's the one which triggered the crash | ||
▲ Show 20 Lines • Show All 49 Lines • Show Last 20 Lines |