Better cache handling. Added clear cache button to settings.
[jenirok] / src / gui / resultwindow.cpp
index 179eac8..11e6fc1 100644 (file)
@@ -25,6 +25,7 @@
 #include "resultwindow.h"
 #include "settings.h"
 #include "db.h"
+#include "cache.h"
 
 ResultWindow::ResultWindow(QWidget* parent): QMainWindow(parent),
 eniro_(0), list_(0)
@@ -105,6 +106,11 @@ void ResultWindow::resultAvailable(Eniro::Result const& result,
 {
     Q_UNUSED(details);
 
+    if(!result.number.isEmpty())
+    {
+        Cache::instance().addItem(result);
+    }
+
     QString row = result.name;
 
     if(!result.street.isEmpty())