diff options
Diffstat (limited to 'kbabel/filters/xliff/xliffimport.cpp')
-rw-r--r-- | kbabel/filters/xliff/xliffimport.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/kbabel/filters/xliff/xliffimport.cpp b/kbabel/filters/xliff/xliffimport.cpp index f7de63ce..25f34ec3 100644 --- a/kbabel/filters/xliff/xliffimport.cpp +++ b/kbabel/filters/xliff/xliffimport.cpp @@ -48,12 +48,12 @@ */ // Qt include files -#include <qfile.h> -#include <qfileinfo.h> -#include <qobject.h> -#include <qregexp.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqobject.h> +#include <tqregexp.h> +#include <tqstring.h> +#include <tqstringlist.h> // KDE include files #include <kdebug.h> #include <kgenericfactory.h> @@ -68,19 +68,19 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_xliffimport, KGenericFactory<XLIFFImportPlugi using namespace KBabel; -XLIFFImportPlugin::XLIFFImportPlugin( QObject * parent, const char * name, const QStringList& ) +XLIFFImportPlugin::XLIFFImportPlugin( TQObject * parent, const char * name, const TQStringList& ) : CatalogImportPlugin( parent, name ) { } -ConversionStatus XLIFFImportPlugin::load( const QString& filename, const QString& ) +ConversionStatus XLIFFImportPlugin::load( const TQString& filename, const TQString& ) { if ( filename.isEmpty( ) ) { kdDebug( KDEBUG_AREA ) << "fatal error: empty filename to open" << endl; return NO_FILE; } - QFileInfo info( filename ); + TQFileInfo info( filename ); if ( !info.exists( ) || info.isDir( ) ) return NO_FILE; @@ -88,14 +88,14 @@ ConversionStatus XLIFFImportPlugin::load( const QString& filename, const QString if ( !info.isReadable( ) ) return NO_PERMISSIONS; - QFile file( filename ); + TQFile file( filename ); if ( !file.open( IO_ReadOnly ) ) return NO_PERMISSIONS; - QString errorMsg; + TQString errorMsg; int errorLine, errorColumn; - QDomDocument doc; + TQDomDocument doc; if ( !doc.setContent( &file, &errorMsg, &errorLine, &errorColumn ) ) { file.close( ); kdError ( KDEBUG_AREA ) << "Parsing error at line " << errorLine << ", column " << errorColumn << ", error " << errorMsg << endl; @@ -105,7 +105,7 @@ ConversionStatus XLIFFImportPlugin::load( const QString& filename, const QString extraData.clear(); - const QDomElement documentElement( doc.documentElement() ); + const TQDomElement documentElement( doc.documentElement() ); msgcnt = documentElement.elementsByTagName( "trans-unit" ).count(); extraData.append( doc.toString() ); @@ -128,32 +128,32 @@ ConversionStatus XLIFFImportPlugin::load( const QString& filename, const QString return OK; } -void XLIFFImportPlugin::parse( const QDomElement& parentElement ) +void XLIFFImportPlugin::parse( const TQDomElement& parentElement ) { - QDomNode node = parentElement.firstChild( ); + TQDomNode node = parentElement.firstChild( ); while ( !node.isNull( ) ) { if ( node.isElement( ) ) { - QDomElement elem = node.toElement( ); + TQDomElement elem = node.toElement( ); if ( elem.tagName( ) == "body" ) { // nothing to do here } else if ( elem.tagName( ) == "file" ) { - context = elem.attribute( "original", QString() ); + context = elem.attribute( "original", TQString() ); kdDebug ( KDEBUG_AREA ) << "Found file: " << context << endl; } else if ( elem.tagName( ) == "trans-unit" ) { CatalogItem item; - QString comment; + TQString comment; bool isObsolete = false; - const QString id = elem.attribute ("id"); + const TQString id = elem.attribute ("id"); - QDomNode childNode = node.firstChild(); + TQDomNode childNode = node.firstChild(); for ( ; ! childNode.isNull() ; childNode = childNode.nextSibling() ) { if ( childNode.isElement() ) { - const QDomElement elem = childNode.toElement( ); + const TQDomElement elem = childNode.toElement( ); if ( elem.tagName( ) == "source" ) { item.setMsgid( elem.text( ) ); } else if ( elem.tagName( ) == "target" ) { |