Viewer *CBDS::addViewer(const QString &username, const int &tips, const bool &in_fanclub, const bool &is_mod, const bool &has_tokens, const char &gender) { Viewer* nv = new Viewer(username, tips, in_fanclub, is_mod, has_tokens, gender, this); Viewer* v = m_viewers.addViewer(nv); if (v) return connectViewer(v); emit error("Can't add \"" + username + "\". Name already exists or is reserved."); nv->deleteLater(); return v; }
void NotifyManager::onNotifyRemove(const QString &id) { // main key is time; Viewer *viewer = qobject_cast<Viewer*>(sender()); Q_ASSERT(viewer); m_connectLayout->removeWidget(viewer); m_viewerList.remove(viewer); m_dbus->RemoveRecord(id); viewer->deleteLater(); update(); }