Adjusted to use new TQStringVariantMap type.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/6/head
Michele Calgaro 6 years ago
parent 845e845efe
commit f70ffdc41a
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -48,7 +48,7 @@ class MetaDataBaseRecord
public:
TQObject *object;
TQStringList changedProperties;
TQMap<TQString,TQVariant> fakeProperties;
TQStringVariantMap fakeProperties;
TQMap<TQString, TQString> propertyComments;
int spacing, margin;
TQValueList<MetaDataBase::Connection> connections;
@ -237,14 +237,14 @@ TQVariant MetaDataBase::fakeProperty( TQObject * o, const TQString &property)
o, o->name(), o->className() );
return TQVariant();
}
TQMap<TQString, TQVariant>::Iterator it = r->fakeProperties.find( property );
TQStringVariantMap::Iterator it = r->fakeProperties.find( property );
if ( it != r->fakeProperties.end() )
return r->fakeProperties[property];
return WidgetFactory::defaultValue( o, property );
}
TQMap<TQString,TQVariant>* MetaDataBase::fakeProperties( TQObject* o )
TQStringVariantMap* MetaDataBase::fakeProperties( TQObject* o )
{
setupDataBase();
MetaDataBaseRecord *r = db->find( (void*)o );

@ -143,7 +143,7 @@ public:
static void setFakeProperty( TQObject *o, const TQString &property, const TQVariant& value );
static TQVariant fakeProperty( TQObject * o, const TQString &property );
static TQMap<TQString,TQVariant>* fakeProperties( TQObject* o );
static TQStringVariantMap* fakeProperties( TQObject* o );
static void setSpacing( TQObject *o, int spacing );
static int spacing( TQObject *o );

@ -1044,8 +1044,8 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent )
}
if ( w->isWidgetType() && MetaDataBase::fakeProperties( w ) ) {
TQMap<TQString, TQVariant>* fakeProperties = MetaDataBase::fakeProperties( w );
for ( TQMap<TQString, TQVariant>::Iterator fake = fakeProperties->begin();
TQStringVariantMap* fakeProperties = MetaDataBase::fakeProperties( w );
for ( TQStringVariantMap::Iterator fake = fakeProperties->begin();
fake != fakeProperties->end(); ++fake ) {
if ( MetaDataBase::isPropertyChanged( w, fake.key() ) ) {
if ( w->inherits( "CustomWidget" ) ) {

Loading…
Cancel
Save