//Created by Mateusz Półrola
-#include "../../common/History.h"
+#include "../../include/History.h"
#include <QDebug>
History::History(int maxSize, QObject *parent) :
_listAvailable = false;
}
-
void History::setMaxSize(int size) {
if(maxSize() <= 0) return;
if(size > _maxSize) {
void History::add(QString word) {
if(currentElement != -1) {
- //we search the same word so we don't add it again
+ //we search for the same word so we don't add it again
if(_history[currentElement] == word)
return;
}