diff --git a/autotests/tabbox/mock_tabboxclient.cpp b/autotests/tabbox/mock_tabboxclient.cpp index 5b5f09ec01..77ade23402 100644 --- a/autotests/tabbox/mock_tabboxclient.cpp +++ b/autotests/tabbox/mock_tabboxclient.cpp @@ -23,10 +23,9 @@ along with this program. If not, see . namespace KWin { -MockTabBoxClient::MockTabBoxClient(QString caption, WId id) +MockTabBoxClient::MockTabBoxClient(QString caption) : TabBoxClient() , m_caption(caption) - , m_wId(id) { } diff --git a/autotests/tabbox/mock_tabboxclient.h b/autotests/tabbox/mock_tabboxclient.h index 6d45eb74ba..4d431be7af 100644 --- a/autotests/tabbox/mock_tabboxclient.h +++ b/autotests/tabbox/mock_tabboxclient.h @@ -30,7 +30,7 @@ namespace KWin class MockTabBoxClient : public TabBox::TabBoxClient { public: - explicit MockTabBoxClient(QString caption, WId id); + explicit MockTabBoxClient(QString caption); bool isMinimized() const override { return false; } @@ -53,9 +53,6 @@ public: int width() const override { return 100; } - WId window() const override { - return m_wId; - } int x() const override { return 0; } @@ -72,7 +69,6 @@ public: private: QString m_caption; - WId m_wId; }; } // namespace KWin #endif diff --git a/autotests/tabbox/mock_tabboxhandler.cpp b/autotests/tabbox/mock_tabboxhandler.cpp index 1e326e9418..eeb12548e7 100644 --- a/autotests/tabbox/mock_tabboxhandler.cpp +++ b/autotests/tabbox/mock_tabboxhandler.cpp @@ -100,9 +100,9 @@ bool MockTabBoxHandler::isInFocusChain(TabBox::TabBoxClient *client) const return false; } -QWeakPointer< TabBox::TabBoxClient > MockTabBoxHandler::createMockWindow(const QString &caption, WId id) +QWeakPointer< TabBox::TabBoxClient > MockTabBoxHandler::createMockWindow(const QString &caption) { - QSharedPointer< TabBox::TabBoxClient > client(new MockTabBoxClient(caption, id)); + QSharedPointer< TabBox::TabBoxClient > client(new MockTabBoxClient(caption)); m_windows.append(client); m_activeClient = client; return QWeakPointer< TabBox::TabBoxClient >(client); diff --git a/autotests/tabbox/mock_tabboxhandler.h b/autotests/tabbox/mock_tabboxhandler.h index 38a209d62c..8540c71398 100644 --- a/autotests/tabbox/mock_tabboxhandler.h +++ b/autotests/tabbox/mock_tabboxhandler.h @@ -100,7 +100,7 @@ public: } // mock methods - QWeakPointer createMockWindow(const QString &caption, WId id); + QWeakPointer createMockWindow(const QString &caption); void closeWindow(TabBox::TabBoxClient *client); private: QList< QSharedPointer > m_windows; diff --git a/autotests/tabbox/test_tabbox_clientmodel.cpp b/autotests/tabbox/test_tabbox_clientmodel.cpp index 201f7be4b3..0ae8212a95 100644 --- a/autotests/tabbox/test_tabbox_clientmodel.cpp +++ b/autotests/tabbox/test_tabbox_clientmodel.cpp @@ -38,7 +38,7 @@ void TestTabBoxClientModel::testLongestCaptionWithNullClient() clientModel->createClientList(); QCOMPARE(clientModel->longestCaption(), QString()); // add a window to the mock - tabboxhandler.createMockWindow(QString("test"), 1); + tabboxhandler.createMockWindow(QString("test")); clientModel->createClientList(); QCOMPARE(clientModel->longestCaption(), QString("test")); // delete the one client in the list @@ -59,8 +59,8 @@ void TestTabBoxClientModel::testCreateClientListNoActiveClient() clientModel->createClientList(); QCOMPARE(clientModel->rowCount(), 0); // create two windows, rowCount() should go to two - QWeakPointer client = tabboxhandler.createMockWindow(QString("test"), 1); - tabboxhandler.createMockWindow(QString("test2"), 2); + QWeakPointer client = tabboxhandler.createMockWindow(QString("test")); + tabboxhandler.createMockWindow(QString("test2")); clientModel->createClientList(); QCOMPARE(clientModel->rowCount(), 2); // let's ensure there is no active client @@ -76,8 +76,8 @@ void TestTabBoxClientModel::testCreateClientListActiveClientNotInFocusChain() tabboxhandler.setConfig(TabBox::TabBoxConfig()); TabBox::ClientModel *clientModel = new TabBox::ClientModel(&tabboxhandler); // create two windows, rowCount() should go to two - QWeakPointer client = tabboxhandler.createMockWindow(QString("test"), 1); - client = tabboxhandler.createMockWindow(QString("test2"), 2); + QWeakPointer client = tabboxhandler.createMockWindow(QString("test")); + client = tabboxhandler.createMockWindow(QString("test2")); clientModel->createClientList(); QCOMPARE(clientModel->rowCount(), 2); diff --git a/tabbox/tabbox.cpp b/tabbox/tabbox.cpp index e0ded5d444..e1143c956e 100644 --- a/tabbox/tabbox.cpp +++ b/tabbox/tabbox.cpp @@ -396,11 +396,6 @@ QIcon TabBoxClientImpl::icon() const return m_client->icon(); } -WId TabBoxClientImpl::window() const -{ - return m_client->windowId(); -} - bool TabBoxClientImpl::isMinimized() const { return m_client->isMinimized(); diff --git a/tabbox/tabbox.h b/tabbox/tabbox.h index ef3ad5e44d..ad3da3d87a 100644 --- a/tabbox/tabbox.h +++ b/tabbox/tabbox.h @@ -93,7 +93,6 @@ public: QString caption() const override; QIcon icon() const override; - WId window() const override; bool isMinimized() const override; int x() const override; int y() const override; diff --git a/tabbox/tabboxhandler.h b/tabbox/tabboxhandler.h index 9a953ac2d3..acc2f9fb67 100644 --- a/tabbox/tabboxhandler.h +++ b/tabbox/tabboxhandler.h @@ -377,10 +377,6 @@ public: * @return The icon of the client */ virtual QIcon icon() const = 0; - /** - * @return The window Id of the client - */ - virtual WId window() const = 0; /** * @return Minimized state of the client */