summaryrefslogtreecommitdiffstats
path: root/kommander/editor/resource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kommander/editor/resource.cpp')
-rw-r--r--kommander/editor/resource.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/kommander/editor/resource.cpp b/kommander/editor/resource.cpp
index e2f636a1..c33cf46d 100644
--- a/kommander/editor/resource.cpp
+++ b/kommander/editor/resource.cpp
@@ -571,7 +571,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
const char* className = WidgetFactory::classNameOf( obj );
if ( obj->isA( "CustomWidget" ) )
usedCustomWidgets << TQString( className );
- if ( TQT_BASE_OBJECT(obj) != TQT_BASE_OBJECT(formwindow) && !formwindow->widgets()->find( (TQWidget*)obj ) )
+ if ( obj != formwindow && !formwindow->widgets()->find( (TQWidget*)obj ) )
return; // we don't know anything about this thing
TQString attributes;
@@ -984,7 +984,7 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent )
changed << "margin" << "spacing";
}
- if ( TQT_BASE_OBJECT(w) == TQT_BASE_OBJECT(formwindow->mainContainer()) ) {
+ if ( w == formwindow->mainContainer() ) {
if ( changed.findIndex( "geometry" ) == -1 )
changed << "geometry";
if ( changed.findIndex( "caption" ) == -1 )
@@ -994,7 +994,7 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent )
if ( changed.isEmpty() )
return;
- bool inLayout = TQT_BASE_OBJECT(w) != TQT_BASE_OBJECT(formwindow->mainContainer()) && !copying && w->isWidgetType() && ( (TQWidget*)w )->parentWidget() &&
+ bool inLayout = w != formwindow->mainContainer() && !copying && w->isWidgetType() && ( (TQWidget*)w )->parentWidget() &&
WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout;
TQStrList lst = w->metaObject()->propertyNames( !w->inherits( "Spacer" ) );
@@ -1099,9 +1099,9 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant
num = value.toInt();
if ( w && w->inherits( "TQLayout" ) ) {
if ( name == "spacing" )
- num = MetaDataBase::spacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( TQT_TQLAYOUT(TQT_BASE_OBJECT(w)) ) ) );
+ num = MetaDataBase::spacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( TQT_TQLAYOUT(w) ) ) );
else if ( name == "margin" )
- num = MetaDataBase::margin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( TQT_TQLAYOUT(TQT_BASE_OBJECT(w)) ) ) );
+ num = MetaDataBase::margin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( TQT_TQLAYOUT(w) ) ) );
}
ts << makeIndent( indent ) << "<number>" << TQString::number( num ) << "</number>" << endl;
break;
@@ -1117,9 +1117,9 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant
unum = value.toUInt();
if ( w && w->inherits( "TQLayout" ) ) {
if ( name == "spacing" )
- num = MetaDataBase::spacing( WidgetFactory::layoutParent( TQT_TQLAYOUT(TQT_BASE_OBJECT(w)) ) );
+ num = MetaDataBase::spacing( WidgetFactory::layoutParent( TQT_TQLAYOUT(w) ) );
else if ( name == "margin" )
- num = MetaDataBase::margin( WidgetFactory::layoutParent( TQT_TQLAYOUT(TQT_BASE_OBJECT(w)) ) );
+ num = MetaDataBase::margin( WidgetFactory::layoutParent( TQT_TQLAYOUT(w) ) );
}
ts << makeIndent( indent ) << "<number>" << TQString::number( unum ) << "</number>" << endl;
break;
@@ -1679,7 +1679,7 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
if ( !p ) {
MetaDataBase::setFakeProperty( obj, prop, v );
if ( obj->isWidgetType() ) {
- if ( prop == "database" && TQT_BASE_OBJECT(obj) != TQT_BASE_OBJECT(toplevel) ) {
+ if ( prop == "database" && obj != toplevel ) {
TQStringList lst = MetaDataBase::fakeProperty( obj, "database" ).toStringList();
if ( lst.count() > 2 )
dbControls.insert( obj->name(), lst[ 2 ] );
@@ -1734,11 +1734,11 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
}
if ( prop == "geometry" ) {
- if ( TQT_BASE_OBJECT(obj) == toplevel ) {
+ if ( obj == toplevel ) {
hadGeometry = true;
toplevel->resize( v.toRect().size() );
return;
- } else if ( TQT_BASE_OBJECT(obj) == formwindow->mainContainer() ) {
+ } else if ( obj == formwindow->mainContainer() ) {
hadGeometry = true;
formwindow->resize( v.toRect().size() );
return;
@@ -1762,7 +1762,7 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
formwindow->unify( TQT_TQOBJECT(obj), s, true );
obj->setName( s.utf8() );
return;
- } else if ( formwindow && TQT_BASE_OBJECT(obj) == formwindow->mainContainer() ) {
+ } else if ( formwindow && obj == formwindow->mainContainer() ) {
formwindow->setName( v.toCString() );
}
}
@@ -2019,9 +2019,9 @@ void Resource::loadConnections( const TQDomElement &e )
n2 = n2.nextSibling().toElement();
}
if ( formwindow ) {
- if ( TQT_BASE_OBJECT(conn.sender) == TQT_BASE_OBJECT(formwindow) )
+ if ( conn.sender == formwindow )
conn.sender = TQT_TQOBJECT(formwindow->mainContainer());
- if ( TQT_BASE_OBJECT(conn.receiver) == TQT_BASE_OBJECT(formwindow) )
+ if ( conn.receiver == formwindow )
conn.receiver = TQT_TQOBJECT(formwindow->mainContainer());
}
if ( conn.sender && conn.receiver ) {