diff --git a/entryprovider.cpp b/entryprovider.cpp index 8edf460..7afe5ab 100644 --- a/entryprovider.cpp +++ b/entryprovider.cpp @@ -231,8 +231,8 @@ QVector EntryProvider::readConfig(QStringList paths, bool userentry if(userentrymode) { entry->userEntry = true; - entry->entryPath = path; } + entry->entryPath = path; result.append(*entry); } } @@ -251,6 +251,14 @@ QVector EntryProvider::getSystemEntries() return readConfig(this->systemEntriesDirsPaths); } +void EntryProvider::saveUserEntry(const EntryConfig &config) +{ + if(!config.userEntry || config.entryPath.isEmpty()) + { + throw std::runtime_error("Only user entries can be saved"); + } +} + template void assignIfDestDefault(T &dest, const T &source) { if(dest == T())