1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +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:
David Rosca 2014-10-15 22:50:19 +02:00
parent 1a54cda705
commit 15bb39689c
3 changed files with 5 additions and 8 deletions

View File

@ -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)

View File

@ -62,7 +62,7 @@ public:
QVector<HistoryEntry> mostVisited(int count);
bool clearHistory();
void clearHistory();
bool optimizeHistory();
bool isSaving();
void setSaving(bool state);

View File

@ -81,7 +81,6 @@ void HistoryManager::clearHistory()
}
mApp->history()->clearHistory();
mApp->history()->optimizeHistory();
}
void HistoryManager::search(const QString &searchText)