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/datatools | |
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/datatools')
24 files changed, 167 insertions, 155 deletions
diff --git a/kbabel/datatools/accelerators/main.cc b/kbabel/datatools/accelerators/main.cc index 632eb7b5..b082c635 100644 --- a/kbabel/datatools/accelerators/main.cc +++ b/kbabel/datatools/accelerators/main.cc @@ -19,11 +19,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 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_accelstool, KGenericFactory<AcceleratorTool> using namespace KBabel; -AcceleratorTool::AcceleratorTool( TQObject* parent, const char* name, const TQStringList & ) - : KDataTool( parent, name ), _cache_origin( 0 ) +AcceleratorTool::AcceleratorTool( TQObject* tqparent, const char* name, const TQStringList & ) + : KDataTool( tqparent, name ), _cache_origin( 0 ) { // bogus translation just for allowing the translation i18n("what check found errors","accelerator"); @@ -97,8 +97,8 @@ bool AcceleratorTool::run( const TQString& command, void* data, const TQString& { // FIXME: this should care about plural forms in msgid TQString lineid=item->msgid().first(); - lineid.replace( _context, ""); - lineid.replace(TQRegExp("\\n"),""); + lineid.tqreplace( _context, ""); + lineid.tqreplace(TQRegExp("\\n"),""); lineid.simplifyWhiteSpace(); TQString regStr(_marker); regStr+="[^\\s]"; @@ -110,12 +110,12 @@ bool AcceleratorTool::run( const TQString& command, void* data, const TQString& TQString linestr=(*form); linestr.simplifyWhiteSpace(); - int n = lineid.contains(reg); + int n = lineid.tqcontains(reg); if( _marker == '&' ) - n = n - lineid.contains(TQRegExp("(&[a-z,A-Z,\\-,0-9,#]*;)|(&&(?!&+))")); - int m = linestr.contains(reg); + n = n - lineid.tqcontains(TQRegExp("(&[a-z,A-Z,\\-,0-9,#]*;)|(&&(?!&+))")); + int m = linestr.tqcontains(reg); if( _marker == '&' ) - m = m - linestr.contains(TQRegExp("(&[a-z,A-Z,\\-,0-9,#]*;)|(&&(?!&+))")); + m = m - linestr.tqcontains(TQRegExp("(&[a-z,A-Z,\\-,0-9,#]*;)|(&&(?!&+))")); hasError = hasError || ( n<=1 && m != n); } } diff --git a/kbabel/datatools/accelerators/main.h b/kbabel/datatools/accelerators/main.h index ee9ae3a8..df1617cf 100644 --- a/kbabel/datatools/accelerators/main.h +++ b/kbabel/datatools/accelerators/main.h @@ -19,11 +19,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. @@ -42,9 +42,10 @@ class AcceleratorTool : public KDataTool { Q_OBJECT + TQ_OBJECT public: - AcceleratorTool( TQObject* parent, const char* name, const TQStringList & ); + AcceleratorTool( TQObject* tqparent, const char* name, const TQStringList & ); virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype); private: diff --git a/kbabel/datatools/arguments/main.cc b/kbabel/datatools/arguments/main.cc index e80c7c35..4b533061 100644 --- a/kbabel/datatools/arguments/main.cc +++ b/kbabel/datatools/arguments/main.cc @@ -19,11 +19,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 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_argstool, KGenericFactory<ArgumentTool> ( "kb using namespace KBabel; -ArgumentTool::ArgumentTool( TQObject* parent, const char* name, const TQStringList & ) - : KDataTool( parent, name ), _cache_origin( 0 ) +ArgumentTool::ArgumentTool( TQObject* tqparent, const char* name, const TQStringList & ) + : KDataTool( tqparent, name ), _cache_origin( 0 ) { i18n( "what check found errors","arguments"); } @@ -110,46 +110,46 @@ bool ArgumentTool::run( const TQString& command, void* data, const TQString& dat if( line.startsWith("_n:" )) { // truncate text after first \n to get args only once - line = line.mid(0,line.find("\\n")); + line = line.mid(0,line.tqfind("\\n")); } } - line.replace(_context, ""); - line.replace(TQRegExp("\\n"),""); + line.tqreplace(_context, ""); + line.tqreplace(TQRegExp("\\n"),""); line.simplifyWhiteSpace(); // flag, for GNU only we can allow reordering bool non_gnu = (item->pluralForm() == KDESpecific); - int index=line.find(TQRegExp("%.")); + int index=line.tqfind(TQRegExp("%.")); while(index>=0) { - int endIndex=line.find(TQRegExp("[^\\d]"),index+1); + int endIndex=line.tqfind(TQRegExp("[^\\d]"),index+1); if(endIndex<0) { endIndex=line.length(); } - else if( formatChars.contains(line[endIndex]) ) + else if( formatChars.tqcontains(line[endIndex]) ) { endIndex++; } if(endIndex - index > 1 ) { TQString arg = line.mid(index,endIndex-index); - if( arg.contains( TQRegExp("\\d") ) ) { + if( arg.tqcontains( TQRegExp("\\d") ) ) { non_gnu = true; } argList.append(arg); } - index=line.find(TQRegExp("%."),endIndex); + index=line.tqfind(TQRegExp("%."),endIndex); } if( item->pluralForm()==KDESpecific) { // FIXME: this is KDE specific - if( _checkPlurals && line.startsWith("_n:" ) && !argList.contains("%n") ) + if( _checkPlurals && line.startsWith("_n:" ) && !argList.tqcontains("%n") ) { argList.append("%n"); } @@ -180,7 +180,7 @@ bool ArgumentTool::run( const TQString& command, void* data, const TQString& dat line=(*i); - line.replace(TQRegExp("\\n"),""); + line.tqreplace(TQRegExp("\\n"),""); TQRegExp argdesc( "%((["+formatChars+"])" @@ -196,7 +196,7 @@ bool ArgumentTool::run( const TQString& command, void* data, const TQString& dat if( index == -1 ) break; // do not add a redundant argument, if it is non GNU - if( !non_gnu || !foundArgs.contains( argdesc.cap(0) ) ) + if( !non_gnu || !foundArgs.tqcontains( argdesc.cap(0) ) ) foundArgs.append( argdesc.cap( 0 ) ); } while( true ); @@ -205,7 +205,7 @@ bool ArgumentTool::run( const TQString& command, void* data, const TQString& dat if( non_gnu ) { for ( TQStringList::Iterator it = foundArgs.begin(); it != foundArgs.end(); ++it ) { - if( argList.find( *it ) == argList.end() ) { + if( argList.tqfind( *it ) == argList.end() ) { hasError = true; break; } else { @@ -224,10 +224,10 @@ bool ArgumentTool::run( const TQString& command, void* data, const TQString& dat for ( TQStringList::Iterator it = foundArgs.begin(); it != foundArgs.end(); ++it , ++oit) { if( *it == *oit ) { // argument is the same, mark as used - *oit = TQString::null; + *oit = TQString(); } else { // try to strip replacement - int index = (*it).find( '$' ); + int index = (*it).tqfind( '$' ); if( index == -1 ) { // there is no replacement, this is wrong hasError = true; @@ -239,7 +239,7 @@ bool ArgumentTool::run( const TQString& command, void* data, const TQString& dat TQStringList::Iterator a = argList.at( place.toInt()-1 ); if( a != argList.end() && (*a) == arg ) { - (*a) = TQString::null; + (*a) = TQString(); } else { diff --git a/kbabel/datatools/arguments/main.h b/kbabel/datatools/arguments/main.h index ea7e4e23..1831ea33 100644 --- a/kbabel/datatools/arguments/main.h +++ b/kbabel/datatools/arguments/main.h @@ -19,11 +19,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. @@ -42,9 +42,10 @@ class ArgumentTool : public KDataTool { Q_OBJECT + TQ_OBJECT public: - ArgumentTool( TQObject* parent, const char* name, const TQStringList & ); + ArgumentTool( TQObject* tqparent, const char* name, const TQStringList & ); virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype); private: KBabel::Project::Ptr _cache_origin; diff --git a/kbabel/datatools/context/main.cc b/kbabel/datatools/context/main.cc index 066ef430..ed89f125 100644 --- a/kbabel/datatools/context/main.cc +++ b/kbabel/datatools/context/main.cc @@ -19,11 +19,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. @@ -52,8 +52,8 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_contexttool, KGenericFactory<ContextTool> ( " using namespace KBabel; -ContextTool::ContextTool( TQObject* parent, const char* name, const TQStringList & ) - : KDataTool( parent, name ), _cache_origin( 0 ) +ContextTool::ContextTool( TQObject* tqparent, const char* name, const TQStringList & ) + : KDataTool( tqparent, name ), _cache_origin( 0 ) { i18n("what check found errors","context info"); } @@ -92,8 +92,8 @@ bool ContextTool::run( const TQString& command, void* data, const TQString& data bool hasError = false; - if(!item->isUntranslated() && item->msgid().first().contains(_context) - && item->msgstr().first().contains(_context) ) + if(!item->isUntranslated() && item->msgid().first().tqcontains(_context) + && item->msgstr().first().tqcontains(_context) ) { hasError = true; } diff --git a/kbabel/datatools/context/main.h b/kbabel/datatools/context/main.h index 8dc24e9f..c85d8d83 100644 --- a/kbabel/datatools/context/main.h +++ b/kbabel/datatools/context/main.h @@ -19,11 +19,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. @@ -40,9 +40,10 @@ class ContextTool : public KDataTool { Q_OBJECT + TQ_OBJECT public: - ContextTool( TQObject* parent, const char* name, const TQStringList & ); + ContextTool( TQObject* tqparent, const char* name, const TQStringList & ); virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype); private: KBabel::Project::Ptr _cache_origin; diff --git a/kbabel/datatools/equations/main.cc b/kbabel/datatools/equations/main.cc index 64d19adf..96cb3057 100644 --- a/kbabel/datatools/equations/main.cc +++ b/kbabel/datatools/equations/main.cc @@ -19,11 +19,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. @@ -52,8 +52,8 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_equationstool, KGenericFactory<EquationsTool> using namespace KBabel; -EquationsTool::EquationsTool( TQObject* parent, const char* name, const TQStringList & ) - : KDataTool( parent, name ), _equation("^[a-zA-Z0-9]+=.+") +EquationsTool::EquationsTool( TQObject* tqparent, const char* name, const TQStringList & ) + : KDataTool( tqparent, name ), _equation("^[a-zA-Z0-9]+=.+") { i18n("what check found errors","equations"); } @@ -86,12 +86,12 @@ bool EquationsTool::run( const TQString& command, void* data, const TQString& da bool hasError = false; - if(!item->isUntranslated() && !item->msgid().first().contains('\n') - && item->msgid().first().contains(_equation)) + if(!item->isUntranslated() && !item->msgid().first().tqcontains('\n') + && item->msgid().first().tqcontains(_equation)) { - int index = item->msgid().first().find('='); + int index = item->msgid().first().tqfind('='); TQString left = item->msgid().first().left(index); - index = item->msgstr().first().find('='); + index = item->msgstr().first().tqfind('='); if(left != item->msgstr().first().left(index)) hasError = true; } diff --git a/kbabel/datatools/equations/main.h b/kbabel/datatools/equations/main.h index 72fae529..11adddaf 100644 --- a/kbabel/datatools/equations/main.h +++ b/kbabel/datatools/equations/main.h @@ -19,11 +19,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. @@ -39,9 +39,10 @@ class EquationsTool : public KDataTool { Q_OBJECT + TQ_OBJECT public: - EquationsTool( TQObject* parent, const char* name, const TQStringList & ); + EquationsTool( TQObject* tqparent, const char* name, const TQStringList & ); virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype); private: TQRegExp _equation; diff --git a/kbabel/datatools/length/main.cc b/kbabel/datatools/length/main.cc index 5b2bc411..2851429e 100644 --- a/kbabel/datatools/length/main.cc +++ b/kbabel/datatools/length/main.cc @@ -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. @@ -55,8 +55,8 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_lengthtool, KGenericFactory<LengthTool> ( "kb using namespace KBabel; -LengthTool::LengthTool( TQObject* parent, const char* name, const TQStringList & ) - : KDataTool( parent, name ), _cache_origin( 0 ) +LengthTool::LengthTool( TQObject* tqparent, const char* name, const TQStringList & ) + : KDataTool( tqparent, name ), _cache_origin( 0 ) { i18n("which check found errors","translation has inconsistent length"); } @@ -104,7 +104,7 @@ bool LengthTool::run( const TQString& command, void* data, const TQString& datat if( item->pluralForm() == KDESpecific ) { str = TQStringList::split( "\\n", item->msgstr().first(), true ); id = TQStringList::split( "\\n", - item->msgid().first().replace( TQRegExp(_plurals), ""), true ); + item->msgid().first().tqreplace( TQRegExp(_plurals), ""), true ); } else { str = item->msgstr(); id = item->msgid(); @@ -113,12 +113,12 @@ bool LengthTool::run( const TQString& command, void* data, const TQString& datat //Check for translations that are too short or too long //This may not be totally correct but we check both //the singular and plural forms against each translated plural. - //FIXME: replace 10% check with configurable setting or a statistical + //FIXME: tqreplace 10% check with configurable setting or a statistical //based expected length relationship int idlen, strlen; for( TQStringList::Iterator i = id.begin() ; i != id.end() ; i++ ) { TQString iditem = (*i); - idlen = iditem.replace( TQRegExp(_context),"").length(); + idlen = iditem.tqreplace( TQRegExp(_context),"").length(); for( TQStringList::Iterator j = str.begin() ; j != str.end() ; j++ ) { TQString stritem = (*j); strlen = stritem.length(); diff --git a/kbabel/datatools/length/main.h b/kbabel/datatools/length/main.h index 6a4ec06f..cff49df8 100644 --- a/kbabel/datatools/length/main.h +++ b/kbabel/datatools/length/main.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. @@ -41,9 +41,10 @@ class LengthTool : public KDataTool { Q_OBJECT + TQ_OBJECT public: - LengthTool( TQObject* parent, const char* name, const TQStringList & ); + LengthTool( TQObject* tqparent, const char* name, const TQStringList & ); virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype); private: KBabel::Project::Ptr _cache_origin; diff --git a/kbabel/datatools/not-translated/main.cc b/kbabel/datatools/not-translated/main.cc index 22e23c84..3082c552 100644 --- a/kbabel/datatools/not-translated/main.cc +++ b/kbabel/datatools/not-translated/main.cc @@ -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. @@ -54,8 +54,8 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_nottranslatedtool, KGenericFactory<NotTransla using namespace KBabel; -NotTranslatedTool::NotTranslatedTool( TQObject* parent, const char* name, const TQStringList & ) - : KDataTool( parent, name ) , _cache_origin( 0 ) +NotTranslatedTool::NotTranslatedTool( TQObject* tqparent, const char* name, const TQStringList & ) + : KDataTool( tqparent, name ) , _cache_origin( 0 ) { i18n("which check found errors","English text in translation"); } @@ -101,13 +101,13 @@ bool NotTranslatedTool::run( const TQString& command, void* data, const TQString if( item->pluralForm() == KDESpecific ) { str = TQStringList::split( "\\n", item->msgstr().first(), true ); id = TQStringList::split( "\\n", - item->msgid().first().replace( TQRegExp(_plurals), ""), true ); + item->msgid().first().tqreplace( TQRegExp(_plurals), ""), true ); } else { str = item->msgstr(); id = item->msgid(); } for( TQStringList::Iterator i = id.begin() ; i != id.end() ; i++ ) { - TQString id_str = (*i).replace( TQRegExp(_context), ""); + TQString id_str = (*i).tqreplace( TQRegExp(_context), ""); for( TQStringList::Iterator j = str.begin() ; j != str.end() ; j++ ) { TQString str_str = (*j); hasError = hasError || ( id_str == str_str ); diff --git a/kbabel/datatools/not-translated/main.h b/kbabel/datatools/not-translated/main.h index c1aeabd8..a9cba848 100644 --- a/kbabel/datatools/not-translated/main.h +++ b/kbabel/datatools/not-translated/main.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. @@ -41,9 +41,10 @@ class NotTranslatedTool : public KDataTool { Q_OBJECT + TQ_OBJECT public: - NotTranslatedTool( TQObject* parent, const char* name, const TQStringList & ); + NotTranslatedTool( TQObject* tqparent, const char* name, const TQStringList & ); virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype); private: diff --git a/kbabel/datatools/pluralforms/main.cc b/kbabel/datatools/pluralforms/main.cc index 87dfef71..9005b4ce 100644 --- a/kbabel/datatools/pluralforms/main.cc +++ b/kbabel/datatools/pluralforms/main.cc @@ -19,11 +19,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 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_pluraltool, KGenericFactory<PluralsTool> ( "k using namespace KBabel; -PluralsTool::PluralsTool( TQObject* parent, const char* name, const TQStringList & ) - : KDataTool( parent, name ), _cache_origin( 0 ), _neededForms(-1) +PluralsTool::PluralsTool( TQObject* tqparent, const char* name, const TQStringList & ) + : KDataTool( tqparent, name ), _cache_origin( 0 ), _neededForms(-1) { i18n("what check found errors", "plural forms"); } @@ -102,11 +102,11 @@ bool PluralsTool::run( const TQString& command, void* data, const TQString& data if(!item->isUntranslated() && item->pluralForm() == KDESpecific ) { - if(_neededForms <= 0 || item->msgstr().first().contains(_plurals)) + if(_neededForms <= 0 || item->msgstr().first().tqcontains(_plurals)) { hasError = true; } - else if( item->msgstr().first().contains(TQString("\\n"))+1 != _neededForms ) + else if( item->msgstr().first().tqcontains(TQString("\\n"))+1 != _neededForms ) { hasError = true; } diff --git a/kbabel/datatools/pluralforms/main.h b/kbabel/datatools/pluralforms/main.h index 420824d2..ee6617dd 100644 --- a/kbabel/datatools/pluralforms/main.h +++ b/kbabel/datatools/pluralforms/main.h @@ -19,11 +19,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. @@ -40,9 +40,10 @@ class PluralsTool : public KDataTool { Q_OBJECT + TQ_OBJECT public: - PluralsTool( TQObject* parent, const char* name, const TQStringList & ); + PluralsTool( TQObject* tqparent, const char* name, const TQStringList & ); virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype); private: KBabel::Project::Ptr _cache_origin; diff --git a/kbabel/datatools/punctuation/main.cc b/kbabel/datatools/punctuation/main.cc index 8806b536..42b2f2eb 100644 --- a/kbabel/datatools/punctuation/main.cc +++ b/kbabel/datatools/punctuation/main.cc @@ -19,11 +19,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 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_punctuationtool, KGenericFactory<PunctuationT using namespace KBabel; -PunctuationTool::PunctuationTool( TQObject* parent, const char* name, const TQStringList & ) - : KDataTool( parent, name ) +PunctuationTool::PunctuationTool( TQObject* tqparent, const char* name, const TQStringList & ) + : KDataTool( tqparent, name ) { // bogus translation just for allowing the translation i18n("what check found errors","punctuation"); @@ -92,7 +92,7 @@ bool PunctuationTool::run( const TQString& command, void* data, const TQString& // lookup punctuation in original text TQRegExp punc("[\\.!\\?:]+$"); - int i = lineid.find(punc); + int i = lineid.tqfind(punc); TQString t(""); @@ -102,7 +102,7 @@ bool PunctuationTool::run( const TQString& command, void* data, const TQString& { // check, that both plural forms contain the same punctuation TQString pl = *(item->msgid().at(1)); - int j = pl.find(punc); + int j = pl.tqfind(punc); TQString tp(""); if( j != -1 ) tp = pl.right(pl.length()-j); @@ -122,7 +122,7 @@ bool PunctuationTool::run( const TQString& command, void* data, const TQString& { TQString linestr=(*form); - int j = linestr.find(punc); + int j = linestr.tqfind(punc); // there is no punctuation in original, but one in the translation if( i == -1 && j != i ) diff --git a/kbabel/datatools/punctuation/main.h b/kbabel/datatools/punctuation/main.h index eb30293f..6d58783e 100644 --- a/kbabel/datatools/punctuation/main.h +++ b/kbabel/datatools/punctuation/main.h @@ -19,11 +19,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. @@ -38,9 +38,10 @@ class PunctuationTool : public KDataTool { Q_OBJECT + TQ_OBJECT public: - PunctuationTool( TQObject* parent, const char* name, const TQStringList & ); + PunctuationTool( TQObject* tqparent, const char* name, const TQStringList & ); virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype); }; diff --git a/kbabel/datatools/regexp/main.cc b/kbabel/datatools/regexp/main.cc index eca0be81..132a8c21 100644 --- a/kbabel/datatools/regexp/main.cc +++ b/kbabel/datatools/regexp/main.cc @@ -49,13 +49,13 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_regexptool, KGenericFactory<RegExpTool> ( "kb using namespace KBabel; -RegExpTool::RegExpTool( TQObject* parent, const char* name, const TQStringList & ) - : KDataTool( parent, name ) +RegExpTool::RegExpTool( TQObject* tqparent, const char* name, const TQStringList & ) + : KDataTool( tqparent, name ) { i18n("which check found errors","translation has inconsistent length"); loadExpressions(); if ( ! _error.isNull() ) - KMessageBox::error( (TQWidget*)parent, i18n( "Error loading data (%1)" ).arg( _error ) ); + KMessageBox::error( (TQWidget*)tqparent, i18n( "Error loading data (%1)" ).tqarg( _error ) ); } bool RegExpTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype ) diff --git a/kbabel/datatools/regexp/main.h b/kbabel/datatools/regexp/main.h index 64df538b..c28c37d0 100644 --- a/kbabel/datatools/regexp/main.h +++ b/kbabel/datatools/regexp/main.h @@ -57,9 +57,10 @@ typedef TQValueList<Expression> ExpressionList; class RegExpTool : public KDataTool { Q_OBJECT + TQ_OBJECT public: - RegExpTool( TQObject* parent, const char* name, const TQStringList & ); + RegExpTool( TQObject* tqparent, const char* name, const TQStringList & ); virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype); private: diff --git a/kbabel/datatools/setfuzzy/main.cc b/kbabel/datatools/setfuzzy/main.cc index 54bbcb57..192dc4f6 100644 --- a/kbabel/datatools/setfuzzy/main.cc +++ b/kbabel/datatools/setfuzzy/main.cc @@ -19,11 +19,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,8 +49,8 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_setfuzzytool, KGenericFactory<SetFuzzyTool> ( using namespace KBabel; -SetFuzzyTool::SetFuzzyTool( TQObject* parent, const char* name, const TQStringList & ) - : KDataTool( parent, name ) +SetFuzzyTool::SetFuzzyTool( TQObject* tqparent, const char* name, const TQStringList & ) + : KDataTool( tqparent, name ) { } diff --git a/kbabel/datatools/setfuzzy/main.h b/kbabel/datatools/setfuzzy/main.h index 45e0bc38..729abd1a 100644 --- a/kbabel/datatools/setfuzzy/main.h +++ b/kbabel/datatools/setfuzzy/main.h @@ -19,11 +19,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. @@ -38,9 +38,10 @@ class SetFuzzyTool : public KDataTool { Q_OBJECT + TQ_OBJECT public: - SetFuzzyTool( TQObject* parent, const char* name, const TQStringList & ); + SetFuzzyTool( TQObject* tqparent, const char* name, const TQStringList & ); virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype); }; diff --git a/kbabel/datatools/whitespace/main.cc b/kbabel/datatools/whitespace/main.cc index 7bfa50b2..3fdd0f47 100644 --- a/kbabel/datatools/whitespace/main.cc +++ b/kbabel/datatools/whitespace/main.cc @@ -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. @@ -54,8 +54,8 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_whitespacetool, KGenericFactory<WhitespaceToo using namespace KBabel; -WhitespaceTool::WhitespaceTool( TQObject* parent, const char* name, const TQStringList & ) - : KDataTool( parent, name ), _cache_origin( 0 ), _equation("^[a-zA-Z0-9]+=") +WhitespaceTool::WhitespaceTool( TQObject* tqparent, const char* name, const TQStringList & ) + : KDataTool( tqparent, name ), _cache_origin( 0 ), _equation("^[a-zA-Z0-9]+=") { i18n("which check found errors","whitespace only translation"); } @@ -104,27 +104,27 @@ bool WhitespaceTool::run( const TQString& command, void* data, const TQString& d if( item->pluralForm() == KDESpecific ) { str = TQStringList::split( "\\n", item->msgstr().first(), true ); id = TQStringList::split( "\\n", - item->msgid().first().replace( TQRegExp(_plurals), ""), true ); + item->msgid().first().tqreplace( TQRegExp(_plurals), ""), true ); } else { str = item->msgstr(); id = item->msgid(); } //Strip equations - id.first().replace( TQRegExp(_equation), ""); - str.first().replace( TQRegExp(_equation), ""); + id.first().tqreplace( TQRegExp(_equation), ""); + str.first().tqreplace( TQRegExp(_equation), ""); //Ignore Messages with blank msgid components for( TQStringList::Iterator it = id.begin() ; it != id.end() ; it++ ) { TQString resultstring = (*it); - hasIdError = hasIdError || resultstring.contains(_whitespace); + hasIdError = hasIdError || resultstring.tqcontains(_whitespace); } if( hasIdError ) return true; //Check each TQString in the List is not whitespace for( TQStringList::Iterator it = str.begin() ; it != str.end() ; it++ ) { TQString resultstring = (*it); - hasStrError = hasStrError || resultstring.contains(_whitespace); + hasStrError = hasStrError || resultstring.tqcontains(_whitespace); } } diff --git a/kbabel/datatools/whitespace/main.h b/kbabel/datatools/whitespace/main.h index c8cd373a..9c6c4f24 100644 --- a/kbabel/datatools/whitespace/main.h +++ b/kbabel/datatools/whitespace/main.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. @@ -42,9 +42,10 @@ class WhitespaceTool : public KDataTool { Q_OBJECT + TQ_OBJECT public: - WhitespaceTool( TQObject* parent, const char* name, const TQStringList & ); + WhitespaceTool( TQObject* tqparent, const char* name, const TQStringList & ); virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype); private: KBabel::Project::Ptr _cache_origin; diff --git a/kbabel/datatools/xml/main.cc b/kbabel/datatools/xml/main.cc index 3bcf66da..57a6f785 100644 --- a/kbabel/datatools/xml/main.cc +++ b/kbabel/datatools/xml/main.cc @@ -19,11 +19,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. @@ -54,8 +54,8 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_xmltool, KGenericFactory<XMLTool> ( "kbabelda using namespace KBabel; -XMLTool::XMLTool( TQObject* parent, const char* name, const TQStringList & ) - : KDataTool( parent, name ), _cache_origin( 0 ) +XMLTool::XMLTool( TQObject* tqparent, const char* name, const TQStringList & ) + : KDataTool( tqparent, name ), _cache_origin( 0 ) { i18n( "what check found errors", "XML tags" ); } @@ -94,12 +94,12 @@ bool XMLTool::run( const TQString& command, void* data, const TQString& datatype uint correctnessLevel = 0; TQString msgid = item->msgid().first(); - msgid.replace( "\\\"", "\"" ); // Change '\"' to '"' - msgid.replace( TQRegExp( "&(?![a-zA-Z0-9]+;)" ), "&" ); - msgid.replace( _context, "" ); - msgid.replace("\n",""); // delete newlines + msgid.tqreplace( "\\\"", "\"" ); // Change '\"' to '"' + msgid.tqreplace( TQRegExp( "&(?![a-zA-Z0-9]+;)" ), "&" ); + msgid.tqreplace( _context, "" ); + msgid.tqreplace("\n",""); // delete newlines - if( _levelCache.contains(msgid) ) + if( _levelCache.tqcontains(msgid) ) { correctnessLevel = _levelCache[msgid]; } @@ -134,8 +134,8 @@ bool XMLTool::run( const TQString& command, void* data, const TQString& datatype for( TQStringList::Iterator form = str.begin() ; form != str.end() ; form++ ) { TQString text=(*form); - text.replace( "\\\"", "\"" ); // Change '\"' to '"' - text.replace( TQRegExp( "&(?![a-zA-Z0-9]+;)" ), "&" ); + text.tqreplace( "\\\"", "\"" ); // Change '\"' to '"' + text.tqreplace( TQRegExp( "&(?![a-zA-Z0-9]+;)" ), "&" ); // isNonCaseWithoutCommonCompliant can fail // even though higher level checks works @@ -189,16 +189,16 @@ bool XMLTool::isNonCaseWithoutCommonCompliant( const TQString& text) TQDomDocument doc; TQString test = text.lower(); TQRegExp rx( "(<br>)|(<hr>)|(<p>)||(<\\w+@(\\w+.)*\\w+>)" ); - test.replace( rx, "" ); + test.tqreplace( rx, "" ); TQString a; do { a = test; - test.replace( TQRegExp("<[^_:A-Za-z/]"), "" ); + test.tqreplace( TQRegExp("<[^_:A-Za-z/]"), "" ); } while( a!=test); - test.replace( TQRegExp("<$"), "" ); + test.tqreplace( TQRegExp("<$"), "" ); return doc.setContent("<para>" + test + "</para>" ); } diff --git a/kbabel/datatools/xml/main.h b/kbabel/datatools/xml/main.h index 68c06cdb..1b983475 100644 --- a/kbabel/datatools/xml/main.h +++ b/kbabel/datatools/xml/main.h @@ -19,11 +19,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. @@ -41,9 +41,10 @@ class XMLTool : public KDataTool { Q_OBJECT + TQ_OBJECT public: - XMLTool( TQObject* parent, const char* name, const TQStringList & ); + XMLTool( TQObject* tqparent, const char* name, const TQStringList & ); virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype); private: bool isFullyCompliant( const TQString& text); |