mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Purge bookmarks if they get invalid
This commit is contained in:
parent
34c1849ddc
commit
14a7148bfa
@ -120,11 +120,17 @@ void Bookmarks::save()
|
|||||||
void BookmarksList::load()
|
void BookmarksList::load()
|
||||||
{
|
{
|
||||||
QFile f(YACReader::getSettingsPath() + "/bookmarks.yacr");
|
QFile f(YACReader::getSettingsPath() + "/bookmarks.yacr");
|
||||||
|
try {
|
||||||
if (f.open(QIODevice::ReadOnly)) {
|
if (f.open(QIODevice::ReadOnly)) {
|
||||||
QDataStream dataS(&f);
|
QDataStream dataS(&f);
|
||||||
dataS >> list;
|
dataS >> list;
|
||||||
f.close();
|
f.close();
|
||||||
}
|
}
|
||||||
|
} catch (const std::exception &e) {
|
||||||
|
f.close();
|
||||||
|
|
||||||
|
f.remove();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BookmarksList::save()
|
void BookmarksList::save()
|
||||||
|
Loading…
Reference in New Issue
Block a user