Replaced various '#define' with actual strings - part 5

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/33/head
Michele Calgaro 12 months ago
parent d72f484381
commit 10ff449a14
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -166,7 +166,7 @@ bool Resource::load( FormFile *ff )
TQFile f( ff->absFileName() ); TQFile f( ff->absFileName() );
f.open( IO_ReadOnly ); f.open( IO_ReadOnly );
bool b = load( ff, TQT_TQIODEVICE(&f) ); bool b = load( ff, &f );
f.close(); f.close();
return b; return b;
@ -413,7 +413,7 @@ bool Resource::save( const TQString& filename, bool formCodeOnly )
TQFile f( filename ); TQFile f( filename );
if ( !f.open( IO_WriteOnly | IO_Translate ) ) if ( !f.open( IO_WriteOnly | IO_Translate ) )
return false; return false;
bool b = save( TQT_TQIODEVICE(&f) ); bool b = save( &f );
f.close(); f.close();
return b; return b;
} }
@ -1099,9 +1099,9 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant
num = value.toInt(); num = value.toInt();
if ( w && w->inherits( "TQLayout" ) ) { if ( w && w->inherits( "TQLayout" ) ) {
if ( name == "spacing" ) if ( name == "spacing" )
num = MetaDataBase::spacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( TQT_TQLAYOUT(w) ) ) ); num = MetaDataBase::spacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( w ) ) );
else if ( name == "margin" ) else if ( name == "margin" )
num = MetaDataBase::margin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( TQT_TQLAYOUT(w) ) ) ); num = MetaDataBase::margin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( w ) ) );
} }
ts << makeIndent( indent ) << "<number>" << TQString::number( num ) << "</number>" << endl; ts << makeIndent( indent ) << "<number>" << TQString::number( num ) << "</number>" << endl;
break; break;
@ -1117,9 +1117,9 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant
unum = value.toUInt(); unum = value.toUInt();
if ( w && w->inherits( "TQLayout" ) ) { if ( w && w->inherits( "TQLayout" ) ) {
if ( name == "spacing" ) if ( name == "spacing" )
num = MetaDataBase::spacing( WidgetFactory::layoutParent( TQT_TQLAYOUT(w) ) ); num = MetaDataBase::spacing( WidgetFactory::layoutParent( w ) );
else if ( name == "margin" ) else if ( name == "margin" )
num = MetaDataBase::margin( WidgetFactory::layoutParent( TQT_TQLAYOUT(w) ) ); num = MetaDataBase::margin( WidgetFactory::layoutParent( w ) );
} }
ts << makeIndent( indent ) << "<number>" << TQString::number( unum ) << "</number>" << endl; ts << makeIndent( indent ) << "<number>" << TQString::number( unum ) << "</number>" << endl;
break; break;

@ -106,7 +106,7 @@ bool Instance::build(const KURL& fname)
{ {
TQFile inputFile; TQFile inputFile;
inputFile.open(IO_ReadOnly, stdin); inputFile.open(IO_ReadOnly, stdin);
m_instance = KommanderFactory::create(TQT_TQIODEVICE(&inputFile)); m_instance = KommanderFactory::create(&inputFile);
} }
// check if build was successful // check if build was successful

@ -131,7 +131,7 @@ TQWidget *KommanderFactory::create( const TQString &uiFile, TQObject *connector,
if (!qwf_currFileName) if (!qwf_currFileName)
qwf_currFileName = new TQString(); qwf_currFileName = new TQString();
*qwf_currFileName = uiFile; *qwf_currFileName = uiFile;
TQWidget *w = KommanderFactory::create( TQT_TQIODEVICE(&f), connector, parent, name ); TQWidget *w = KommanderFactory::create( &f, connector, parent, name );
if ( !qwf_forms ) if ( !qwf_forms )
qwf_forms = new TQMap<TQWidget*, TQString>; qwf_forms = new TQMap<TQWidget*, TQString>;
qwf_forms->insert( w, uiFile ); qwf_forms->insert( w, uiFile );

@ -142,7 +142,7 @@ bool DTDParser::parse(const TQString &targetDir, bool entitiesOnly)
TQFile file( DTD::dirName + "entities.tag" ); TQFile file( DTD::dirName + "entities.tag" );
if ( file.open( IO_WriteOnly ) ) if ( file.open( IO_WriteOnly ) )
{ {
DTD::entityStream.setDevice(TQT_TQIODEVICE(&file)); DTD::entityStream.setDevice(&file);
DTD::entityStream.setEncoding(TQTextStream::UnicodeUTF8); DTD::entityStream.setEncoding(TQTextStream::UnicodeUTF8);
DTD::entityStream << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl; DTD::entityStream << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
DTD::entityStream << "<!DOCTYPE TAGS>" << endl DTD::entityStream << "<!DOCTYPE TAGS>" << endl

@ -2236,7 +2236,7 @@ void Document::checkDirtyStatus()
const char* c = ""; const char* c = "";
KMD5 context(c); KMD5 context(c);
context.reset(); context.reset();
context.update(*TQT_TQIODEVICE(&f)); context.update(f);
m_md5sum = context.hexDigest(); m_md5sum = context.hexDigest();
f.close(); f.close();
} }
@ -2252,7 +2252,7 @@ void Document::checkDirtyStatus()
const char* c = ""; const char* c = "";
KMD5 context(c); KMD5 context(c);
context.reset(); context.reset();
context.update(*TQT_TQIODEVICE(&f)); context.update(f);
md5sum = context.hexDigest(); md5sum = context.hexDigest();
kdDebug(24000) << "MD5 sum of current doc: " << m_md5sum << endl; kdDebug(24000) << "MD5 sum of current doc: " << m_md5sum << endl;
kdDebug(24000) << "MD5 sum of doc on disc : " << md5sum << endl; kdDebug(24000) << "MD5 sum of doc on disc : " << md5sum << endl;
@ -2323,7 +2323,7 @@ bool Document::saveAs(const KURL& url)
const char* c = ""; const char* c = "";
KMD5 context(c); KMD5 context(c);
context.reset(); context.reset();
context.update(*TQT_TQIODEVICE(&f)); context.update(f);
m_md5sum = context.hexDigest(); m_md5sum = context.hexDigest();
f.close(); f.close();
} }
@ -3181,7 +3181,7 @@ bool Document::openURL(const KURL& url)
const char* c = ""; const char* c = "";
KMD5 context(c); KMD5 context(c);
context.reset(); context.reset();
context.update(*TQT_TQIODEVICE(&f)); context.update(f);
m_md5sum = context.hexDigest(); m_md5sum = context.hexDigest();
f.close(); f.close();
} }

Loading…
Cancel
Save