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
This commit is contained in:
parent
9d3cea7092
commit
ffdd37370b
1 changed files with 8 additions and 0 deletions
|
@ -65,6 +65,7 @@ private Q_SLOTS:
|
||||||
void testIsMovable();
|
void testIsMovable();
|
||||||
void testIsResizable();
|
void testIsResizable();
|
||||||
void testIsVirtualDesktopChangeable();
|
void testIsVirtualDesktopChangeable();
|
||||||
|
void testIsCloseable();
|
||||||
void testTitle();
|
void testTitle();
|
||||||
void testAppId();
|
void testAppId();
|
||||||
void testVirtualDesktop();
|
void testVirtualDesktop();
|
||||||
|
@ -225,6 +226,7 @@ void PlasmaWindowModelTest::testRoleNames_data()
|
||||||
QTest::newRow("IsMovable") << int(PlasmaWindowModel::IsMovable) << QByteArrayLiteral("IsMovable");
|
QTest::newRow("IsMovable") << int(PlasmaWindowModel::IsMovable) << QByteArrayLiteral("IsMovable");
|
||||||
QTest::newRow("IsResizable") << int(PlasmaWindowModel::IsResizable) << QByteArrayLiteral("IsResizable");
|
QTest::newRow("IsResizable") << int(PlasmaWindowModel::IsResizable) << QByteArrayLiteral("IsResizable");
|
||||||
QTest::newRow("IsVirtualDesktopChangeable") << int(PlasmaWindowModel::IsVirtualDesktopChangeable) << QByteArrayLiteral("IsVirtualDesktopChangeable");
|
QTest::newRow("IsVirtualDesktopChangeable") << int(PlasmaWindowModel::IsVirtualDesktopChangeable) << QByteArrayLiteral("IsVirtualDesktopChangeable");
|
||||||
|
QTest::newRow("IsCloseable") << int(PlasmaWindowModel::IsCloseable) << QByteArrayLiteral("IsCloseable");
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlasmaWindowModelTest::testRoleNames()
|
void PlasmaWindowModelTest::testRoleNames()
|
||||||
|
@ -308,6 +310,7 @@ void PlasmaWindowModelTest::testDefaultData_data()
|
||||||
QTest::newRow("IsMovable") << int(PlasmaWindowModel::IsMovable) << QVariant(false);
|
QTest::newRow("IsMovable") << int(PlasmaWindowModel::IsMovable) << QVariant(false);
|
||||||
QTest::newRow("IsResizable") << int(PlasmaWindowModel::IsResizable) << QVariant(false);
|
QTest::newRow("IsResizable") << int(PlasmaWindowModel::IsResizable) << QVariant(false);
|
||||||
QTest::newRow("IsVirtualDesktopChangeable") << int(PlasmaWindowModel::IsVirtualDesktopChangeable) << QVariant(false);
|
QTest::newRow("IsVirtualDesktopChangeable") << int(PlasmaWindowModel::IsVirtualDesktopChangeable) << QVariant(false);
|
||||||
|
QTest::newRow("IsCloseable") << int(PlasmaWindowModel::IsCloseable) << QVariant(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlasmaWindowModelTest::testDefaultData()
|
void PlasmaWindowModelTest::testDefaultData()
|
||||||
|
@ -412,6 +415,11 @@ void PlasmaWindowModelTest::testIsVirtualDesktopChangeable()
|
||||||
QVERIFY(testBooleanData(PlasmaWindowModel::IsVirtualDesktopChangeable, &PlasmaWindowInterface::setVirtualDesktopChangeable));
|
QVERIFY(testBooleanData(PlasmaWindowModel::IsVirtualDesktopChangeable, &PlasmaWindowInterface::setVirtualDesktopChangeable));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PlasmaWindowModelTest::testIsCloseable()
|
||||||
|
{
|
||||||
|
QVERIFY(testBooleanData(PlasmaWindowModel::IsCloseable, &PlasmaWindowInterface::setCloseable));
|
||||||
|
}
|
||||||
|
|
||||||
void PlasmaWindowModelTest::testTitle()
|
void PlasmaWindowModelTest::testTitle()
|
||||||
{
|
{
|
||||||
auto model = m_pw->createWindowModel();
|
auto model = m_pw->createWindowModel();
|
||||||
|
|
Loading…
Reference in a new issue