From d1b35f306d83f2346a96c5b6aaea1d5241b83ff8 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 7 Jul 2020 12:32:29 +0300 Subject: [PATCH] Introduce started signal in Application The new signal is emitted when the Application has fully been initialized. It allows us to change the startup sequence, for example create workspace before starting the Xwayland server, without making any adjustments in our test suit. --- autotests/integration/activation_test.cpp | 6 +++--- autotests/integration/activities_test.cpp | 6 +++--- autotests/integration/colorcorrect_nightcolor_test.cpp | 6 +++--- autotests/integration/dbus_interface_test.cpp | 6 +++--- autotests/integration/debug_console_test.cpp | 6 +++--- autotests/integration/decoration_input_test.cpp | 6 +++--- autotests/integration/desktop_window_x11_test.cpp | 6 +++--- autotests/integration/dont_crash_aurorae_destroy_deco.cpp | 6 +++--- .../integration/dont_crash_cursor_physical_size_empty.cpp | 6 +++--- autotests/integration/dont_crash_empty_deco.cpp | 6 +++--- autotests/integration/dont_crash_glxgears.cpp | 6 +++--- autotests/integration/dont_crash_no_border.cpp | 6 +++--- .../integration/dont_crash_reinitialize_compositor.cpp | 6 +++--- autotests/integration/dont_crash_useractions_menu.cpp | 6 +++--- .../effects/desktop_switching_animation_test.cpp | 6 +++--- autotests/integration/effects/maximize_animation_test.cpp | 6 +++--- autotests/integration/effects/minimize_animation_test.cpp | 6 +++--- .../integration/effects/popup_open_close_animation_test.cpp | 6 +++--- autotests/integration/effects/scripted_effects_test.cpp | 6 +++--- autotests/integration/effects/slidingpopups_test.cpp | 6 +++--- .../effects/toplevel_open_close_animation_test.cpp | 6 +++--- autotests/integration/effects/translucency_test.cpp | 6 +++--- autotests/integration/effects/windowgeometry_test.cpp | 6 +++--- autotests/integration/effects/wobbly_shade_test.cpp | 6 +++--- autotests/integration/generic_scene_opengl_test.cpp | 6 +++--- autotests/integration/globalshortcuts_test.cpp | 6 +++--- autotests/integration/idle_inhibition_test.cpp | 6 +++--- autotests/integration/input_stacking_order.cpp | 6 +++--- autotests/integration/internal_window.cpp | 6 +++--- autotests/integration/keyboard_layout_test.cpp | 6 +++--- autotests/integration/keymap_creation_failure_test.cpp | 6 +++--- autotests/integration/kwin_wayland_test.cpp | 1 + autotests/integration/kwinbindings_test.cpp | 6 +++--- autotests/integration/lockscreen.cpp | 6 +++--- autotests/integration/maximize_test.cpp | 6 +++--- autotests/integration/modifier_only_shortcut_test.cpp | 6 +++--- autotests/integration/move_resize_window_test.cpp | 6 +++--- autotests/integration/no_global_shortcuts_test.cpp | 6 +++--- autotests/integration/placement_test.cpp | 6 +++--- autotests/integration/plasma_surface_test.cpp | 6 +++--- autotests/integration/plasmawindow_test.cpp | 6 +++--- autotests/integration/platformcursor.cpp | 6 +++--- autotests/integration/pointer_constraints_test.cpp | 6 +++--- autotests/integration/pointer_input.cpp | 6 +++--- autotests/integration/quick_tiling_test.cpp | 6 +++--- autotests/integration/scene_opengl_shadow_test.cpp | 6 +++--- autotests/integration/scene_qpainter_shadow_test.cpp | 6 +++--- autotests/integration/scene_qpainter_test.cpp | 6 +++--- autotests/integration/screen_changes_test.cpp | 6 +++--- autotests/integration/screenedge_client_show_test.cpp | 6 +++--- autotests/integration/scripting/minimizeall_test.cpp | 6 +++--- autotests/integration/scripting/screenedge_test.cpp | 6 +++--- autotests/integration/shade_test.cpp | 6 +++--- autotests/integration/showing_desktop_test.cpp | 6 +++--- autotests/integration/stacking_order_test.cpp | 6 +++--- autotests/integration/struts_test.cpp | 6 +++--- autotests/integration/tabbox_test.cpp | 6 +++--- autotests/integration/touch_input_test.cpp | 6 +++--- autotests/integration/transient_placement.cpp | 6 +++--- autotests/integration/virtual_desktop_test.cpp | 6 +++--- autotests/integration/window_rules_test.cpp | 6 +++--- autotests/integration/window_selection_test.cpp | 6 +++--- autotests/integration/x11_client_test.cpp | 6 +++--- autotests/integration/xdgshellclient_rules_test.cpp | 6 +++--- autotests/integration/xdgshellclient_test.cpp | 6 +++--- autotests/integration/xwayland_input_test.cpp | 6 +++--- autotests/integration/xwayland_selections_test.cpp | 6 +++--- main.cpp | 5 +++++ main.h | 2 ++ main_wayland.cpp | 1 + main_x11.cpp | 2 ++ 71 files changed, 209 insertions(+), 198 deletions(-) diff --git a/autotests/integration/activation_test.cpp b/autotests/integration/activation_test.cpp index 2758a6deae..c50017bd66 100644 --- a/autotests/integration/activation_test.cpp +++ b/autotests/integration/activation_test.cpp @@ -59,14 +59,14 @@ void ActivationTest::initTestCase() { qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); diff --git a/autotests/integration/activities_test.cpp b/autotests/integration/activities_test.cpp index 838778f302..38da8e1e47 100644 --- a/autotests/integration/activities_test.cpp +++ b/autotests/integration/activities_test.cpp @@ -59,15 +59,15 @@ void ActivitiesTest::initTestCase() { qRegisterMetaType(); qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); kwinApp()->setUseKActivities(true); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); diff --git a/autotests/integration/colorcorrect_nightcolor_test.cpp b/autotests/integration/colorcorrect_nightcolor_test.cpp index bc77130c38..b1bc609c28 100644 --- a/autotests/integration/colorcorrect_nightcolor_test.cpp +++ b/autotests/integration/colorcorrect_nightcolor_test.cpp @@ -47,8 +47,8 @@ private Q_SLOTS: void ColorCorrectNightColorTest::initTestCase() { - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); @@ -56,7 +56,7 @@ void ColorCorrectNightColorTest::initTestCase() kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig)); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); waylandServer()->initWorkspace(); } diff --git a/autotests/integration/dbus_interface_test.cpp b/autotests/integration/dbus_interface_test.cpp index ef32f5fa28..1170a3a998 100644 --- a/autotests/integration/dbus_interface_test.cpp +++ b/autotests/integration/dbus_interface_test.cpp @@ -71,13 +71,13 @@ void TestDbusInterface::initTestCase() qRegisterMetaType(); qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); waylandServer()->initWorkspace(); VirtualDesktopManager::self()->setCount(4); } diff --git a/autotests/integration/debug_console_test.cpp b/autotests/integration/debug_console_test.cpp index ffacc62ae6..9afbaf8850 100644 --- a/autotests/integration/debug_console_test.cpp +++ b/autotests/integration/debug_console_test.cpp @@ -60,14 +60,14 @@ void DebugConsoleTest::initTestCase() { qRegisterMetaType(); qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); diff --git a/autotests/integration/decoration_input_test.cpp b/autotests/integration/decoration_input_test.cpp index 362cf2f7ac..8a507e9f6b 100644 --- a/autotests/integration/decoration_input_test.cpp +++ b/autotests/integration/decoration_input_test.cpp @@ -134,8 +134,8 @@ void DecorationInputTest::initTestCase() { qRegisterMetaType(); qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); @@ -150,7 +150,7 @@ void DecorationInputTest::initTestCase() kwinApp()->setConfig(config); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); diff --git a/autotests/integration/desktop_window_x11_test.cpp b/autotests/integration/desktop_window_x11_test.cpp index 859ac4426f..f14b006bb5 100644 --- a/autotests/integration/desktop_window_x11_test.cpp +++ b/autotests/integration/desktop_window_x11_test.cpp @@ -54,14 +54,14 @@ void X11DesktopWindowTest::initTestCase() { qRegisterMetaType(); qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); diff --git a/autotests/integration/dont_crash_aurorae_destroy_deco.cpp b/autotests/integration/dont_crash_aurorae_destroy_deco.cpp index 91224e577c..fc6aaea747 100644 --- a/autotests/integration/dont_crash_aurorae_destroy_deco.cpp +++ b/autotests/integration/dont_crash_aurorae_destroy_deco.cpp @@ -54,8 +54,8 @@ void DontCrashAuroraeDestroyDecoTest::initTestCase() { qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8()); qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); @@ -68,7 +68,7 @@ void DontCrashAuroraeDestroyDecoTest::initTestCase() // this test needs to enforce OpenGL compositing to get into the crashy condition qputenv("KWIN_COMPOSE", QByteArrayLiteral("O2")); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); diff --git a/autotests/integration/dont_crash_cursor_physical_size_empty.cpp b/autotests/integration/dont_crash_cursor_physical_size_empty.cpp index bd04017291..2c08d03d8e 100644 --- a/autotests/integration/dont_crash_cursor_physical_size_empty.cpp +++ b/autotests/integration/dont_crash_cursor_physical_size_empty.cpp @@ -67,8 +67,8 @@ void DontCrashCursorPhysicalSizeEmpty::cleanup() void DontCrashCursorPhysicalSizeEmpty::initTestCase() { qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); @@ -81,7 +81,7 @@ void DontCrashCursorPhysicalSizeEmpty::initTestCase() qputenv("XCURSOR_SIZE", QByteArrayLiteral("0")); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); } void DontCrashCursorPhysicalSizeEmpty::testMoveCursorOverDeco_data() diff --git a/autotests/integration/dont_crash_empty_deco.cpp b/autotests/integration/dont_crash_empty_deco.cpp index a8ee608032..e3eb7fc48c 100644 --- a/autotests/integration/dont_crash_empty_deco.cpp +++ b/autotests/integration/dont_crash_empty_deco.cpp @@ -50,8 +50,8 @@ private Q_SLOTS: void DontCrashEmptyDecorationTest::initTestCase() { qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); @@ -59,7 +59,7 @@ void DontCrashEmptyDecorationTest::initTestCase() // this test needs to enforce OpenGL compositing to get into the crashy condition qputenv("KWIN_COMPOSE", QByteArrayLiteral("O2")); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); diff --git a/autotests/integration/dont_crash_glxgears.cpp b/autotests/integration/dont_crash_glxgears.cpp index 4179945121..ab00782cf3 100644 --- a/autotests/integration/dont_crash_glxgears.cpp +++ b/autotests/integration/dont_crash_glxgears.cpp @@ -44,12 +44,12 @@ private Q_SLOTS: void DontCrashGlxgearsTest::initTestCase() { qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); } void DontCrashGlxgearsTest::testGlxgears() diff --git a/autotests/integration/dont_crash_no_border.cpp b/autotests/integration/dont_crash_no_border.cpp index a4352630e5..40746db007 100644 --- a/autotests/integration/dont_crash_no_border.cpp +++ b/autotests/integration/dont_crash_no_border.cpp @@ -56,8 +56,8 @@ private Q_SLOTS: void DontCrashNoBorder::initTestCase() { qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); @@ -70,7 +70,7 @@ void DontCrashNoBorder::initTestCase() // this test needs to enforce OpenGL compositing to get into the crashy condition qputenv("KWIN_COMPOSE", QByteArrayLiteral("O2")); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); diff --git a/autotests/integration/dont_crash_reinitialize_compositor.cpp b/autotests/integration/dont_crash_reinitialize_compositor.cpp index d75b769b12..e1eca03f7e 100644 --- a/autotests/integration/dont_crash_reinitialize_compositor.cpp +++ b/autotests/integration/dont_crash_reinitialize_compositor.cpp @@ -59,8 +59,8 @@ void DontCrashReinitializeCompositorTest::initTestCase() qRegisterMetaType(); qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); @@ -79,7 +79,7 @@ void DontCrashReinitializeCompositorTest::initTestCase() qputenv("KWIN_EFFECTS_FORCE_ANIMATIONS", QByteArrayLiteral("1")); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); diff --git a/autotests/integration/dont_crash_useractions_menu.cpp b/autotests/integration/dont_crash_useractions_menu.cpp index 7f9fae0856..32137c7c94 100644 --- a/autotests/integration/dont_crash_useractions_menu.cpp +++ b/autotests/integration/dont_crash_useractions_menu.cpp @@ -57,8 +57,8 @@ private Q_SLOTS: void TestDontCrashUseractionsMenu::initTestCase() { qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); @@ -67,7 +67,7 @@ void TestDontCrashUseractionsMenu::initTestCase() QVERIFY(kwinApp()->setStyle(QStringLiteral("breeze"))); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); diff --git a/autotests/integration/effects/desktop_switching_animation_test.cpp b/autotests/integration/effects/desktop_switching_animation_test.cpp index c3736047c1..f1a536b058 100644 --- a/autotests/integration/effects/desktop_switching_animation_test.cpp +++ b/autotests/integration/effects/desktop_switching_animation_test.cpp @@ -56,8 +56,8 @@ void DesktopSwitchingAnimationTest::initTestCase() qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8()); qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); @@ -75,7 +75,7 @@ void DesktopSwitchingAnimationTest::initTestCase() qputenv("KWIN_EFFECTS_FORCE_ANIMATIONS", QByteArrayLiteral("1")); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); waylandServer()->initWorkspace(); auto scene = Compositor::self()->scene(); diff --git a/autotests/integration/effects/maximize_animation_test.cpp b/autotests/integration/effects/maximize_animation_test.cpp index 5e860d0090..0f549e856e 100644 --- a/autotests/integration/effects/maximize_animation_test.cpp +++ b/autotests/integration/effects/maximize_animation_test.cpp @@ -56,8 +56,8 @@ void MaximizeAnimationTest::initTestCase() qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8()); qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); @@ -74,7 +74,7 @@ void MaximizeAnimationTest::initTestCase() qputenv("KWIN_EFFECTS_FORCE_ANIMATIONS", QByteArrayLiteral("1")); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); waylandServer()->initWorkspace(); } diff --git a/autotests/integration/effects/minimize_animation_test.cpp b/autotests/integration/effects/minimize_animation_test.cpp index c4e2086f5e..c4148d7b4d 100644 --- a/autotests/integration/effects/minimize_animation_test.cpp +++ b/autotests/integration/effects/minimize_animation_test.cpp @@ -58,8 +58,8 @@ void MinimizeAnimationTest::initTestCase() qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8()); qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); @@ -77,7 +77,7 @@ void MinimizeAnimationTest::initTestCase() qputenv("KWIN_EFFECTS_FORCE_ANIMATIONS", QByteArrayLiteral("1")); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); waylandServer()->initWorkspace(); auto scene = Compositor::self()->scene(); diff --git a/autotests/integration/effects/popup_open_close_animation_test.cpp b/autotests/integration/effects/popup_open_close_animation_test.cpp index a1b8df54af..aec204b0c7 100644 --- a/autotests/integration/effects/popup_open_close_animation_test.cpp +++ b/autotests/integration/effects/popup_open_close_animation_test.cpp @@ -65,8 +65,8 @@ void PopupOpenCloseAnimationTest::initTestCase() qRegisterMetaType(); qRegisterMetaType(); qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); @@ -83,7 +83,7 @@ void PopupOpenCloseAnimationTest::initTestCase() qputenv("KWIN_EFFECTS_FORCE_ANIMATIONS", QByteArrayLiteral("1")); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); waylandServer()->initWorkspace(); } diff --git a/autotests/integration/effects/scripted_effects_test.cpp b/autotests/integration/effects/scripted_effects_test.cpp index 6bd4b41de6..bf065c211a 100644 --- a/autotests/integration/effects/scripted_effects_test.cpp +++ b/autotests/integration/effects/scripted_effects_test.cpp @@ -146,8 +146,8 @@ void ScriptedEffectsTest::initTestCase() qRegisterMetaType(); qRegisterMetaType(); qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); @@ -167,7 +167,7 @@ void ScriptedEffectsTest::initTestCase() qputenv("KWIN_COMPOSE", QByteArrayLiteral("O2")); qputenv("KWIN_EFFECTS_FORCE_ANIMATIONS", "1"); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QVERIFY(Compositor::self()); auto scene = KWin::Compositor::self()->scene(); diff --git a/autotests/integration/effects/slidingpopups_test.cpp b/autotests/integration/effects/slidingpopups_test.cpp index ae438f3ce9..ab5d615f76 100644 --- a/autotests/integration/effects/slidingpopups_test.cpp +++ b/autotests/integration/effects/slidingpopups_test.cpp @@ -63,8 +63,8 @@ void SlidingPopupsTest::initTestCase() qRegisterMetaType(); qRegisterMetaType(); qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); @@ -87,7 +87,7 @@ void SlidingPopupsTest::initTestCase() qputenv("KWIN_COMPOSE", QByteArrayLiteral("O2")); qputenv("KWIN_EFFECTS_FORCE_ANIMATIONS", "1"); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QVERIFY(Compositor::self()); auto scene = KWin::Compositor::self()->scene(); diff --git a/autotests/integration/effects/toplevel_open_close_animation_test.cpp b/autotests/integration/effects/toplevel_open_close_animation_test.cpp index 429046e5bb..c7d9990be4 100644 --- a/autotests/integration/effects/toplevel_open_close_animation_test.cpp +++ b/autotests/integration/effects/toplevel_open_close_animation_test.cpp @@ -60,8 +60,8 @@ void ToplevelOpenCloseAnimationTest::initTestCase() qRegisterMetaType(); qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); @@ -79,7 +79,7 @@ void ToplevelOpenCloseAnimationTest::initTestCase() qputenv("KWIN_EFFECTS_FORCE_ANIMATIONS", QByteArrayLiteral("1")); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); waylandServer()->initWorkspace(); auto scene = KWin::Compositor::self()->scene(); diff --git a/autotests/integration/effects/translucency_test.cpp b/autotests/integration/effects/translucency_test.cpp index a5a69cecb9..e28235abff 100644 --- a/autotests/integration/effects/translucency_test.cpp +++ b/autotests/integration/effects/translucency_test.cpp @@ -56,8 +56,8 @@ void TranslucencyTest::initTestCase() qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8()); qRegisterMetaType(); qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); @@ -77,7 +77,7 @@ void TranslucencyTest::initTestCase() qputenv("KWIN_EFFECTS_FORCE_ANIMATIONS", "1"); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QVERIFY(Compositor::self()); } diff --git a/autotests/integration/effects/windowgeometry_test.cpp b/autotests/integration/effects/windowgeometry_test.cpp index 1e7d172301..cd1330e08a 100644 --- a/autotests/integration/effects/windowgeometry_test.cpp +++ b/autotests/integration/effects/windowgeometry_test.cpp @@ -52,8 +52,8 @@ void WindowGeometryTest::initTestCase() { qRegisterMetaType(); qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); @@ -72,7 +72,7 @@ void WindowGeometryTest::initTestCase() qputenv("KWIN_EFFECTS_FORCE_ANIMATIONS", "1"); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QVERIFY(KWin::Compositor::self()); } diff --git a/autotests/integration/effects/wobbly_shade_test.cpp b/autotests/integration/effects/wobbly_shade_test.cpp index e07780b951..5fd98199e7 100644 --- a/autotests/integration/effects/wobbly_shade_test.cpp +++ b/autotests/integration/effects/wobbly_shade_test.cpp @@ -56,8 +56,8 @@ void WobblyWindowsShadeTest::initTestCase() { qRegisterMetaType(); qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); @@ -76,7 +76,7 @@ void WobblyWindowsShadeTest::initTestCase() qputenv("KWIN_COMPOSE", QByteArrayLiteral("O2")); qputenv("KWIN_EFFECTS_FORCE_ANIMATIONS", "1"); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QVERIFY(Compositor::self()); auto scene = KWin::Compositor::self()->scene(); diff --git a/autotests/integration/generic_scene_opengl_test.cpp b/autotests/integration/generic_scene_opengl_test.cpp index 14f1c92719..8d7acb1d93 100644 --- a/autotests/integration/generic_scene_opengl_test.cpp +++ b/autotests/integration/generic_scene_opengl_test.cpp @@ -50,8 +50,8 @@ void GenericSceneOpenGLTest::cleanup() void GenericSceneOpenGLTest::initTestCase() { qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); @@ -72,7 +72,7 @@ void GenericSceneOpenGLTest::initTestCase() qputenv("KWIN_COMPOSE", m_envVariable); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QVERIFY(Compositor::self()); auto scene = KWin::Compositor::self()->scene(); diff --git a/autotests/integration/globalshortcuts_test.cpp b/autotests/integration/globalshortcuts_test.cpp index 7419827045..068b1b6aa9 100644 --- a/autotests/integration/globalshortcuts_test.cpp +++ b/autotests/integration/globalshortcuts_test.cpp @@ -64,8 +64,8 @@ void GlobalShortcutsTest::initTestCase() { qRegisterMetaType(); qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); @@ -74,7 +74,7 @@ void GlobalShortcutsTest::initTestCase() qputenv("XKB_DEFAULT_RULES", "evdev"); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); waylandServer()->initWorkspace(); } diff --git a/autotests/integration/idle_inhibition_test.cpp b/autotests/integration/idle_inhibition_test.cpp index 26a477bf94..05e1c72c3d 100644 --- a/autotests/integration/idle_inhibition_test.cpp +++ b/autotests/integration/idle_inhibition_test.cpp @@ -56,14 +56,14 @@ void TestIdleInhibition::initTestCase() { qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); waylandServer()->initWorkspace(); } diff --git a/autotests/integration/input_stacking_order.cpp b/autotests/integration/input_stacking_order.cpp index b940f86470..b3359408db 100644 --- a/autotests/integration/input_stacking_order.cpp +++ b/autotests/integration/input_stacking_order.cpp @@ -62,14 +62,14 @@ void InputStackingOrderTest::initTestCase() { qRegisterMetaType(); qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); diff --git a/autotests/integration/internal_window.cpp b/autotests/integration/internal_window.cpp index caa5b96ed2..fb48db92b2 100644 --- a/autotests/integration/internal_window.cpp +++ b/autotests/integration/internal_window.cpp @@ -184,15 +184,15 @@ void InternalWindowTest::initTestCase() { qRegisterMetaType(); qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig)); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); diff --git a/autotests/integration/keyboard_layout_test.cpp b/autotests/integration/keyboard_layout_test.cpp index d9de5f12f3..dba385190e 100644 --- a/autotests/integration/keyboard_layout_test.cpp +++ b/autotests/integration/keyboard_layout_test.cpp @@ -75,8 +75,8 @@ void KeyboardLayoutTest::reconfigureLayouts() void KeyboardLayoutTest::initTestCase() { qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); @@ -84,7 +84,7 @@ void KeyboardLayoutTest::initTestCase() kwinApp()->setKxkbConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig)); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); waylandServer()->initWorkspace(); } diff --git a/autotests/integration/keymap_creation_failure_test.cpp b/autotests/integration/keymap_creation_failure_test.cpp index 069c677f06..c986572c4f 100644 --- a/autotests/integration/keymap_creation_failure_test.cpp +++ b/autotests/integration/keymap_creation_failure_test.cpp @@ -58,8 +58,8 @@ void KeymapCreationFailureTest::initTestCase() qputenv("XKB_DEFAULT_OPTIONS", "no"); qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); @@ -72,7 +72,7 @@ void KeymapCreationFailureTest::initTestCase() layoutGroup.sync(); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); waylandServer()->initWorkspace(); } diff --git a/autotests/integration/kwin_wayland_test.cpp b/autotests/integration/kwin_wayland_test.cpp index b0b3406419..198ffa4145 100644 --- a/autotests/integration/kwin_wayland_test.cpp +++ b/autotests/integration/kwin_wayland_test.cpp @@ -136,6 +136,7 @@ void WaylandTestApplication::finalizeStartup() disconnect(m_xwayland, &Xwl::Xwayland::initialized, this, &WaylandTestApplication::finalizeStartup); } createWorkspace(); + notifyStarted(); } void WaylandTestApplication::continueStartupWithScene() diff --git a/autotests/integration/kwinbindings_test.cpp b/autotests/integration/kwinbindings_test.cpp index ba86bd1406..eabe1d0ca0 100644 --- a/autotests/integration/kwinbindings_test.cpp +++ b/autotests/integration/kwinbindings_test.cpp @@ -58,15 +58,15 @@ private Q_SLOTS: void KWinBindingsTest::initTestCase() { qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig)); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); waylandServer()->initWorkspace(); } diff --git a/autotests/integration/lockscreen.cpp b/autotests/integration/lockscreen.cpp index 02b3e1f12e..ce9fe6b272 100644 --- a/autotests/integration/lockscreen.cpp +++ b/autotests/integration/lockscreen.cpp @@ -184,15 +184,15 @@ AbstractClient *LockScreenTest::showWindow() void LockScreenTest::initTestCase() { qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); qputenv("KWIN_COMPOSE", QByteArrayLiteral("O2")); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); diff --git a/autotests/integration/maximize_test.cpp b/autotests/integration/maximize_test.cpp index 326dd23803..c0eee6cf4b 100644 --- a/autotests/integration/maximize_test.cpp +++ b/autotests/integration/maximize_test.cpp @@ -61,8 +61,8 @@ private Q_SLOTS: void TestMaximized::initTestCase() { qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); @@ -70,7 +70,7 @@ void TestMaximized::initTestCase() kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig)); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); diff --git a/autotests/integration/modifier_only_shortcut_test.cpp b/autotests/integration/modifier_only_shortcut_test.cpp index a974727d53..37e383f4d0 100644 --- a/autotests/integration/modifier_only_shortcut_test.cpp +++ b/autotests/integration/modifier_only_shortcut_test.cpp @@ -90,8 +90,8 @@ void Target::shortcut() void ModifierOnlyShortcutTest::initTestCase() { - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); @@ -100,7 +100,7 @@ void ModifierOnlyShortcutTest::initTestCase() qputenv("XKB_DEFAULT_RULES", "evdev"); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); waylandServer()->initWorkspace(); } diff --git a/autotests/integration/move_resize_window_test.cpp b/autotests/integration/move_resize_window_test.cpp index 01c4a8b9bb..f54674d771 100644 --- a/autotests/integration/move_resize_window_test.cpp +++ b/autotests/integration/move_resize_window_test.cpp @@ -93,12 +93,12 @@ void MoveResizeWindowTest::initTestCase() qRegisterMetaType(); qRegisterMetaType(); qRegisterMetaType("MaximizeMode"); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QCOMPARE(screens()->count(), 1); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); } diff --git a/autotests/integration/no_global_shortcuts_test.cpp b/autotests/integration/no_global_shortcuts_test.cpp index 5b08ea05cc..f86e9a0ca2 100644 --- a/autotests/integration/no_global_shortcuts_test.cpp +++ b/autotests/integration/no_global_shortcuts_test.cpp @@ -100,8 +100,8 @@ void Target::shortcut() void NoGlobalShortcutsTest::initTestCase() { qRegisterMetaType("ElectricBorder"); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit(), KWin::WaylandServer::InitializationFlag::NoGlobalShortcuts)); @@ -110,7 +110,7 @@ void NoGlobalShortcutsTest::initTestCase() qputenv("XKB_DEFAULT_RULES", "evdev"); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); waylandServer()->initWorkspace(); } diff --git a/autotests/integration/placement_test.cpp b/autotests/integration/placement_test.cpp index 22ecee9ec0..f1eea04e1c 100644 --- a/autotests/integration/placement_test.cpp +++ b/autotests/integration/placement_test.cpp @@ -91,8 +91,8 @@ void TestPlacement::cleanup() void TestPlacement::initTestCase() { qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); @@ -100,7 +100,7 @@ void TestPlacement::initTestCase() kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig)); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); diff --git a/autotests/integration/plasma_surface_test.cpp b/autotests/integration/plasma_surface_test.cpp index a19502b341..35d990e3ef 100644 --- a/autotests/integration/plasma_surface_test.cpp +++ b/autotests/integration/plasma_surface_test.cpp @@ -71,12 +71,12 @@ private: void PlasmaSurfaceTest::initTestCase() { qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); } void PlasmaSurfaceTest::init() diff --git a/autotests/integration/plasmawindow_test.cpp b/autotests/integration/plasmawindow_test.cpp index a14a87c0e7..890f0c0676 100644 --- a/autotests/integration/plasmawindow_test.cpp +++ b/autotests/integration/plasmawindow_test.cpp @@ -68,14 +68,14 @@ private: void PlasmaWindowTest::initTestCase() { qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); diff --git a/autotests/integration/platformcursor.cpp b/autotests/integration/platformcursor.cpp index 0f5b188cb8..a9b253583f 100644 --- a/autotests/integration/platformcursor.cpp +++ b/autotests/integration/platformcursor.cpp @@ -37,12 +37,12 @@ private Q_SLOTS: void PlatformCursorTest::initTestCase() { - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); } void PlatformCursorTest::testPos() diff --git a/autotests/integration/pointer_constraints_test.cpp b/autotests/integration/pointer_constraints_test.cpp index adbf351bc9..ed52695c0e 100644 --- a/autotests/integration/pointer_constraints_test.cpp +++ b/autotests/integration/pointer_constraints_test.cpp @@ -70,8 +70,8 @@ void TestPointerConstraints::initTestCase() { qRegisterMetaType(); qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); @@ -86,7 +86,7 @@ void TestPointerConstraints::initTestCase() kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); diff --git a/autotests/integration/pointer_input.cpp b/autotests/integration/pointer_input.cpp index e9999c387d..0f7ddccb75 100644 --- a/autotests/integration/pointer_input.cpp +++ b/autotests/integration/pointer_input.cpp @@ -148,8 +148,8 @@ void PointerInputTest::initTestCase() { qRegisterMetaType(); qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); @@ -166,7 +166,7 @@ void PointerInputTest::initTestCase() qputenv("XKB_DEFAULT_RULES", "evdev"); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); diff --git a/autotests/integration/quick_tiling_test.cpp b/autotests/integration/quick_tiling_test.cpp index f5f5264325..c78f8d756b 100644 --- a/autotests/integration/quick_tiling_test.cpp +++ b/autotests/integration/quick_tiling_test.cpp @@ -93,8 +93,8 @@ void QuickTilingTest::initTestCase() { qRegisterMetaType(); qRegisterMetaType("MaximizeMode"); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); @@ -110,7 +110,7 @@ void QuickTilingTest::initTestCase() qputenv("XKB_DEFAULT_RULES", "evdev"); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); diff --git a/autotests/integration/scene_opengl_shadow_test.cpp b/autotests/integration/scene_opengl_shadow_test.cpp index df075a4309..012f543e04 100644 --- a/autotests/integration/scene_opengl_shadow_test.cpp +++ b/autotests/integration/scene_opengl_shadow_test.cpp @@ -113,8 +113,8 @@ void SceneOpenGLShadowTest::initTestCase() // Copied from generic_scene_opengl_test.cpp qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); @@ -135,7 +135,7 @@ void SceneOpenGLShadowTest::initTestCase() qputenv("KWIN_COMPOSE", QByteArrayLiteral("O2")); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QVERIFY(KWin::Compositor::self()); // Add directory with fake decorations to the plugin search path. diff --git a/autotests/integration/scene_qpainter_shadow_test.cpp b/autotests/integration/scene_qpainter_shadow_test.cpp index cba443788b..5736f92886 100644 --- a/autotests/integration/scene_qpainter_shadow_test.cpp +++ b/autotests/integration/scene_qpainter_shadow_test.cpp @@ -117,8 +117,8 @@ void SceneQPainterShadowTest::initTestCase() // Copied from scene_qpainter_test.cpp qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); @@ -144,7 +144,7 @@ void SceneQPainterShadowTest::initTestCase() qputenv("KWIN_COMPOSE", QByteArrayLiteral("Q")); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QVERIFY(KWin::Compositor::self()); // Add directory with fake decorations to the plugin search path. diff --git a/autotests/integration/scene_qpainter_test.cpp b/autotests/integration/scene_qpainter_test.cpp index e972d762f5..c5f48bd526 100644 --- a/autotests/integration/scene_qpainter_test.cpp +++ b/autotests/integration/scene_qpainter_test.cpp @@ -68,8 +68,8 @@ void SceneQPainterTest::cleanup() void SceneQPainterTest::initTestCase() { qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); @@ -95,7 +95,7 @@ void SceneQPainterTest::initTestCase() qputenv("KWIN_COMPOSE", QByteArrayLiteral("Q")); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QVERIFY(Compositor::self()); } diff --git a/autotests/integration/screen_changes_test.cpp b/autotests/integration/screen_changes_test.cpp index 1ee2b4153f..a5a009b417 100644 --- a/autotests/integration/screen_changes_test.cpp +++ b/autotests/integration/screen_changes_test.cpp @@ -45,13 +45,13 @@ private Q_SLOTS: void ScreenChangesTest::initTestCase() { - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); setenv("QT_QPA_PLATFORM", "wayland", true); waylandServer()->initWorkspace(); } diff --git a/autotests/integration/screenedge_client_show_test.cpp b/autotests/integration/screenedge_client_show_test.cpp index cb9f68d7a0..514d85b69d 100644 --- a/autotests/integration/screenedge_client_show_test.cpp +++ b/autotests/integration/screenedge_client_show_test.cpp @@ -52,8 +52,8 @@ void ScreenEdgeClientShowTest::initTestCase() { qRegisterMetaType(); qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); @@ -67,7 +67,7 @@ void ScreenEdgeClientShowTest::initTestCase() kwinApp()->setConfig(config); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); diff --git a/autotests/integration/scripting/minimizeall_test.cpp b/autotests/integration/scripting/minimizeall_test.cpp index 3412b44127..ad19c92dcd 100644 --- a/autotests/integration/scripting/minimizeall_test.cpp +++ b/autotests/integration/scripting/minimizeall_test.cpp @@ -56,14 +56,14 @@ void MinimizeAllScriptTest::initTestCase() qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); diff --git a/autotests/integration/scripting/screenedge_test.cpp b/autotests/integration/scripting/screenedge_test.cpp index b06459758c..99a0e2b79c 100644 --- a/autotests/integration/scripting/screenedge_test.cpp +++ b/autotests/integration/scripting/screenedge_test.cpp @@ -59,8 +59,8 @@ private: void ScreenEdgeTest::initTestCase() { - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); @@ -83,7 +83,7 @@ void ScreenEdgeTest::initTestCase() kwinApp()->setConfig(config); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QVERIFY(Scripting::self()); ScreenEdges::self()->setTimeThreshold(0); diff --git a/autotests/integration/shade_test.cpp b/autotests/integration/shade_test.cpp index 8491502096..f4f302f4a8 100644 --- a/autotests/integration/shade_test.cpp +++ b/autotests/integration/shade_test.cpp @@ -49,14 +49,14 @@ private Q_SLOTS: void ShadeTest::initTestCase() { qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); diff --git a/autotests/integration/showing_desktop_test.cpp b/autotests/integration/showing_desktop_test.cpp index 1ceb47cb09..2d9ab26dec 100644 --- a/autotests/integration/showing_desktop_test.cpp +++ b/autotests/integration/showing_desktop_test.cpp @@ -46,13 +46,13 @@ private Q_SLOTS: void ShowingDesktopTest::initTestCase() { qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); waylandServer()->initWorkspace(); } diff --git a/autotests/integration/stacking_order_test.cpp b/autotests/integration/stacking_order_test.cpp index 20d5a72d4a..c6265c7b1d 100644 --- a/autotests/integration/stacking_order_test.cpp +++ b/autotests/integration/stacking_order_test.cpp @@ -67,15 +67,15 @@ void StackingOrderTest::initTestCase() qRegisterMetaType(); qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig)); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); waylandServer()->initWorkspace(); } diff --git a/autotests/integration/struts_test.cpp b/autotests/integration/struts_test.cpp index 3a9e26faf4..831eca1cd2 100644 --- a/autotests/integration/struts_test.cpp +++ b/autotests/integration/struts_test.cpp @@ -68,8 +68,8 @@ void StrutsTest::initTestCase() { qRegisterMetaType(); qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); @@ -83,7 +83,7 @@ void StrutsTest::initTestCase() kwinApp()->setConfig(config); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); diff --git a/autotests/integration/tabbox_test.cpp b/autotests/integration/tabbox_test.cpp index 651c193986..da96c9728c 100644 --- a/autotests/integration/tabbox_test.cpp +++ b/autotests/integration/tabbox_test.cpp @@ -53,8 +53,8 @@ private Q_SLOTS: void TabBoxTest::initTestCase() { qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); @@ -65,7 +65,7 @@ void TabBoxTest::initTestCase() qputenv("KWIN_XKB_DEFAULT_KEYMAP", "1"); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); waylandServer()->initWorkspace(); } diff --git a/autotests/integration/touch_input_test.cpp b/autotests/integration/touch_input_test.cpp index a220515596..73239b8a5b 100644 --- a/autotests/integration/touch_input_test.cpp +++ b/autotests/integration/touch_input_test.cpp @@ -58,14 +58,14 @@ private: void TouchInputTest::initTestCase() { qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); diff --git a/autotests/integration/transient_placement.cpp b/autotests/integration/transient_placement.cpp index e45a280492..02f7df3341 100644 --- a/autotests/integration/transient_placement.cpp +++ b/autotests/integration/transient_placement.cpp @@ -63,14 +63,14 @@ private Q_SLOTS: void TransientPlacementTest::initTestCase() { qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); diff --git a/autotests/integration/virtual_desktop_test.cpp b/autotests/integration/virtual_desktop_test.cpp index 9e04c66511..535b0a527f 100644 --- a/autotests/integration/virtual_desktop_test.cpp +++ b/autotests/integration/virtual_desktop_test.cpp @@ -52,8 +52,8 @@ private Q_SLOTS: void VirtualDesktopTest::initTestCase() { qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); @@ -62,7 +62,7 @@ void VirtualDesktopTest::initTestCase() qputenv("XKB_DEFAULT_RULES", "evdev"); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); waylandServer()->initWorkspace(); if (kwinApp()->x11Connection()) { diff --git a/autotests/integration/window_rules_test.cpp b/autotests/integration/window_rules_test.cpp index 3127a43b0a..40e3de69b5 100644 --- a/autotests/integration/window_rules_test.cpp +++ b/autotests/integration/window_rules_test.cpp @@ -53,14 +53,14 @@ void WindowRuleTest::initTestCase() { qRegisterMetaType(); qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); diff --git a/autotests/integration/window_selection_test.cpp b/autotests/integration/window_selection_test.cpp index a818e57672..3bdfd6203d 100644 --- a/autotests/integration/window_selection_test.cpp +++ b/autotests/integration/window_selection_test.cpp @@ -64,15 +64,15 @@ private Q_SLOTS: void TestWindowSelection::initTestCase() { qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); qputenv("XKB_DEFAULT_RULES", "evdev"); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); diff --git a/autotests/integration/x11_client_test.cpp b/autotests/integration/x11_client_test.cpp index fbd5eb124c..010aaff246 100644 --- a/autotests/integration/x11_client_test.cpp +++ b/autotests/integration/x11_client_test.cpp @@ -67,14 +67,14 @@ void X11ClientTest::initTestCase() { qRegisterMetaType(); qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig)); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QVERIFY(KWin::Compositor::self()); waylandServer()->initWorkspace(); } diff --git a/autotests/integration/xdgshellclient_rules_test.cpp b/autotests/integration/xdgshellclient_rules_test.cpp index 2b143ae921..5b2e948b21 100644 --- a/autotests/integration/xdgshellclient_rules_test.cpp +++ b/autotests/integration/xdgshellclient_rules_test.cpp @@ -226,14 +226,14 @@ void TestXdgShellClientRules::initTestCase() { qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); diff --git a/autotests/integration/xdgshellclient_test.cpp b/autotests/integration/xdgshellclient_test.cpp index 7d9f3e2722..5241d2598e 100644 --- a/autotests/integration/xdgshellclient_test.cpp +++ b/autotests/integration/xdgshellclient_test.cpp @@ -126,14 +126,14 @@ void TestXdgShellClient::initTestCase() qRegisterMetaType(); qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); diff --git a/autotests/integration/xwayland_input_test.cpp b/autotests/integration/xwayland_input_test.cpp index 1eb7a61d05..420cb1d4e3 100644 --- a/autotests/integration/xwayland_input_test.cpp +++ b/autotests/integration/xwayland_input_test.cpp @@ -53,14 +53,14 @@ void XWaylandInputTest::initTestCase() { qRegisterMetaType(); qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); diff --git a/autotests/integration/xwayland_selections_test.cpp b/autotests/integration/xwayland_selections_test.cpp index 9753636522..8d7298dd4c 100644 --- a/autotests/integration/xwayland_selections_test.cpp +++ b/autotests/integration/xwayland_selections_test.cpp @@ -54,8 +54,8 @@ void XwaylandSelectionsTest::initTestCase() QSKIP("Skipped as it fails for unknown reasons on build.kde.org"); qRegisterMetaType(); qRegisterMetaType(); - QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); - QVERIFY(workspaceCreatedSpy.isValid()); + QSignalSpy applicationStartedSpy(kwinApp(), &Application::started); + QVERIFY(applicationStartedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); // QSignalSpy clipboardSyncDevicedCreated{waylandServer(), &WaylandServer::xclipboardSyncDataDeviceCreated}; // QVERIFY(clipboardSyncDevicedCreated.isValid()); @@ -63,7 +63,7 @@ void XwaylandSelectionsTest::initTestCase() QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); kwinApp()->start(); - QVERIFY(workspaceCreatedSpy.wait()); + QVERIFY(applicationStartedSpy.wait()); QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); diff --git a/main.cpp b/main.cpp index fcd0338032..41c0418f80 100644 --- a/main.cpp +++ b/main.cpp @@ -160,6 +160,11 @@ Application::~Application() destroyPlatform(); } +void Application::notifyStarted() +{ + emit started(); +} + void Application::destroyAtoms() { delete atoms; diff --git a/main.h b/main.h index a1b10af5d5..bbd0a26117 100644 --- a/main.h +++ b/main.h @@ -194,12 +194,14 @@ Q_SIGNALS: void workspaceCreated(); void screensCreated(); void virtualTerminalCreated(); + void started(); protected: Application(OperationMode mode, int &argc, char **argv); virtual void performStartup() = 0; void notifyKSplash(); + void notifyStarted(); void createInput(); void createWorkspace(); void createAtoms(); diff --git a/main_wayland.cpp b/main_wayland.cpp index ed7b7325d3..6f9415cdf1 100644 --- a/main_wayland.cpp +++ b/main_wayland.cpp @@ -192,6 +192,7 @@ void ApplicationWayland::finalizeStartup() } startSession(); createWorkspace(); + notifyStarted(); } void ApplicationWayland::continueStartupWithScene() diff --git a/main_x11.cpp b/main_x11.cpp index 6474deb016..5897404563 100644 --- a/main_x11.cpp +++ b/main_x11.cpp @@ -249,6 +249,8 @@ void ApplicationX11::performStartup() Xcb::sync(); // Trigger possible errors, there's still a chance to abort notifyKSplash(); + + notifyStarted(); } ); connect(platform(), &Platform::initFailed, this,