summaryrefslogtreecommitdiffstats
path: root/tqtinterface/qt4/src/kernel/tqtranslator.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-08-09 22:25:47 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-08-09 22:25:47 -0500
commiteaa7ee2e0bbca40ba3173c4304f81957e8964291 (patch)
tree4f793aa48a5080aedc94ce6e519c3b86708f2b88 /tqtinterface/qt4/src/kernel/tqtranslator.cpp
parent79a9d7a46a20d4a0923bc06fc471fdc2176ef865 (diff)
downloadexperimental-eaa7ee2e0bbca40ba3173c4304f81957e8964291.tar.gz
experimental-eaa7ee2e0bbca40ba3173c4304f81957e8964291.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains
Diffstat (limited to 'tqtinterface/qt4/src/kernel/tqtranslator.cpp')
-rw-r--r--tqtinterface/qt4/src/kernel/tqtranslator.cpp76
1 files changed, 38 insertions, 38 deletions
diff --git a/tqtinterface/qt4/src/kernel/tqtranslator.cpp b/tqtinterface/qt4/src/kernel/tqtranslator.cpp
index ec0856b..fabbb98 100644
--- a/tqtinterface/qt4/src/kernel/tqtranslator.cpp
+++ b/tqtinterface/qt4/src/kernel/tqtranslator.cpp
@@ -246,7 +246,7 @@ TQValueList<TQTranslatorMessage> TQTranslator::messages() const
Saves this message file to \a filename, overwriting the previous
contents of \a filename. If \a mode is \c Everything (the
default), all the information is preserved. If \a mode is \c
- Stripped, any information that is not necessary for tqfindMessage()
+ Stripped, any information that is not necessary for findMessage()
is stripped away.
\sa load()
@@ -381,7 +381,7 @@ void TQTranslator::squeeze( SaveMode mode )
cpNext = 0;
else
cpNext = (int) it.key().commonPrefix( next.key() );
- offsets.tqreplace( TQTranslatorPrivate::Offset(it.key(),
+ offsets.replace( TQTranslatorPrivate::Offset(it.key(),
ms.tqdevice()->at()), (void*)0 );
it.key().write( ms, mode == Stripped,
(TQTranslatorMessage::Prefix) TQMAX(cpPrev, cpNext + 1) );
@@ -402,7 +402,7 @@ void TQTranslator::squeeze( SaveMode mode )
int baudelaire;
for ( it = messages->begin(); it != messages->end(); ++it )
- contextSet.tqreplace( it.key().context(), &baudelaire );
+ contextSet.replace( it.key().context(), &baudelaire );
TQ_UINT16 hTableSize;
if ( contextSet.count() < 200 )
@@ -439,7 +439,7 @@ void TQTranslator::squeeze( SaveMode mode )
If hTable[h] is 0, "FunnyDialog" is not covered by this
translator. Else, we check in the contextPool at offset
2 * hTable[h] to see if "FunnyDialog" is one of the
- contexts stored there, until we tqfind it or we meet the
+ contexts stored there, until we find it or we meet the
empty string.
*/
d->contextArray = new TQByteArray;
@@ -454,7 +454,7 @@ void TQTranslator::squeeze( SaveMode mode )
uint upto = 2;
for ( int i = 0; i < hTableSize; i++ ) {
- const char *con = hDict.tqfind( i );
+ const char *con = hDict.find( i );
if ( con == 0 ) {
hTable[i] = 0;
} else {
@@ -466,7 +466,7 @@ void TQTranslator::squeeze( SaveMode mode )
t.writeRawBytes( con, len );
upto += 1 + len;
hDict.remove( i );
- } while ( (con = hDict.tqfind(i)) != 0 );
+ } while ( (con = hDict.find(i)) != 0 );
do {
t << (TQ_UINT8) 0; // empty string (at least one)
upto++;
@@ -517,18 +517,18 @@ void TQTranslator::unsqueeze()
}
/*!
- Returns TRUE if this message file tqcontains a message with the key
+ Returns TRUE if this message file contains a message with the key
(\a context, \a sourceText, \a comment); otherwise returns FALSE.
This function works with stripped translator files.
- (This is is a one-liner that calls tqfindMessage().)
+ (This is is a one-liner that calls findMessage().)
*/
-bool TQTranslator::tqcontains( const char* context, const char* sourceText,
+bool TQTranslator::contains( const char* context, const char* sourceText,
const char* comment ) const
{
- return !tqfindMessage( context, sourceText, comment ).translation().isNull();
+ return !findMessage( context, sourceText, comment ).translation().isNull();
}
/*!
@@ -575,7 +575,7 @@ void TQTranslator::remove( const TQTranslatorMessage& message )
#endif
-TQTranslatorMessage TQTranslator::tqfindMessage( const char* context,
+TQTranslatorMessage TQTranslator::findMessage( const char* context,
const char* sourceText,
const char* comment ) const
{
@@ -590,13 +590,13 @@ TQTranslatorMessage TQTranslator::tqfindMessage( const char* context,
if ( d->messages ) {
TQMap<TQTranslatorMessage, void *>::ConstIterator it;
- it = d->messages->tqfind( TQTranslatorMessage(context, sourceText,
+ it = d->messages->find( TQTranslatorMessage(context, sourceText,
comment) );
if ( it != d->messages->end() )
return it.key();
if ( comment[0] ) {
- it = d->messages->tqfind( TQTranslatorMessage(context, sourceText,
+ it = d->messages->find( TQTranslatorMessage(context, sourceText,
"") );
if ( it != d->messages->end() )
return it.key();
@@ -688,7 +688,7 @@ TQTranslatorMessage TQTranslator::tqfindMessage( const char* context,
/*!
\class TQTranslatorMessage
- \brief The TQTranslatorMessage class tqcontains a translator message and its
+ \brief The TQTranslatorMessage class contains a translator message and its
properties.
\ingroup i18n
@@ -1184,7 +1184,7 @@ public:
\ingroup environment
\mainclass
- An object of this class tqcontains a set of TQTranslatorMessage
+ An object of this class contains a set of TQTranslatorMessage
objects, each of which specifies a translation from a source
language to a target language. TQTranslator provides functions to
look up translations, add new ones, remove them, load and save
@@ -1221,8 +1221,8 @@ public:
We call a translation a "messsage". For this reason, translation
files are sometimes referred to as "message files".
- It is possible to lookup a translation using tqfindMessage() (as
- tr() and TQApplication::translate() do) and tqcontains(), to insert a
+ It is possible to lookup a translation using findMessage() (as
+ tr() and TQApplication::translate() do) and contains(), to insert a
new translation messsage using insert(), and to remove one using
remove().
@@ -1232,10 +1232,10 @@ public:
usually only need lookup. To cater for these different needs,
TQTranslator can use stripped translator files that use the minimum
of memory and which support little more functionality than
- tqfindMessage().
+ findMessage().
Thus, load() may not load enough information to make anything more
- than tqfindMessage() work. save() has an argument indicating
+ than findMessage() work. save() has an argument indicating
whether to save just this minimum of information or to save
everything.
@@ -1254,7 +1254,7 @@ public:
\endlist
The minimum for each item is just the information necessary for
- tqfindMessage() to return the right text. This may include the
+ findMessage() to return the right text. This may include the
source, context and comment, but usually it is just a hash value
and the translated text.
@@ -1414,7 +1414,7 @@ bool TQTranslator::load( const TQString & filename, const TQString & directory,
int rightmost = 0;
for ( int i = 0; i < (int)delims.length(); i++ ) {
- int k = fname.tqfindRev( delims[i] );
+ int k = fname.findRev( delims[i] );
if ( k > rightmost )
rightmost = k;
}
@@ -1555,7 +1555,7 @@ bool TQTranslator::do_load( const uchar *data, int len )
}
array.resetRawData( (const char *) data, len );
- if ( tqApp && tqApp->translators && tqApp->translators->tqcontains(this) )
+ if ( tqApp && tqApp->translators && tqApp->translators->contains(this) )
tqApp->setReverseLayout( qt_detectRTLLanguage() );
return ok;
}
@@ -1566,7 +1566,7 @@ bool TQTranslator::do_load( const uchar *data, int len )
Saves this message file to \a filename, overwriting the previous
contents of \a filename. If \a mode is \c Everything (the
default), all the information is preserved. If \a mode is \c
- Stripped, any information that is not necessary for tqfindMessage()
+ Stripped, any information that is not necessary for findMessage()
is stripped away.
\sa load()
@@ -1705,7 +1705,7 @@ void TQTranslator::squeeze( SaveMode mode )
cpNext = 0;
else
cpNext = (int) it.key().commonPrefix( next.key() );
- offsets.tqreplace( TQTranslatorPrivate::Offset(it.key(),
+ offsets.replace( TQTranslatorPrivate::Offset(it.key(),
ms.tqdevice()->at()), (void*)0 );
it.key().write( ms, mode == Stripped,
(TQTranslatorMessage::Prefix) TQMAX(cpPrev, cpNext + 1) );
@@ -1726,7 +1726,7 @@ void TQTranslator::squeeze( SaveMode mode )
int baudelaire;
for ( it = messages->begin(); it != messages->end(); ++it )
- contextSet.tqreplace( it.key().context(), &baudelaire );
+ contextSet.replace( it.key().context(), &baudelaire );
TQ_UINT16 hTableSize;
if ( contextSet.count() < 200 )
@@ -1763,7 +1763,7 @@ void TQTranslator::squeeze( SaveMode mode )
If hTable[h] is 0, "FunnyDialog" is not covered by this
translator. Else, we check in the contextPool at offset
2 * hTable[h] to see if "FunnyDialog" is one of the
- contexts stored there, until we tqfind it or we meet the
+ contexts stored there, until we find it or we meet the
empty string.
*/
d->contextArray = new TQByteArray;
@@ -1778,7 +1778,7 @@ void TQTranslator::squeeze( SaveMode mode )
uint upto = 2;
for ( int i = 0; i < hTableSize; i++ ) {
- const char *con = hDict.tqfind( i );
+ const char *con = hDict.find( i );
if ( con == 0 ) {
hTable[i] = 0;
} else {
@@ -1790,7 +1790,7 @@ void TQTranslator::squeeze( SaveMode mode )
t.writeRawBytes( con, len );
upto += 1 + len;
hDict.remove( i );
- } while ( (con = hDict.tqfind(i)) != 0 );
+ } while ( (con = hDict.find(i)) != 0 );
do {
t << (TQ_UINT8) 0; // empty string (at least one)
upto++;
@@ -1842,18 +1842,18 @@ void TQTranslator::unsqueeze()
/*!
- Returns TRUE if this message file tqcontains a message with the key
+ Returns TRUE if this message file contains a message with the key
(\a context, \a sourceText, \a comment); otherwise returns FALSE.
This function works with stripped translator files.
- (This is is a one-liner that calls tqfindMessage().)
+ (This is is a one-liner that calls findMessage().)
*/
-bool TQTranslator::tqcontains( const char* context, const char* sourceText,
+bool TQTranslator::contains( const char* context, const char* sourceText,
const char* comment ) const
{
- return !tqfindMessage( context, sourceText, comment ).translation().isNull();
+ return !findMessage( context, sourceText, comment ).translation().isNull();
}
@@ -1906,10 +1906,10 @@ void TQTranslator::remove( const TQTranslatorMessage& message )
#endif
/*!
- \fn TQString TQTranslator::tqfind( const char*, const char*, const char* ) const
+ \fn TQString TQTranslator::find( const char*, const char*, const char* ) const
\obsolete
- Please use tqfindMessage() instead.
+ Please use findMessage() instead.
Returns the translation for the key (\a context, \a sourceText,
\a comment) or TQString::null if there is none in this translator.
@@ -1920,7 +1920,7 @@ void TQTranslator::remove( const TQTranslatorMessage& message )
also tries (\a context, \a sourceText, "").
*/
-TQTranslatorMessage TQTranslator::tqfindMessage( const char* context,
+TQTranslatorMessage TQTranslator::findMessage( const char* context,
const char* sourceText,
const char* comment ) const
{
@@ -1935,13 +1935,13 @@ TQTranslatorMessage TQTranslator::tqfindMessage( const char* context,
if ( d->messages ) {
TQMap<TQTranslatorMessage, void *>::ConstIterator it;
- it = d->messages->tqfind( TQTranslatorMessage(context, sourceText,
+ it = d->messages->find( TQTranslatorMessage(context, sourceText,
comment) );
if ( it != d->messages->end() )
return it.key();
if ( comment[0] ) {
- it = d->messages->tqfind( TQTranslatorMessage(context, sourceText,
+ it = d->messages->find( TQTranslatorMessage(context, sourceText,
"") );
if ( it != d->messages->end() )
return it.key();
@@ -2079,7 +2079,7 @@ TQValueList<TQTranslatorMessage> TQTranslator::messages() const
/*!
\class TQTranslatorMessage
- \brief The TQTranslatorMessage class tqcontains a translator message and its
+ \brief The TQTranslatorMessage class contains a translator message and its
properties.
\ingroup i18n