From ffe8a83e053396df448e9413828527613ca3bd46 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:46:43 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kspell2/plugins/aspell/kspell_aspellclient.cpp | 8 ++-- kspell2/plugins/aspell/kspell_aspellclient.h | 10 ++--- kspell2/plugins/aspell/kspell_aspelldict.cpp | 24 +++++------ kspell2/plugins/aspell/kspell_aspelldict.h | 18 ++++---- kspell2/plugins/hspell/kspell_hspellclient.cpp | 8 ++-- kspell2/plugins/hspell/kspell_hspellclient.h | 10 ++--- kspell2/plugins/hspell/kspell_hspelldict.cpp | 26 ++++++------ kspell2/plugins/hspell/kspell_hspelldict.h | 20 ++++----- kspell2/plugins/ispell/ispell_checker.cpp | 58 +++++++++++++------------- kspell2/plugins/ispell/ispell_checker.h | 20 ++++----- kspell2/plugins/ispell/kspell_ispellclient.cpp | 6 +-- kspell2/plugins/ispell/kspell_ispellclient.h | 10 ++--- kspell2/plugins/ispell/kspell_ispelldict.cpp | 18 ++++---- kspell2/plugins/ispell/kspell_ispelldict.h | 18 ++++---- 14 files changed, 127 insertions(+), 127 deletions(-) (limited to 'kspell2/plugins') diff --git a/kspell2/plugins/aspell/kspell_aspellclient.cpp b/kspell2/plugins/aspell/kspell_aspellclient.cpp index 94156c523..3577dd795 100644 --- a/kspell2/plugins/aspell/kspell_aspellclient.cpp +++ b/kspell2/plugins/aspell/kspell_aspellclient.cpp @@ -30,7 +30,7 @@ K_EXPORT_COMPONENT_FACTORY( kspell_aspell, ASpellClientFactory( "kspell_aspell" using namespace KSpell2; -ASpellClient::ASpellClient( QObject *parent, const char *name, const QStringList& /* args */ ) +ASpellClient::ASpellClient( TQObject *parent, const char *name, const TQStringList& /* args */ ) : Client( parent, name ) { m_config = new_aspell_config(); @@ -41,18 +41,18 @@ ASpellClient::~ASpellClient() delete_aspell_config( m_config ); } -Dictionary* ASpellClient::dictionary( const QString& language ) +Dictionary* ASpellClient::dictionary( const TQString& language ) { ASpellDict *ad = new ASpellDict( language ); return ad; } -QStringList ASpellClient::languages() const +TQStringList ASpellClient::languages() const { AspellDictInfoList *l = get_aspell_dict_info_list( m_config ); AspellDictInfoEnumeration *el = aspell_dict_info_list_elements( l ); - QStringList langs; + TQStringList langs; const AspellDictInfo *di = 0; while ( ( di = aspell_dict_info_enumeration_next( el ) ) ) { langs.append( di->name ); diff --git a/kspell2/plugins/aspell/kspell_aspellclient.h b/kspell2/plugins/aspell/kspell_aspellclient.h index 7073e80ec..f2439989c 100644 --- a/kspell2/plugins/aspell/kspell_aspellclient.h +++ b/kspell2/plugins/aspell/kspell_aspellclient.h @@ -22,7 +22,7 @@ #define KSPELL_ASPELLCLIENT_H #include "client.h" -#include +#include #include "aspell.h" @@ -35,18 +35,18 @@ class ASpellClient : public KSpell2::Client { Q_OBJECT public: - ASpellClient( QObject *parent, const char *name, const QStringList & /* args */ ); + ASpellClient( TQObject *parent, const char *name, const TQStringList & /* args */ ); ~ASpellClient(); virtual int reliability() const { return 20; } - 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 "ASpell"; } private: diff --git a/kspell2/plugins/aspell/kspell_aspelldict.cpp b/kspell2/plugins/aspell/kspell_aspelldict.cpp index 4674c138a..6687f2106 100644 --- a/kspell2/plugins/aspell/kspell_aspelldict.cpp +++ b/kspell2/plugins/aspell/kspell_aspelldict.cpp @@ -22,11 +22,11 @@ #include -#include +#include using namespace KSpell2; -ASpellDict::ASpellDict( const QString& lang ) +ASpellDict::ASpellDict( const TQString& lang ) : Dictionary( lang ) { m_config = new_aspell_config(); @@ -50,7 +50,7 @@ ASpellDict::~ASpellDict() delete_aspell_config( m_config ); } -bool ASpellDict::check( const QString& word ) +bool ASpellDict::check( const TQString& word ) { /* ASpell is expecting length of a string in char representation */ /* word.length() != word.utf8().length() for nonlatin strings */ @@ -58,10 +58,10 @@ bool ASpellDict::check( const QString& word ) return correct; } -QStringList ASpellDict::suggest( const QString& word ) +TQStringList ASpellDict::suggest( const TQString& word ) { /* Needed for Unicode conversion */ - QTextCodec *codec = QTextCodec::codecForName("utf8"); + TQTextCodec *codec = TQTextCodec::codecForName("utf8"); /* ASpell is expecting length of a string in char representation */ /* word.length() != word.utf8().length() for nonlatin strings */ @@ -71,7 +71,7 @@ QStringList ASpellDict::suggest( const QString& word ) AspellStringEnumeration * elements = aspell_word_list_elements( suggestions ); - QStringList qsug; + TQStringList qsug; const char * cword; while ( (cword = aspell_string_enumeration_next( elements )) ) { @@ -84,8 +84,8 @@ QStringList ASpellDict::suggest( const QString& word ) return qsug; } -bool ASpellDict::checkAndSuggest( const QString& word, - QStringList& suggestions ) +bool ASpellDict::checkAndSuggest( const TQString& word, + TQStringList& suggestions ) { bool c = check( word ); if ( c ) @@ -93,8 +93,8 @@ bool ASpellDict::checkAndSuggest( const QString& word, return c; } -bool ASpellDict::storeReplacement( const QString& bad, - const QString& good ) +bool ASpellDict::storeReplacement( const TQString& bad, + const TQString& good ) { /* ASpell is expecting length of a string in char representation */ /* word.length() != word.utf8().length() for nonlatin strings */ @@ -103,7 +103,7 @@ bool ASpellDict::storeReplacement( const QString& bad, good.utf8(), good.utf8().length() ); } -bool ASpellDict::addToPersonal( const QString& word ) +bool ASpellDict::addToPersonal( const TQString& word ) { kdDebug() << "ASpellDict::addToPersonal: word = " << word << endl; /* ASpell is expecting length of a string in char representation */ @@ -116,7 +116,7 @@ bool ASpellDict::addToPersonal( const QString& word ) return aspell_speller_save_all_word_lists( m_speller ); } -bool ASpellDict::addToSession( const QString& word ) +bool ASpellDict::addToSession( const TQString& word ) { /* ASpell is expecting length of a string in char representation */ /* word.length() != word.utf8().length() for nonlatin strings */ diff --git a/kspell2/plugins/aspell/kspell_aspelldict.h b/kspell2/plugins/aspell/kspell_aspelldict.h index 0a4f520d3..2ff51c056 100644 --- a/kspell2/plugins/aspell/kspell_aspelldict.h +++ b/kspell2/plugins/aspell/kspell_aspelldict.h @@ -28,20 +28,20 @@ class ASpellDict : public KSpell2::Dictionary { public: - ASpellDict( const QString& lang ); + ASpellDict( const TQString& lang ); ~ASpellDict(); - 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: AspellConfig *m_config; AspellSpeller *m_speller; diff --git a/kspell2/plugins/hspell/kspell_hspellclient.cpp b/kspell2/plugins/hspell/kspell_hspellclient.cpp index ac0876153..716300c20 100644 --- a/kspell2/plugins/hspell/kspell_hspellclient.cpp +++ b/kspell2/plugins/hspell/kspell_hspellclient.cpp @@ -31,7 +31,7 @@ K_EXPORT_COMPONENT_FACTORY( kspell_hspell, HSpellClientFactory( "kspell_hspell" using namespace KSpell2; -HSpellClient::HSpellClient( QObject *parent, const char *name, const QStringList& /* args */ ) +HSpellClient::HSpellClient( TQObject *parent, const char *name, const TQStringList& /* args */ ) : Client( parent, name ) { } @@ -40,15 +40,15 @@ HSpellClient::~HSpellClient() { } -Dictionary* HSpellClient::dictionary( const QString& language ) +Dictionary* HSpellClient::dictionary( const TQString& language ) { HSpellDict *ad = new HSpellDict( language ); return ad; } -QStringList HSpellClient::languages() const +TQStringList HSpellClient::languages() const { - QStringList langs; + TQStringList langs; langs.append( "he" ); return langs; diff --git a/kspell2/plugins/hspell/kspell_hspellclient.h b/kspell2/plugins/hspell/kspell_hspellclient.h index 6d7a1773b..a26aca227 100644 --- a/kspell2/plugins/hspell/kspell_hspellclient.h +++ b/kspell2/plugins/hspell/kspell_hspellclient.h @@ -23,7 +23,7 @@ #define KSPELL_HSPELLCLIENT_H #include "client.h" -#include +#include /* libhspell is a C library and it does not have #ifdef __cplusplus */ extern "C" { @@ -39,18 +39,18 @@ class HSpellClient : public KSpell2::Client { Q_OBJECT public: - HSpellClient( QObject *parent, const char *name, const QStringList & /* args */ ); + HSpellClient( TQObject *parent, const char *name, const TQStringList & /* args */ ); ~HSpellClient(); virtual int reliability() const { return 20; } - 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 "HSpell"; } private: diff --git a/kspell2/plugins/hspell/kspell_hspelldict.cpp b/kspell2/plugins/hspell/kspell_hspelldict.cpp index e8944dbf7..04f055e86 100644 --- a/kspell2/plugins/hspell/kspell_hspelldict.cpp +++ b/kspell2/plugins/hspell/kspell_hspelldict.cpp @@ -23,18 +23,18 @@ #include "kspell_hspelldict.h" #include -#include +#include using namespace KSpell2; -HSpellDict::HSpellDict( const QString& lang ) +HSpellDict::HSpellDict( const TQString& lang ) : Dictionary( lang ) { int int_error = hspell_init( &m_speller, HSPELL_OPT_DEFAULT ); if ( int_error == -1 ) kdDebug() << "HSpellDict::HSpellDict: Init failed" << endl; /* hspell understans only iso8859-8-i */ - codec = QTextCodec::codecForName( "iso8859-8-i" ); + codec = TQTextCodec::codecForName( "iso8859-8-i" ); } HSpellDict::~HSpellDict() @@ -43,11 +43,11 @@ HSpellDict::~HSpellDict() hspell_uninit( m_speller ); } -bool HSpellDict::check( const QString& word ) +bool HSpellDict::check( const TQString& word ) { kdDebug() << "HSpellDict::check word = " << word <fromUnicode( word ); + TQCString wordISO = codec->fromUnicode( word ); /* returns 1 if the word is correct, 0 otherwise */ int correct = hspell_check_word ( m_speller, wordISO, @@ -61,9 +61,9 @@ bool HSpellDict::check( const QString& word ) return correct == 1; } -QStringList HSpellDict::suggest( const QString& word ) +TQStringList HSpellDict::suggest( const TQString& word ) { - QStringList qsug; + TQStringList qsug; struct corlist cl; int n_sugg; corlist_init( &cl ); @@ -75,8 +75,8 @@ QStringList HSpellDict::suggest( const QString& word ) return qsug; } -bool HSpellDict::checkAndSuggest( const QString& word, - QStringList& suggestions ) +bool HSpellDict::checkAndSuggest( const TQString& word, + TQStringList& suggestions ) { bool c = check( word ); if( c ) @@ -84,22 +84,22 @@ bool HSpellDict::checkAndSuggest( const QString& word, return c; } -bool HSpellDict::storeReplacement( const QString& bad, - const QString& good ) +bool HSpellDict::storeReplacement( const TQString& bad, + const TQString& good ) { // hspell-0.9 cannot do this kdDebug() << "HSpellDict::storeReplacement: Sorry, cannot." << endl; return false; } -bool HSpellDict::addToPersonal( const QString& word ) +bool HSpellDict::addToPersonal( const TQString& word ) { // hspell-0.9 cannot do this kdDebug() << "HSpellDict::addToPersonal: Sorry, cannot." << endl; return false; } -bool HSpellDict::addToSession( const QString& word ) +bool HSpellDict::addToSession( const TQString& word ) { // hspell-0.9 cannot do this kdDebug() << "HSpellDict::addToSession: Sorry, cannot." << endl; diff --git a/kspell2/plugins/hspell/kspell_hspelldict.h b/kspell2/plugins/hspell/kspell_hspelldict.h index a3895dc98..ff0302e4b 100644 --- a/kspell2/plugins/hspell/kspell_hspelldict.h +++ b/kspell2/plugins/hspell/kspell_hspelldict.h @@ -31,23 +31,23 @@ extern "C" { class HSpellDict : public KSpell2::Dictionary { public: - HSpellDict( const QString& lang ); + HSpellDict( const TQString& lang ); ~HSpellDict(); - 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: struct dict_radix *m_speller; - QTextCodec *codec; + TQTextCodec *codec; }; #endif 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 -#include -#include +#include +#include +#include /***************************************************************************/ @@ -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 ispell_dict_map; +static TQMap 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 & 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 +TQValueList 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(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(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 -#include -#include -#include +#include +#include +#include +#include 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 allDics(); + static TQValueList 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 +#include #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; }; -- cgit v1.2.1