summaryrefslogtreecommitdiffstats
path: root/pylupdate3/numberh.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-11-29 01:11:08 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-11-29 01:11:08 -0600
commit8a055d66f43592c257cece2eb8cc021808062917 (patch)
treed0922f201bd5d24b62a33160d1d9baf9e89f9a70 /pylupdate3/numberh.cpp
parentb388516ca2691303a076a0764fd40bf7116fe43d (diff)
downloadpytqt-8a055d66f43592c257cece2eb8cc021808062917.tar.gz
pytqt-8a055d66f43592c257cece2eb8cc021808062917.zip
Initial TQt conversion
Diffstat (limited to 'pylupdate3/numberh.cpp')
-rw-r--r--pylupdate3/numberh.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/pylupdate3/numberh.cpp b/pylupdate3/numberh.cpp
index 6704803..7c5f7ee 100644
--- a/pylupdate3/numberh.cpp
+++ b/pylupdate3/numberh.cpp
@@ -3,7 +3,7 @@
**
** numberh.cpp
**
-** This file is part of Qt Linguist.
+** This file is part of TQt Linguist.
**
** See the file LICENSE included in the distribution for the usage
** and distribution terms.
@@ -22,8 +22,8 @@
#include <ctype.h>
#include <metatranslator.h>
-typedef QMap<QCString, MetaTranslatorMessage> TMM;
-typedef QValueList<MetaTranslatorMessage> TML;
+typedef TQMap<TQCString, MetaTranslatorMessage> TMM;
+typedef TQValueList<MetaTranslatorMessage> TML;
static bool isDigitFriendly( int c )
{
@@ -49,9 +49,9 @@ static int numberLength( const char *s )
Returns a version of 'key' where all numbers have been replaced by zeroes. If
there were none, returns "".
*/
-static QCString zeroKey( const char *key )
+static TQCString zeroKey( const char *key )
{
- QCString zeroed( strlen(key) + 1 );
+ TQCString zeroed( strlen(key) + 1 );
char *z = zeroed.data();
int i = 0, j = 0;
int len;
@@ -75,17 +75,17 @@ static QCString zeroKey( const char *key )
return "";
}
-static QString translationAttempt( const QString& oldTranslation,
+static TQString translationAttempt( const TQString& oldTranslation,
const char *oldSource,
const char *newSource )
{
int p = zeroKey( oldSource ).contains( '0' );
int oldSourceLen = qstrlen( oldSource );
- QString attempt;
- QStringList oldNumbers;
- QStringList newNumbers;
- QMemArray<bool> met( p );
- QMemArray<int> matchedYet( p );
+ TQString attempt;
+ TQStringList oldNumbers;
+ TQStringList newNumbers;
+ TQMemArray<bool> met( p );
+ TQMemArray<int> matchedYet( p );
int i, j;
int k = 0, ell, best;
int m, n;
@@ -103,8 +103,8 @@ static QString translationAttempt( const QString& oldTranslation,
m = numberLength( oldSource + i );
n = numberLength( newSource + j );
if ( m > 0 ) {
- oldNumbers.append( QCString(oldSource + i, m + 1) );
- newNumbers.append( QCString(newSource + j, n + 1) );
+ oldNumbers.append( TQCString(oldSource + i, m + 1) );
+ newNumbers.append( TQCString(newSource + j, n + 1) );
i += m;
j += n;
met[k] = FALSE;
@@ -168,7 +168,7 @@ static QString translationAttempt( const QString& oldTranslation,
*/
for ( k = 0; k < p; k++ ) {
if ( !met[k] )
- attempt += QString( " {" ) + newNumbers[k] + QString( "?}" );
+ attempt += TQString( " {" ) + newNumbers[k] + TQString( "?}" );
}
/*
@@ -180,8 +180,8 @@ static QString translationAttempt( const QString& oldTranslation,
for ( ell = 0; ell < p; ell++ ) {
if ( k != ell && oldNumbers[k] == oldNumbers[ell] &&
newNumbers[k] < newNumbers[ell] )
- attempt += QString( " {" ) + newNumbers[k] + QString( " or " ) +
- newNumbers[ell] + QString( "?}" );
+ attempt += TQString( " {" ) + newNumbers[k] + TQString( " or " ) +
+ newNumbers[ell] + TQString( "?}" );
}
}
return attempt;