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/common/catalogitem.cpp | |
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/common/catalogitem.cpp')
-rw-r--r-- | kbabel/common/catalogitem.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/kbabel/common/catalogitem.cpp b/kbabel/common/catalogitem.cpp index bd55d7b6..14604438 100644 --- a/kbabel/common/catalogitem.cpp +++ b/kbabel/common/catalogitem.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. @@ -75,7 +75,7 @@ TQString CatalogItem::msgctxt(const bool noNewlines) const if( noNewlines ) { TQString tmp = d->_msgctxt; - tmp.replace("\n", " "); // ### TODO: " " or "" ? + tmp.tqreplace("\n", " "); // ### TODO: " " or "" ? return tmp; } else @@ -207,29 +207,29 @@ TQStringList CatalogItem::argList( RegExpExtractor& te) bool CatalogItem::isFuzzy() const { - return d->_comment.find( TQRegExp(",\\s*fuzzy") ) != -1; + return d->_comment.tqfind( TQRegExp(",\\s*fuzzy") ) != -1; } bool CatalogItem::isCformat() const { // Allow "possible-c-format" (from xgettext --debug) or "c-format" // Note the regexp (?: ) is similar to () but it does not capture (so it is faster) - return d->_comment.find( TQRegExp(",\\s*(?:possible-)c-format") ) == -1; + return d->_comment.tqfind( TQRegExp(",\\s*(?:possible-)c-format") ) == -1; } bool CatalogItem::isNoCformat() const { - return d->_comment.find( TQRegExp(",\\s*no-c-format") ) == -1; + return d->_comment.tqfind( TQRegExp(",\\s*no-c-format") ) == -1; } -bool CatalogItem::isQtformat() const +bool CatalogItem::isTQtformat() const { - return d->_comment.find( TQRegExp(",\\s*qt-format") ) == -1; + return d->_comment.tqfind( TQRegExp(",\\s*qt-format") ) == -1; } -bool CatalogItem::isNoQtformat() const +bool CatalogItem::isNoTQtformat() const { - return d->_comment.find( TQRegExp(",\\s*no-qt-format") ) == -1; + return d->_comment.tqfind( TQRegExp(",\\s*no-qt-format") ) == -1; } bool CatalogItem::isUntranslated() const @@ -252,23 +252,23 @@ int CatalogItem::totalLines() const int lines=0; if(!d->_comment.isEmpty()) { - lines = d->_comment.contains('\n')+1; + lines = d->_comment.tqcontains('\n')+1; } int msgctxtLines=0; if(!d->_msgctxt.isEmpty()) { - msgctxtLines=d->_msgctxt.contains('\n')+1; + msgctxtLines=d->_msgctxt.tqcontains('\n')+1; } int msgidLines=0; TQStringList::ConstIterator it; for(it=d->_msgid.begin(); it != d->_msgid.end(); ++it) { - msgidLines += (*it).contains('\n')+1; + msgidLines += (*it).tqcontains('\n')+1; } int msgstrLines=0; for(it=d->_msgstr.begin(); it != d->_msgstr.end(); ++it) { - msgstrLines += (*it).contains('\n')+1; + msgstrLines += (*it).tqcontains('\n')+1; } if(msgctxtLines>1) @@ -286,7 +286,7 @@ int CatalogItem::totalLines() const void CatalogItem::setSyntaxError(bool on) { - if(on && !d->_errors.contains("syntax error")) + if(on && !d->_errors.tqcontains("syntax error")) d->_errors.append("syntax error"); else d->_errors.remove("syntax error"); @@ -305,7 +305,7 @@ TQPtrList<EditCommand> CatalogItem::removeFuzzy(bool doIt) TQRegExp fuzzyStr(",\\s*fuzzy"); int offset; - offset=comment.find(fuzzyStr); + offset=comment.tqfind(fuzzyStr); while(offset>=0) { cmd = new DelTextCmd(offset,fuzzyStr.cap(),0); @@ -314,11 +314,11 @@ TQPtrList<EditCommand> CatalogItem::removeFuzzy(bool doIt) comment.remove(offset,fuzzyStr.cap().length()); - offset=comment.find(fuzzyStr,offset+1); + offset=comment.tqfind(fuzzyStr,offset+1); } // remove empty comment lines - if( comment.contains( TQRegExp("^#\\s*$") )) + if( comment.tqcontains( TQRegExp("^#\\s*$") )) { cmd = new DelTextCmd(0,comment,0); cmd->setPart(Comment); @@ -326,9 +326,9 @@ TQPtrList<EditCommand> CatalogItem::removeFuzzy(bool doIt) comment=""; } - if( comment.contains( TQRegExp("\n#\\s*$") )) + if( comment.tqcontains( TQRegExp("\n#\\s*$") )) { - offset=comment.find( TQRegExp("\n#\\s*$") ); + offset=comment.tqfind( TQRegExp("\n#\\s*$") ); while(offset>=0) { cmd = new DelTextCmd(offset,comment.mid(offset),0); @@ -337,15 +337,15 @@ TQPtrList<EditCommand> CatalogItem::removeFuzzy(bool doIt) comment.remove(offset,comment.length()-offset); - offset=comment.find( TQRegExp("\n#\\s*$"), offset+1 ); + offset=comment.tqfind( TQRegExp("\n#\\s*$"), offset+1 ); } } - if( comment.contains( TQRegExp("\n#\\s*\n") )) + if( comment.tqcontains( TQRegExp("\n#\\s*\n") )) { - offset=comment.find( TQRegExp("\n#\\s*\n") )+1; + offset=comment.tqfind( TQRegExp("\n#\\s*\n") )+1; while(offset>=0) { - int endIndex=comment.find("\n",offset)+1; + int endIndex=comment.tqfind("\n",offset)+1; cmd = new DelTextCmd(offset,comment.mid(offset,endIndex-offset),0); cmd->setPart(Comment); @@ -353,7 +353,7 @@ TQPtrList<EditCommand> CatalogItem::removeFuzzy(bool doIt) comment.remove(offset,endIndex-offset); - offset=comment.find( TQRegExp("\n#\\s*\n"), offset+1 ); + offset=comment.tqfind( TQRegExp("\n#\\s*\n"), offset+1 ); } } @@ -499,7 +499,7 @@ void CatalogItem::clearErrors() void CatalogItem::appendError(const TQString& error ) { - if( !d->_errors.contains( error ) ) + if( !d->_errors.tqcontains( error ) ) d->_errors.append(error); } @@ -518,4 +518,4 @@ void CatalogItem::setProject( Project::Ptr project ) d->_project = project; } -// kate: space-indent on; indent-width 4; replace-tabs on; +// kate: space-indent on; indent-width 4; tqreplace-tabs on; |