Rename VirtualDesktopManager::desktopCreated signal

Rename it to desktopAdded to match activityAdded, windowAdded, etc.
This commit is contained in:
Vlad Zahorodnii 2023-10-25 20:37:35 +03:00
parent 8fbf287254
commit 22efedc09c
7 changed files with 9 additions and 9 deletions

View file

@ -375,7 +375,7 @@ VirtualDesktopManagerDBusInterface::VirtualDesktopManagerDBusInterface(VirtualDe
Q_EMIT desktopsChanged(desktops());
});
}
connect(m_manager, &VirtualDesktopManager::desktopCreated, this, [this](VirtualDesktop *vd) {
connect(m_manager, &VirtualDesktopManager::desktopAdded, this, [this](VirtualDesktop *vd) {
connect(vd, &VirtualDesktop::x11DesktopNumberChanged, this, [this, vd]() {
DBusDesktopDataStruct data{.position = vd->x11DesktopNumber() - 1, .id = vd->id(), .name = vd->name()};
Q_EMIT desktopDataChanged(vd->id(), data);

View file

@ -175,7 +175,7 @@ EffectsHandlerImpl::EffectsHandlerImpl(Compositor *compositor, WorkspaceScene *s
Q_EMIT desktopGridWidthChanged(width);
Q_EMIT desktopGridHeightChanged(height);
});
connect(vds, &VirtualDesktopManager::desktopCreated, this, &EffectsHandler::desktopAdded);
connect(vds, &VirtualDesktopManager::desktopAdded, this, &EffectsHandler::desktopAdded);
connect(vds, &VirtualDesktopManager::desktopRemoved, this, &EffectsHandler::desktopRemoved);
connect(Cursors::self()->mouse(), &Cursor::mouseChanged, this, &EffectsHandler::mouseChanged);
connect(ws, &Workspace::geometryChanged, this, &EffectsHandler::virtualScreenSizeChanged);

View file

@ -15,7 +15,7 @@ VirtualDesktopModel::VirtualDesktopModel(QObject *parent)
{
VirtualDesktopManager *manager = VirtualDesktopManager::self();
connect(manager, &VirtualDesktopManager::desktopCreated,
connect(manager, &VirtualDesktopManager::desktopAdded,
this, &VirtualDesktopModel::handleVirtualDesktopAdded);
connect(manager, &VirtualDesktopManager::desktopRemoved,
this, &VirtualDesktopModel::handleVirtualDesktopRemoved);

View file

@ -35,7 +35,7 @@ WorkspaceWrapper::WorkspaceWrapper(QObject *parent)
connect(ws, &Workspace::windowAdded, this, &WorkspaceWrapper::windowAdded);
connect(ws, &Workspace::windowRemoved, this, &WorkspaceWrapper::windowRemoved);
connect(ws, &Workspace::windowActivated, this, &WorkspaceWrapper::windowActivated);
connect(vds, &VirtualDesktopManager::desktopCreated, this, &WorkspaceWrapper::desktopsChanged);
connect(vds, &VirtualDesktopManager::desktopAdded, this, &WorkspaceWrapper::desktopsChanged);
connect(vds, &VirtualDesktopManager::desktopRemoved, this, &WorkspaceWrapper::desktopsChanged);
connect(vds, &VirtualDesktopManager::layoutChanged, this, &WorkspaceWrapper::desktopLayoutChanged);
connect(vds, &VirtualDesktopManager::currentChanged, this, &WorkspaceWrapper::currentDesktopChanged);

View file

@ -63,7 +63,7 @@ void VirtualDesktopManager::setVirtualDesktopManagement(PlasmaVirtualDesktopMana
});
};
connect(this, &VirtualDesktopManager::desktopCreated, m_virtualDesktopManagement, createPlasmaVirtualDesktop);
connect(this, &VirtualDesktopManager::desktopAdded, m_virtualDesktopManagement, createPlasmaVirtualDesktop);
connect(this, &VirtualDesktopManager::rowsChanged, m_virtualDesktopManagement, [this](uint rows) {
m_virtualDesktopManagement->setRows(rows);
@ -469,7 +469,7 @@ VirtualDesktop *VirtualDesktopManager::createVirtualDesktop(uint position, const
save();
updateRootInfo();
Q_EMIT desktopCreated(vd);
Q_EMIT desktopAdded(vd);
Q_EMIT countChanged(m_desktops.count() - 1, m_desktops.count());
return vd;
}
@ -599,7 +599,7 @@ void VirtualDesktopManager::setCount(uint count)
save();
}
for (auto vd : std::as_const(newDesktops)) {
Q_EMIT desktopCreated(vd);
Q_EMIT desktopAdded(vd);
}
Q_EMIT countChanged(oldCount, m_desktops.count());
}

View file

@ -369,7 +369,7 @@ Q_SIGNALS:
* A new desktop has been created
* @param desktop the new just crated desktop
*/
void desktopCreated(KWin::VirtualDesktop *desktop);
void desktopAdded(KWin::VirtualDesktop *desktop);
/**
* A desktop has been removed and is about to be deleted

View file

@ -180,7 +180,7 @@ void Workspace::init()
// create VirtualDesktopManager and perform dependency injection
VirtualDesktopManager *vds = VirtualDesktopManager::self();
connect(vds, &VirtualDesktopManager::desktopCreated, this, &Workspace::slotDesktopAdded);
connect(vds, &VirtualDesktopManager::desktopAdded, this, &Workspace::slotDesktopAdded);
connect(vds, &VirtualDesktopManager::desktopRemoved, this, &Workspace::slotDesktopRemoved);
connect(vds, &VirtualDesktopManager::currentChanged, this, &Workspace::slotCurrentDesktopChanged);
connect(vds, &VirtualDesktopManager::currentChanging, this, &Workspace::slotCurrentDesktopChanging);