summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/designer/resource.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commit330c33ab6f97b279737bf9527c9add7bb1475450 (patch)
tree85cb998d3077ae295d65944ebb4d0189fc660ead /kdevdesigner/designer/resource.cpp
parent093de0db4fea89b3f94a2359c6981f353d035eb7 (diff)
downloadtdevelop-330c33ab6f97b279737bf9527c9add7bb1475450.tar.gz
tdevelop-330c33ab6f97b279737bf9527c9add7bb1475450.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdevdesigner/designer/resource.cpp')
-rw-r--r--kdevdesigner/designer/resource.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/kdevdesigner/designer/resource.cpp b/kdevdesigner/designer/resource.cpp
index e511f7f1..74ef9862 100644
--- a/kdevdesigner/designer/resource.cpp
+++ b/kdevdesigner/designer/resource.cpp
@@ -97,12 +97,12 @@ static TQString makeIndent( int indent )
static TQString entitize( const TQString &s, bool attribute = FALSE )
{
TQString s2 = s;
- s2 = s2.tqreplace( "&", "&amp;" );
- s2 = s2.tqreplace( ">", "&gt;" );
- s2 = s2.tqreplace( "<", "&lt;" );
+ s2 = s2.replace( "&", "&amp;" );
+ s2 = s2.replace( ">", "&gt;" );
+ s2 = s2.replace( "<", "&lt;" );
if ( attribute ) {
- s2 = s2.tqreplace( "\"", "&quot;" );
- s2 = s2.tqreplace( "'", "&apos;" );
+ s2 = s2.replace( "\"", "&quot;" );
+ s2 = s2.replace( "'", "&apos;" );
}
return s2;
}
@@ -742,7 +742,7 @@ TQString Resource::copy()
TQWidget *p = w->parentWidget();
bool save = TRUE;
while ( p ) {
- if ( tmp.tqfindRef( p ) != -1 ) {
+ if ( tmp.findRef( p ) != -1 ) {
save = FALSE;
break;
}
@@ -846,7 +846,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
includeHints << WidgetDatabase::includeFile( classID );
}
- if ( TQT_BASE_OBJECT(obj) != TQT_BASE_OBJECT(formwindow) && !formwindow->widgets()->tqfind( (TQWidget*)obj ) )
+ if ( TQT_BASE_OBJECT(obj) != TQT_BASE_OBJECT(formwindow) && !formwindow->widgets()->find( (TQWidget*)obj ) )
return; // we don't know anything about this thing
TQString attributes;
@@ -1214,7 +1214,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
if ( isDataTable && !columnFields.isEmpty() ) {
ts << makeIndent( indent ) << "<property name=\"field\">" << endl;
indent++;
- ts << makeIndent( indent ) << "<string>" << entitize( *columnFields.tqfind( l[ 0 ] ) ) << "</string>" << endl;
+ ts << makeIndent( indent ) << "<string>" << entitize( *columnFields.find( l[ 0 ] ) ) << "</string>" << endl;
indent--;
ts << makeIndent( indent ) << "</property>" << endl;
}
@@ -1399,9 +1399,9 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent )
changed = MetaDataBase::changedProperties( w );
if ( w->isWidgetType() ) {
if ( ::tqqt_cast<Spacer*>(w) ) {
- if ( !changed.tqcontains( "tqsizeHint" ) )
+ if ( !changed.contains( "tqsizeHint" ) )
changed << "tqsizeHint";
- if ( !changed.tqcontains( "geometry" ) )
+ if ( !changed.contains( "geometry" ) )
changed << "geometry";
} else {
TQToolButton *tb = ::tqqt_cast<TQToolButton*>(w);
@@ -1420,9 +1420,9 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent )
}
if ( TQT_BASE_OBJECT(w) == TQT_BASE_OBJECT(formwindow->mainContainer()) ) {
- if ( changed.tqfindIndex( "geometry" ) == -1 )
+ if ( changed.findIndex( "geometry" ) == -1 )
changed << "geometry";
- if ( changed.tqfindIndex( "caption" ) == -1 )
+ if ( changed.findIndex( "caption" ) == -1 )
changed << "caption";
}
@@ -1434,13 +1434,13 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent )
TQStrList lst = w->tqmetaObject()->propertyNames( !::tqqt_cast<Spacer*>(w) );
for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) {
- if ( changed.tqfind( TQString::tqfromLatin1( it.current() ) ) == changed.end() )
+ if ( changed.find( TQString::tqfromLatin1( it.current() ) ) == changed.end() )
continue;
- if ( saved.tqfind( TQString::tqfromLatin1( it.current() ) ) != saved.end() )
+ if ( saved.find( TQString::tqfromLatin1( it.current() ) ) != saved.end() )
continue;
saved << TQString::tqfromLatin1( it.current() );
const TQMetaProperty* p = w->tqmetaObject()->
- property( w->tqmetaObject()->tqfindProperty( it.current(), TRUE ), TRUE );
+ property( w->tqmetaObject()->findProperty( it.current(), TRUE ), TRUE );
if ( !p || !p->stored( w ) || ( inLayout && qstrcmp( p->name(), "geometry" ) == 0 ) )
continue;
if ( ::tqqt_cast<TQLabel*>(w) && qstrcmp( p->name(), "pixmap" ) == 0 &&
@@ -1496,7 +1496,7 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent )
void Resource::saveSetProperty( TQObject *w, const TQString &name, TQVariant::Type, TQTextStream &ts, int indent )
{
- const TQMetaProperty *p = w->tqmetaObject()->property( w->tqmetaObject()->tqfindProperty( name, TRUE ), TRUE );
+ const TQMetaProperty *p = w->tqmetaObject()->property( w->tqmetaObject()->findProperty( name, TRUE ), TRUE );
TQStrList l( p->valueToKeys( w->property( name ).toInt() ) );
TQString v;
for ( uint i = 0; i < l.count(); ++i ) {
@@ -1509,7 +1509,7 @@ void Resource::saveSetProperty( TQObject *w, const TQString &name, TQVariant::Ty
void Resource::saveEnumProperty( TQObject *w, const TQString &name, TQVariant::Type, TQTextStream &ts, int indent )
{
- const TQMetaProperty *p = w->tqmetaObject()->property( w->tqmetaObject()->tqfindProperty( name, TRUE ), TRUE );
+ const TQMetaProperty *p = w->tqmetaObject()->property( w->tqmetaObject()->findProperty( name, TRUE ), TRUE );
ts << makeIndent( indent ) << "<enum>" << p->valueToKey( w->property( name ).toInt() ) << "</enum>" << endl;
}
@@ -1522,7 +1522,7 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant
uint unum;
double dob;
TQString comment;
- if ( w && formwindow->widgets()->tqfind( (TQWidget*)w ) || formwindow->actionList().tqfind( (TQAction*)w ) )
+ if ( w && formwindow->widgets()->find( (TQWidget*)w ) || formwindow->actionList().find( (TQAction*)w ) )
comment = MetaDataBase::propertyComment( w, name );
switch ( t ) {
case TQVariant::String:
@@ -2143,7 +2143,7 @@ TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *tqparent, TQL
*/
void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQDomElement &e )
{
- const TQMetaProperty *p = obj->tqmetaObject()->property( obj->tqmetaObject()->tqfindProperty( prop, TRUE ), TRUE );
+ const TQMetaProperty *p = obj->tqmetaObject()->property( obj->tqmetaObject()->findProperty( prop, TRUE ), TRUE );
if ( !::tqqt_cast<TQLayout*>(obj) ) {// no layouts in metadatabase... (RS)
if ( obj->inherits( "CustomWidget" ) ) {
@@ -2404,7 +2404,7 @@ static TQImage loadImageData( TQDomElement &n2 )
ba[2] = ( len & 0x0000ff00 ) >> 8;
ba[3] = ( len & 0x000000ff );
TQByteArray baunzip = tqUncompress( ba, baSize );
- img.loadFromData( (const uchar*)baunzip.data(), baunzip.size(), format.left(format.tqfind('.')) );
+ img.loadFromData( (const uchar*)baunzip.data(), baunzip.size(), format.left(format.find('.')) );
} else {
img.loadFromData( (const uchar*)ba+lengthOffset, baSize-lengthOffset, format );
}
@@ -2451,9 +2451,9 @@ void Resource::saveConnections( TQTextStream &ts, int indent )
TQValueList<MetaDataBase::Connection>::Iterator it = connections.begin();
for ( ; it != connections.end(); ++it ) {
MetaDataBase::Connection conn = *it;
- if ( ( knownNames.tqfindIndex( TQString( conn.sender->name() ) ) == -1 &&
+ if ( ( knownNames.findIndex( TQString( conn.sender->name() ) ) == -1 &&
qstrcmp( conn.sender->name(), "this" ) != 0 ) ||
- ( knownNames.tqfindIndex( TQString( conn.receiver->name() ) ) == -1 &&
+ ( knownNames.findIndex( TQString( conn.receiver->name() ) ) == -1 &&
qstrcmp( conn.receiver->name(), "this" ) != 0 ) )
continue;
if ( formwindow->isMainContainer( TQT_TQOBJECT((*it).receiver) ) &&
@@ -2581,7 +2581,7 @@ void Resource::saveCustomWidgets( TQTextStream &ts, int indent )
TQPtrList<MetaDataBase::CustomWidget> *lst = MetaDataBase::customWidgets();
for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) {
- if ( usedCustomWidgets.tqfindIndex( w->className ) == -1 )
+ if ( usedCustomWidgets.findIndex( w->className ) == -1 )
continue;
ts << makeIndent( indent ) << "<customwidget>" << endl;
indent++;
@@ -2716,7 +2716,7 @@ void Resource::saveTabOrder( TQTextStream &ts, int indent )
indent++;
for ( TQWidget *w = l.first(); w; w = l.next() ) {
- if ( w->testWState( TQt::WState_ForceHide ) || knownNames.tqfindIndex( w->name() ) == -1 )
+ if ( w->testWState( TQt::WState_ForceHide ) || knownNames.findIndex( w->name() ) == -1 )
continue;
ts << makeIndent( indent ) << "<tabstop>" << w->name() << "</tabstop>" << endl;
}
@@ -3235,7 +3235,7 @@ void Resource::loadPopupMenu( PopupMenuEditor *p, const TQDomElement &e )
p->insert( a );
}
if ( n.tagName() == "item" ) {
- PopupMenuEditorItem *i = p->at( p->tqfind( a ) );
+ PopupMenuEditorItem *i = p->at( p->find( a ) );
if ( i ) {
TQString name = n.attribute( "name" );
formwindow->unify( i, name, TRUE );