diff options
author | Michele Calgaro <[email protected]> | 2019-06-01 20:03:50 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2019-06-01 20:03:50 +0900 |
commit | 09f45583d97c73e309a93447707b0acebfbddea8 (patch) | |
tree | d0941a11d3399f967e2c8ff8c10e6d0dff845e0f /src/sql | |
parent | 8e3ec3023bdb4e1c61f0b5db945a09628e4fbae2 (diff) | |
download | qt3-09f45583d97c73e309a93447707b0acebfbddea8.tar.gz qt3-09f45583d97c73e309a93447707b0acebfbddea8.zip |
Adjusted to use new QStringVariantMap type.
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'src/sql')
-rw-r--r-- | src/sql/qsqlextension_p.cpp | 4 | ||||
-rw-r--r-- | src/sql/qsqlextension_p.h | 2 | ||||
-rw-r--r-- | src/sql/qsqlquery.cpp | 8 | ||||
-rw-r--r-- | src/sql/qsqlquery.h | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/src/sql/qsqlextension_p.cpp b/src/sql/qsqlextension_p.cpp index da6a2ac..27fdca8 100644 --- a/src/sql/qsqlextension_p.cpp +++ b/src/sql/qsqlextension_p.cpp @@ -128,10 +128,10 @@ QVariant QSqlExtension::boundValue( int pos ) const return values[ index[ pos ] ].value; } -QMap<QString, QVariant> QSqlExtension::boundValues() const +QStringVariantMap QSqlExtension::boundValues() const { QMap<QString, QSqlParam>::ConstIterator it; - QMap<QString, QVariant> m; + QStringVariantMap m; if ( bindm == BindByName ) { for ( it = values.begin(); it != values.end(); ++it ) m.insert( it.key(), it.data().value ); diff --git a/src/sql/qsqlextension_p.h b/src/sql/qsqlextension_p.h index 1379d91..db64f9c 100644 --- a/src/sql/qsqlextension_p.h +++ b/src/sql/qsqlextension_p.h @@ -102,7 +102,7 @@ public: virtual QVariant parameterValue( int pos ); QVariant boundValue( const QString& holder ) const; QVariant boundValue( int pos ) const; - QMap<QString, QVariant> boundValues() const; + QStringVariantMap boundValues() const; void clear(); void clearValues(); void clearIndex(); diff --git a/src/sql/qsqlquery.cpp b/src/sql/qsqlquery.cpp index fec2343..ad49b8a 100644 --- a/src/sql/qsqlquery.cpp +++ b/src/sql/qsqlquery.cpp @@ -1173,8 +1173,8 @@ QVariant QSqlQuery::boundValue( int pos ) const QSqlQuery query; ... // Examine the bound values - bound using named binding - QMap<QString, QVariant>::ConstIterator it; - QMap<QString, QVariant> vals = query.boundValues(); + QStringVariantMap::ConstIterator it; + QStringVariantMap vals = query.boundValues(); for ( it = vals.begin(); it != vals.end(); ++it ) qWarning( "Placeholder: " + it.key() + ", Value: " + (*it).toString() ); ... @@ -1189,10 +1189,10 @@ QVariant QSqlQuery::boundValue( int pos ) const \endcode */ -QMap<QString,QVariant> QSqlQuery::boundValues() const +QStringVariantMap QSqlQuery::boundValues() const { if ( !d->sqlResult || !d->sqlResult->extension() ) - return QMap<QString,QVariant>(); + return QStringVariantMap(); return d->sqlResult->extension()->boundValues(); } diff --git a/src/sql/qsqlquery.h b/src/sql/qsqlquery.h index cf176d8..4e52a88 100644 --- a/src/sql/qsqlquery.h +++ b/src/sql/qsqlquery.h @@ -114,7 +114,7 @@ public: void addBindValue( const QVariant& val, QSql::ParameterType type ); QVariant boundValue( const QString& placeholder ) const; QVariant boundValue( int pos ) const; - QMap<QString, QVariant> boundValues() const; + QStringVariantMap boundValues() const; QString executedQuery() const; protected: |