From ffdd37370bcd5957704b2e7298d7854f31e24057 Mon Sep 17 00:00:00 2001 From: Eike Hein Date: Sun, 17 Apr 2016 18:44:22 +0900 Subject: [PATCH] Add missing data role for closable state. Summary: Exposes closable state in the window model and adds tests. This was included in the protocol and interface, but missing from the model. Test Plan: Autotest extended. Reviewers: graesslin Subscribers: plasma-devel Projects: #plasma Differential Revision: https://phabricator.kde.org/D1435 --- src/wayland/autotests/client/test_plasma_window_model.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/wayland/autotests/client/test_plasma_window_model.cpp b/src/wayland/autotests/client/test_plasma_window_model.cpp index 78b8da1864..2e37469149 100644 --- a/src/wayland/autotests/client/test_plasma_window_model.cpp +++ b/src/wayland/autotests/client/test_plasma_window_model.cpp @@ -65,6 +65,7 @@ private Q_SLOTS: void testIsMovable(); void testIsResizable(); void testIsVirtualDesktopChangeable(); + void testIsCloseable(); void testTitle(); void testAppId(); void testVirtualDesktop(); @@ -225,6 +226,7 @@ void PlasmaWindowModelTest::testRoleNames_data() QTest::newRow("IsMovable") << int(PlasmaWindowModel::IsMovable) << QByteArrayLiteral("IsMovable"); QTest::newRow("IsResizable") << int(PlasmaWindowModel::IsResizable) << QByteArrayLiteral("IsResizable"); QTest::newRow("IsVirtualDesktopChangeable") << int(PlasmaWindowModel::IsVirtualDesktopChangeable) << QByteArrayLiteral("IsVirtualDesktopChangeable"); + QTest::newRow("IsCloseable") << int(PlasmaWindowModel::IsCloseable) << QByteArrayLiteral("IsCloseable"); } void PlasmaWindowModelTest::testRoleNames() @@ -308,6 +310,7 @@ void PlasmaWindowModelTest::testDefaultData_data() QTest::newRow("IsMovable") << int(PlasmaWindowModel::IsMovable) << QVariant(false); QTest::newRow("IsResizable") << int(PlasmaWindowModel::IsResizable) << QVariant(false); QTest::newRow("IsVirtualDesktopChangeable") << int(PlasmaWindowModel::IsVirtualDesktopChangeable) << QVariant(false); + QTest::newRow("IsCloseable") << int(PlasmaWindowModel::IsCloseable) << QVariant(false); } void PlasmaWindowModelTest::testDefaultData() @@ -412,6 +415,11 @@ void PlasmaWindowModelTest::testIsVirtualDesktopChangeable() QVERIFY(testBooleanData(PlasmaWindowModel::IsVirtualDesktopChangeable, &PlasmaWindowInterface::setVirtualDesktopChangeable)); } +void PlasmaWindowModelTest::testIsCloseable() +{ + QVERIFY(testBooleanData(PlasmaWindowModel::IsCloseable, &PlasmaWindowInterface::setCloseable)); +} + void PlasmaWindowModelTest::testTitle() { auto model = m_pw->createWindowModel();