Skip to content

Commit

Permalink
QMap::unite is gone in Qt6, use QMultiMap
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Jul 17, 2021
1 parent 79ae6db commit d10695c
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/core/providers/ogr/qgsgeopackageproviderconnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/core/providers/ogr/qgsgeopackageproviderconnection.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ QString QgsAbstractDatabaseProviderConnection::providerKey() const
///@endcond


QMap<Qgis::SqlKeywordCategory, QStringList> QgsAbstractDatabaseProviderConnection::sqlDictionary()
QMultiMap<Qgis::SqlKeywordCategory, QStringList> QgsAbstractDatabaseProviderConnection::sqlDictionary()
{
return
{
Expand Down
2 changes: 1 addition & 1 deletion src/core/providers/qgsabstractdatabaseproviderconnection.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion src/providers/oracle/qgsoracleproviderconnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ QList<QgsVectorDataProvider::NativeType> QgsOracleProviderConnection::nativeType
return types;
}

QMap<Qgis::SqlKeywordCategory, QStringList> QgsOracleProviderConnection::sqlDictionary()
QMultiMap<Qgis::SqlKeywordCategory, QStringList> QgsOracleProviderConnection::sqlDictionary()
{
return
{
Expand Down
2 changes: 1 addition & 1 deletion src/providers/oracle/qgsoracleproviderconnection.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/providers/postgres/qgspostgresproviderconnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(
{
Expand Down
2 changes: 1 addition & 1 deletion src/providers/postgres/qgspostgresproviderconnection.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/providers/spatialite/qgsspatialiteproviderconnection.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down

0 comments on commit d10695c

Please sign in to comment.