Skip to content
Permalink
Browse files
QMap::unite is gone in Qt6, use QMultiMap
  • Loading branch information
nirvn committed Jul 17, 2021
1 parent 79ae6db commit d10695cf77628501b7d450949068b89523472f41
@@ -668,7 +668,7 @@ Returns the provider key.
.. versionadded:: 3.16
%End

virtual QMap<Qgis::SqlKeywordCategory, QStringList> sqlDictionary();
virtual QMultiMap<Qgis::SqlKeywordCategory, QStringList> sqlDictionary();
%Docstring
Returns a dictionary of SQL keywords supported by the provider.
The default implementation returns an list of common reserved words under the
@@ -714,7 +714,7 @@ QgsFields QgsGeoPackageProviderConnection::fields( const QString &schema, const
return fieldList;
}

QMap<Qgis::SqlKeywordCategory, QStringList> QgsGeoPackageProviderConnection::sqlDictionary()
QMultiMap<Qgis::SqlKeywordCategory, QStringList> QgsGeoPackageProviderConnection::sqlDictionary()
{
/*
* last_insert_rowid + list from: http://www.gaia-gis.it/gaia-sins/spatialite-sql-4.2.0.html
@@ -81,7 +81,7 @@ class QgsGeoPackageProviderConnection : public QgsAbstractDatabaseProviderConnec
QIcon icon() const override;
QList<QgsVectorDataProvider::NativeType> nativeTypes() const override;
QgsFields fields( const QString &schema, const QString &table ) const override;
QMap<Qgis::SqlKeywordCategory, QStringList> sqlDictionary() override;
QMultiMap<Qgis::SqlKeywordCategory, QStringList> sqlDictionary() override;

private:

@@ -74,7 +74,7 @@ QString QgsAbstractDatabaseProviderConnection::providerKey() const
///@endcond


QMap<Qgis::SqlKeywordCategory, QStringList> QgsAbstractDatabaseProviderConnection::sqlDictionary()
QMultiMap<Qgis::SqlKeywordCategory, QStringList> QgsAbstractDatabaseProviderConnection::sqlDictionary()
{
return
{
@@ -788,7 +788,7 @@ class CORE_EXPORT QgsAbstractDatabaseProviderConnection : public QgsAbstractProv
*
* \since QGIS 3.22
*/
virtual QMap<Qgis::SqlKeywordCategory, QStringList> sqlDictionary();
virtual QMultiMap<Qgis::SqlKeywordCategory, QStringList> sqlDictionary();

protected:

@@ -322,7 +322,7 @@ QList<QgsVectorDataProvider::NativeType> QgsOracleProviderConnection::nativeType
return types;
}

QMap<Qgis::SqlKeywordCategory, QStringList> QgsOracleProviderConnection::sqlDictionary()
QMultiMap<Qgis::SqlKeywordCategory, QStringList> QgsOracleProviderConnection::sqlDictionary()
{
return
{
@@ -72,7 +72,7 @@ class QgsOracleProviderConnection : public QgsAbstractDatabaseProviderConnection
void remove( const QString &name ) const override;
QIcon icon() const override;
QList<QgsVectorDataProvider::NativeType> nativeTypes() const override;
QMap<Qgis::SqlKeywordCategory, QStringList> sqlDictionary() override;
QMultiMap<Qgis::SqlKeywordCategory, QStringList> sqlDictionary() override;
QgsVectorLayer *createSqlVectorLayer( const SqlVectorLayerOptions &options ) const override;

private:
@@ -807,7 +807,7 @@ QgsVectorLayer *QgsPostgresProviderConnection::createSqlVectorLayer( const SqlVe
return new QgsVectorLayer{ tUri.uri(), options.layerName.isEmpty() ? QStringLiteral( "QueryLayer" ) : options.layerName, providerKey(), vectorLayerOptions };
}

QMap<Qgis::SqlKeywordCategory, QStringList> QgsPostgresProviderConnection::sqlDictionary()
QMultiMap<Qgis::SqlKeywordCategory, QStringList> QgsPostgresProviderConnection::sqlDictionary()
{
return QgsAbstractDatabaseProviderConnection::sqlDictionary().unite(
{
@@ -77,7 +77,7 @@ class QgsPostgresProviderConnection : public QgsAbstractDatabaseProviderConnecti
QIcon icon() const override;
QList<QgsVectorDataProvider::NativeType> nativeTypes() const override;
QgsVectorLayer *createSqlVectorLayer( const SqlVectorLayerOptions &options ) const override;
QMap<Qgis::SqlKeywordCategory, QStringList> sqlDictionary() override;
QMultiMap<Qgis::SqlKeywordCategory, QStringList> sqlDictionary() override;

private:

@@ -668,7 +668,7 @@ QString QgsSpatiaLiteProviderConnection::pathFromUri() const
return dsUri.database();
}

QMap<Qgis::SqlKeywordCategory, QStringList> QgsSpatiaLiteProviderConnection::sqlDictionary()
QMultiMap<Qgis::SqlKeywordCategory, QStringList> QgsSpatiaLiteProviderConnection::sqlDictionary()
{
/*
* List from: http://www.gaia-gis.it/gaia-sins/spatialite-sql-4.2.0.html
@@ -79,7 +79,7 @@ class QgsSpatiaLiteProviderConnection : public QgsAbstractDatabaseProviderConnec
QIcon icon() const override;
void deleteField( const QString &fieldName, const QString &schema, const QString &tableName, bool force ) const override;
QList<QgsVectorDataProvider::NativeType> nativeTypes() const override;
QMap<Qgis::SqlKeywordCategory, QStringList> sqlDictionary() override;
QMultiMap<Qgis::SqlKeywordCategory, QStringList> sqlDictionary() override;

private:

0 comments on commit d10695c

Please sign in to comment.