void ServiceList::CreateService(const Service &service) { QSettings store("Casper", "casperdns", this); store.beginGroup(service.getName()); store.setValue("name", service.getName()); store.setValue("url", service.getUrl()); store.setValue("details", service.getDetails()); store.setValue("icon", service.getIcon()); store.setValue("primary", service.getPrimary()); store.setValue("secondry", service.getSecondry()); store.setValue("active", service.getActive()); store.endGroup(); store.sync(); emit service_added(service.getName()); }
bool Ekiga::ServiceCore::add (ServicePtr service) { bool result = false; if ( !get (service->get_name ())) { services.push_front (service); service_added (service); result = true; } else { result = false; } #if DEBUG if (result) std::cout << "Ekiga::ServiceCore added " << service->get_name () << std::endl; else std::cout << "Ekiga::ServiceCore already has " << service->get_name () << std::endl; #endif return result; }