mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56:34 +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");
|
return query.exec("VACUUM");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool History::clearHistory()
|
void History::clearHistory()
|
||||||
{
|
{
|
||||||
QSqlQuery query;
|
QSqlQuery query;
|
||||||
if (query.exec("DELETE FROM history")) {
|
query.exec(QSL("DELETE FROM history"));
|
||||||
emit resetHistory();
|
query.exec(QSL("VACUUM"));
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
emit resetHistory();
|
||||||
}
|
}
|
||||||
|
|
||||||
void History::setSaving(bool state)
|
void History::setSaving(bool state)
|
||||||
|
@ -62,7 +62,7 @@ public:
|
|||||||
|
|
||||||
QVector<HistoryEntry> mostVisited(int count);
|
QVector<HistoryEntry> mostVisited(int count);
|
||||||
|
|
||||||
bool clearHistory();
|
void clearHistory();
|
||||||
bool optimizeHistory();
|
bool optimizeHistory();
|
||||||
bool isSaving();
|
bool isSaving();
|
||||||
void setSaving(bool state);
|
void setSaving(bool state);
|
||||||
|
@ -81,7 +81,6 @@ void HistoryManager::clearHistory()
|
|||||||
}
|
}
|
||||||
|
|
||||||
mApp->history()->clearHistory();
|
mApp->history()->clearHistory();
|
||||||
mApp->history()->optimizeHistory();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void HistoryManager::search(const QString &searchText)
|
void HistoryManager::search(const QString &searchText)
|
||||||
|
Loading…
Reference in New Issue
Block a user