File indexing completed on 2024-07-21 09:27:11

0001 // SPDX-License-Identifier: LGPL-2.1-or-later
0002 //
0003 // SPDX-FileCopyrightText: 2011 Thibaut Gridel <tgridel@free.fr>
0004 
0005 #include "OsmRunner.h"
0006 
0007 #include "GeoDataDocument.h"
0008 #include "OsmParser.h"
0009 #include "MarbleDebug.h"
0010 
0011 namespace Marble
0012 {
0013 
0014 OsmRunner::OsmRunner(QObject *parent) :
0015     ParsingRunner(parent)
0016 {
0017 }
0018 
0019 GeoDataDocument *OsmRunner::parseFile(const QString &fileName, DocumentRole role, QString &error)
0020 {
0021     GeoDataDocument* document = OsmParser::parse(fileName, error);
0022     if (document) {
0023         document->setDocumentRole(role);
0024         document->setFileName(fileName);
0025     }
0026     return document;
0027 }
0028 
0029 }
0030 
0031 #include "moc_OsmRunner.cpp"