mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-11-04 00:04:25 -05:00 
			
		
		
		
	QGIS Server throw an exception if the project has bad layers, but the user can defined restricted layers which are unpublished layers. So restricted layers can be bad layers server side, it is not necessary an error. This code verified that the bad layers are not restricted. If the project contains unrestricted bad layers, the server throw an exception.
		
			
				
	
	
		
			60 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			60 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
/************************************************************************
 | 
						|
 * This file has been generated automatically from                      *
 | 
						|
 *                                                                      *
 | 
						|
 * src/server/qgsstorebadlayerinfo.h                                    *
 | 
						|
 *                                                                      *
 | 
						|
 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 | 
						|
 ************************************************************************/
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
class QgsStoreBadLayerInfo: QgsProjectBadLayerHandler
 | 
						|
{
 | 
						|
%Docstring
 | 
						|
Stores layer ids of bad layers
 | 
						|
 | 
						|
.. versionadded:: 3.6
 | 
						|
%End
 | 
						|
 | 
						|
%TypeHeaderCode
 | 
						|
#include "qgsstorebadlayerinfo.h"
 | 
						|
%End
 | 
						|
  public:
 | 
						|
 | 
						|
    QgsStoreBadLayerInfo();
 | 
						|
%Docstring
 | 
						|
Default constructor
 | 
						|
%End
 | 
						|
 | 
						|
    void handleBadLayers( const QList<QDomNode> &layers );
 | 
						|
%Docstring
 | 
						|
handleBadLayers
 | 
						|
 | 
						|
:param layers: layer nodes
 | 
						|
%End
 | 
						|
 | 
						|
    QStringList badLayers() const;
 | 
						|
%Docstring
 | 
						|
badLayers
 | 
						|
 | 
						|
:return: ids of bad layers
 | 
						|
%End
 | 
						|
 | 
						|
    QMap<QString, QString> badLayerNames() const;
 | 
						|
%Docstring
 | 
						|
Returns names of bad layers with ids.
 | 
						|
 | 
						|
.. versionadded:: 3.12
 | 
						|
%End
 | 
						|
 | 
						|
};
 | 
						|
 | 
						|
/************************************************************************
 | 
						|
 * This file has been generated automatically from                      *
 | 
						|
 *                                                                      *
 | 
						|
 * src/server/qgsstorebadlayerinfo.h                                    *
 | 
						|
 *                                                                      *
 | 
						|
 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 | 
						|
 ************************************************************************/
 |