[Marble-commits] KDE/kdeedu/marble/src/lib
Jens-Michael Hoffmann
jensmh at gmx.de
Tue May 4 16:44:39 CEST 2010
SVN commit 1122713 by jmhoffmann:
Coding style: white space changes.
M +10 -20 FileLoader.cpp
M +8 -16 FileManager.cpp
--- trunk/KDE/kdeedu/marble/src/lib/FileLoader.cpp #1122712:1122713
@@ -91,8 +91,7 @@
QDateTime sourceLastModified;
QDateTime cacheLastModified;
- if ( QFile::exists( defaultsrcname ) )
- {
+ if ( QFile::exists( defaultsrcname ) ) {
sourceLastModified = QFileInfo( defaultsrcname ).lastModified();
cacheLastModified = QFileInfo( defaultcachename ).lastModified();
@@ -102,31 +101,25 @@
bool loadok = false;
- if ( !cacheoutdated )
- {
+ if ( !cacheoutdated ) {
loadok = loadFile( defaultcachename );
if ( loadok )
emit newGeoDataDocumentAdded( m_document );
}
mDebug() << "Loading ended" << loadok;
- if ( loadok )
- {
+ if ( loadok ) {
mDebug() << "placemarksLoaded";
}
}
- else
- {
- if ( QFile::exists( defaultsrcname ) )
- {
+ else {
+ if ( QFile::exists( defaultsrcname ) ) {
// Read the KML file.
importKml( defaultsrcname );
- if ( ! defaultcachename.isEmpty() )
- {
+ if ( !defaultcachename.isEmpty() ) {
saveFile( defaultcachename );
}
}
- else
- {
+ else {
mDebug() << "No Default Placemark Source File for " << defaultsrcname;
}
}
@@ -290,8 +283,7 @@
const QVector<GeoDataPlacemark> placemarks = container->placemarks();
QVector<GeoDataPlacemark>::const_iterator it = placemarks.constBegin();
QVector<GeoDataPlacemark>::const_iterator const end = placemarks.constEnd();
- for (; it != end; ++it )
- {
+ for (; it != end; ++it ) {
out << it->name();
it->coordinate( lon, lat, alt );
@@ -307,10 +299,8 @@
const QVector<GeoDataFolder> folders = container->folders();
QVector<GeoDataFolder>::const_iterator cont = folders.constBegin();
QVector<GeoDataFolder>::const_iterator endcont = folders.constEnd();
- for (; cont != endcont; ++cont )
- {
- if (GeoDataFolderId == cont->featureId() )
- {
+ for (; cont != endcont; ++cont ) {
+ if (GeoDataFolderId == cont->featureId() ) {
const GeoDataContainer *subcontainer = & (*cont);
savePlacemarks(out, subcontainer);
}
--- trunk/KDE/kdeedu/marble/src/lib/FileManager.cpp #1122712:1122713
@@ -58,8 +58,7 @@
}
}
- foreach( AbstractFileViewItem *file, d->m_fileItemList)
- {
+ foreach ( AbstractFileViewItem *file, d->m_fileItemList ) {
delete file;
}
@@ -123,8 +122,7 @@
void FileManager::removeFile( const QString& key )
{
- for( int i = 0; i < d->m_fileItemList.size(); ++i )
- {
+ for ( int i = 0; i < d->m_fileItemList.size(); ++i ) {
if( toRegularName( key ) == toRegularName( d->m_fileItemList.at(i)->name() ) ) {
closeFile(i);
break;
@@ -141,8 +139,7 @@
void FileManager::saveFile( int index )
{
- if (index < d->m_fileItemList.size() )
- {
+ if ( index < d->m_fileItemList.size() ) {
d->m_fileItemList.at( index )->saveFile();
}
}
@@ -150,17 +147,13 @@
void FileManager::closeFile( int index )
{
mDebug() << "FileManager::closeFile";
- if (index < d->m_fileItemList.size() )
- {
+ if ( index < d->m_fileItemList.size() ) {
emit fileRemoved( index );
KmlFileViewItem *file =
static_cast<KmlFileViewItem*>(d->m_fileItemList.at(index));
- if (file)
- {
- MarbleGeometryModel *geometryModel =
- d->m_datafacade->geometryModel();
- if (geometryModel->geoDataRoot() == file->document())
- {
+ if ( file ) {
+ MarbleGeometryModel *geometryModel = d->m_datafacade->geometryModel();
+ if ( geometryModel->geoDataRoot() == file->document() ) {
geometryModel->setGeoDataRoot(0);
}
}
@@ -176,8 +169,7 @@
AbstractFileViewItem * FileManager::at( int index )
{
- if (index < d->m_fileItemList.size() )
- {
+ if ( index < d->m_fileItemList.size() ) {
return d->m_fileItemList.at( index );
}
return 0;
More information about the Marble-commits
mailing list