diff --git a/autotests/tabbox/mock_tabboxclient.h b/autotests/tabbox/mock_tabboxclient.h --- a/autotests/tabbox/mock_tabboxclient.h +++ b/autotests/tabbox/mock_tabboxclient.h @@ -30,7 +30,7 @@ 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 @@ int width() const override { return 100; } - WId window() const override { - return m_wId; - } int x() const override { return 0; } @@ -72,7 +69,6 @@ private: QString m_caption; - WId m_wId; }; } // namespace KWin #endif diff --git a/autotests/tabbox/mock_tabboxclient.cpp b/autotests/tabbox/mock_tabboxclient.cpp --- a/autotests/tabbox/mock_tabboxclient.cpp +++ b/autotests/tabbox/mock_tabboxclient.cpp @@ -23,10 +23,9 @@ 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_tabboxhandler.h b/autotests/tabbox/mock_tabboxhandler.h --- a/autotests/tabbox/mock_tabboxhandler.h +++ b/autotests/tabbox/mock_tabboxhandler.h @@ -100,7 +100,7 @@ } // 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/mock_tabboxhandler.cpp b/autotests/tabbox/mock_tabboxhandler.cpp --- a/autotests/tabbox/mock_tabboxhandler.cpp +++ b/autotests/tabbox/mock_tabboxhandler.cpp @@ -100,9 +100,9 @@ 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/test_tabbox_clientmodel.cpp b/autotests/tabbox/test_tabbox_clientmodel.cpp --- a/autotests/tabbox/test_tabbox_clientmodel.cpp +++ b/autotests/tabbox/test_tabbox_clientmodel.cpp @@ -38,7 +38,7 @@ 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 @@ 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 @@ 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.h b/tabbox/tabbox.h --- a/tabbox/tabbox.h +++ b/tabbox/tabbox.h @@ -93,7 +93,6 @@ 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/tabbox.cpp b/tabbox/tabbox.cpp --- a/tabbox/tabbox.cpp +++ b/tabbox/tabbox.cpp @@ -396,11 +396,6 @@ return m_client->icon(); } -WId TabBoxClientImpl::window() const -{ - return m_client->windowId(); -} - bool TabBoxClientImpl::isMinimized() const { return m_client->isMinimized(); diff --git a/tabbox/tabboxhandler.h b/tabbox/tabboxhandler.h --- a/tabbox/tabboxhandler.h +++ b/tabbox/tabboxhandler.h @@ -377,10 +377,6 @@ * @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 */