File indexing completed on 2025-01-05 03:59:29

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 
0010 #include "digikam_debug.h"
0011 
0012 namespace Marble
0013 {
0014 
0015 OsmRunner::OsmRunner(QObject *parent) :
0016     ParsingRunner(parent)
0017 {
0018 }
0019 
0020 GeoDataDocument *OsmRunner::parseFile(const QString &fileName, DocumentRole role, QString &error)
0021 {
0022     GeoDataDocument* document = OsmParser::parse(fileName, error);
0023     if (document) {
0024         document->setDocumentRole(role);
0025         document->setFileName(fileName);
0026     }
0027     return document;
0028 }
0029 
0030 }
0031 
0032 #include "moc_OsmRunner.cpp"