@@ -20,6 +20,9 @@ import QtQuick 2.4
2020// TODO sanitize input, move to persistent storage
2121
2222ListModel {
23+
24+ property int searchesToRemember: 3
25+
2326 function addQuery(newQuery) {
2427 // strip whitespaces
2528 newQuery = newQuery.replace(/^\s+|\s+$/g, '');
@@ -34,9 +37,9 @@ ListModel {
3437 }
3538 // add a new entry
3639 insert(0, { "query": newQuery })
37− if (count > 3) {
40+ if (count > searchesToRemember) {
3841 // remove entries if there's more than three
39− remove(3)
42+ remove(searchesToRemember)
4043 }
4144 }
4245}