void PathDialog::RemovePath() { int row = m_path_list->currentRow(); if (row < 0) return; emit PathRemoved(m_path_list->takeItem(row)->text()); Settings().RemovePath(row); }
void Settings::RemovePath(const QString& qpath) { std::string path = qpath.toStdString(); std::vector<std::string>& paths = SConfig::GetInstance().m_ISOFolder; auto new_end = std::remove(paths.begin(), paths.end(), path); if (new_end == paths.end()) return; paths.erase(new_end, paths.end()); emit PathRemoved(qpath); }