Modified mapEngine and mapFetcher.
authorJussi Laitinen <jussi.laitinen@ixonos.com>
Mon, 29 Mar 2010 09:50:25 +0000 (12:50 +0300)
committerJussi Laitinen <jupe@l3l7588.ixonos.local>
Mon, 29 Mar 2010 09:50:25 +0000 (12:50 +0300)
Situare.pro
src/map/mapengine.cpp
src/map/mapfetcher.cpp
tests/testMap/testmapengine.cpp

index 9b1f980..b638568 100644 (file)
@@ -3,12 +3,16 @@
 # -------------------------------------------------
 TARGET = Situare
 TEMPLATE = app
-SOURCES += src/main.cpp \
-    src/ui/mainwindow.cpp \
+QT += network testlib
+INCLUDEPATH += . \
+    src/tests/testMap/ \
+    src/map/
+SOURCES += src/ui/mainwindow.cpp \
     src/map/mapfetcher.cpp \
     src/map/mapengine.cpp \
-    tests/testMap/testmapfetcher.cpp \
-    tests/testMap/testmapengine.cpp
+    tests/testMap/testmapfetcher.cpp
+#   tests/testMap/testmapengine.cpp
+#    src/main.cpp \
 HEADERS += src/ui/mainwindow.h \
     src/map/mapfetcher.h \
     src/map/mapengine.h
index 9b171a5..90ad48b 100644 (file)
@@ -1,7 +1,7 @@
 #include <QtCore>
 #include <QtGlobal>
 
-#include "map/mapengine.h"
+#include "mapengine.h"
 
 MapEngine::MapEngine(QObject *parent)
     : QObject(parent)
index 1fa5ee4..2f8f4b7 100644 (file)
@@ -28,6 +28,9 @@ void MapFetcher::fetchMapImage(const QUrl &url)
 
     QNetworkRequest request(url);
     request.setRawHeader("User-Agent", "Map Test");
+    request.setAttribute(QNetworkRequest::CacheLoadControlAttribute,
+                                              QNetworkRequest::PreferCache);
+
     m_manager.get(request);
 }
 
index 686f1ef..9a5a690 100644 (file)
@@ -2,8 +2,7 @@
 #include <QPointF>
 #include <QDebug>
 
-#include "../map/mapengine.h"
-
+#include "mapengine.h"
 
 /**
 * @brief Test class for MapEngine.