mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
Remove History::optimizeHistory() function
It is no longer needed, this function was little confusing as it actually only executed VACUUM. Instead, execute VACUUM after clearing all history in History::clearHistory()
This commit is contained in:
parent
1a54cda705
commit
15bb39689c
@ -241,15 +241,13 @@ bool History::optimizeHistory()
|
||||
return query.exec("VACUUM");
|
||||
}
|
||||
|
||||
bool History::clearHistory()
|
||||
void History::clearHistory()
|
||||
{
|
||||
QSqlQuery query;
|
||||
if (query.exec("DELETE FROM history")) {
|
||||
emit resetHistory();
|
||||
return true;
|
||||
}
|
||||
query.exec(QSL("DELETE FROM history"));
|
||||
query.exec(QSL("VACUUM"));
|
||||
|
||||
return false;
|
||||
emit resetHistory();
|
||||
}
|
||||
|
||||
void History::setSaving(bool state)
|
||||
|
@ -62,7 +62,7 @@ public:
|
||||
|
||||
QVector<HistoryEntry> mostVisited(int count);
|
||||
|
||||
bool clearHistory();
|
||||
void clearHistory();
|
||||
bool optimizeHistory();
|
||||
bool isSaving();
|
||||
void setSaving(bool state);
|
||||
|
@ -81,7 +81,6 @@ void HistoryManager::clearHistory()
|
||||
}
|
||||
|
||||
mApp->history()->clearHistory();
|
||||
mApp->history()->optimizeHistory();
|
||||
}
|
||||
|
||||
void HistoryManager::search(const QString &searchText)
|
||||
|
Loading…
Reference in New Issue
Block a user