[Marble-commits] KDE/kdeedu/marble/src/lib
Thibaut Gridel
tgridel at free.fr
Mon Aug 17 19:58:00 CEST 2009
SVN commit 1012481 by tgridel:
PlacemarkManager dead code
M +2 -9 PlacemarkLoader.cpp
M +2 -4 PlacemarkLoader.h
M +2 -12 PlacemarkManager.cpp
--- trunk/KDE/kdeedu/marble/src/lib/PlacemarkLoader.cpp #1012480:1012481
@@ -28,21 +28,19 @@
namespace Marble {
-PlacemarkLoader::PlacemarkLoader( QObject* parent, const QString& file, bool finalize )
+PlacemarkLoader::PlacemarkLoader( QObject* parent, const QString& file )
: QThread( parent ),
m_filepath( file ),
m_contents( QString() ),
- m_finalize( finalize ),
m_document( 0 ),
m_container( 0 )
{
}
-PlacemarkLoader::PlacemarkLoader( QObject* parent, const QString& contents, const QString& file, bool finalize )
+PlacemarkLoader::PlacemarkLoader( QObject* parent, const QString& contents, const QString& file )
: QThread( parent ),
m_filepath( file ),
m_contents( contents ),
- m_finalize( finalize ),
m_document( 0 ),
m_container( 0 )
{
@@ -253,11 +251,6 @@
}
}
-bool PlacemarkLoader::finalize()
-{
- return m_finalize;
-}
-
bool PlacemarkLoader::loadFile( const QString& filename )
{
QFile file( filename );
--- trunk/KDE/kdeedu/marble/src/lib/PlacemarkLoader.h #1012480:1012481
@@ -22,11 +22,10 @@
{
Q_OBJECT
public:
- PlacemarkLoader( QObject* parent, const QString& file, bool finalize = true );
- PlacemarkLoader( QObject* parent, const QString& contents, const QString& name, bool finalize = true );
+ PlacemarkLoader( QObject* parent, const QString& file );
+ PlacemarkLoader( QObject* parent, const QString& contents, const QString& name );
virtual ~PlacemarkLoader();
- bool finalize();
void run();
QString path() const;
@@ -42,7 +41,6 @@
QString m_filepath;
QString m_contents;
- bool m_finalize;
GeoDataDocument *m_document;
PlacemarkContainer *m_container;
};
--- trunk/KDE/kdeedu/marble/src/lib/PlacemarkManager.cpp #1012480:1012481
@@ -18,8 +18,6 @@
#include <QtCore/QDebug>
#include <QtCore/QDir>
#include <QtCore/QFileInfo>
-#include <QtXml/QXmlInputSource>
-#include <QtXml/QXmlSimpleReader>
#include "KmlFileViewItem.h"
#include "FileViewModel.h"
@@ -43,17 +41,12 @@
public:
PlacemarkManagerPrivate( )
: m_datafacade( 0 )
- , m_finalized( true )
- , m_target( QString() )
{
}
MarbleDataFacade* m_datafacade;
QList<PlacemarkLoader*> m_loaderList;
QStringList m_pathList;
-
- bool m_finalized;
- QString m_target;
};
}
@@ -105,7 +98,7 @@
{
if( ! containers().contains( toRegularName( filepath ) ) ) {
qDebug() << "adding container:" << toRegularName( filepath ) << finalized;
- PlacemarkLoader* loader = new PlacemarkLoader( this, filepath, finalized );
+ PlacemarkLoader* loader = new PlacemarkLoader( this, filepath );
connect ( loader, SIGNAL( placemarksLoaded( PlacemarkLoader*, PlacemarkContainer * ) ),
this, SLOT( loadPlacemarkContainer( PlacemarkLoader*, PlacemarkContainer * ) ) );
connect ( loader, SIGNAL( placemarkLoaderFailed( PlacemarkLoader* ) ),
@@ -175,7 +168,7 @@
d->m_loaderList.removeAll( loader );
if ( container )
{
- d->m_datafacade->placemarkModel()->addPlacemarks( *container, false, d->m_finalized && d->m_loaderList.isEmpty() );
+ d->m_datafacade->placemarkModel()->addPlacemarks( *container, false, d->m_loaderList.isEmpty() );
}
if( d->m_loaderList.isEmpty() ) {
@@ -201,9 +194,6 @@
Q_ASSERT( d->m_datafacade->placemarkModel() != 0 && "You have called loadKmlFromData before creating a model!" );
- PlacemarkContainer container;
-
- d->m_finalized = true;
qDebug() << "adding container:" << key;
PlacemarkLoader* loader = new PlacemarkLoader( this, data, key );
connect ( loader, SIGNAL( placemarksLoaded( PlacemarkLoader*, PlacemarkContainer * ) ),
More information about the Marble-commits
mailing list