QGIS API Documentation  3.6.0-Noosa (5873452)
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 
18 #include "qgsstorebadlayerinfo.h"
19 #include <QDomElement>
20 
21 void 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  QDomElement idElem = it->firstChildElement( "id" );
30  if ( !idElem.isNull() )
31  {
32  mBadLayerIds.append( idElem.text() );
33  }
34  }
35  }
36 }
void handleBadLayers(const QList< QDomNode > &layers)
handleBadLayers