From: Jussi Laitinen Date: Mon, 29 Mar 2010 09:50:25 +0000 (+0300) Subject: Modified mapEngine and mapFetcher. X-Git-Tag: v0.1~2^2~17 X-Git-Url: http://vcs.maemo.org/git/?a=commitdiff_plain;h=6111238d2e1f601b67d3168410ef60d48b1d1400;p=situare Modified mapEngine and mapFetcher. --- diff --git a/Situare.pro b/Situare.pro index 9b1f980..b638568 100644 --- a/Situare.pro +++ b/Situare.pro @@ -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 diff --git a/src/map/mapengine.cpp b/src/map/mapengine.cpp index 9b171a5..90ad48b 100644 --- a/src/map/mapengine.cpp +++ b/src/map/mapengine.cpp @@ -1,7 +1,7 @@ #include #include -#include "map/mapengine.h" +#include "mapengine.h" MapEngine::MapEngine(QObject *parent) : QObject(parent) diff --git a/src/map/mapfetcher.cpp b/src/map/mapfetcher.cpp index 1fa5ee4..2f8f4b7 100644 --- a/src/map/mapfetcher.cpp +++ b/src/map/mapfetcher.cpp @@ -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); } diff --git a/tests/testMap/testmapengine.cpp b/tests/testMap/testmapengine.cpp index 686f1ef..9a5a690 100644 --- a/tests/testMap/testmapengine.cpp +++ b/tests/testMap/testmapengine.cpp @@ -2,8 +2,7 @@ #include #include -#include "../map/mapengine.h" - +#include "mapengine.h" /** * @brief Test class for MapEngine.