[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdeedu/marble
From: Torsten Rahn <tackat () kde ! org>
Date: 2008-01-03 23:13:49
Message-ID: 1199402029.776196.16782.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 756973 by rahn:
- Fixed mem leaks in the DownloadManager.
- Bumping up the version number to 0.5
- Fixing Andrew's gpx/GPS functionality
M +22 -0 ChangeLog
M +6 -6 src/lib/AbstractLayer/AbstractLayerData.cpp
M +17 -5 src/lib/HttpDownloadManager.cpp
M +6 -0 src/lib/HttpFetchFile.cpp
M +1 -0 src/lib/HttpFetchFile.h
M +1 -1 src/lib/MarbleControlBox.cpp
M +4 -1 src/lib/MarbleModel.cpp
M +1 -1 src/lib/global.h
M +2 -0 src/lib/gps/GpsTracking.cpp
M +8 -0 src/lib/gps/GpxFileModel.cpp
M +8 -1 src/lib/gps/GpxSax.cpp
M +2 -1 src/lib/gps/GpxSax.h
M +9 -0 src/lib/gps/Track.cpp
M +2 -1 src/lib/gps/Track.h
M +1 -0 src/lib/gps/WaypointContainer.cpp
--- trunk/KDE/kdeedu/marble/ChangeLog #756972:756973
@@ -1,5 +1,27 @@
2008-01-03 Torsten Rahn <rahn@kde.org>
+ * ChangeLog:
+ * src/lib/gps/Track.cpp:
+ * src/lib/gps/Track.h:
+ * src/lib/gps/GpxSax.cpp:
+ * src/lib/gps/GpsTracking.cpp:
+ * src/lib/gps/WaypointContainer.cpp:
+ * src/lib/gps/GpxSax.h:
+ * src/lib/gps/GpxFileModel.cpp:
+ * src/lib/AbstractLayer/AbstractLayerData.cpp:
+ * src/lib/HttpFetchFile.h:
+ * src/lib/HttpDownloadManager.cpp:
+ * src/lib/global.h:
+ * src/lib/MarbleControlBox.cpp:
+ * src/lib/MarbleModel.cpp:
+ * src/lib/HttpFetchFile.cpp:
+
+ - Fixed mem leaks in the DownloadManager.
+ - Bumping up the version number to 0.5
+ - Fixing Andrew's gpx/GPS functionality
+
+2008-01-03 Torsten Rahn <rahn@kde.org>
+
* src/lib/GlobeScanlineTextureMapper.cpp:
- Fix precise rendering around north pole
--- trunk/KDE/kdeedu/marble/src/lib/AbstractLayer/AbstractLayerData.cpp \
#756972:756973 @@ -150,7 +150,7 @@
point->setX( ( ( screenSize.width() / 2 )
+ ( radius * qpos.v[Q_X] ) ) );
point->setY( ( ( screenSize.height() / 2 )
- + ( radius * qpos.v[Q_Y] ) ) );
+ - ( radius * qpos.v[Q_Y] ) ) );
return true;
} else {
@@ -158,19 +158,19 @@
}
break;
case Equirectangular:
- double degX;
- double degY;
+ double lon;
+ double lat;
double xyFactor = 2 * viewParams->m_radius / M_PI;
double centerLon;
double centerLat;
// Let (x, y) be the position on the screen of the placemark..
- qpos.getSpherical( degX, degY );
+ qpos.getSpherical( lon, lat );
viewParams->centerCoordinates( centerLon, centerLat );
- int x = (int)( screenSize.width()/ 2 + xyFactor * (degX + centerLon));
- int y = (int)(screenSize.height()/ 2 + xyFactor * (degY + centerLat));
+ int x = (int)( screenSize.width()/ 2 - xyFactor * (centerLon - lon));
+ int y = (int)(screenSize.height()/ 2 + xyFactor * (centerLat - lat));
point->setX( x );
point->setY( y );
--- trunk/KDE/kdeedu/marble/src/lib/HttpDownloadManager.cpp #756972:756973
@@ -23,7 +23,7 @@
, m_serverUrl( serverUrl )
, m_storagePolicy( policy )
{
- m_downloadEnabled = true; //disabled for now
+ m_downloadEnabled = true; //enabled for now
m_jobQueue.clear();
m_activatedJobList.clear();
@@ -38,6 +38,17 @@
HttpDownloadManager::~HttpDownloadManager()
{
+ m_downloadEnabled = false;
+
+ qDeleteAll( m_jobQueue );
+ m_jobQueue.clear();
+
+ qDeleteAll( m_activatedJobList );
+ m_activatedJobList.clear();
+
+ qDeleteAll( m_jobBlackList );
+ m_jobBlackList.clear();
+
if ( m_storagePolicy != 0 )
delete m_storagePolicy;
}
@@ -146,6 +157,7 @@
if ( pos > 0 )
{
m_activatedJobList.removeAt( pos );
+// qDebug() << "Removing: " << job->initiatorId;
delete job;
}
@@ -173,13 +185,13 @@
{
int pos = m_activatedJobList.indexOf( job );
- if ( pos > 0 )
+ if ( pos >= 0 )
{
m_activatedJobList.removeAt( pos );
+ m_jobBlackList.push_back( job );
+
+// qDebug() << QString( "Download of %1 Blacklisted. Number of blacklist \
items: %2" ).arg( job->relativeUrlString ).arg( m_jobBlackList.size() ); }
- m_jobBlackList.push_back( job );
-
-// qDebug() << QString( "Download of %1 Blacklisted. Number of blacklist \
items: %2" ).arg( job->relativeUrlString ).arg( m_jobBlackList.size() ); }
else
{
--- trunk/KDE/kdeedu/marble/src/lib/HttpFetchFile.cpp #756972:756973
@@ -68,6 +68,12 @@
QHttpResponseHeader responseHeader = m_pHttp->lastResponse();
+// FIXME: Check whether this assumption is a safe on:
+// ( Problem: Conditional jump later on depends on uninitialised value )
+//
+// if ( responseHeader.isValid() == false )
+// return;
+
HttpJob* job = m_pJobMap[ requestId ];
if ( responseHeader.statusCode() == 301 ) {
--- trunk/KDE/kdeedu/marble/src/lib/HttpFetchFile.h #756972:756973
@@ -18,6 +18,7 @@
#define HTTPFETCHFILE_H
#include <QtCore/QBuffer>
+#include <QtCore/QDebug>
#include <QtCore/QMap>
#include <QtCore/QObject>
#include <QtCore/QUrl>
--- trunk/KDE/kdeedu/marble/src/lib/MarbleControlBox.cpp #756972:756973
@@ -70,7 +70,7 @@
d->m_widget = 0;
d->m_searchTerm = QString();
d->m_searchTriggered = false;
- // FIXME: Get this from the widget?
+ // FIXME: Get this from MapTheme.
d->m_minimumzoom = 900;
d->uiWidget.setupUi( this );
--- trunk/KDE/kdeedu/marble/src/lib/MarbleModel.cpp #756972:756973
@@ -151,7 +151,10 @@
MarbleModel::~MarbleModel()
{
delete d->m_texmapper;
- delete d->m_tileLoader;
+
+ delete d->m_tileLoader; // disconnects from downloadManager in dtor
+ delete d->m_downloadManager;
+
delete d->m_veccomposer;
delete d->m_texcolorizer;
delete d->m_gridmap;
--- trunk/KDE/kdeedu/marble/src/lib/global.h #756972:756973
@@ -29,7 +29,7 @@
const double DEG2RAD = M_PI / 180.0;
const double RAD2DEG = 180.0 / M_PI;
-const QString MARBLE_VERSION_STRING = QString::fromLatin1( "pre-0.5-SVN" );
+const QString MARBLE_VERSION_STRING = QString::fromLatin1( "0.5 KDE 4.0 Release" );
const QString NOT_AVAILABLE = QObject::tr("not available");
--- trunk/KDE/kdeedu/marble/src/lib/gps/GpsTracking.cpp #756972:756973
@@ -54,6 +54,8 @@
delete m_gpsPreviousPosition;
delete m_gpsTracking;
+ delete m_gpsTrack;
+
#ifdef HAVE_LIBGPS
delete m_gpsd;
#endif
--- trunk/KDE/kdeedu/marble/src/lib/gps/GpxFileModel.cpp #756972:756973
@@ -13,6 +13,7 @@
#include <QtCore/Qt>
#include <QtCore/QFile>
+#include <QtCore/QVectorIterator>
#include <QDebug>
#include <config-marble.h>
@@ -35,6 +36,13 @@
GpxFileModel::~GpxFileModel()
{
+/*
+ FIXME: Do we need to clean up here?
+ QVector<GpxFile*>::iterator it = (*m_data).begin();
+ if ( m_data->size() > 1 )
+ qDeleteAll( ++it, (*m_data).end() );
+ m_data->clear();
+*/
delete m_data;
}
--- trunk/KDE/kdeedu/marble/src/lib/gps/GpxSax.cpp #756972:756973
@@ -36,10 +36,17 @@
m_tempLat = 0.0;
m_tempLon = 0.0;
+
+ m_track = 0;
+ m_trackSeg = 0;
}
+GpxSax::~GpxSax()
+{
+ delete m_track;
+ delete m_trackSeg;
+}
-
bool GpxSax::startElement( const QString &namespaceURI,
const QString &localName,
const QString &qName,
--- trunk/KDE/kdeedu/marble/src/lib/gps/GpxSax.h #756972:756973
@@ -27,7 +27,8 @@
public:
//GpxSax( WaypointContainer *wptContainer, TrackContainer *track );
GpxSax( GpxFile *gpxFile );
-
+ ~GpxSax();
+
bool startElement( const QString &namespaceURI,
const QString &localName,
const QString &qName,
--- trunk/KDE/kdeedu/marble/src/lib/gps/Track.cpp #756972:756973
@@ -21,6 +21,15 @@
{
}
+Track::~Track()
+{
+ iterator it;
+ for ( it = this->begin(); it < this->constEnd(); it++ ) {
+ delete (*it);
+ }
+ clear();
+}
+
void Track::draw(ClipPainter *painter, const QSize &canvasSize,
ViewParams *viewParams )
{
--- trunk/KDE/kdeedu/marble/src/lib/gps/Track.h #756972:756973
@@ -40,7 +40,8 @@
* @brief empty constructor
*/
Track();
-
+ ~Track();
+
virtual void draw(ClipPainter *painter,
const QSize &canvasSize,
ViewParams *viewParams );
--- trunk/KDE/kdeedu/marble/src/lib/gps/WaypointContainer.cpp #756972:756973
@@ -39,6 +39,7 @@
bool draw;
QPoint position;
+ painter->setPen( QPen( Qt::black ) );
painter->setBrush( QBrush( Qt::white ) );
for ( it = this->begin(); it < this->constEnd(); ++it ) {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic