summaryrefslogtreecommitdiffstats
path: root/kbabel/common/poinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kbabel/common/poinfo.cpp')
-rw-r--r--kbabel/common/poinfo.cpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/kbabel/common/poinfo.cpp b/kbabel/common/poinfo.cpp
index 68e13da8..f7245141 100644
--- a/kbabel/common/poinfo.cpp
+++ b/kbabel/common/poinfo.cpp
@@ -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.
@@ -123,7 +123,7 @@ void PoInfo::cacheRead()
// Check the file cache version.
// If it is not the current version, we do not read the cache file
- Q_UINT32 version;
+ TQ_UINT32 version;
s >> version;
if( version != POINFOCACHE_VERSION ) {
// Wrong POINFOCACHE_VERSION, so abort
@@ -134,13 +134,13 @@ void PoInfo::cacheRead()
/*
* Check the version of the TQDataStream with which the cache file was written
*
- * If the cache file was written by an incompatible future version of Qt,
+ * If the cache file was written by an incompatible future version of TQt,
* the cache file will not be read.
*
- * On the other side, a cache file written by a previous version of Qt can be read,
+ * On the other side, a cache file written by a previous version of TQt can be read,
* by setting the version of the TQDataStream used.
*/
- Q_INT32 qdatastreamVersion;
+ TQ_INT32 qdatastreamVersion;
s >> qdatastreamVersion;
if( qdatastreamVersion > 0 && qdatastreamVersion <= s.version() ) {
s.setVersion( qdatastreamVersion );
@@ -173,13 +173,13 @@ void PoInfo::cacheWrite()
if( stream ) {
// Write the cache file version
- // We choose to fix a format (Q_UINT32) for compatibility (Qt version, platforms, architectures)
- const Q_UINT32 version = POINFOCACHE_VERSION;
+ // We choose to fix a format (TQ_UINT32) for compatibility (TQt version, platforms, architectures)
+ const TQ_UINT32 version = POINFOCACHE_VERSION;
*stream << version;
- // Write the version of the QDataStream
- // Here too we choose a fixed format (Q_INT32) for compatibility
- const Q_INT32 qdatastreamVersion = stream->version();
+ // Write the version of the TQDataStream
+ // Here too we choose a fixed format (TQ_INT32) for compatibility
+ const TQ_INT32 qdatastreamVersion = stream->version();
*stream << qdatastreamVersion;
TQDictIterator<poInfoCacheItem> it( _poInfoCache ); // iterator for dict
@@ -209,7 +209,7 @@ bool PoInfo::cacheFind(const TQString url, PoInfo& info)
cacheRead();
}
- poInfoCacheItem *item = _poInfoCache.find( url );
+ poInfoCacheItem *item = _poInfoCache.tqfind( url );
if( item ) {
TQFileInfo fi( url );
@@ -297,7 +297,7 @@ PoInfo PoInfo::headerInfo(const CatalogItem& headerItem)
{
bool knownKey=false;
// We search for the : character, which is the separator between key and value
- const int res=(*it).find(':');
+ const int res=(*it).tqfind(':');
if (res>=0)
{
knownKey=true; // We know most keys, if not it will be changed to false in the "else" case
@@ -305,7 +305,7 @@ PoInfo PoInfo::headerInfo(const CatalogItem& headerItem)
TQString value=(*it).mid(res+1);
// "Chop" the \n at the end
if (value.endsWith("\\n"))
- value.remove(value.length()-2,2); // ### Qt4: use value.chop(2)
+ value.remove(value.length()-2,2); // ### TQt4: use value.chop(2)
value=value.simplifyWhiteSpace();
kdDebug(KBABEL) << "Header key: " << key << " value: " << value << endl;
if (key=="Project-Id-Version")
@@ -335,7 +335,7 @@ PoInfo PoInfo::headerInfo(const CatalogItem& headerItem)
TQString line=(*it);
if(line.right(2)=="\\n")
- line.remove(line.length()-2,2); // ### Qt4: use value.chop(2)
+ line.remove(line.length()-2,2); // ### TQt4: use value.chop(2)
if(!info.others.isEmpty())
info.others+='\n';
@@ -350,12 +350,12 @@ PoInfo PoInfo::headerInfo(const CatalogItem& headerItem)
}
-ConversionStatus PoInfo::info(const TQString& url, PoInfo& info, TQStringList &wordList, bool updateWordList, bool interactive)
+ConversiontqStatus PoInfo::info(const TQString& url, PoInfo& info, TQStringList &wordList, bool updateWordList, bool interactive)
{
return PoInfo::info( url, info, wordList, updateWordList, interactive, true);
}
-ConversionStatus PoInfo::info(const TQString& url, PoInfo& info, TQStringList &wordList, bool updateWordList, bool interactive, bool msgfmt)
+ConversiontqStatus PoInfo::info(const TQString& url, PoInfo& info, TQStringList &wordList, bool updateWordList, bool interactive, bool msgfmt)
{
stopStaticRead = false;
@@ -372,7 +372,7 @@ ConversionStatus PoInfo::info(const TQString& url, PoInfo& info, TQStringList &w
// First check file with msgfmt to be sure, it is syntactically correct
Msgfmt msgfmt;
TQString output;
- Msgfmt::Status stat = msgfmt.checkSyntax( target , output );
+ Msgfmt::tqStatus stat = msgfmt.checkSyntax( target , output );
if(stat == Msgfmt::SyntaxError)
{
KIO::NetAccess::removeTempFile(target);
@@ -395,7 +395,7 @@ ConversionStatus PoInfo::info(const TQString& url, PoInfo& info, TQStringList &w
lexer->yylex();
// now parse the rest of the file
- ConversionStatus success=OK;
+ ConversiontqStatus success=OK;
while( lexer->lastToken != T_EOF && success==OK)
{
@@ -415,7 +415,7 @@ ConversionStatus PoInfo::info(const TQString& url, PoInfo& info, TQStringList &w
{
success=OK;
- if( temp.comment().contains("\n#~") ) continue; // skip obsolete
+ if( temp.comment().tqcontains("\n#~") ) continue; // skip obsolete
if( temp.msgid().first().isEmpty()) //header
{
@@ -453,7 +453,7 @@ ConversionStatus PoInfo::info(const TQString& url, PoInfo& info, TQStringList &w
{
TQString w = sl.first();
sl.pop_front();
- if( !wordList.contains(w) ) wordList.append( w );
+ if( !wordList.tqcontains(w) ) wordList.append( w );
}
st = temp.msgstr().join(" " ).simplifyWhiteSpace().lower();
sl = TQStringList::split( ' ', st );
@@ -461,7 +461,7 @@ ConversionStatus PoInfo::info(const TQString& url, PoInfo& info, TQStringList &w
{
TQString w = sl.first();
sl.pop_front();
- if( !wordList.contains(w) ) wordList.append( w );
+ if( !wordList.tqcontains(w) ) wordList.append( w );
}
st = temp.comment().simplifyWhiteSpace().lower();
sl = TQStringList::split( ' ', st );
@@ -469,7 +469,7 @@ ConversionStatus PoInfo::info(const TQString& url, PoInfo& info, TQStringList &w
{
TQString w = sl.first();
sl.pop_front();
- if( !wordList.contains(w) ) wordList.append( w );
+ if( !wordList.tqcontains(w) ) wordList.append( w );
}
}
}
@@ -532,7 +532,7 @@ bool PoInfo::findInFile( const TQString& url, FindOptions options )
// first read header
CatalogItem temp;
- ConversionStatus status = fastRead( temp, lexer, true );
+ ConversiontqStatus status = fastRead( temp, lexer, true );
if( status != OK || !temp.msgid().first().isEmpty() )
{
delete lexer;
@@ -560,15 +560,15 @@ bool PoInfo::findInFile( const TQString& url, FindOptions options )
if( options.isRegExp )
pos=regexp.search(text, 0 );
else
- pos=text.find(searchStr,0,options.caseSensitive);
+ pos=text.tqfind(searchStr,0,options.caseSensitive);
if( pos >= 0)
{
if( options.wholeWords) {
len = searchStr.length();
TQString pre = text.mid(pos-1,1);
TQString post = text.mid(pos+len,1);
- if( !pre.contains( TQRegExp("[a-zA-Z0-9]")) &&
- !post.contains( TQRegExp("[a-zA-Z0-9]") )
+ if( !pre.tqcontains( TQRegExp("[a-zA-Z0-9]")) &&
+ !post.tqcontains( TQRegExp("[a-zA-Z0-9]") )
) {
delete lexer;
delete stream;
@@ -601,7 +601,7 @@ bool PoInfo::findInFile( const TQString& url, FindOptions options )
if( options.ignoreAccelMarker )
{
- pos = text.find( options.accelMarker );
+ pos = text.tqfind( options.accelMarker );
if( pos >= 0 )
text.remove( pos, 1 );
}
@@ -609,7 +609,7 @@ bool PoInfo::findInFile( const TQString& url, FindOptions options )
if( options.isRegExp )
pos=regexp.search(text, 0 );
else
- pos=text.find(searchStr,0,options.caseSensitive);
+ pos=text.tqfind(searchStr,0,options.caseSensitive);
if( pos >= 0)
{
@@ -617,8 +617,8 @@ bool PoInfo::findInFile( const TQString& url, FindOptions options )
len = searchStr.length();
TQString pre = text.mid(pos-1,1);
TQString post = text.mid(pos+len,1);
- if( !pre.contains( TQRegExp("[a-zA-Z0-9]")) &&
- !post.contains( TQRegExp("[a-zA-Z0-9]") )
+ if( !pre.tqcontains( TQRegExp("[a-zA-Z0-9]")) &&
+ !post.tqcontains( TQRegExp("[a-zA-Z0-9]") )
) {
delete lexer;
delete stream;
@@ -666,7 +666,7 @@ bool PoInfo::findInFile( const TQString& url, FindOptions options )
}
// this does not like any incorrect files
-ConversionStatus PoInfo::fastRead( CatalogItem& item, GettextFlexLexer *lexer, bool storeText)
+ConversiontqStatus PoInfo::fastRead( CatalogItem& item, GettextFlexLexer *lexer, bool storeText)
{
item.clear();
_gettextPluralForm = false;
@@ -758,7 +758,7 @@ ConversionStatus PoInfo::fastRead( CatalogItem& item, GettextFlexLexer *lexer, b
{
TQStringList msgstrs = item.msgstr();
TQString s = TQString::fromUtf8(lexer->YYText());
- while( lexer->lastToken == T_MSGSTR && s.contains( TQRegExp("^msgstr\\[[0-9]+\\]" ) ) )
+ while( lexer->lastToken == T_MSGSTR && s.tqcontains( TQRegExp("^msgstr\\[[0-9]+\\]" ) ) )
{
if( lexer->yylex() != T_STRING ) return PARSE_ERROR;
it = msgstrs.fromLast();
@@ -778,4 +778,4 @@ ConversionStatus PoInfo::fastRead( CatalogItem& item, GettextFlexLexer *lexer, b
return OK;
}
-// kate: space-indent on; indent-width 4; replace-tabs on;
+// kate: space-indent on; indent-width 4; tqreplace-tabs on;