Commit ffdd3737 authored by Eike Hein's avatar Eike Hein
Browse files

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
parent 9d3cea70
......@@ -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();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment