diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-12 01:36:19 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-12 01:36:19 +0000 |
commit | 99a2774ca6f1cab334de5d43fe36fc44ae889a4c (patch) | |
tree | eff34cf0762227f6baf2a93e8fef48d4bed2651c /kbabel/filters | |
parent | 1c104292188541106338d4940b0f04beeb4301a0 (diff) | |
download | tdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.tar.gz tdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.zip |
TQt4 convert kdesdk
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1236185 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kbabel/filters')
-rw-r--r-- | kbabel/filters/gettext/gettextexport.cpp | 22 | ||||
-rw-r--r-- | kbabel/filters/gettext/gettextexport.h | 10 | ||||
-rw-r--r-- | kbabel/filters/gettext/gettextimport.cpp | 76 | ||||
-rw-r--r-- | kbabel/filters/gettext/gettextimport.h | 14 | ||||
-rw-r--r-- | kbabel/filters/linguist/linguistexport.cpp | 22 | ||||
-rw-r--r-- | kbabel/filters/linguist/linguistexport.h | 10 | ||||
-rw-r--r-- | kbabel/filters/linguist/linguistimport.cpp | 20 | ||||
-rw-r--r-- | kbabel/filters/linguist/linguistimport.h | 16 | ||||
-rw-r--r-- | kbabel/filters/xliff/xliffexport.cpp | 22 | ||||
-rw-r--r-- | kbabel/filters/xliff/xliffexport.h | 10 | ||||
-rw-r--r-- | kbabel/filters/xliff/xliffimport.cpp | 20 | ||||
-rw-r--r-- | kbabel/filters/xliff/xliffimport.h | 12 |
12 files changed, 127 insertions, 127 deletions
diff --git a/kbabel/filters/gettext/gettextexport.cpp b/kbabel/filters/gettext/gettextexport.cpp index c2fe9c67..21db665e 100644 --- a/kbabel/filters/gettext/gettextexport.cpp +++ b/kbabel/filters/gettext/gettextexport.cpp @@ -21,11 +21,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -51,12 +51,12 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_gettextexport, KGenericFactory<GettextExportP using namespace KBabel; -GettextExportPlugin::GettextExportPlugin(TQObject* parent, const char* name, const TQStringList &) : - CatalogExportPlugin(parent,name), m_wrapWidth( -1 ) +GettextExportPlugin::GettextExportPlugin(TQObject* tqparent, const char* name, const TQStringList &) : + CatalogExportPlugin(tqparent,name), m_wrapWidth( -1 ) { } -ConversionStatus GettextExportPlugin::save(const TQString& localFile , const TQString& mimetype, const Catalog* catalog) +ConversiontqStatus GettextExportPlugin::save(const TQString& localFile , const TQString& mimetype, const Catalog* catalog) { // check, whether we know how to handle the extra data if( catalog->importPluginID() != "GNU gettext") @@ -70,7 +70,7 @@ ConversionStatus GettextExportPlugin::save(const TQString& localFile , const TQS if(file.open(IO_WriteOnly)) { - int progressRatio = QMAX(100/ QMAX(catalog->numberOfEntries(),1), 1); + int progressRatio = TQMAX(100/ TQMAX(catalog->numberOfEntries(),1), 1); emit signalResetProgressBar(i18n("saving file"),100); TQTextStream stream(&file); @@ -196,7 +196,7 @@ ConversionStatus GettextExportPlugin::save(const TQString& localFile , const TQS } else { - //emit signalError(i18n("Wasn't able to open file %1").arg(filename.ascii())); + //emit signalError(i18n("Wasn't able to open file %1").tqarg(filename.ascii())); return OS_ERROR; } @@ -211,7 +211,7 @@ void GettextExportPlugin::writeComment( TQTextStream& stream, const TQString& co int pos = 0; for(;;) { - const int newpos = comment.find( '\n', pos, false ); + const int newpos = comment.tqfind( '\n', pos, false ); if ( newpos == pos ) { ++pos; @@ -305,7 +305,7 @@ void GettextExportPlugin::writeKeyword( TQTextStream& stream, const TQString& ke realText.remove( '\n' ); bool needFirstEmptyLine = false; - if ( realText.find( "\\n" ) != -1 ) + if ( realText.tqfind( "\\n" ) != -1 ) { // We have more than one (logical) line, so write the extra empty line needFirstEmptyLine = true; @@ -340,7 +340,7 @@ void GettextExportPlugin::writeKeyword( TQTextStream& stream, const TQString& ke // Be sure that at least two useful characters are written, even if the wrap width is too small availableWidth = 2; } - const int newlinePos = realText.find ( "\\n", pos ); + const int newlinePos = realText.tqfind ( "\\n", pos ); if ( ( newlinePos >= 0 ) && ( newlinePos - pos + 2 < availableWidth ) ) { // The newline is near than the maximum available numbers of characters diff --git a/kbabel/filters/gettext/gettextexport.h b/kbabel/filters/gettext/gettextexport.h index 2d1b9681..cfe46ed0 100644 --- a/kbabel/filters/gettext/gettextexport.h +++ b/kbabel/filters/gettext/gettextexport.h @@ -20,11 +20,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -53,8 +53,8 @@ class TQTextCodec; class GettextExportPlugin: public KBabel::CatalogExportPlugin { public: - GettextExportPlugin(TQObject* parent, const char* name, const TQStringList &); - virtual KBabel::ConversionStatus save(const TQString& file, const TQString& mimetype, const KBabel::Catalog* catalog); + GettextExportPlugin(TQObject* tqparent, const char* name, const TQStringList &); + virtual KBabel::ConversiontqStatus save(const TQString& file, const TQString& mimetype, const KBabel::Catalog* catalog); private: /** diff --git a/kbabel/filters/gettext/gettextimport.cpp b/kbabel/filters/gettext/gettextimport.cpp index 9210c1a9..848cfeb1 100644 --- a/kbabel/filters/gettext/gettextimport.cpp +++ b/kbabel/filters/gettext/gettextimport.cpp @@ -1,4 +1,4 @@ -// kate: space-indent on; indent-width 3; replace-tabs on; +// kate: space-indent on; indent-width 3; tqreplace-tabs on; /* **************************************************************************** This file is part of KBabel @@ -23,11 +23,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -53,11 +53,11 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_gettextimport, KGenericFactory<GettextImportP using namespace KBabel; -GettextImportPlugin::GettextImportPlugin(TQObject* parent, const char* name, const TQStringList &) : CatalogImportPlugin(parent,name) +GettextImportPlugin::GettextImportPlugin(TQObject* tqparent, const char* name, const TQStringList &) : CatalogImportPlugin(tqparent,name) { } -ConversionStatus GettextImportPlugin::load(const TQString& filename, const TQString&) +ConversiontqStatus GettextImportPlugin::load(const TQString& filename, const TQString&) { kdDebug( KBABEL ) << k_funcinfo << endl; @@ -117,7 +117,7 @@ ConversionStatus GettextImportPlugin::load(const TQString& filename, const TQStr kdDebug(KBABEL) << "start parsing..." << endl; // first read header - const ConversionStatus status = readHeader(stream); + const ConversiontqStatus status = readHeader(stream); if ( status == RECOVERED_PARSE_ERROR ) @@ -163,7 +163,7 @@ ConversionStatus GettextImportPlugin::load(const TQString& filename, const TQStr } // check if header seems to indicate docbook content generated by xml2pot - const bool docbookContent = (tempHeader.msgstr().find("application/x-xml2pot") != tempHeader.msgstr().end()); + const bool docbookContent = (tempHeader.msgstr().tqfind("application/x-xml2pot") != tempHeader.msgstr().end()); // now parse the rest of the file uint counter=0; @@ -179,7 +179,7 @@ ConversionStatus GettextImportPlugin::load(const TQString& filename, const TQStr return STOPPED; } - const ConversionStatus success=readEntry(stream); + const ConversiontqStatus success=readEntry(stream); if(success==OK) { @@ -200,7 +200,7 @@ ConversionStatus GettextImportPlugin::load(const TQString& filename, const TQStr appendCatalogItem(tempCatItem); // check if first comment seems to indicate a docbook source file if(counter==0) - docbookFile = ( tempCatItem.comment().find(".docbook") != -1 ); + docbookFile = ( tempCatItem.comment().tqfind(".docbook") != -1 ); } } else if(success==RECOVERED_PARSE_ERROR) @@ -297,12 +297,12 @@ TQTextCodec* GettextImportPlugin::codecForArray(TQByteArray& array, bool* hadCod } TQTextStream stream( array, IO_ReadOnly ); - // ### TODO Qt4: see if it can be done with TQByteArray alone, in an encoding-neutral way. + // ### TODO TQt4: see if it can be done with TQByteArray alone, in an encoding-neutral way. // Set ISO-8859-1 as it is a relatively neutral encoding when reading (compared to UTF-8 or a random locale encoing) stream.setEncoding( TQTextStream::Latin1 ); // first read header - ConversionStatus status = readHeader(stream); + ConversiontqStatus status = readHeader(stream); if(status!=OK && status != RECOVERED_PARSE_ERROR) { kdDebug(KBABEL) << "wasn't able to read header" << endl; @@ -360,11 +360,11 @@ TQTextCodec* GettextImportPlugin::codecForArray(TQByteArray& array, bool* hadCod return codec; } -ConversionStatus GettextImportPlugin::readHeader(TQTextStream& stream) +ConversiontqStatus GettextImportPlugin::readHeader(TQTextStream& stream) { CatalogItem temp; int filePos=stream.device()->at(); - ConversionStatus status=readEntry(stream); + ConversiontqStatus status=readEntry(stream); if(status==OK || status==RECOVERED_PARSE_ERROR) { @@ -380,7 +380,7 @@ ConversionStatus GettextImportPlugin::readHeader(TQTextStream& stream) return PARSE_ERROR; } -ConversionStatus GettextImportPlugin::readEntry(TQTextStream& stream) +ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream) { //kdDebug( KBABEL ) << k_funcinfo << " START" << endl; enum {Begin,Comment,Msgctxt,Msgid,Msgstr} part=Begin; @@ -408,7 +408,7 @@ ConversionStatus GettextImportPlugin::readEntry(TQTextStream& stream) //kdDebug() << "Parsing line: " << line << endl; - // ### Qt4: no need of a such a check + // ### TQt4: no need of a such a check if(line.isNull()) // file end break; else if ( line.startsWith( "<<<<<<<" ) || line.startsWith( "=======" ) || line.startsWith( ">>>>>>>" ) ) @@ -439,7 +439,7 @@ ConversionStatus GettextImportPlugin::readEntry(TQTextStream& stream) part=Comment; _comment=line; } - else if(line.find(TQRegExp("^msgctxt\\s*\".*\"$")) != -1) + else if(line.tqfind(TQRegExp("^msgctxt\\s*\".*\"$")) != -1) { part=Msgctxt; @@ -449,7 +449,7 @@ ConversionStatus GettextImportPlugin::readEntry(TQTextStream& stream) _msgctxt=line; seenMsgctxt=true; } - else if(line.find(TQRegExp("^msgid\\s*\".*\"$")) != -1) + else if(line.tqfind(TQRegExp("^msgid\\s*\".*\"$")) != -1) { part=Msgid; @@ -460,7 +460,7 @@ ConversionStatus GettextImportPlugin::readEntry(TQTextStream& stream) (*(_msgid).begin())=line; } // one of the quotation marks is missing - else if(line.find(TQRegExp("^msgid\\s*\"?.*\"?$")) != -1) + else if(line.tqfind(TQRegExp("^msgid\\s*\"?.*\"?$")) != -1) { part=Msgid; @@ -494,7 +494,7 @@ ConversionStatus GettextImportPlugin::readEntry(TQTextStream& stream) { _comment+=("\n"+line); } - else if(line.find(TQRegExp("^msgctxt\\s*\".*\"$")) != -1) + else if(line.tqfind(TQRegExp("^msgctxt\\s*\".*\"$")) != -1) { part=Msgctxt; @@ -504,7 +504,7 @@ ConversionStatus GettextImportPlugin::readEntry(TQTextStream& stream) _msgctxt=line; seenMsgctxt=true; } - else if(line.find(TQRegExp("^msgid\\s*\".*\"$")) != -1) + else if(line.tqfind(TQRegExp("^msgid\\s*\".*\"$")) != -1) { part=Msgid; @@ -515,7 +515,7 @@ ConversionStatus GettextImportPlugin::readEntry(TQTextStream& stream) (*(_msgid).begin())=line; } // one of the quotation marks is missing - else if(line.find(TQRegExp("^msgid\\s*\"?.*\"?$")) != -1) + else if(line.tqfind(TQRegExp("^msgid\\s*\"?.*\"?$")) != -1) { part=Msgid; @@ -539,7 +539,7 @@ ConversionStatus GettextImportPlugin::readEntry(TQTextStream& stream) { if(line.isEmpty()) continue; - else if(line.find(TQRegExp("^\".*\\n?\"$")) != -1) + else if(line.tqfind(TQRegExp("^\".*\\n?\"$")) != -1) { // remove quotes at beginning and the end of the lines line.remove(TQRegExp("^\"")); @@ -551,7 +551,7 @@ ConversionStatus GettextImportPlugin::readEntry(TQTextStream& stream) else _msgctxt+=("\n"+line); } - else if(line.find(TQRegExp("^msgid\\s*\".*\"$")) != -1) + else if(line.tqfind(TQRegExp("^msgid\\s*\".*\"$")) != -1) { part=Msgid; @@ -562,7 +562,7 @@ ConversionStatus GettextImportPlugin::readEntry(TQTextStream& stream) (*(_msgid).begin())=line; } // one of the quotation marks is missing - else if(line.find(TQRegExp("^msgid\\s*\"?.*\"?$")) != -1) + else if(line.tqfind(TQRegExp("^msgid\\s*\"?.*\"?$")) != -1) { part=Msgid; @@ -586,7 +586,7 @@ ConversionStatus GettextImportPlugin::readEntry(TQTextStream& stream) { if(line.isEmpty()) continue; - else if(line.find(TQRegExp("^\".*\\n?\"$")) != -1) + else if(line.tqfind(TQRegExp("^\".*\\n?\"$")) != -1) { // remove quotes at beginning and the end of the lines line.remove(TQRegExp("^\"")); @@ -604,7 +604,7 @@ ConversionStatus GettextImportPlugin::readEntry(TQTextStream& stream) else (*it)+=("\n"+line); } - else if(line.find(TQRegExp("^msgid_plural\\s*\".*\"$")) != -1) + else if(line.tqfind(TQRegExp("^msgid_plural\\s*\".*\"$")) != -1) { part=Msgid; _gettextPluralForm = true; @@ -616,7 +616,7 @@ ConversionStatus GettextImportPlugin::readEntry(TQTextStream& stream) _msgid.append(line); } // one of the quotation marks is missing - else if(line.find(TQRegExp("^msgid_plural\\s*\"?.*\"?$")) != -1) + else if(line.tqfind(TQRegExp("^msgid_plural\\s*\"?.*\"?$")) != -1) { part=Msgid; _gettextPluralForm = true; @@ -631,7 +631,7 @@ ConversionStatus GettextImportPlugin::readEntry(TQTextStream& stream) recoverableError=true; } else if(!_gettextPluralForm - && (line.find(TQRegExp("^msgstr\\s*\".*\\n?\"$")) != -1)) + && (line.tqfind(TQRegExp("^msgstr\\s*\".*\\n?\"$")) != -1)) { part=Msgstr; @@ -642,7 +642,7 @@ ConversionStatus GettextImportPlugin::readEntry(TQTextStream& stream) (*msgstrIt)=line; } else if(!_gettextPluralForm - && line.find(TQRegExp("^msgstr\\s*\"?.*\\n?\"?$")) != -1) + && line.tqfind(TQRegExp("^msgstr\\s*\"?.*\\n?\"?$")) != -1) { part=Msgstr; @@ -656,7 +656,7 @@ ConversionStatus GettextImportPlugin::readEntry(TQTextStream& stream) recoverableError=true; } else if( _gettextPluralForm - && (line.find(TQRegExp("^msgstr\\[0\\]\\s*\".*\\n?\"$")) != -1)) + && (line.tqfind(TQRegExp("^msgstr\\[0\\]\\s*\".*\\n?\"$")) != -1)) { part=Msgstr; @@ -667,7 +667,7 @@ ConversionStatus GettextImportPlugin::readEntry(TQTextStream& stream) (*msgstrIt)=line; } else if( _gettextPluralForm - && (line.find(TQRegExp("^msgstr\\[0\\]\\s*\"?.*\\n?\"?$")) != -1)) + && (line.tqfind(TQRegExp("^msgstr\\[0\\]\\s*\"?.*\\n?\"?$")) != -1)) { part=Msgstr; @@ -694,7 +694,7 @@ ConversionStatus GettextImportPlugin::readEntry(TQTextStream& stream) break; } // a line of the msgid with a missing quotation mark - else if(line.find(TQRegExp("^\"?.+\\n?\"?$")) != -1) + else if(line.tqfind(TQRegExp("^\"?.+\\n?\"?$")) != -1) { recoverableError=true; @@ -726,7 +726,7 @@ ConversionStatus GettextImportPlugin::readEntry(TQTextStream& stream) if(line.isEmpty()) continue; // another line of the msgstr - else if(line.find(TQRegExp("^\".*\\n?\"$")) != -1) + else if(line.tqfind(TQRegExp("^\".*\\n?\"$")) != -1) { // remove quotes at beginning and the end of the lines line.remove(TQRegExp("^\"")); @@ -738,7 +738,7 @@ ConversionStatus GettextImportPlugin::readEntry(TQTextStream& stream) (*msgstrIt)+=("\n"+line); } else if( _gettextPluralForm - && (line.find(TQRegExp("^msgstr\\[[0-9]+\\]\\s*\".*\\n?\"$")) != -1)) + && (line.tqfind(TQRegExp("^msgstr\\[[0-9]+\\]\\s*\".*\\n?\"$")) != -1)) { // remove quotes at beginning and the end of the lines line.remove(TQRegExp("^msgstr\\[[0-9]+\\]\\s*\"?")); @@ -747,7 +747,7 @@ ConversionStatus GettextImportPlugin::readEntry(TQTextStream& stream) msgstrIt=_msgstr.append(line); } else if( _gettextPluralForm - && (line.find(TQRegExp("^msgstr\\[[0-9]\\]\\s*\"?.*\\n?\"?$")) != -1)) + && (line.tqfind(TQRegExp("^msgstr\\[[0-9]\\]\\s*\"?.*\\n?\"?$")) != -1)) { // remove quotes at beginning and the end of the lines line.remove(TQRegExp("^msgstr\\[[0-9]\\]\\s*\"?")); @@ -758,7 +758,7 @@ ConversionStatus GettextImportPlugin::readEntry(TQTextStream& stream) if(!line.isEmpty()) recoverableError=true; } - else if((line.find(TQRegExp("^\\s*msgid")) != -1) || (line.find(TQRegExp("^\\s*#")) != -1)) + else if((line.tqfind(TQRegExp("^\\s*msgid")) != -1) || (line.tqfind(TQRegExp("^\\s*#")) != -1)) { // We have read successfully one entry, so end loop. stream.device()->at(pos);// reset position in stream to beginning of this line @@ -771,7 +771,7 @@ ConversionStatus GettextImportPlugin::readEntry(TQTextStream& stream) break; } // another line of the msgstr with a missing quotation mark - else if(line.find(TQRegExp("^\"?.+\\n?\"?$")) != -1) + else if(line.tqfind(TQRegExp("^\"?.+\\n?\"?$")) != -1) { recoverableError=true; diff --git a/kbabel/filters/gettext/gettextimport.h b/kbabel/filters/gettext/gettextimport.h index 54ced3f0..5549168b 100644 --- a/kbabel/filters/gettext/gettextimport.h +++ b/kbabel/filters/gettext/gettextimport.h @@ -20,11 +20,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -49,14 +49,14 @@ class TQTextCodec; class GettextImportPlugin: public KBabel::CatalogImportPlugin { public: - GettextImportPlugin(TQObject* parent, const char* name, const TQStringList &); - virtual KBabel::ConversionStatus load(const TQString& file, const TQString& mimetype); + GettextImportPlugin(TQObject* tqparent, const char* name, const TQStringList &); + virtual KBabel::ConversiontqStatus load(const TQString& file, const TQString& mimetype); virtual const TQString id() { return "GNU gettext"; } private: TQTextCodec* codecForArray(TQByteArray& arary, bool* hadCodec); - KBabel::ConversionStatus readHeader(TQTextStream& stream); - KBabel::ConversionStatus readEntry(TQTextStream& stream); + KBabel::ConversiontqStatus readHeader(TQTextStream& stream); + KBabel::ConversiontqStatus readEntry(TQTextStream& stream); // description of the last read entry TQString _msgctxt; diff --git a/kbabel/filters/linguist/linguistexport.cpp b/kbabel/filters/linguist/linguistexport.cpp index af0a3298..3b5bc5fc 100644 --- a/kbabel/filters/linguist/linguistexport.cpp +++ b/kbabel/filters/linguist/linguistexport.cpp @@ -24,11 +24,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -53,15 +53,15 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_linguistexport, KGenericFactory<LinguistExpor using namespace KBabel; -LinguistExportPlugin::LinguistExportPlugin( TQObject * parent, const char * name, const TQStringList& ) - : CatalogExportPlugin( parent, name ) +LinguistExportPlugin::LinguistExportPlugin( TQObject * tqparent, const char * name, const TQStringList& ) + : CatalogExportPlugin( tqparent, name ) { } -ConversionStatus LinguistExportPlugin::save( const TQString& filename, const TQString&, const Catalog * catalog ) +ConversiontqStatus LinguistExportPlugin::save( const TQString& filename, const TQString&, const Catalog * catalog ) { // Check whether we know how to handle the extra data. - if ( catalog->importPluginID( ) != "Qt translation source" ) + if ( catalog->importPluginID( ) != "TQt translation source" ) return UNSUPPORTED_TYPE; TQFile file( filename ); @@ -76,7 +76,7 @@ ConversionStatus LinguistExportPlugin::save( const TQString& filename, const TQS doc.appendChild( doc.createElement( "TS" ) ); // Create a default context just in case none is given in the messages. - context = "Default"; // ### FIXME: Qt's default seems named "@default" + context = "Default"; // ### FIXME: TQt's default seems named "@default" bool fuzzy; @@ -123,17 +123,17 @@ const TQString LinguistExportPlugin::extractComment( TQDomDocument& doc, const T * writing the comment for Linguist */ - int pos = comment.find("#, fuzzy"); + int pos = comment.tqfind("#, fuzzy"); if ( pos >= 0) { fuzzy = true; comment.remove("#, fuzzy"); } TQString newContext; - pos = comment.find( '\n' ); + pos = comment.tqfind( '\n' ); if ( pos >= 0 ) { newContext = comment.left( pos ); - comment.replace( 0, pos + 1, "" ); // ### TODO: use TQString::remove + comment.tqreplace( 0, pos + 1, "" ); // ### TODO: use TQString::remove } else { newContext = comment; comment = ""; // ### TODO: use TQString() instead of "" diff --git a/kbabel/filters/linguist/linguistexport.h b/kbabel/filters/linguist/linguistexport.h index b3399ed1..f4ed3240 100644 --- a/kbabel/filters/linguist/linguistexport.h +++ b/kbabel/filters/linguist/linguistexport.h @@ -22,11 +22,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -51,8 +51,8 @@ class Catalog; class LinguistExportPlugin : public KBabel::CatalogExportPlugin { public: - LinguistExportPlugin( TQObject * parent, const char * name, const TQStringList& ); - virtual KBabel::ConversionStatus save( const TQString& filename, const TQString& mimetype, const KBabel::Catalog * catalog ); + LinguistExportPlugin( TQObject * tqparent, const char * name, const TQStringList& ); + virtual KBabel::ConversiontqStatus save( const TQString& filename, const TQString& mimetype, const KBabel::Catalog * catalog ); private: const TQString extractComment( TQDomDocument& doc, const TQString& s, bool& fuzzy ); diff --git a/kbabel/filters/linguist/linguistimport.cpp b/kbabel/filters/linguist/linguistimport.cpp index a1870bd7..b46f5f97 100644 --- a/kbabel/filters/linguist/linguistimport.cpp +++ b/kbabel/filters/linguist/linguistimport.cpp @@ -1,4 +1,4 @@ -// kate: space-indent on; indent-width 2; replace-tabs on; +// kate: space-indent on; indent-width 2; tqreplace-tabs on; /* **************************************************************************** This file is part of KBabel @@ -26,18 +26,18 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. **************************************************************************** */ -// Qt include files +// TQt include files #include <tqfile.h> #include <tqfileinfo.h> #include <tqobject.h> @@ -55,12 +55,12 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_linguistimport, KGenericFactory<LinguistImpor using namespace KBabel; -LinguistImportPlugin::LinguistImportPlugin( TQObject * parent, const char * name, const TQStringList& ) - : CatalogImportPlugin( parent, name ) +LinguistImportPlugin::LinguistImportPlugin( TQObject * tqparent, const char * name, const TQStringList& ) + : CatalogImportPlugin( tqparent, name ) { } -ConversionStatus LinguistImportPlugin::load( const TQString& filename, const TQString& ) +ConversiontqStatus LinguistImportPlugin::load( const TQString& filename, const TQString& ) { if ( filename.isEmpty( ) ) { kdDebug( ) << "fatal error: empty filename to open" << endl; @@ -113,9 +113,9 @@ ConversionStatus LinguistImportPlugin::load( const TQString& filename, const TQS return OK; } -void LinguistImportPlugin::parse( const TQDomElement& parentElement ) +void LinguistImportPlugin::parse( const TQDomElement& tqparentElement ) { - TQDomNode node = parentElement.firstChild( ); + TQDomNode node = tqparentElement.firstChild( ); while ( !node.isNull( ) ) { if ( node.isElement( ) ) { diff --git a/kbabel/filters/linguist/linguistimport.h b/kbabel/filters/linguist/linguistimport.h index 175a28f8..fa7aa36c 100644 --- a/kbabel/filters/linguist/linguistimport.h +++ b/kbabel/filters/linguist/linguistimport.h @@ -22,11 +22,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -45,18 +45,18 @@ class TQString; class TQStringList; /** - * The class for importing Qt's translation source files. + * The class for importing TQt's translation source files. */ class LinguistImportPlugin : public KBabel::CatalogImportPlugin { public: - LinguistImportPlugin( TQObject * parent, const char * name, const TQStringList& ); + LinguistImportPlugin( TQObject * tqparent, const char * name, const TQStringList& ); - virtual KBabel::ConversionStatus load( const TQString& filename, const TQString& mimetype ); - virtual const TQString id( ) { return "Qt translation source"; } + virtual KBabel::ConversiontqStatus load( const TQString& filename, const TQString& mimetype ); + virtual const TQString id( ) { return "TQt translation source"; } private: - void parse( const TQDomElement& parentElement ); + void parse( const TQDomElement& tqparentElement ); private: uint msgcnt; diff --git a/kbabel/filters/xliff/xliffexport.cpp b/kbabel/filters/xliff/xliffexport.cpp index 9400b9c6..82033521 100644 --- a/kbabel/filters/xliff/xliffexport.cpp +++ b/kbabel/filters/xliff/xliffexport.cpp @@ -24,11 +24,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -53,12 +53,12 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_xliffexport, KGenericFactory<XLIFFExportPlugi using namespace KBabel; -XLIFFExportPlugin::XLIFFExportPlugin( TQObject * parent, const char * name, const TQStringList& ) - : CatalogExportPlugin( parent, name ) +XLIFFExportPlugin::XLIFFExportPlugin( TQObject * tqparent, const char * name, const TQStringList& ) + : CatalogExportPlugin( tqparent, name ) { } -ConversionStatus XLIFFExportPlugin::save( const TQString& filename, const TQString&, const Catalog * catalog ) +ConversiontqStatus XLIFFExportPlugin::save( const TQString& filename, const TQString&, const Catalog * catalog ) { // Check whether we know how to handle the extra data. if ( catalog->importPluginID( ) != "XLIFF 1.1" ) @@ -147,7 +147,7 @@ void XLIFFExportPlugin::createMessage( TQDomDocument& doc, TQDomElement& transla TQDomElement XLIFFExportPlugin::getContext( TQDomDocument& doc, const TQString& file, const TQString& id ) { // Find out whether there is already such a context in the TQDomDocument. - TQDomNode parentelem = doc.documentElement(); + TQDomNode tqparentelem = doc.documentElement(); TQDomNode elem = doc.documentElement( ).firstChild( ); while ( !elem.isNull( ) ) { if ( elem.isElement( ) && elem.toElement().tagName( ) == "file" && elem.toElement().attribute ("original") == file ) { @@ -162,12 +162,12 @@ TQDomElement XLIFFExportPlugin::getContext( TQDomDocument& doc, const TQString& kdError () << "File not found at all, creating" << endl; TQDomElement newelem = doc.createElement ("file"); newelem.setAttribute ("original", file); - parentelem.appendChild (newelem); + tqparentelem.appendChild (newelem); elem = newelem; } // lookup body tag - parentelem = elem; + tqparentelem = elem; elem = elem.firstChild (); while ( !elem.isNull( ) ) { if ( elem.isElement( ) && elem.toElement().tagName( ) == "body" ) { @@ -181,7 +181,7 @@ TQDomElement XLIFFExportPlugin::getContext( TQDomDocument& doc, const TQString& { kdError () << "File body not found at all, creating" << endl; TQDomElement newelem = doc.createElement ("body"); - parentelem.appendChild (newelem); + tqparentelem.appendChild (newelem); elem = newelem; } @@ -192,7 +192,7 @@ TQDomElement XLIFFExportPlugin::getContext( TQDomDocument& doc, const TQString& kdError () << "Trans-unit not found at all, creating" << endl; TQDomElement newelem = doc.createElement ("trans-unit"); newelem.setAttribute ("id", id); - parentelem.appendChild (newelem); + tqparentelem.appendChild (newelem); elem = newelem; } diff --git a/kbabel/filters/xliff/xliffexport.h b/kbabel/filters/xliff/xliffexport.h index cc44cbec..71253133 100644 --- a/kbabel/filters/xliff/xliffexport.h +++ b/kbabel/filters/xliff/xliffexport.h @@ -22,11 +22,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -51,8 +51,8 @@ class Catalog; class XLIFFExportPlugin : public KBabel::CatalogExportPlugin { public: - XLIFFExportPlugin( TQObject * parent, const char * name, const TQStringList& ); - virtual KBabel::ConversionStatus save( const TQString& filename, const TQString& mimetype, const KBabel::Catalog * catalog ); + XLIFFExportPlugin( TQObject * tqparent, const char * name, const TQStringList& ); + virtual KBabel::ConversiontqStatus save( const TQString& filename, const TQString& mimetype, const KBabel::Catalog * catalog ); private: TQDomElement extractComment( TQDomDocument& doc, const TQString& s ); diff --git a/kbabel/filters/xliff/xliffimport.cpp b/kbabel/filters/xliff/xliffimport.cpp index 25f34ec3..9d14c054 100644 --- a/kbabel/filters/xliff/xliffimport.cpp +++ b/kbabel/filters/xliff/xliffimport.cpp @@ -1,4 +1,4 @@ -// kate: space-indent on; indent-width 2; replace-tabs on; +// kate: space-indent on; indent-width 2; tqreplace-tabs on; /* **************************************************************************** This file is part of KBabel @@ -26,11 +26,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -47,7 +47,7 @@ optional comments */ -// Qt include files +// TQt include files #include <tqfile.h> #include <tqfileinfo.h> #include <tqobject.h> @@ -68,12 +68,12 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_xliffimport, KGenericFactory<XLIFFImportPlugi using namespace KBabel; -XLIFFImportPlugin::XLIFFImportPlugin( TQObject * parent, const char * name, const TQStringList& ) - : CatalogImportPlugin( parent, name ) +XLIFFImportPlugin::XLIFFImportPlugin( TQObject * tqparent, const char * name, const TQStringList& ) + : CatalogImportPlugin( tqparent, name ) { } -ConversionStatus XLIFFImportPlugin::load( const TQString& filename, const TQString& ) +ConversiontqStatus XLIFFImportPlugin::load( const TQString& filename, const TQString& ) { if ( filename.isEmpty( ) ) { kdDebug( KDEBUG_AREA ) << "fatal error: empty filename to open" << endl; @@ -128,9 +128,9 @@ ConversionStatus XLIFFImportPlugin::load( const TQString& filename, const TQStri return OK; } -void XLIFFImportPlugin::parse( const TQDomElement& parentElement ) +void XLIFFImportPlugin::parse( const TQDomElement& tqparentElement ) { - TQDomNode node = parentElement.firstChild( ); + TQDomNode node = tqparentElement.firstChild( ); while ( !node.isNull( ) ) { if ( node.isElement( ) ) { diff --git a/kbabel/filters/xliff/xliffimport.h b/kbabel/filters/xliff/xliffimport.h index e86d59a3..2dbe1066 100644 --- a/kbabel/filters/xliff/xliffimport.h +++ b/kbabel/filters/xliff/xliffimport.h @@ -22,11 +22,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -50,13 +50,13 @@ class TQStringList; class XLIFFImportPlugin : public KBabel::CatalogImportPlugin { public: - XLIFFImportPlugin( TQObject * parent, const char * name, const TQStringList& ); + XLIFFImportPlugin( TQObject * tqparent, const char * name, const TQStringList& ); - virtual KBabel::ConversionStatus load( const TQString& filename, const TQString& mimetype ); + virtual KBabel::ConversiontqStatus load( const TQString& filename, const TQString& mimetype ); virtual const TQString id( ) { return "XLIFF 1.1"; } private: - void parse( const TQDomElement& parentElement ); + void parse( const TQDomElement& tqparentElement ); private: uint msgcnt; |