implement deletion of entries

Tá an tiomantas seo le fáil i:
2020-09-27 22:28:16 +02:00
tuismitheoir 84cf8837bd
tiomantas f9eff3b5b2
D'athraigh 5 comhad le 20 breiseanna agus 1 scriosta

Féach ar an gComhad

@@ -295,6 +295,16 @@ void EntryProvider::saveUserEntry(const EntryConfig &config)
}
}
bool EntryProvider::deleteUserEntry(const EntryConfig &config)
{
if(!config.userEntry || config.entryPath.isEmpty())
{
throw std::runtime_error("Only user entries can be saved");
}
QFile file { config.entryPath };
return file.remove();
}
template <class T> void assignIfDestDefault(T &dest, const T &source)
{
if(dest == T())