QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
qgsstorebadlayerinfo.cpp
Go to the documentation of this file.
1/***************************************************************************
2 qgsstorebadlayerinfo.cpp
3 ------------------------
4 begin : Jan 2019
5 copyright : (C) 2019 by Marco Hugentobler
6 email : marco dot hugentobler at sourcepole dot ch
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
19#include <QDomElement>
20
21void QgsStoreBadLayerInfo::handleBadLayers( const QList<QDomNode> &layers )
22{
23 mBadLayerIds.clear();
24 QList<QDomNode>::const_iterator it = layers.constBegin();
25 for ( ; it != layers.constEnd(); ++it )
26 {
27 if ( !it->isNull() )
28 {
29 const QDomElement idElem = it->firstChildElement( "id" );
30 if ( !idElem.isNull() )
31 {
32 const QString badLayerId = idElem.text();
33 mBadLayerIds.append( badLayerId );
34 const QDomElement nameElem = it->firstChildElement( "layername" );
35 if ( !nameElem.isNull() )
36 {
37 mBadLayerNames.insert( badLayerId, nameElem.text() );
38 }
39 }
40 }
41 }
42}
void handleBadLayers(const QList< QDomNode > &layers)
handleBadLayers