summaryrefslogtreecommitdiffstats
path: root/kspell2/plugins/ispell
diff options
context:
space:
mode:
Diffstat (limited to 'kspell2/plugins/ispell')
-rw-r--r--kspell2/plugins/ispell/ispell_checker.cpp58
-rw-r--r--kspell2/plugins/ispell/ispell_checker.h20
-rw-r--r--kspell2/plugins/ispell/kspell_ispellclient.cpp6
-rw-r--r--kspell2/plugins/ispell/kspell_ispellclient.h10
-rw-r--r--kspell2/plugins/ispell/kspell_ispelldict.cpp18
-rw-r--r--kspell2/plugins/ispell/kspell_ispelldict.h18
6 files changed, 65 insertions, 65 deletions
diff --git a/kspell2/plugins/ispell/ispell_checker.cpp b/kspell2/plugins/ispell/ispell_checker.cpp
index 42cc2c460..6b3d382af 100644
--- a/kspell2/plugins/ispell/ispell_checker.cpp
+++ b/kspell2/plugins/ispell/ispell_checker.cpp
@@ -39,9 +39,9 @@
#include "sp_spell.h"
#include "ispell_checker.h"
-#include <qmap.h>
-#include <qdir.h>
-#include <qfileinfo.h>
+#include <tqmap.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
/***************************************************************************/
@@ -161,7 +161,7 @@ static const IspellMap ispell_map [] = {
};
static const size_t size_ispell_map = ( sizeof(ispell_map) / sizeof((ispell_map)[0]) );
-static QMap<QString, QString> ispell_dict_map;
+static TQMap<TQString, TQString> ispell_dict_map;
void
@@ -169,7 +169,7 @@ ISpellChecker::try_autodetect_charset(const char * const inEncoding)
{
if (inEncoding && strlen(inEncoding))
{
- m_translate_in = QTextCodec::codecForName(inEncoding);
+ m_translate_in = TQTextCodec::codecForName(inEncoding);
}
}
@@ -228,7 +228,7 @@ ISpellChecker::~ISpellChecker()
}
bool
-ISpellChecker::checkWord( const QString& utf8Word )
+ISpellChecker::checkWord( const TQString& utf8Word )
{
ichar_t iWord[INPUTWORDLEN + MAXAFFIXLEN];
if (!m_bSuccessfulInit)
@@ -238,7 +238,7 @@ ISpellChecker::checkWord( const QString& utf8Word )
return false;
bool retVal = false;
- QCString out;
+ TQCString out;
if (!m_translate_in)
return false;
else {
@@ -261,21 +261,21 @@ ISpellChecker::checkWord( const QString& utf8Word )
}
QStringList
-ISpellChecker::suggestWord(const QString& utf8Word)
+ISpellChecker::suggestWord(const TQString& utf8Word)
{
ichar_t iWord[INPUTWORDLEN + MAXAFFIXLEN];
int c;
if (!m_bSuccessfulInit)
- return QStringList();
+ return TQStringList();
if (utf8Word.isEmpty() || utf8Word.length() >= (INPUTWORDLEN + MAXAFFIXLEN) ||
utf8Word.length() == 0)
- return QStringList();
+ return TQStringList();
- QCString out;
+ TQCString out;
if (!m_translate_in)
- return QStringList();
+ return TQStringList();
else
{
/* convert to 8bit string and null terminate */
@@ -287,17 +287,17 @@ ISpellChecker::suggestWord(const QString& utf8Word)
if (!strtoichar(iWord, out.data(), INPUTWORDLEN + MAXAFFIXLEN, 0))
makepossibilities(iWord);
else
- return QStringList();
+ return TQStringList();
- QStringList sugg_arr;
+ TQStringList sugg_arr;
for (c = 0; c < m_pcount; c++)
{
- QString utf8Word;
+ TQString utf8Word;
if (!m_translate_in)
{
/* copy to 8bit string and null terminate */
- utf8Word = QString::fromUtf8( m_possibilities[c] );
+ utf8Word = TQString::fromUtf8( m_possibilities[c] );
}
else
{
@@ -320,7 +320,7 @@ s_buildHashNames (std::vector<std::string> & names, const char * dict)
names.clear ();
while ( (tmp = ispell_dirs[i++]) ) {
- QCString maybeFile = QCString( tmp ) + '/';
+ TQCString maybeFile = TQCString( tmp ) + '/';
maybeFile += dict;
names.push_back( maybeFile.data() );
}
@@ -333,10 +333,10 @@ s_allDics()
int i = 0;
while ( (tmp = ispell_dirs[i++]) ) {
- QDir dir( tmp );
- QStringList lst = dir.entryList( "*.hash" );
- for ( QStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) {
- QFileInfo info( *it );
+ TQDir dir( tmp );
+ TQStringList lst = dir.entryList( "*.hash" );
+ for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) {
+ TQFileInfo info( *it );
for (size_t i = 0; i < size_ispell_map; i++)
{
const IspellMap * mapping = (const IspellMap *)(&(ispell_map[i]));
@@ -349,7 +349,7 @@ s_allDics()
}
}
-QValueList<QString>
+TQValueList<TQString>
ISpellChecker::allDics()
{
if ( ispell_dict_map.empty() )
@@ -371,7 +371,7 @@ ISpellChecker::loadDictionary (const char * szdict)
return dict_names[i].c_str();
}
- return QString::null;
+ return TQString::null;
}
/*!
@@ -383,7 +383,7 @@ ISpellChecker::loadDictionary (const char * szdict)
bool
ISpellChecker::loadDictionaryForLanguage ( const char * szLang )
{
- QString hashname;
+ TQString hashname;
const char * encoding = NULL;
const char * szFile = NULL;
@@ -415,7 +415,7 @@ ISpellChecker::loadDictionaryForLanguage ( const char * szLang )
}
void
-ISpellChecker::setDictionaryEncoding( const QString& hashname, const char * encoding )
+ISpellChecker::setDictionaryEncoding( const TQString& hashname, const char * encoding )
{
/* Get Hash encoding from XML file. This should always work! */
try_autodetect_charset(encoding);
@@ -446,7 +446,7 @@ ISpellChecker::setDictionaryEncoding( const QString& hashname, const char * enco
prefstringchar = findfiletype("utf8", 1, deftflag < 0 ? &deftflag : static_cast<int *>(NULL));
if (prefstringchar >= 0)
{
- m_translate_in = QTextCodec::codecForName("utf8");
+ m_translate_in = TQTextCodec::codecForName("utf8");
}
if (m_translate_in)
@@ -458,13 +458,13 @@ ISpellChecker::setDictionaryEncoding( const QString& hashname, const char * enco
/* Look for "altstringtype" names from latin1 to latin15 */
for(int n1 = 1; n1 <= 15; n1++)
{
- QString teststring = QString("latin%1").arg(n1);
+ TQString teststring = TQString("latin%1").arg(n1);
prefstringchar = findfiletype(teststring.latin1(), 1,
deftflag < 0 ? &deftflag : static_cast<int *>(NULL));
if (prefstringchar >= 0)
{
//FIXME: latin1 might be wrong
- m_translate_in = QTextCodec::codecForName( teststring.latin1() );
+ m_translate_in = TQTextCodec::codecForName( teststring.latin1() );
break;
}
}
@@ -473,7 +473,7 @@ ISpellChecker::setDictionaryEncoding( const QString& hashname, const char * enco
/* If nothing found, use latin1 */
if (!m_translate_in)
{
- m_translate_in = QTextCodec::codecForName("latin1");
+ m_translate_in = TQTextCodec::codecForName("latin1");
}
}
diff --git a/kspell2/plugins/ispell/ispell_checker.h b/kspell2/plugins/ispell/ispell_checker.h
index e59f8ed2d..08783922a 100644
--- a/kspell2/plugins/ispell/ispell_checker.h
+++ b/kspell2/plugins/ispell/ispell_checker.h
@@ -34,10 +34,10 @@
#include "ispell.h"
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qtextcodec.h>
-#include <qstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqtextcodec.h>
+#include <tqstring.h>
class ISpellChecker
@@ -46,18 +46,18 @@ public:
ISpellChecker();
~ISpellChecker();
- bool checkWord(const QString& word);
- QStringList suggestWord(const QString& word);
+ bool checkWord(const TQString& word);
+ TQStringList suggestWord(const TQString& word);
bool requestDictionary (const char * szLang);
- static QValueList<QString> allDics();
+ static TQValueList<TQString> allDics();
private:
ISpellChecker(const ISpellChecker&); // no impl
void operator=(const ISpellChecker&); // no impl
- QString loadDictionary (const char * szLang );
+ TQString loadDictionary (const char * szLang );
bool loadDictionaryForLanguage ( const char * szLang );
- void setDictionaryEncoding ( const QString& hashname, const char * enc );
+ void setDictionaryEncoding ( const TQString& hashname, const char * enc );
//
// The member functions after this point were formerly global functions
@@ -267,7 +267,7 @@ private:
int m_Trynum; /* Size of "Try" array */
ichar_t m_Try[SET_SIZE + MAXSTRINGCHARS];
- QTextCodec *m_translate_in; /* Selected translation from/to Unicode */
+ TQTextCodec *m_translate_in; /* Selected translation from/to Unicode */
};
#endif /* ISPELL_CHECKER_H */
diff --git a/kspell2/plugins/ispell/kspell_ispellclient.cpp b/kspell2/plugins/ispell/kspell_ispellclient.cpp
index 5830d4957..3b2fda4e0 100644
--- a/kspell2/plugins/ispell/kspell_ispellclient.cpp
+++ b/kspell2/plugins/ispell/kspell_ispellclient.cpp
@@ -31,7 +31,7 @@ K_EXPORT_COMPONENT_FACTORY( kspell_ispell, ISpellClientFactory( "kspell_ispell"
using namespace KSpell2;
-ISpellClient::ISpellClient( QObject *parent, const char *name, const QStringList& /* args */ )
+ISpellClient::ISpellClient( TQObject *parent, const char *name, const TQStringList& /* args */ )
: Client( parent, name )
{
}
@@ -40,13 +40,13 @@ ISpellClient::~ISpellClient()
{
}
-Dictionary* ISpellClient::dictionary( const QString& language )
+Dictionary* ISpellClient::dictionary( const TQString& language )
{
ISpellDict *ad = new ISpellDict( language );
return ad;
}
-QStringList ISpellClient::languages() const
+TQStringList ISpellClient::languages() const
{
return ISpellChecker::allDics();
}
diff --git a/kspell2/plugins/ispell/kspell_ispellclient.h b/kspell2/plugins/ispell/kspell_ispellclient.h
index b46f485fd..6a67bb1a6 100644
--- a/kspell2/plugins/ispell/kspell_ispellclient.h
+++ b/kspell2/plugins/ispell/kspell_ispellclient.h
@@ -22,7 +22,7 @@
#define KSPELL_ISPELLCLIENT_H
#include "client.h"
-#include <qobject.h>
+#include <tqobject.h>
#include "ispell_checker.h"
@@ -35,18 +35,18 @@ class ISpellClient : public KSpell2::Client
{
Q_OBJECT
public:
- ISpellClient( QObject *parent, const char *name, const QStringList & /* args */ );
+ ISpellClient( TQObject *parent, const char *name, const TQStringList & /* args */ );
~ISpellClient();
virtual int reliability() const {
return 10;
}
- virtual Dictionary* dictionary( const QString& language );
+ virtual Dictionary* dictionary( const TQString& language );
- virtual QStringList languages() const;
+ virtual TQStringList languages() const;
- virtual QString name() const {
+ virtual TQString name() const {
return "ISpell";
}
private:
diff --git a/kspell2/plugins/ispell/kspell_ispelldict.cpp b/kspell2/plugins/ispell/kspell_ispelldict.cpp
index 2d3728a6a..35c1e9276 100644
--- a/kspell2/plugins/ispell/kspell_ispelldict.cpp
+++ b/kspell2/plugins/ispell/kspell_ispelldict.cpp
@@ -26,7 +26,7 @@
using namespace KSpell2;
-ISpellDict::ISpellDict( const QString& lang )
+ISpellDict::ISpellDict( const TQString& lang )
: Dictionary( lang )
{
m_checker = new ISpellChecker();
@@ -40,18 +40,18 @@ ISpellDict::~ISpellDict()
{
}
-bool ISpellDict::check( const QString& word )
+bool ISpellDict::check( const TQString& word )
{
return m_checker->checkWord( word );
}
-QStringList ISpellDict::suggest( const QString& word )
+TQStringList ISpellDict::suggest( const TQString& word )
{
return m_checker->suggestWord( word );
}
-bool ISpellDict::checkAndSuggest( const QString& word,
- QStringList& suggestions )
+bool ISpellDict::checkAndSuggest( const TQString& word,
+ TQStringList& suggestions )
{
bool c = check( word );
if ( c )
@@ -59,18 +59,18 @@ bool ISpellDict::checkAndSuggest( const QString& word,
return c;
}
-bool ISpellDict::storeReplacement( const QString& ,
- const QString& )
+bool ISpellDict::storeReplacement( const TQString& ,
+ const TQString& )
{
return false;
}
-bool ISpellDict::addToPersonal( const QString& )
+bool ISpellDict::addToPersonal( const TQString& )
{
return false;
}
-bool ISpellDict::addToSession( const QString& )
+bool ISpellDict::addToSession( const TQString& )
{
return false;
}
diff --git a/kspell2/plugins/ispell/kspell_ispelldict.h b/kspell2/plugins/ispell/kspell_ispelldict.h
index 45154d790..2ca9e7d93 100644
--- a/kspell2/plugins/ispell/kspell_ispelldict.h
+++ b/kspell2/plugins/ispell/kspell_ispelldict.h
@@ -28,20 +28,20 @@ class ISpellChecker;
class ISpellDict : public KSpell2::Dictionary
{
public:
- ISpellDict( const QString& lang );
+ ISpellDict( const TQString& lang );
~ISpellDict();
- virtual bool check( const QString& word );
+ virtual bool check( const TQString& word );
- virtual QStringList suggest( const QString& word );
+ virtual TQStringList suggest( const TQString& word );
- virtual bool checkAndSuggest( const QString& word,
- QStringList& suggestions ) ;
+ virtual bool checkAndSuggest( const TQString& word,
+ TQStringList& suggestions ) ;
- virtual bool storeReplacement( const QString& bad,
- const QString& good );
+ virtual bool storeReplacement( const TQString& bad,
+ const TQString& good );
- virtual bool addToPersonal( const QString& word );
- virtual bool addToSession( const QString& word );
+ virtual bool addToPersonal( const TQString& word );
+ virtual bool addToSession( const TQString& word );
private:
ISpellChecker *m_checker;
};