diff options
author | Ken Moore <moorekou@gmail.com> | 2016-06-10 10:17:37 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2016-06-10 10:17:37 -0400 |
commit | 348ed6f26138f44832ec99ce9989adf3ebfdde32 (patch) | |
tree | dc35c61811ac79e27091ff8f886def3dd30cc6f1 /src-qt5/core/libLumina/LuminaUtils.cpp | |
parent | Make sure the text on the terminal is visible. (diff) | |
download | lumina-348ed6f26138f44832ec99ce9989adf3ebfdde32.tar.gz lumina-348ed6f26138f44832ec99ce9989adf3ebfdde32.tar.bz2 lumina-348ed6f26138f44832ec99ce9989adf3ebfdde32.zip |
Hide duplicate favorite entries.
Diffstat (limited to 'src-qt5/core/libLumina/LuminaUtils.cpp')
-rw-r--r-- | src-qt5/core/libLumina/LuminaUtils.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src-qt5/core/libLumina/LuminaUtils.cpp b/src-qt5/core/libLumina/LuminaUtils.cpp index c434febc..4911b9fa 100644 --- a/src-qt5/core/libLumina/LuminaUtils.cpp +++ b/src-qt5/core/libLumina/LuminaUtils.cpp @@ -489,6 +489,7 @@ QStringList LUtils::listFavorites(){ if(lastRead.isNull() || lastRead<QFileInfo(QDir::homePath()+"/.lumina/favorites/fav.list").lastModified()){ fav = LUtils::readFile(QDir::homePath()+"/.lumina/favorites/fav.list"); fav.removeAll(""); //remove any empty lines + fav.removeDuplicates(); lastRead = cur; if(fav.isEmpty()){ //Make sure the favorites dir exists, and create it if necessary @@ -501,6 +502,7 @@ QStringList LUtils::listFavorites(){ } bool LUtils::saveFavorites(QStringList list){ + list.removeDuplicates(); bool ok = LUtils::writeFile(QDir::homePath()+"/.lumina/favorites/fav.list", list, true); if(ok){ fav = list; } //also save internally in case of rapid write/read of the file return ok; |