summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2019-06-01 20:03:50 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2019-06-01 20:03:50 +0900
commit09f45583d97c73e309a93447707b0acebfbddea8 (patch)
treed0941a11d3399f967e2c8ff8c10e6d0dff845e0f
parent8e3ec3023bdb4e1c61f0b5db945a09628e4fbae2 (diff)
downloadqt3-09f45583d97c73e309a93447707b0acebfbddea8.tar.gz
qt3-09f45583d97c73e309a93447707b0acebfbddea8.zip
Adjusted to use new QStringVariantMap type.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rw-r--r--src/sql/qsqlextension_p.cpp4
-rw-r--r--src/sql/qsqlextension_p.h2
-rw-r--r--src/sql/qsqlquery.cpp8
-rw-r--r--src/sql/qsqlquery.h2
-rw-r--r--tools/designer/designer/metadatabase.cpp6
-rw-r--r--tools/designer/designer/metadatabase.h2
-rw-r--r--tools/designer/designer/resource.cpp4
7 files changed, 14 insertions, 14 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:
diff --git a/tools/designer/designer/metadatabase.cpp b/tools/designer/designer/metadatabase.cpp
index 48422b1..9aba982 100644
--- a/tools/designer/designer/metadatabase.cpp
+++ b/tools/designer/designer/metadatabase.cpp
@@ -64,7 +64,7 @@ class MetaDataBaseRecord
public:
QObject *object;
QStringList changedProperties;
- QMap<QString,QVariant> fakeProperties;
+ QStringVariantMap fakeProperties;
QMap<QString, QString> propertyComments;
int spacing, margin;
QString resizeMode;
@@ -272,14 +272,14 @@ QVariant MetaDataBase::fakeProperty( QObject * o, const QString &property)
o, o->name(), o->className() );
return QVariant();
}
- QMap<QString, QVariant>::Iterator it = r->fakeProperties.find( property );
+ QStringVariantMap::Iterator it = r->fakeProperties.find( property );
if ( it != r->fakeProperties.end() )
return r->fakeProperties[property];
return WidgetFactory::defaultValue( o, property );
}
-QMap<QString,QVariant>* MetaDataBase::fakeProperties( QObject* o )
+QStringVariantMap* MetaDataBase::fakeProperties( QObject* o )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );
diff --git a/tools/designer/designer/metadatabase.h b/tools/designer/designer/metadatabase.h
index 707cc69..dc34d24 100644
--- a/tools/designer/designer/metadatabase.h
+++ b/tools/designer/designer/metadatabase.h
@@ -162,7 +162,7 @@ public:
static void setFakeProperty( QObject *o, const QString &property, const QVariant& value );
static QVariant fakeProperty( QObject * o, const QString &property );
- static QMap<QString,QVariant>* fakeProperties( QObject* o );
+ static QStringVariantMap* fakeProperties( QObject* o );
static void setSpacing( QObject *o, int spacing );
static int spacing( QObject *o );
diff --git a/tools/designer/designer/resource.cpp b/tools/designer/designer/resource.cpp
index b6fc689..2ba2eb1 100644
--- a/tools/designer/designer/resource.cpp
+++ b/tools/designer/designer/resource.cpp
@@ -1501,8 +1501,8 @@ void Resource::saveObjectProperties( QObject *w, QTextStream &ts, int indent )
}
if ( w->isWidgetType() && MetaDataBase::fakeProperties( w ) ) {
- QMap<QString, QVariant>* fakeProperties = MetaDataBase::fakeProperties( w );
- for ( QMap<QString, QVariant>::Iterator fake = fakeProperties->begin();
+ QStringVariantMap* fakeProperties = MetaDataBase::fakeProperties( w );
+ for ( QStringVariantMap::Iterator fake = fakeProperties->begin();
fake != fakeProperties->end(); ++fake ) {
if ( MetaDataBase::isPropertyChanged( w, fake.key() ) ) {
if ( w->inherits("CustomWidget") ) {