summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/designer/resource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdevdesigner/designer/resource.cpp')
-rw-r--r--kdevdesigner/designer/resource.cpp170
1 files changed, 85 insertions, 85 deletions
diff --git a/kdevdesigner/designer/resource.cpp b/kdevdesigner/designer/resource.cpp
index 18b00d30..7d853ce7 100644
--- a/kdevdesigner/designer/resource.cpp
+++ b/kdevdesigner/designer/resource.cpp
@@ -94,7 +94,7 @@ static TQString makeIndent( int indent )
return s;
}
-static TQString entitize( const TQString &s, bool attribute = FALSE )
+static TQString entitize( const TQString &s, bool attribute = false )
{
TQString s2 = s;
s2 = s2.replace( "&", "&" );
@@ -273,11 +273,11 @@ Resource::Resource()
mainwindow = 0;
formwindow = 0;
toplevel = 0;
- copying = FALSE;
- pasting = FALSE;
- hadGeometry = FALSE;
+ copying = false;
+ pasting = false;
+ hadGeometry = false;
langIface = 0;
- hasFunctions = FALSE;
+ hasFunctions = false;
}
Resource::Resource( MainWindow* mw )
@@ -285,11 +285,11 @@ Resource::Resource( MainWindow* mw )
{
formwindow = 0;
toplevel = 0;
- copying = FALSE;
- pasting = FALSE;
- hadGeometry = FALSE;
+ copying = false;
+ pasting = false;
+ hadGeometry = false;
langIface = 0;
- hasFunctions = FALSE;
+ hasFunctions = false;
}
Resource::~Resource()
@@ -312,9 +312,9 @@ TQWidget *Resource::widget() const
bool Resource::load( FormFile *ff, Project *defProject )
{
if ( !ff || ff->absFileName().isEmpty() )
- return FALSE;
+ return false;
currFileName = ff->absFileName();
- mainContainerSet = FALSE;
+ mainContainerSet = false;
TQFile f( ff->absFileName() );
f.open( IO_ReadOnly | IO_Translate );
@@ -334,7 +334,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
TQString errMsg;
int errLine;
if ( !doc.setContent( dev, &errMsg, &errLine ) ) {
- return FALSE;
+ return false;
}
DomTool::fixDocument( doc );
@@ -462,14 +462,14 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
metaInfo.className = e.firstChild().toText().data();
} else if ( e.tagName() == "pixmapfunction" ) {
if ( formwindow ) {
- formwindow->setSavePixmapInline( FALSE );
- formwindow->setSavePixmapInProject( FALSE );
+ formwindow->setSavePixmapInline( false );
+ formwindow->setSavePixmapInProject( false );
formwindow->setPixmapLoaderFunction( e.firstChild().toText().data() );
}
} else if ( e.tagName() == "pixmapinproject" ) {
if ( formwindow ) {
- formwindow->setSavePixmapInline( FALSE );
- formwindow->setSavePixmapInProject( TRUE );
+ formwindow->setSavePixmapInline( false );
+ formwindow->setSavePixmapInProject( true );
}
} else if ( e.tagName() == "exportmacro" ) {
exportMacro = e.firstChild().toText().data();
@@ -480,7 +480,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
formwindow->setSpacingFunction( e.attribute( "spacing" ) );
formwindow->setMarginFunction( e.attribute( "margin" ) );
if ( !formwindow->marginFunction().isEmpty() || !formwindow->spacingFunction().isEmpty() )
- formwindow->hasLayoutFunctions( TRUE );
+ formwindow->hasLayoutFunctions( true );
}
e = e.nextSibling().toElement();
@@ -492,7 +492,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
loadCustomWidgets( customWidgets, this );
if ( !createObject( widget, formwindow) )
- return FALSE;
+ return false;
if ( !forwards.isNull() ) {
for ( TQDomElement n = forwards.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
@@ -569,7 +569,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
function.returnType = "void";
function.type = "slot";
function.function = n.firstChild().toText().data();
- if ( !MetaDataBase::hasFunction( formwindow, function.function, TRUE ) )
+ if ( !MetaDataBase::hasFunction( formwindow, function.function, true ) )
MetaDataBase::addFunction( formwindow, function.function, function.specifier,
function.access, "slot", function.language, function.returnType );
else
@@ -597,7 +597,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
if ( function.returnType.isEmpty() )
function.returnType = "void";
function.function = n.firstChild().toText().data();
- if ( !MetaDataBase::hasFunction( formwindow, function.function, TRUE ) )
+ if ( !MetaDataBase::hasFunction( formwindow, function.function, true ) )
MetaDataBase::addFunction( formwindow, function.function, function.specifier,
function.access, function.type, function.language,
function.returnType );
@@ -648,7 +648,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
formwindow->resize( formwindow->size().expandedTo( formwindow->sizeHint() ) );
}
- return TRUE;
+ return true;
}
static bool saveCode( const TQString &filename, const TQString &code )
@@ -657,15 +657,15 @@ static bool saveCode( const TQString &filename, const TQString &code )
if ( f.open(IO_WriteOnly | IO_Translate) ) {
TQTextStream ts( &f );
ts << code;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
bool Resource::save( const TQString& filename, bool formCodeOnly )
{
if ( !formwindow || filename.isEmpty() )
- return FALSE;
+ return false;
if (!langIface) {
TQString lang = "TQt Script";
if ( mainwindow )
@@ -676,8 +676,8 @@ bool Resource::save( const TQString& filename, bool formCodeOnly )
}
if ( formCodeOnly && langIface ) {
if ( saveFormCode(formwindow->formFile(), langIface) )
- return TRUE;
- bool breakout = FALSE;
+ return true;
+ bool breakout = false;
FormFile *ff = formwindow->formFile();
TQString codeFile = ff->project()->makeAbsolute( ff->codeFile() );
TQString filter = langIface->fileFilterList().join("\n");
@@ -686,7 +686,7 @@ bool Resource::save( const TQString& filename, bool formCodeOnly )
breakout = fn.isEmpty();
if ( !breakout ) {
if ( saveCode(fn, ff->code()) )
- return TRUE;
+ return true;
}
}
}
@@ -694,7 +694,7 @@ bool Resource::save( const TQString& filename, bool formCodeOnly )
TQFile f( filename );
if ( !f.open( IO_WriteOnly | IO_Translate ) )
- return FALSE;
+ return false;
bool b = save( &f );
f.close();
return b;
@@ -703,7 +703,7 @@ bool Resource::save( const TQString& filename, bool formCodeOnly )
bool Resource::save( TQIODevice* dev )
{
if ( !formwindow )
- return FALSE;
+ return false;
if ( !langIface ) {
TQString lang = "C++";
@@ -747,7 +747,7 @@ TQString Resource::copy()
if ( !formwindow )
return TQString();
- copying = TRUE;
+ copying = true;
TQString s;
TQTextOStream ts( &s );
@@ -756,10 +756,10 @@ TQString Resource::copy()
TQWidgetList tmp( widgets );
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
TQWidget *p = w->parentWidget();
- bool save = TRUE;
+ bool save = true;
while ( p ) {
if ( tmp.findRef( p ) != -1 ) {
- save = FALSE;
+ save = false;
break;
}
p = p->parentWidget();
@@ -781,9 +781,9 @@ void Resource::paste( const TQString &cb, TQWidget *parent )
{
if ( !formwindow )
return;
- mainContainerSet = TRUE;
+ mainContainerSet = true;
- pasting = TRUE;
+ pasting = true;
TQDomDocument doc;
TQString errMsg;
int errLine;
@@ -806,9 +806,9 @@ void Resource::paste( const TQString &cb, TQWidget *parent )
loadCustomWidgets( customWidgets, this );
TQWidgetList widgets;
- formwindow->clearSelection( FALSE );
- formwindow->setPropertyShowingBlocked( TRUE );
- formwindow->clearSelection( FALSE );
+ formwindow->clearSelection( false );
+ formwindow->setPropertyShowingBlocked( true );
+ formwindow->clearSelection( false );
while ( !firstWidget.isNull() ) {
if ( firstWidget.tagName() == "widget" ) {
TQWidget *w = (TQWidget*)createObject( firstWidget, parent, 0 );
@@ -841,7 +841,7 @@ void Resource::paste( const TQString &cb, TQWidget *parent )
}
firstWidget = firstWidget.nextSibling().toElement();
}
- formwindow->setPropertyShowingBlocked( FALSE );
+ formwindow->setPropertyShowingBlocked( false );
formwindow->emitShowProperties();
PasteCommand *cmd = new PasteCommand( i18n( "Paste" ), formwindow, widgets );
@@ -1026,7 +1026,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
} else if ( ::tqt_cast<TQMainWindow*>(obj) ) {
saveChildrenOf( ( (TQMainWindow*)obj )->centralWidget(), ts, indent );
} else {
- bool saved = FALSE;
+ bool saved = false;
#ifdef TQT_CONTAINER_CUSTOM_WIDGETS
if ( isPlugin ) {
WidgetInterface *iface = 0;
@@ -1038,7 +1038,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
if ( iface2->supportsPages( className ) ) {
TQWidgetList containers = iface2->pages( className, (TQWidget*)obj );
if ( !containers.isEmpty() ) {
- saved = TRUE;
+ saved = true;
int i = 0;
for ( TQWidget *w = containers.first(); w; w = containers.next(), ++i ) {
if ( WidgetDatabase::
@@ -1067,7 +1067,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
}
}
} else {
- saved = TRUE;
+ saved = true;
TQWidget *w = iface2->containerOfWidget( className, (TQWidget*)obj );
if ( obj != w ) {
ts << makeIndent( indent ) << "<widget class=\""
@@ -1089,14 +1089,14 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
MetaDataBase::CustomWidget *cw = new MetaDataBase::CustomWidget;
cw->className = className;
cw->includeFile = WidgetDatabase::includeFile( classID );
- TQStrList lst = w->metaObject()->signalNames( TRUE );
+ TQStrList lst = w->metaObject()->signalNames( true );
for ( TQPtrListIterator<char> it(lst); it.current(); ++it )
cw->lstSignals.append(it.current());
int i;
- int total = w->metaObject()->numProperties( TRUE );
+ int total = w->metaObject()->numProperties( true );
for ( i = 0; i < total; i++ ) {
- const TQMetaProperty *p = w->metaObject()->property( i, TRUE );
+ const TQMetaProperty *p = w->metaObject()->property( i, true );
if ( p->designable(w) ) {
MetaDataBase::Property prop;
prop.property = p->name();
@@ -1114,9 +1114,9 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
}
}
- total = w->metaObject()->numSlots( TRUE );
+ total = w->metaObject()->numSlots( true );
for ( i = 0; i < total; i++ ) {
- const TQMetaData *md = w->metaObject()->slot( i, TRUE );
+ const TQMetaData *md = w->metaObject()->slot( i, true );
MetaDataBase::Function funky;
// Find out if we have a return type.
if ( md->method->count > 0 ) {
@@ -1203,7 +1203,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
TQStringList l;
l << lv->header()->label( i );
TQPtrList<TQPixmap> pix;
- pix.setAutoDelete( TRUE );
+ pix.setAutoDelete( true );
if ( lv->header()->iconSet( i ) )
pix.append( new TQPixmap( lv->header()->iconSet( i )->pixmap() ) );
saveItem( l, pix, ts, indent );
@@ -1245,7 +1245,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
TQStringList l;
l << table->horizontalHeader()->label( i );
TQPtrList<TQPixmap> pix;
- pix.setAutoDelete( TRUE );
+ pix.setAutoDelete( true );
if ( table->horizontalHeader()->iconSet( i ) )
pix.append( new TQPixmap( table->horizontalHeader()->iconSet( i )->pixmap() ) );
saveItem( l, pix, ts, indent );
@@ -1269,7 +1269,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
TQStringList l;
l << table->verticalHeader()->label( i );
TQPtrList<TQPixmap> pix;
- pix.setAutoDelete( TRUE );
+ pix.setAutoDelete( true );
if ( table->verticalHeader()->iconSet( i ) )
pix.append( new TQPixmap( table->verticalHeader()->iconSet( i )->pixmap() ) );
saveItem( l, pix, ts, indent );
@@ -1482,7 +1482,7 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent )
continue;
saved << TQString::fromLatin1( it.current() );
const TQMetaProperty* p = w->metaObject()->
- property( w->metaObject()->findProperty( it.current(), TRUE ), TRUE );
+ property( w->metaObject()->findProperty( it.current(), true ), true );
if ( !p || !p->stored( w ) || ( inLayout && qstrcmp( p->name(), "geometry" ) == 0 ) )
continue;
if ( ::tqt_cast<TQLabel*>(w) && qstrcmp( p->name(), "pixmap" ) == 0 &&
@@ -1538,7 +1538,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->metaObject()->property( w->metaObject()->findProperty( name, TRUE ), TRUE );
+ const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, true ), true );
TQStrList l( p->valueToKeys( w->property( name ).toInt() ) );
TQString v;
for ( uint i = 0; i < l.count(); ++i ) {
@@ -1551,7 +1551,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->metaObject()->property( w->metaObject()->findProperty( name, TRUE ), TRUE );
+ const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, true ), true );
ts << makeIndent( indent ) << "<enum>" << p->valueToKey( w->property( name ).toInt() ) << "</enum>" << endl;
}
@@ -1824,7 +1824,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
// ### TODO loading for custom container widgets without pages
#endif
if ( !className.isNull() ) {
- obj = WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, 0, FALSE );
+ obj = WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, 0, false );
if ( !obj ) {
TQMessageBox::critical( MainWindow::self, i18n( "Loading File" ),
i18n( "Error loading %1.\n"
@@ -1835,7 +1835,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
if ( !mainContainerSet ) {
if ( formwindow )
formwindow->setMainContainer( (TQWidget*)obj );
- mainContainerSet = TRUE;
+ mainContainerSet = true;
}
w = (TQWidget*)obj;
if ( ::tqt_cast<TQMainWindow*>(w) )
@@ -1980,9 +1980,9 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget )
TQListView *lv = (TQListView*)widget;
TQDomElement n = e.firstChild().toElement();
TQPixmap pix;
- bool hasPixmap = FALSE;
+ bool hasPixmap = false;
TQString txt;
- bool clickable = TRUE, resizable = TRUE;
+ bool clickable = true, resizable = true;
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
TQString attrib = n.attribute( "name" );
@@ -2020,7 +2020,7 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget )
TQDomElement n = e.firstChild().toElement();
TQPixmap pix;
- bool hasPixmap = FALSE;
+ bool hasPixmap = false;
TQString txt;
TQString field;
TQMap<TQString, TQString> fieldMap = MetaDataBase::columnFields( table );
@@ -2056,7 +2056,7 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget )
void Resource::loadItem( const TQDomElement &e, TQPixmap &pix, TQString &txt, bool &hasPixmap )
{
TQDomElement n = e;
- hasPixmap = FALSE;
+ hasPixmap = false;
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
TQString attrib = n.attribute( "name" );
@@ -2080,7 +2080,7 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt
if ( ::tqt_cast<TQListBox*>(widget) || ::tqt_cast<TQComboBox*>(widget) ) {
TQDomElement n = e.firstChild().toElement();
TQPixmap pix;
- bool hasPixmap = FALSE;
+ bool hasPixmap = false;
TQString txt;
loadItem( n, pix, txt, hasPixmap );
TQListBox *lb = 0;
@@ -2096,7 +2096,7 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt
} else if ( ::tqt_cast<TQIconView*>(widget) ) {
TQDomElement n = e.firstChild().toElement();
TQPixmap pix;
- bool hasPixmap = FALSE;
+ bool hasPixmap = false;
TQString txt;
loadItem( n, pix, txt, hasPixmap );
TQIconView *iv = (TQIconView*)widget;
@@ -2131,7 +2131,7 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt
}
}
} else if ( n.tagName() == "item" ) {
- item->setOpen( TRUE );
+ item->setOpen( true );
createItem( n, widget, item );
}
@@ -2159,15 +2159,15 @@ TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLay
colspan = 1;
Spacer *spacer = (Spacer*) WidgetFactory::create( WidgetDatabase::idFromClassName("Spacer"),
- parent, "spacer", FALSE);
+ parent, "spacer", false);
spacer->setOrientation( o );
- spacer->setInteraciveMode( FALSE );
+ spacer->setInteraciveMode( false );
while ( !n.isNull() ) {
if ( n.tagName() == "property" )
setObjectProperty( spacer, n.attribute( "name" ), n.firstChild().toElement() );
n = n.nextSibling().toElement();
}
- spacer->setInteraciveMode( TRUE );
+ spacer->setInteraciveMode( true );
if ( formwindow )
formwindow->insertWidget( spacer, pasting );
if ( layout ) {
@@ -2185,7 +2185,7 @@ TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLay
*/
void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQDomElement &e )
{
- const TQMetaProperty *p = obj->metaObject()->property( obj->metaObject()->findProperty( prop, TRUE ), TRUE );
+ const TQMetaProperty *p = obj->metaObject()->property( obj->metaObject()->findProperty( prop, true ), true );
if ( !::tqt_cast<TQLayout*>(obj) ) {// no layouts in metadatabase... (RS)
if ( obj->inherits( "CustomWidget" ) ) {
@@ -2193,7 +2193,7 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
if ( cw && !cw->hasProperty( prop.latin1() ) && !p && prop != "toolTip" && prop != "whatsThis" )
return;
}
- MetaDataBase::setPropertyChanged( obj, prop, TRUE );
+ MetaDataBase::setPropertyChanged( obj, prop, true );
}
TQVariant defVarient;
@@ -2290,11 +2290,11 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
if ( prop == "geometry" ) {
if ( obj == toplevel ) {
- hadGeometry = TRUE;
+ hadGeometry = true;
toplevel->resize( v.toRect().size() );
return;
} else if ( obj == formwindow->mainContainer() ) {
- hadGeometry = TRUE;
+ hadGeometry = true;
formwindow->resize( v.toRect().size() );
return;
}
@@ -2316,7 +2316,7 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
if ( prop == "name" ) {
if ( pasting ) {
TQString s = v.toString();
- formwindow->unify( obj, s, TRUE );
+ formwindow->unify( obj, s, true );
obj->setName( s );
return;
} else if ( formwindow && obj == formwindow->mainContainer() ) {
@@ -2363,12 +2363,12 @@ void Resource::saveImageData( const TQImage &img, TQTextStream &ts, int indent )
TQBuffer buf( ba );
buf.open( IO_WriteOnly | IO_Translate );
TQString format;
- bool compress = FALSE;
+ bool compress = false;
if (img.hasAlphaBuffer()) {
format = "PNG";
} else {
format = img.depth() > 1 ? "XPM" : "XBM";
- compress = TRUE;
+ compress = true;
}
TQImageIO iio( &buf, format );
iio.setImage( img );
@@ -2546,7 +2546,7 @@ void Resource::loadConnections( const TQDomElement &e )
} else {
if ( name == "this" )
name = toplevel->name();
- TQObjectList *l = toplevel->queryList( 0, name, FALSE );
+ TQObjectList *l = toplevel->queryList( 0, name, false );
if ( l ) {
if ( l->first() )
conn.sender = l->first();
@@ -2564,7 +2564,7 @@ void Resource::loadConnections( const TQDomElement &e )
if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) {
conn.receiver = toplevel;
} else {
- TQObjectList *l = toplevel->queryList( 0, name, FALSE );
+ TQObjectList *l = toplevel->queryList( 0, name, false );
if ( l ) {
if ( l->first() )
conn.receiver = l->first();
@@ -2604,7 +2604,7 @@ void Resource::loadConnections( const TQDomElement &e )
if ( slot.returnType.isEmpty() )
slot.returnType = "void";
slot.function = n.firstChild().toText().data();
- if ( !MetaDataBase::hasFunction( formwindow, slot.function, TRUE ) )
+ if ( !MetaDataBase::hasFunction( formwindow, slot.function, true ) )
MetaDataBase::addFunction( formwindow, slot.function, slot.specifier,
slot.access, "slot", slot.language, slot.returnType );
else
@@ -2777,7 +2777,7 @@ void Resource::loadTabOrder( const TQDomElement &e )
TQString name = n.firstChild().toText().data();
if ( name.isEmpty() )
continue;
- TQObjectList *l = toplevel->queryList( 0, name, FALSE );
+ TQObjectList *l = toplevel->queryList( 0, name, false );
if ( l ) {
if ( l->first() ) {
TQWidget *w = (TQWidget*)l->first();
@@ -2817,12 +2817,12 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
if ( !langIface || formwindow->project()->isCpp() ) {
TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formwindow );
TQString extensionInclude;
- bool needExtensionInclude = FALSE;
+ bool needExtensionInclude = false;
if ( langIface &&
formwindow->formFile()->hasFormCode() &&
formwindow->formFile()->codeFileState() != FormFile::Deleted ) {
extensionInclude = TQFileInfo( currFileName ).fileName() + langIface->formCodeExtension();
- needExtensionInclude = TRUE;
+ needExtensionInclude = true;
}
if ( !includes.isEmpty() || needExtensionInclude ) {
ts << makeIndent( indent ) << "<includes>" << endl;
@@ -2900,7 +2900,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
ts << makeIndent( indent ) << "</slots>" << endl;
}
- TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( formwindow, TRUE );
+ TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( formwindow, true );
if ( !functionList.isEmpty() ) {
ts << makeIndent( indent ) << "<functions>" << endl;
indent++;
@@ -3038,13 +3038,13 @@ void Resource::loadChildAction( TQObject *parent, const TQDomElement &e )
a = new QDesignerAction( parent );
MetaDataBase::addEntry( a );
TQDomElement n2 = n.firstChild().toElement();
- bool hasMenuText = FALSE;
+ bool hasMenuText = false;
while ( !n2.isNull() ) {
if ( n2.tagName() == "property" ) {
TQDomElement n3(n2); // don't modify n2
TQString prop = n3.attribute( "name" );
if (prop == "menuText")
- hasMenuText = TRUE;
+ hasMenuText = true;
TQDomElement value(n3.firstChild().toElement());
setObjectProperty( a, prop, value );
if (!hasMenuText && uiFileVersion < "3.3" && prop == "text")
@@ -3058,13 +3058,13 @@ void Resource::loadChildAction( TQObject *parent, const TQDomElement &e )
a = new QDesignerActionGroup( parent );
MetaDataBase::addEntry( a );
TQDomElement n2 = n.firstChild().toElement();
- bool hasMenuText = FALSE;
+ bool hasMenuText = false;
while ( !n2.isNull() ) {
if ( n2.tagName() == "property" ) {
TQDomElement n3(n2); // don't modify n2
TQString prop = n3.attribute( "name" );
if (prop == "menuText")
- hasMenuText = TRUE;
+ hasMenuText = true;
TQDomElement value = n3.firstChild().toElement();
setObjectProperty( a, prop, value );
if (!hasMenuText && uiFileVersion < "3.3" && prop == "text")
@@ -3147,7 +3147,7 @@ void Resource::saveMenuBar( TQMainWindow *mw, TQTextStream &ts, int indent )
return;
ts << makeIndent( indent ) << "<menubar>" << endl;
indent++;
- MetaDataBase::setPropertyChanged( mb, "name", TRUE ); // FIXME: remove
+ MetaDataBase::setPropertyChanged( mb, "name", true ); // FIXME: remove
saveObjectProperties( mb, ts, indent );
for ( int i = 0; i < (int)mb->count(); ++i ) {
@@ -3268,7 +3268,7 @@ void Resource::loadPopupMenu( PopupMenuEditor *p, const TQDomElement &e )
PopupMenuEditorItem *i = p->at( p->find( a ) );
if ( i ) {
TQString name = n.attribute( "name" );
- formwindow->unify( i, name, TRUE );
+ formwindow->unify( i, name, true );
i->setName( name );
MetaDataBase::addEntry( i );
loadPopupMenu( i->subMenu(), n );
@@ -3288,7 +3288,7 @@ bool Resource::saveFormCode( FormFile *formfile, LanguageInterface * /*langIface
formfile->code().isEmpty() ||
!formfile->hasFormCode() ||
!formfile->isModified(FormFile::WFormCode) )
- return TRUE; // There is no code to be saved.
+ return true; // There is no code to be saved.
return saveCode( formfile->project()->makeAbsolute(formfile->codeFile()),
formfile->code() );
}