mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
Change some by value arguments to by reference
This commit is contained in:
parent
e6d495a2d6
commit
526b8fc635
@ -19,12 +19,12 @@ class QgsStyleV2ExportImportDialog : QDialog
|
||||
* @brief selectSymbols select symbols by name
|
||||
* @param symbolNames list of symbol names
|
||||
*/
|
||||
void selectSymbols(const QStringList symbolNames);
|
||||
void selectSymbols( const QStringList& symbolNames);
|
||||
/**
|
||||
* @brief deselectSymbols deselect symbols by name
|
||||
* @param symbolNames list of symbol names
|
||||
*/
|
||||
void deselectSymbols(const QStringList symbolNames);
|
||||
void deselectSymbols( const QStringList& symbolNames);
|
||||
|
||||
public slots:
|
||||
void doExportImport();
|
||||
@ -44,22 +44,22 @@ class QgsStyleV2ExportImportDialog : QDialog
|
||||
* Select the symbols belonging to the given group
|
||||
* @param groupName the name of the group to be selected
|
||||
*/
|
||||
void selectGroup( const QString groupName );
|
||||
void selectGroup( const QString& groupName );
|
||||
/**
|
||||
* Unselect the symbols belonging to the given group
|
||||
* @param groupName the name of the group to be deselected
|
||||
*/
|
||||
void deselectGroup(const QString groupName);
|
||||
void deselectGroup( const QString& groupName);
|
||||
/**
|
||||
* @brief selectSmartgroup selects all symbols from a smart group
|
||||
* @param groupName
|
||||
*/
|
||||
void selectSmartgroup(const QString groupName);
|
||||
void selectSmartgroup( const QString& groupName);
|
||||
/**
|
||||
* @brief deselectSmartgroup deselects all symbols from a smart group
|
||||
* @param groupName
|
||||
*/
|
||||
void deselectSmartgroup(const QString groupName);
|
||||
void deselectSmartgroup( const QString& groupName);
|
||||
|
||||
void importTypeChanged( int );
|
||||
void browse();
|
||||
|
@ -29,13 +29,13 @@ class QgsStyleV2GroupSelectionDialog : public QDialog, private Ui::SymbolsV2Grou
|
||||
|
||||
signals:
|
||||
//! group with groupName has been selected
|
||||
void groupSelected( const QString groupName );
|
||||
void groupSelected( const QString& groupName );
|
||||
//! group with groupName has been deselected
|
||||
void groupDeselected( const QString groupName );
|
||||
void groupDeselected( const QString& groupName );
|
||||
//! smartgroup with groupName has been selected
|
||||
void smartgroupSelected( const QString groupName);
|
||||
void smartgroupSelected( const QString& groupName);
|
||||
//! smart group with groupName has been deselected
|
||||
void smartgroupDeselected( const QString groupName );
|
||||
void smartgroupDeselected( const QString& groupName );
|
||||
//! all deselected
|
||||
void allDeselected( );
|
||||
//! all selected
|
||||
|
@ -27,9 +27,9 @@ class QgsCapabilitiesCache: QObject
|
||||
public:
|
||||
|
||||
/** Returns cached capabilities document (or 0 if document for configuration file not in cache)*/
|
||||
const QDomDocument* searchCapabilitiesDocument( QString configFilePath, QString version );
|
||||
const QDomDocument* searchCapabilitiesDocument( const QString& configFilePath, const QString& version );
|
||||
/** Inserts new capabilities document (creates a copy of the document, does not take ownership)*/
|
||||
void insertCapabilitiesDocument( QString configFilePath, QString version, const QDomDocument* doc );
|
||||
void insertCapabilitiesDocument( const QString& configFilePath, const QString& version, const QDomDocument* doc );
|
||||
|
||||
};
|
||||
|
||||
|
@ -59,7 +59,7 @@ class QgsServerInterface
|
||||
* available after requestReady has been called.*/
|
||||
virtual QString configFilePath( ) = 0;
|
||||
/** Set the config file path */
|
||||
virtual void setConfigFilePath( QString configFilePath) = 0;
|
||||
virtual void setConfigFilePath( const QString& configFilePath) = 0;
|
||||
|
||||
private:
|
||||
/** Constructor */
|
||||
|
@ -104,17 +104,17 @@ class QgsWFSServer: public QgsOWSServer
|
||||
protected:
|
||||
|
||||
void startGetFeature( QgsRequestHandler& request, const QString& format, int prec, QgsCoordinateReferenceSystem& crs, QgsRectangle* rect );
|
||||
void setGetFeature( QgsRequestHandler& request, const QString& format, QgsFeature* feat, int featIdx, int prec, QgsCoordinateReferenceSystem& crs, QgsAttributeList attrIndexes, QSet<QString> excludedAttributes );
|
||||
void setGetFeature( QgsRequestHandler& request, const QString& format, QgsFeature* feat, int featIdx, int prec, QgsCoordinateReferenceSystem& crs, const QgsAttributeList& attrIndexes, const QSet<QString>& excludedAttributes );
|
||||
void endGetFeature( QgsRequestHandler& request, const QString& format );
|
||||
|
||||
//method for transaction
|
||||
QgsFeatureIds getFeatureIdsFromFilter( QDomElement filter, QgsVectorLayer* layer );
|
||||
QgsFeatureIds getFeatureIdsFromFilter( const QDomElement& filter, QgsVectorLayer* layer );
|
||||
|
||||
//methods to write GeoJSON
|
||||
QString createFeatureGeoJSON( QgsFeature* feat, int prec, QgsCoordinateReferenceSystem& crs, QgsAttributeList attrIndexes, QSet<QString> excludedAttributes ) /*const*/;
|
||||
QString createFeatureGeoJSON( QgsFeature* feat, int prec, QgsCoordinateReferenceSystem& crs, const QgsAttributeList& attrIndexes, const QSet<QString>& excludedAttributes ) /*const*/;
|
||||
|
||||
//methods to write GML2
|
||||
QDomElement createFeatureGML2( QgsFeature* feat, QDomDocument& doc, int prec, QgsCoordinateReferenceSystem& crs, QgsAttributeList attrIndexes, QSet<QString> excludedAttributes ) /*const*/;
|
||||
QDomElement createFeatureGML2( QgsFeature* feat, QDomDocument& doc, int prec, QgsCoordinateReferenceSystem& crs, const QgsAttributeList& attrIndexes, const QSet<QString>& excludedAttributes ) /*const*/;
|
||||
|
||||
//methods to write GML3
|
||||
QDomElement createFeatureGML3( QgsFeature* feat, QDomDocument& doc, int prec, QgsCoordinateReferenceSystem& crs, QgsAttributeList attrIndexes, QSet<QString> excludedAttributes ) /*const*/;
|
||||
|
@ -95,7 +95,7 @@ class QgsWMSServer: public QgsOWSServer
|
||||
|
||||
/** Creates an xml document that describes the result of the getFeatureInfo request.
|
||||
@return 0 in case of success*/
|
||||
int getFeatureInfo( QDomDocument& result, QString version = "1.3.0" );
|
||||
int getFeatureInfo( QDomDocument& result, const QString& version = "1.3.0" );
|
||||
|
||||
/** Sets configuration parser for administration settings. Does not take ownership*/
|
||||
void setAdminConfigParser( QgsWMSConfigParser* parser ) { mConfigParser = parser; }
|
||||
|
@ -131,7 +131,7 @@ class QgsWMSProjectParser : public QgsWMSConfigParser
|
||||
|
||||
void addOWSLayers( QDomDocument &doc, QDomElement &parentElem, const QDomElement &legendElem,
|
||||
const QMap<QString, QgsMapLayer *> &layerMap, const QStringList &nonIdentifiableLayers,
|
||||
const QString& strHref, QgsRectangle& combinedBBox, QString strGroup ) const;
|
||||
const QString& strHref, QgsRectangle& combinedBBox, const QString& strGroup ) const;
|
||||
|
||||
/** Adds layers from a legend group to list (could be embedded or a normal group)*/
|
||||
//void addLayersFromGroup( const QDomElement& legendGroupElem, QMap< int, QgsMapLayer*>& layers, bool useCache = true ) const;
|
||||
|
@ -120,7 +120,7 @@ void QgsComposerManager::refreshComposers()
|
||||
}
|
||||
}
|
||||
|
||||
void QgsComposerManager::addTemplates( QMap<QString, QString> templates )
|
||||
void QgsComposerManager::addTemplates( const QMap<QString, QString>& templates )
|
||||
{
|
||||
if ( templates.size() > 0 )
|
||||
{
|
||||
@ -152,7 +152,7 @@ QMap<QString, QString> QgsComposerManager::otherTemplates() const
|
||||
{
|
||||
QMap<QString, QString> templateMap;
|
||||
QStringList paths = QgsApplication::composerTemplatePaths();
|
||||
Q_FOREACH ( QString path, paths )
|
||||
Q_FOREACH ( const QString& path, paths )
|
||||
{
|
||||
QMap<QString, QString> templates = templatesFromPath( path );
|
||||
QMap<QString, QString>::const_iterator templateIt = templates.constBegin();
|
||||
@ -165,7 +165,7 @@ QMap<QString, QString> QgsComposerManager::otherTemplates() const
|
||||
}
|
||||
|
||||
|
||||
QMap<QString, QString> QgsComposerManager::templatesFromPath( QString path ) const
|
||||
QMap<QString, QString> QgsComposerManager::templatesFromPath( const QString& path ) const
|
||||
{
|
||||
QMap<QString, QString> templateMap;
|
||||
|
||||
|
@ -52,7 +52,7 @@ class QgsComposerManager: public QDialog, private Ui::QgsComposerManagerBase
|
||||
QgsComposerManager( QWidget * parent = 0, Qt::WindowFlags f = 0 );
|
||||
~QgsComposerManager();
|
||||
|
||||
void addTemplates( QMap<QString, QString> templates );
|
||||
void addTemplates( const QMap<QString, QString>& templates );
|
||||
|
||||
public slots:
|
||||
/** Raise, unminimize and activate this window */
|
||||
@ -69,7 +69,7 @@ class QgsComposerManager: public QDialog, private Ui::QgsComposerManagerBase
|
||||
QMap<QString, QString> defaultTemplates( bool fromUser = false ) const;
|
||||
QMap<QString, QString> otherTemplates() const;
|
||||
|
||||
QMap<QString, QString> templatesFromPath( QString path ) const;
|
||||
QMap<QString, QString> templatesFromPath( const QString& path ) const;
|
||||
|
||||
/** Open local directory with user's system, creating it if not present
|
||||
*/
|
||||
|
@ -98,7 +98,7 @@ void QgsStatusBarCoordinatesWidget::setMapCanvas( QgsMapCanvas *mapCanvas )
|
||||
connect( mMapCanvas, SIGNAL( extentsChanged() ), this, SLOT( showExtent() ) );
|
||||
}
|
||||
|
||||
void QgsStatusBarCoordinatesWidget::setFont( QFont myFont )
|
||||
void QgsStatusBarCoordinatesWidget::setFont( const QFont& myFont )
|
||||
{
|
||||
mLineEdit->setFont( myFont );
|
||||
mLabel->setFont( myFont );
|
||||
|
@ -45,7 +45,7 @@ class APP_EXPORT QgsStatusBarCoordinatesWidget : public QWidget
|
||||
//! define the map canvas associated to the widget
|
||||
void setMapCanvas( QgsMapCanvas* mapCanvas );
|
||||
|
||||
void setFont( QFont myFont );
|
||||
void setFont( const QFont& myFont );
|
||||
|
||||
void setMouseCoordinatesPrecision( unsigned int precision );
|
||||
|
||||
|
@ -392,7 +392,7 @@ void QgsStyleV2ExportImportDialog::clearSelection()
|
||||
listItems->clearSelection();
|
||||
}
|
||||
|
||||
void QgsStyleV2ExportImportDialog::selectSymbols( const QStringList symbolNames )
|
||||
void QgsStyleV2ExportImportDialog::selectSymbols( const QStringList& symbolNames )
|
||||
{
|
||||
Q_FOREACH ( const QString &symbolName, symbolNames )
|
||||
{
|
||||
@ -404,7 +404,7 @@ void QgsStyleV2ExportImportDialog::selectSymbols( const QStringList symbolNames
|
||||
}
|
||||
}
|
||||
|
||||
void QgsStyleV2ExportImportDialog::deselectSymbols( const QStringList symbolNames )
|
||||
void QgsStyleV2ExportImportDialog::deselectSymbols( const QStringList& symbolNames )
|
||||
{
|
||||
Q_FOREACH ( const QString &symbolName, symbolNames )
|
||||
{
|
||||
@ -417,7 +417,7 @@ void QgsStyleV2ExportImportDialog::deselectSymbols( const QStringList symbolName
|
||||
}
|
||||
}
|
||||
|
||||
void QgsStyleV2ExportImportDialog::selectGroup( const QString groupName )
|
||||
void QgsStyleV2ExportImportDialog::selectGroup( const QString& groupName )
|
||||
{
|
||||
QStringList symbolNames = mQgisStyle->symbolsOfGroup( QgsStyleV2::SymbolEntity, mQgisStyle->groupId( groupName ) );
|
||||
selectSymbols( symbolNames );
|
||||
@ -426,7 +426,7 @@ void QgsStyleV2ExportImportDialog::selectGroup( const QString groupName )
|
||||
}
|
||||
|
||||
|
||||
void QgsStyleV2ExportImportDialog::deselectGroup( const QString groupName )
|
||||
void QgsStyleV2ExportImportDialog::deselectGroup( const QString& groupName )
|
||||
{
|
||||
QStringList symbolNames = mQgisStyle->symbolsOfGroup( QgsStyleV2::SymbolEntity, mQgisStyle->groupId( groupName ) );
|
||||
deselectSymbols( symbolNames );
|
||||
@ -434,7 +434,7 @@ void QgsStyleV2ExportImportDialog::deselectGroup( const QString groupName )
|
||||
deselectSymbols( symbolNames );
|
||||
}
|
||||
|
||||
void QgsStyleV2ExportImportDialog::selectSmartgroup( const QString groupName )
|
||||
void QgsStyleV2ExportImportDialog::selectSmartgroup( const QString& groupName )
|
||||
{
|
||||
QStringList symbolNames = mQgisStyle->symbolsOfSmartgroup( QgsStyleV2::SymbolEntity, mQgisStyle->smartgroupId( groupName ) );
|
||||
selectSymbols( symbolNames );
|
||||
@ -442,7 +442,7 @@ void QgsStyleV2ExportImportDialog::selectSmartgroup( const QString groupName )
|
||||
selectSymbols( symbolNames );
|
||||
}
|
||||
|
||||
void QgsStyleV2ExportImportDialog::deselectSmartgroup( const QString groupName )
|
||||
void QgsStyleV2ExportImportDialog::deselectSmartgroup( const QString& groupName )
|
||||
{
|
||||
QStringList symbolNames = mQgisStyle->symbolsOfSmartgroup( QgsStyleV2::SymbolEntity, mQgisStyle->smartgroupId( groupName ) );
|
||||
deselectSymbols( symbolNames );
|
||||
|
@ -50,12 +50,12 @@ class GUI_EXPORT QgsStyleV2ExportImportDialog : public QDialog, private Ui::QgsS
|
||||
* @brief selectSymbols select symbols by name
|
||||
* @param symbolNames list of symbol names
|
||||
*/
|
||||
void selectSymbols( const QStringList symbolNames );
|
||||
void selectSymbols( const QStringList& symbolNames );
|
||||
/**
|
||||
* @brief deselectSymbols deselect symbols by name
|
||||
* @param symbolNames list of symbol names
|
||||
*/
|
||||
void deselectSymbols( const QStringList symbolNames );
|
||||
void deselectSymbols( const QStringList& symbolNames );
|
||||
|
||||
public slots:
|
||||
void doExportImport();
|
||||
@ -75,22 +75,22 @@ class GUI_EXPORT QgsStyleV2ExportImportDialog : public QDialog, private Ui::QgsS
|
||||
* Select the symbols belonging to the given group
|
||||
* @param groupName the name of the group to be selected
|
||||
*/
|
||||
void selectGroup( const QString groupName );
|
||||
void selectGroup( const QString& groupName );
|
||||
/**
|
||||
* Unselect the symbols belonging to the given group
|
||||
* @param groupName the name of the group to be deselected
|
||||
*/
|
||||
void deselectGroup( const QString groupName );
|
||||
void deselectGroup( const QString& groupName );
|
||||
/**
|
||||
* @brief selectSmartgroup selects all symbols from a smart group
|
||||
* @param groupName
|
||||
*/
|
||||
void selectSmartgroup( const QString groupName );
|
||||
void selectSmartgroup( const QString& groupName );
|
||||
/**
|
||||
* @brief deselectSmartgroup deselects all symbols from a smart group
|
||||
* @param groupName
|
||||
*/
|
||||
void deselectSmartgroup( const QString groupName );
|
||||
void deselectSmartgroup( const QString& groupName );
|
||||
|
||||
void importTypeChanged( int );
|
||||
void browse();
|
||||
|
@ -36,20 +36,20 @@ class GUI_EXPORT QgsStyleV2GroupSelectionDialog : public QDialog, private Ui::Sy
|
||||
|
||||
signals:
|
||||
//! group with groupName has been selected
|
||||
void groupSelected( const QString groupName );
|
||||
void groupSelected( const QString& groupName );
|
||||
//! group with groupName has been deselected
|
||||
void groupDeselected( const QString groupName );
|
||||
void groupDeselected( const QString& groupName );
|
||||
//! smartgroup with groupName has been selected
|
||||
void smartgroupSelected( const QString groupName );
|
||||
void smartgroupSelected( const QString& groupName );
|
||||
//! smart group with groupName has been deselected
|
||||
void smartgroupDeselected( const QString groupName );
|
||||
void smartgroupDeselected( const QString& groupName );
|
||||
//! all deselected
|
||||
void allDeselected( );
|
||||
//! all selected
|
||||
void allSelected( );
|
||||
|
||||
private slots:
|
||||
void groupTreeSelectionChanged( const QItemSelection&selected, const QItemSelection& deselected );
|
||||
void groupTreeSelectionChanged( const QItemSelection& selected, const QItemSelection& deselected );
|
||||
|
||||
private:
|
||||
/**
|
||||
|
@ -53,6 +53,6 @@ class eVisDatabaseLayerFieldSelectionGui : public QDialog, private Ui::eVisDatab
|
||||
|
||||
signals:
|
||||
/** \brief Signal emitted when the user has entered the layername, selected the field names, and pressed the accept button */
|
||||
void eVisDatabaseLayerFieldsSelected( QString, QString, QString );
|
||||
void eVisDatabaseLayerFieldsSelected( const QString&, const QString&, const QString& );
|
||||
};
|
||||
#endif
|
||||
|
@ -28,7 +28,7 @@ QgsCapabilitiesCache::~QgsCapabilitiesCache()
|
||||
{
|
||||
}
|
||||
|
||||
const QDomDocument* QgsCapabilitiesCache::searchCapabilitiesDocument( QString configFilePath, QString version )
|
||||
const QDomDocument* QgsCapabilitiesCache::searchCapabilitiesDocument( const QString& configFilePath, const QString& version )
|
||||
{
|
||||
QCoreApplication::processEvents(); //get updates from file system watcher
|
||||
|
||||
@ -42,7 +42,7 @@ const QDomDocument* QgsCapabilitiesCache::searchCapabilitiesDocument( QString co
|
||||
}
|
||||
}
|
||||
|
||||
void QgsCapabilitiesCache::insertCapabilitiesDocument( QString configFilePath, QString version, const QDomDocument* doc )
|
||||
void QgsCapabilitiesCache::insertCapabilitiesDocument( const QString& configFilePath, const QString& version, const QDomDocument* doc )
|
||||
{
|
||||
if ( mCachedCapabilities.size() > 40 )
|
||||
{
|
||||
|
@ -32,9 +32,9 @@ class SERVER_EXPORT QgsCapabilitiesCache : public QObject
|
||||
~QgsCapabilitiesCache();
|
||||
|
||||
/** Returns cached capabilities document (or 0 if document for configuration file not in cache)*/
|
||||
const QDomDocument* searchCapabilitiesDocument( QString configFilePath, QString version );
|
||||
const QDomDocument* searchCapabilitiesDocument( const QString& configFilePath, const QString& version );
|
||||
/** Inserts new capabilities document (creates a copy of the document, does not take ownership)*/
|
||||
void insertCapabilitiesDocument( QString configFilePath, QString version, const QDomDocument* doc );
|
||||
void insertCapabilitiesDocument( const QString& configFilePath, const QString& version, const QDomDocument* doc );
|
||||
|
||||
private:
|
||||
QHash< QString, QHash< QString, QDomDocument > > mCachedCapabilities;
|
||||
|
@ -67,7 +67,7 @@ QString QgsMSUtils::createTempFilePath()
|
||||
return tempFilePath;
|
||||
}
|
||||
|
||||
int QgsMSUtils::createTextFile( QString filePath, const QString& text )
|
||||
int QgsMSUtils::createTextFile( const QString& filePath, const QString& text )
|
||||
{
|
||||
QFile file( filePath );
|
||||
if ( file.open( QIODevice::WriteOnly | QIODevice::Text ) )
|
||||
|
@ -25,7 +25,7 @@ namespace QgsMSUtils
|
||||
the current working directory on windows*/
|
||||
QString createTempFilePath();
|
||||
/** Stores the specified text in a temporary file. Returns 0 in case of success*/
|
||||
int createTextFile( QString filePath, const QString& text );
|
||||
int createTextFile( const QString& filePath, const QString& text );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -422,7 +422,7 @@ bool QgsServer::init( int & argc, char ** argv )
|
||||
* @param queryString
|
||||
* @return response headers and body
|
||||
*/
|
||||
QPair<QByteArray, QByteArray> QgsServer::handleRequest( const QString queryString /*= QString( )*/ )
|
||||
QPair<QByteArray, QByteArray> QgsServer::handleRequest( const QString& queryString /*= QString( )*/ )
|
||||
{
|
||||
// Run init if handleRequest was called without previously initialising
|
||||
// the server
|
||||
|
@ -69,7 +69,7 @@ class SERVER_EXPORT QgsServer
|
||||
* @param queryString optional QString containing the query string
|
||||
* @return the response headers and body QPair of QByteArray if called from python bindings, empty otherwise
|
||||
*/
|
||||
QPair<QByteArray, QByteArray> handleRequest( const QString queryString = QString( ) );
|
||||
QPair<QByteArray, QByteArray> handleRequest( const QString& queryString = QString( ) );
|
||||
/* The following code was used to test type conversion in python bindings
|
||||
QPair<QByteArray, QByteArray> testQPair( QPair<QByteArray, QByteArray> pair );
|
||||
*/
|
||||
|
@ -99,7 +99,7 @@ class SERVER_EXPORT QgsServerInterface
|
||||
* Set the configuration file path
|
||||
* @param configFilePath QString with the configuration file path
|
||||
*/
|
||||
virtual void setConfigFilePath( QString configFilePath ) = 0;
|
||||
virtual void setConfigFilePath( const QString& configFilePath ) = 0;
|
||||
|
||||
private:
|
||||
QString mConfigFilePath;
|
||||
|
@ -49,7 +49,7 @@ void QgsServerInterfaceImpl::setRequestHandler( QgsRequestHandler * requestHandl
|
||||
mRequestHandler = requestHandler;
|
||||
}
|
||||
|
||||
void QgsServerInterfaceImpl::setConfigFilePath( QString configFilePath )
|
||||
void QgsServerInterfaceImpl::setConfigFilePath( const QString& configFilePath )
|
||||
{
|
||||
mConfigFilePath = configFilePath;
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ class QgsServerInterfaceImpl : public QgsServerInterface
|
||||
QgsServerFiltersMap filters( ) override { return mFilters; }
|
||||
QString getEnv( const QString& name ) const override;
|
||||
QString configFilePath( ) override { return mConfigFilePath; }
|
||||
void setConfigFilePath( QString configFilePath ) override;
|
||||
void setConfigFilePath( const QString& configFilePath ) override;
|
||||
void setFilters( QgsServerFiltersMap *filters ) override;
|
||||
|
||||
private:
|
||||
|
@ -59,7 +59,7 @@ QgsServerLogger::QgsServerLogger(): mLogFile( 0 )
|
||||
SLOT( logMessage( QString, QString, QgsMessageLog::MessageLevel ) ) );
|
||||
}
|
||||
|
||||
void QgsServerLogger::logMessage( QString message, QString tag, QgsMessageLog::MessageLevel level )
|
||||
void QgsServerLogger::logMessage( const QString& message, const QString& tag, QgsMessageLog::MessageLevel level )
|
||||
{
|
||||
Q_UNUSED( tag );
|
||||
if ( !mLogFile.isOpen() || mLogLevel > level )
|
||||
|
@ -36,7 +36,7 @@ class QgsServerLogger: public QObject
|
||||
//QString logFile() const { return mLogFile; }
|
||||
|
||||
public slots:
|
||||
void logMessage( QString message, QString tag, QgsMessageLog::MessageLevel level );
|
||||
void logMessage( const QString& message, const QString& tag, QgsMessageLog::MessageLevel level );
|
||||
|
||||
protected:
|
||||
QgsServerLogger();
|
||||
|
@ -1230,7 +1230,7 @@ void QgsWFSServer::startGetFeature( QgsRequestHandler& request, const QString& f
|
||||
fcString = "";
|
||||
}
|
||||
|
||||
void QgsWFSServer::setGetFeature( QgsRequestHandler& request, const QString& format, QgsFeature* feat, int featIdx, int prec, QgsCoordinateReferenceSystem& crs, QgsAttributeList attrIndexes, QSet<QString> excludedAttributes ) /*const*/
|
||||
void QgsWFSServer::setGetFeature( QgsRequestHandler& request, const QString& format, QgsFeature* feat, int featIdx, int prec, QgsCoordinateReferenceSystem& crs, const QgsAttributeList& attrIndexes, const QSet<QString>& excludedAttributes ) /*const*/
|
||||
{
|
||||
if ( !feat->isValid() )
|
||||
return;
|
||||
@ -1635,7 +1635,7 @@ QDomDocument QgsWFSServer::transaction( const QString& requestBody )
|
||||
return resp;
|
||||
}
|
||||
|
||||
QgsFeatureIds QgsWFSServer::getFeatureIdsFromFilter( QDomElement filterElem, QgsVectorLayer* layer )
|
||||
QgsFeatureIds QgsWFSServer::getFeatureIdsFromFilter( const QDomElement& filterElem, QgsVectorLayer* layer )
|
||||
{
|
||||
QgsFeatureIds fids;
|
||||
|
||||
@ -1689,7 +1689,7 @@ QgsFeatureIds QgsWFSServer::getFeatureIdsFromFilter( QDomElement filterElem, Qgs
|
||||
return fids;
|
||||
}
|
||||
|
||||
QString QgsWFSServer::createFeatureGeoJSON( QgsFeature* feat, int prec, QgsCoordinateReferenceSystem &, QgsAttributeList attrIndexes, QSet<QString> excludedAttributes ) /*const*/
|
||||
QString QgsWFSServer::createFeatureGeoJSON( QgsFeature* feat, int prec, QgsCoordinateReferenceSystem &, const QgsAttributeList& attrIndexes, const QSet<QString>& excludedAttributes ) /*const*/
|
||||
{
|
||||
QString fStr = "{\"type\": \"Feature\",\n";
|
||||
|
||||
@ -1768,7 +1768,7 @@ QString QgsWFSServer::createFeatureGeoJSON( QgsFeature* feat, int prec, QgsCoord
|
||||
return fStr;
|
||||
}
|
||||
|
||||
QDomElement QgsWFSServer::createFeatureGML2( QgsFeature* feat, QDomDocument& doc, int prec, QgsCoordinateReferenceSystem& crs, QgsAttributeList attrIndexes, QSet<QString> excludedAttributes ) /*const*/
|
||||
QDomElement QgsWFSServer::createFeatureGML2( QgsFeature* feat, QDomDocument& doc, int prec, QgsCoordinateReferenceSystem& crs, const QgsAttributeList& attrIndexes, const QSet<QString>& excludedAttributes ) /*const*/
|
||||
{
|
||||
//gml:FeatureMember
|
||||
QDomElement featureElement = doc.createElement( "gml:featureMember"/*wfs:FeatureMember*/ );
|
||||
@ -1841,7 +1841,7 @@ QDomElement QgsWFSServer::createFeatureGML2( QgsFeature* feat, QDomDocument& doc
|
||||
return featureElement;
|
||||
}
|
||||
|
||||
QDomElement QgsWFSServer::createFeatureGML3( QgsFeature* feat, QDomDocument& doc, int prec, QgsCoordinateReferenceSystem& crs, QgsAttributeList attrIndexes, QSet<QString> excludedAttributes ) /*const*/
|
||||
QDomElement QgsWFSServer::createFeatureGML3( QgsFeature* feat, QDomDocument& doc, int prec, QgsCoordinateReferenceSystem& crs, const QgsAttributeList& attrIndexes, const QSet<QString>& excludedAttributes ) /*const*/
|
||||
{
|
||||
//gml:FeatureMember
|
||||
QDomElement featureElement = doc.createElement( "gml:featureMember"/*wfs:FeatureMember*/ );
|
||||
|
@ -105,20 +105,20 @@ class QgsWFSServer: public QgsOWSServer
|
||||
protected:
|
||||
|
||||
void startGetFeature( QgsRequestHandler& request, const QString& format, int prec, QgsCoordinateReferenceSystem& crs, QgsRectangle* rect );
|
||||
void setGetFeature( QgsRequestHandler& request, const QString& format, QgsFeature* feat, int featIdx, int prec, QgsCoordinateReferenceSystem& crs, QgsAttributeList attrIndexes, QSet<QString> excludedAttributes );
|
||||
void setGetFeature( QgsRequestHandler& request, const QString& format, QgsFeature* feat, int featIdx, int prec, QgsCoordinateReferenceSystem& crs, const QgsAttributeList& attrIndexes, const QSet<QString>& excludedAttributes );
|
||||
void endGetFeature( QgsRequestHandler& request, const QString& format );
|
||||
|
||||
//method for transaction
|
||||
QgsFeatureIds getFeatureIdsFromFilter( QDomElement filter, QgsVectorLayer* layer );
|
||||
QgsFeatureIds getFeatureIdsFromFilter( const QDomElement& filter, QgsVectorLayer* layer );
|
||||
|
||||
//methods to write GeoJSON
|
||||
QString createFeatureGeoJSON( QgsFeature* feat, int prec, QgsCoordinateReferenceSystem& crs, QgsAttributeList attrIndexes, QSet<QString> excludedAttributes ) /*const*/;
|
||||
QString createFeatureGeoJSON( QgsFeature* feat, int prec, QgsCoordinateReferenceSystem& crs, const QgsAttributeList& attrIndexes, const QSet<QString>& excludedAttributes ) /*const*/;
|
||||
|
||||
//methods to write GML2
|
||||
QDomElement createFeatureGML2( QgsFeature* feat, QDomDocument& doc, int prec, QgsCoordinateReferenceSystem& crs, QgsAttributeList attrIndexes, QSet<QString> excludedAttributes ) /*const*/;
|
||||
QDomElement createFeatureGML2( QgsFeature* feat, QDomDocument& doc, int prec, QgsCoordinateReferenceSystem& crs, const QgsAttributeList& attrIndexes, const QSet<QString>& excludedAttributes ) /*const*/;
|
||||
|
||||
//methods to write GML3
|
||||
QDomElement createFeatureGML3( QgsFeature* feat, QDomDocument& doc, int prec, QgsCoordinateReferenceSystem& crs, QgsAttributeList attrIndexes, QSet<QString> excludedAttributes ) /*const*/;
|
||||
QDomElement createFeatureGML3( QgsFeature* feat, QDomDocument& doc, int prec, QgsCoordinateReferenceSystem& crs, const QgsAttributeList& attrIndexes, const QSet<QString>& excludedAttributes ) /*const*/;
|
||||
|
||||
void addTransactionResult( QDomDocument& responseDoc, QDomElement& responseElem, const QString& status, const QString& locator, const QString& message );
|
||||
};
|
||||
|
@ -1242,7 +1242,7 @@ void QgsWMSProjectParser::addOWSLayers( QDomDocument &doc,
|
||||
const QStringList &nonIdentifiableLayers,
|
||||
const QString& strHref,
|
||||
QgsRectangle& combinedBBox,
|
||||
QString strGroup ) const
|
||||
const QString& strGroup ) const
|
||||
{
|
||||
const QgsCoordinateReferenceSystem& projectCrs = mProjectParser->projectCRS();
|
||||
QDomNodeList legendChildren = legendElem.childNodes();
|
||||
|
@ -145,7 +145,7 @@ class SERVER_EXPORT QgsWMSProjectParser : public QgsWMSConfigParser
|
||||
|
||||
void addOWSLayers( QDomDocument &doc, QDomElement &parentElem, const QDomElement &legendElem,
|
||||
const QMap<QString, QgsMapLayer *> &layerMap, const QStringList &nonIdentifiableLayers,
|
||||
const QString& strHref, QgsRectangle& combinedBBox, QString strGroup ) const;
|
||||
const QString& strHref, QgsRectangle& combinedBBox, const QString& strGroup ) const;
|
||||
|
||||
/** Adds layers from a legend group to list (could be embedded or a normal group)*/
|
||||
void addLayersFromGroup( const QDomElement& legendGroupElem, QMap< int, QgsMapLayer*>& layers, bool useCache = true ) const;
|
||||
|
@ -1403,7 +1403,7 @@ void QgsWMSServer::getMapAsDxf()
|
||||
d.close();
|
||||
}
|
||||
|
||||
int QgsWMSServer::getFeatureInfo( QDomDocument& result, QString version )
|
||||
int QgsWMSServer::getFeatureInfo( QDomDocument& result, const QString& version )
|
||||
{
|
||||
if ( !mMapRenderer || !mConfigParser )
|
||||
{
|
||||
@ -2016,8 +2016,8 @@ int QgsWMSServer::featureInfoFromVectorLayer( QgsVectorLayer* layer,
|
||||
QDomElement& layerElement,
|
||||
QgsMapRenderer* mapRender,
|
||||
QgsRenderContext& renderContext,
|
||||
QString version,
|
||||
QString infoFormat,
|
||||
const QString& version,
|
||||
const QString& infoFormat,
|
||||
QgsRectangle* featureBBox ) const
|
||||
{
|
||||
if ( !layer || !mapRender )
|
||||
@ -2205,8 +2205,8 @@ int QgsWMSServer::featureInfoFromRasterLayer( QgsRasterLayer* layer,
|
||||
const QgsPoint* infoPoint,
|
||||
QDomDocument& infoDocument,
|
||||
QDomElement& layerElement,
|
||||
QString version,
|
||||
QString infoFormat ) const
|
||||
const QString& version,
|
||||
const QString& infoFormat ) const
|
||||
{
|
||||
Q_UNUSED( version );
|
||||
|
||||
@ -2984,7 +2984,7 @@ QDomElement QgsWMSServer::createFeatureGML(
|
||||
QgsVectorLayer* layer,
|
||||
QDomDocument& doc,
|
||||
QgsCoordinateReferenceSystem& crs,
|
||||
QString typeName,
|
||||
const QString& typeName,
|
||||
bool withGeom,
|
||||
int version ) const
|
||||
{
|
||||
|
@ -100,7 +100,7 @@ class QgsWMSServer: public QgsOWSServer
|
||||
|
||||
/** Creates an xml document that describes the result of the getFeatureInfo request.
|
||||
@return 0 in case of success*/
|
||||
int getFeatureInfo( QDomDocument& result, QString version = "1.3.0" );
|
||||
int getFeatureInfo( QDomDocument& result, const QString& version = "1.3.0" );
|
||||
|
||||
/** Sets configuration parser for administration settings. Does not take ownership*/
|
||||
void setAdminConfigParser( QgsWMSConfigParser* parser ) { mConfigParser = parser; }
|
||||
@ -147,16 +147,16 @@ class QgsWMSServer: public QgsOWSServer
|
||||
QDomElement& layerElement,
|
||||
QgsMapRenderer* mapRender,
|
||||
QgsRenderContext& renderContext,
|
||||
QString version,
|
||||
QString infoFormat,
|
||||
const QString& version,
|
||||
const QString& infoFormat,
|
||||
QgsRectangle* featureBBox = 0 ) const;
|
||||
/** Appends feature info xml for the layer to the layer element of the dom document*/
|
||||
int featureInfoFromRasterLayer( QgsRasterLayer* layer,
|
||||
const QgsPoint* infoPoint,
|
||||
QDomDocument& infoDocument,
|
||||
QDomElement& layerElement,
|
||||
QString version,
|
||||
QString infoFormat ) const;
|
||||
const QString& version,
|
||||
const QString& infoFormat ) const;
|
||||
|
||||
/** Creates a layer set and returns a stringlist with layer ids that can be passed to a QgsMapRenderer. Usually used in conjunction with readLayersAndStyles
|
||||
@param scaleDenominator Filter out layer if scale based visibility does not match (or use -1 if no scale restriction)*/
|
||||
@ -236,14 +236,13 @@ class QgsWMSServer: public QgsOWSServer
|
||||
bool mDrawLegendLayerLabel;
|
||||
bool mDrawLegendItemLabel;
|
||||
|
||||
QDomElement createFeatureGML(
|
||||
QgsFeature* feat,
|
||||
QgsVectorLayer* layer,
|
||||
QDomDocument& doc,
|
||||
QgsCoordinateReferenceSystem& crs,
|
||||
QString typeName,
|
||||
bool withGeom,
|
||||
int version ) const;
|
||||
QDomElement createFeatureGML( QgsFeature* feat,
|
||||
QgsVectorLayer* layer,
|
||||
QDomDocument& doc,
|
||||
QgsCoordinateReferenceSystem& crs,
|
||||
const QString& typeName,
|
||||
bool withGeom,
|
||||
int version ) const;
|
||||
|
||||
/** Replaces attribute value with ValueRelation or ValueRelation if defined. Otherwise returns the original value*/
|
||||
static QString replaceValueMapAndRelation( QgsVectorLayer* vl, int idx, const QString& attributeVal );
|
||||
|
Loading…
x
Reference in New Issue
Block a user