summaryrefslogtreecommitdiffstats
path: root/kspell2
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
commitffe8a83e053396df448e9413828527613ca3bd46 (patch)
treea73d4169e02df4a50f9a12cb165fcd0ab5bac7c6 /kspell2
parent682bf3bfdcbcbb1fca85e8a36ed03e062e0555d5 (diff)
downloadtdelibs-ffe8a83e053396df448e9413828527613ca3bd46.tar.gz
tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kspell2')
-rw-r--r--kspell2/backgroundchecker.cpp34
-rw-r--r--kspell2/backgroundchecker.h20
-rw-r--r--kspell2/backgroundengine.cpp26
-rw-r--r--kspell2/backgroundengine.h22
-rw-r--r--kspell2/backgroundthread.cpp18
-rw-r--r--kspell2/backgroundthread.h22
-rw-r--r--kspell2/broker.cpp38
-rw-r--r--kspell2/broker.h20
-rw-r--r--kspell2/client.cpp4
-rw-r--r--kspell2/client.h18
-rw-r--r--kspell2/defaultdictionary.cpp28
-rw-r--r--kspell2/defaultdictionary.h24
-rw-r--r--kspell2/dictionary.h26
-rw-r--r--kspell2/filter.cpp44
-rw-r--r--kspell2/filter.h22
-rw-r--r--kspell2/plugins/aspell/kspell_aspellclient.cpp8
-rw-r--r--kspell2/plugins/aspell/kspell_aspellclient.h10
-rw-r--r--kspell2/plugins/aspell/kspell_aspelldict.cpp24
-rw-r--r--kspell2/plugins/aspell/kspell_aspelldict.h18
-rw-r--r--kspell2/plugins/hspell/kspell_hspellclient.cpp8
-rw-r--r--kspell2/plugins/hspell/kspell_hspellclient.h10
-rw-r--r--kspell2/plugins/hspell/kspell_hspelldict.cpp26
-rw-r--r--kspell2/plugins/hspell/kspell_hspelldict.h20
-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
-rw-r--r--kspell2/settings.cpp42
-rw-r--r--kspell2/settings.h22
-rw-r--r--kspell2/tests/backgroundtest.cpp14
-rw-r--r--kspell2/tests/backgroundtest.h8
-rw-r--r--kspell2/tests/test.cpp10
-rw-r--r--kspell2/tests/test_dialog.cpp10
-rw-r--r--kspell2/tests/test_dialog.h6
-rw-r--r--kspell2/tests/test_filter.cpp2
-rw-r--r--kspell2/tests/test_highlighter.cpp4
-rw-r--r--kspell2/threadevents.h14
-rw-r--r--kspell2/ui/configdialog.cpp6
-rw-r--r--kspell2/ui/configdialog.h2
-rw-r--r--kspell2/ui/configwidget.cpp22
-rw-r--r--kspell2/ui/configwidget.h6
-rw-r--r--kspell2/ui/dialog.cpp104
-rw-r--r--kspell2/ui/dialog.h28
-rw-r--r--kspell2/ui/highlighter.cpp24
-rw-r--r--kspell2/ui/highlighter.h12
47 files changed, 478 insertions, 478 deletions
diff --git a/kspell2/backgroundchecker.cpp b/kspell2/backgroundchecker.cpp
index cf02e0714..799edf120 100644
--- a/kspell2/backgroundchecker.cpp
+++ b/kspell2/backgroundchecker.cpp
@@ -34,22 +34,22 @@ class BackgroundChecker::Private
public:
//BackgroundThread thread;
BackgroundEngine *engine;
- QString currentText;
+ TQString currentText;
};
-BackgroundChecker::BackgroundChecker( const Broker::Ptr& broker, QObject* parent,
+BackgroundChecker::BackgroundChecker( const Broker::Ptr& broker, TQObject* parent,
const char *name )
- : QObject( parent, name )
+ : TQObject( parent, name )
{
d = new Private;
//d->thread.setReceiver( this );
//d->thread.setBroker( broker );
d->engine = new BackgroundEngine( this );
d->engine->setBroker( broker );
- connect( d->engine, SIGNAL(misspelling( const QString&, int )),
- SIGNAL(misspelling( const QString&, int )) );
- connect( d->engine, SIGNAL(done()),
- SLOT(slotEngineDone()) );
+ connect( d->engine, TQT_SIGNAL(misspelling( const TQString&, int )),
+ TQT_SIGNAL(misspelling( const TQString&, int )) );
+ connect( d->engine, TQT_SIGNAL(done()),
+ TQT_SLOT(slotEngineDone()) );
}
BackgroundChecker::~BackgroundChecker()
@@ -57,7 +57,7 @@ BackgroundChecker::~BackgroundChecker()
delete d;
}
-void BackgroundChecker::checkText( const QString& text )
+void BackgroundChecker::checkText( const TQString& text )
{
d->currentText = text;
//d->thread.setText( text );
@@ -81,9 +81,9 @@ void BackgroundChecker::stop()
d->engine->stop();
}
-QString BackgroundChecker::getMoreText()
+TQString BackgroundChecker::getMoreText()
{
- return QString::null;
+ return TQString::null;
}
void BackgroundChecker::finishedCurrentFeed()
@@ -108,24 +108,24 @@ Broker *BackgroundChecker::broker() const
return d->engine->broker();
}
-bool BackgroundChecker::checkWord( const QString& word )
+bool BackgroundChecker::checkWord( const TQString& word )
{
//kdDebug()<<"checking word \""<<word<< "\""<<endl;
return d->engine->checkWord( word );
}
-bool BackgroundChecker::addWord( const QString& word )
+bool BackgroundChecker::addWord( const TQString& word )
{
return d->engine->addWord( word );
}
-QStringList BackgroundChecker::suggest( const QString& word ) const
+TQStringList BackgroundChecker::suggest( const TQString& word ) const
{
//return d->thread.suggest( word );
return d->engine->suggest( word );
}
-void BackgroundChecker::changeLanguage( const QString& lang )
+void BackgroundChecker::changeLanguage( const TQString& lang )
{
//d->thread.changeLanguage( lang );
d->engine->changeLanguage( lang );
@@ -152,12 +152,12 @@ void BackgroundChecker::slotEngineDone()
//////////////////////////////////////////////////////////////////
#if 0
-void BackgroundChecker::customEvent( QCustomEvent *event )
+void BackgroundChecker::customEvent( TQCustomEvent *event )
{
if ( (int)event->type() == FoundMisspelling ) {
MisspellingEvent *me = static_cast<MisspellingEvent*>( event );
kdDebug()<<"Found misspelling of \"" << me->word() << "\"" <<endl;
- QString currentWord = d->currentText.mid( me->position(), me->word().length() );
+ TQString currentWord = d->currentText.mid( me->position(), me->word().length() );
if ( currentWord == me->word() )
emit misspelling( me->word(), me->position() );
else {
@@ -171,7 +171,7 @@ void BackgroundChecker::customEvent( QCustomEvent *event )
else
d->thread.setText( d->currentText );
} else {
- QObject::customEvent( event );
+ TQObject::customEvent( event );
}
}
#endif
diff --git a/kspell2/backgroundchecker.h b/kspell2/backgroundchecker.h
index 3c25d3749..c3f2cbc1b 100644
--- a/kspell2/backgroundchecker.h
+++ b/kspell2/backgroundchecker.h
@@ -50,7 +50,7 @@ namespace KSpell2
{
Q_OBJECT
public:
- BackgroundChecker( const Broker::Ptr& broker, QObject *parent =0,
+ BackgroundChecker( const Broker::Ptr& broker, TQObject *parent =0,
const char *name =0 );
~BackgroundChecker();
@@ -60,16 +60,16 @@ namespace KSpell2
*
* Use getMoreText() with start() to spell check a stream.
*/
- void checkText( const QString& );
+ void checkText( const TQString& );
Filter *filter() const;
Broker *broker() const;
- void changeLanguage( const QString& lang );
+ void changeLanguage( const TQString& lang );
- bool checkWord( const QString& word );
- QStringList suggest( const QString& ) const;
- bool addWord( const QString& word );
+ bool checkWord( const TQString& word );
+ TQStringList suggest( const TQString& ) const;
+ bool addWord( const TQString& word );
public slots:
virtual void setFilter( KSpell2::Filter *filter );
virtual void start();
@@ -86,7 +86,7 @@ namespace KSpell2
/**
* Emitted whenever a misspelled word is found
*/
- void misspelling( const QString& word, int start );
+ void misspelling( const TQString& word, int start );
/**
* Emitted after the whole text has been spell checked.
@@ -96,13 +96,13 @@ namespace KSpell2
protected:
/**
* This function is called to get the text to spell check.
- * It will be called continuesly until it returns QString::null
+ * It will be called continuesly until it returns TQString::null
* in which case the done() singnal is emitted.
* Note: the start parameter in mispelling() is not a combined
* position but a position in the last string returned
* by getMoreText. You need to store the state in the derivatives.
*/
- virtual QString getMoreText();
+ virtual TQString getMoreText();
/**
* This function will be called whenever the background checker
@@ -113,7 +113,7 @@ namespace KSpell2
protected slots:
void slotEngineDone();
protected:
- //void customEvent( QCustomEvent *event );
+ //void customEvent( TQCustomEvent *event );
private:
class Private;
Private *d;
diff --git a/kspell2/backgroundengine.cpp b/kspell2/backgroundengine.cpp
index d5394dbb5..9eafe1b2e 100644
--- a/kspell2/backgroundengine.cpp
+++ b/kspell2/backgroundengine.cpp
@@ -26,12 +26,12 @@
#include <kdebug.h>
-#include <qtimer.h>
+#include <tqtimer.h>
using namespace KSpell2;
-BackgroundEngine::BackgroundEngine( QObject *parent )
- : QObject( parent )
+BackgroundEngine::BackgroundEngine( TQObject *parent )
+ : TQObject( parent )
{
m_filter = Filter::defaultFilter();
m_dict = 0;
@@ -50,17 +50,17 @@ void BackgroundEngine::setBroker( const Broker::Ptr& broker )
m_filter->setSettings( m_broker->settings() );
}
-void BackgroundEngine::setText( const QString& text )
+void BackgroundEngine::setText( const TQString& text )
{
m_filter->setBuffer( text );
}
-QString BackgroundEngine::text() const
+TQString BackgroundEngine::text() const
{
return m_filter->buffer();
}
-void BackgroundEngine::changeLanguage( const QString& lang )
+void BackgroundEngine::changeLanguage( const TQString& lang )
{
delete m_dict;
if ( lang.isEmpty() ) {
@@ -70,7 +70,7 @@ void BackgroundEngine::changeLanguage( const QString& lang )
}
}
-QString BackgroundEngine::language() const
+TQString BackgroundEngine::language() const
{
if ( m_dict )
return m_dict->language();
@@ -80,14 +80,14 @@ QString BackgroundEngine::language() const
void BackgroundEngine::setFilter( Filter *filter )
{
- QString oldText = m_filter->buffer();
+ TQString oldText = m_filter->buffer();
m_filter = filter;
m_filter->setBuffer( oldText );
}
void BackgroundEngine::start()
{
- QTimer::singleShot( 0, this, SLOT(checkNext()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(checkNext()) );
}
void BackgroundEngine::stop()
@@ -96,7 +96,7 @@ void BackgroundEngine::stop()
void BackgroundEngine::continueChecking()
{
- QTimer::singleShot( 0, this, SLOT(checkNext()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(checkNext()) );
}
void BackgroundEngine::checkNext()
@@ -117,19 +117,19 @@ void BackgroundEngine::checkNext()
continueChecking();
}
-bool BackgroundEngine::checkWord( const QString& word )
+bool BackgroundEngine::checkWord( const TQString& word )
{
Dictionary *dict = ( m_dict ) ? m_dict : static_cast<Dictionary*>( m_defaultDict );
return dict->check( word );
}
-bool BackgroundEngine::addWord( const QString& word )
+bool BackgroundEngine::addWord( const TQString& word )
{
Dictionary *dict = ( m_dict ) ? m_dict : static_cast<Dictionary*>( m_defaultDict );
return dict->addToPersonal( word );
}
-QStringList BackgroundEngine::suggest( const QString& word )
+TQStringList BackgroundEngine::suggest( const TQString& word )
{
Dictionary *dict = ( m_dict ) ? m_dict : static_cast<Dictionary*>( m_defaultDict );
return dict->suggest( word );
diff --git a/kspell2/backgroundengine.h b/kspell2/backgroundengine.h
index 9ae2f4a73..9534e970c 100644
--- a/kspell2/backgroundengine.h
+++ b/kspell2/backgroundengine.h
@@ -23,8 +23,8 @@
#include "broker.h"
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
namespace KSpell2
{
@@ -35,17 +35,17 @@ namespace KSpell2
{
Q_OBJECT
public:
- BackgroundEngine( QObject *parent );
+ BackgroundEngine( TQObject *parent );
~BackgroundEngine();
void setBroker( const Broker::Ptr& broker );
Broker *broker() const { return m_broker; }
- void setText( const QString& );
- QString text() const;
+ void setText( const TQString& );
+ TQString text() const;
- void changeLanguage( const QString& );
- QString language() const;
+ void changeLanguage( const TQString& );
+ TQString language() const;
void setFilter( Filter *filter );
Filter *filter() const { return m_filter; }
@@ -54,11 +54,11 @@ namespace KSpell2
void continueChecking();
void stop();
- bool checkWord( const QString& word );
- QStringList suggest( const QString& word );
- bool addWord( const QString& word );
+ bool checkWord( const TQString& word );
+ TQStringList suggest( const TQString& word );
+ bool addWord( const TQString& word );
signals:
- void misspelling( const QString&, int );
+ void misspelling( const TQString&, int );
void done();
protected slots:
void checkNext();
diff --git a/kspell2/backgroundthread.cpp b/kspell2/backgroundthread.cpp
index ffa5d0d8a..0f3471537 100644
--- a/kspell2/backgroundthread.cpp
+++ b/kspell2/backgroundthread.cpp
@@ -26,19 +26,19 @@
#include "dictionary.h"
#include <kdebug.h>
-#include <qapplication.h>
+#include <tqapplication.h>
using namespace KSpell2;
BackgroundThread::BackgroundThread()
- : QThread(), m_broker( 0 ), m_dict( 0 )
+ : TQThread(), m_broker( 0 ), m_dict( 0 )
{
m_recv = 0;
m_filter = Filter::defaultFilter();
m_done = false;
}
-void BackgroundThread::setReceiver( QObject *recv )
+void BackgroundThread::setReceiver( TQObject *recv )
{
m_recv = recv;
}
@@ -52,7 +52,7 @@ void BackgroundThread::setBroker( const Broker::Ptr& broker )
m_filter->restart();
}
-QStringList BackgroundThread::suggest( const QString& word ) const
+TQStringList BackgroundThread::suggest( const TQString& word ) const
{
return m_dict->suggest( word );
}
@@ -65,15 +65,15 @@ void BackgroundThread::run()
w = m_filter->nextWord() ) {
if ( !m_dict->check( w.word ) && !m_done ) {
MisspellingEvent *event = new MisspellingEvent( w.word, w.start );
- QApplication::postEvent( m_recv, event );
+ TQApplication::postEvent( m_recv, event );
}
}
m_mutex.unlock();
FinishedCheckingEvent *event = new FinishedCheckingEvent();
- QApplication::postEvent( m_recv, event );
+ TQApplication::postEvent( m_recv, event );
}
-void BackgroundThread::setText( const QString& buff )
+void BackgroundThread::setText( const TQString& buff )
{
stop();
m_mutex.lock();
@@ -90,13 +90,13 @@ void BackgroundThread::setFilter( Filter *filter )
m_filter = filter;
if ( oldFilter ) {
m_filter->setBuffer( oldFilter->buffer() );
- oldFilter->setBuffer( QString::null );
+ oldFilter->setBuffer( TQString::null );
}
m_mutex.unlock();
start();
}
-void BackgroundThread::changeLanguage( const QString& lang )
+void BackgroundThread::changeLanguage( const TQString& lang )
{
stop();
m_mutex.lock();
diff --git a/kspell2/backgroundthread.h b/kspell2/backgroundthread.h
index 6d15baff5..376fda97d 100644
--- a/kspell2/backgroundthread.h
+++ b/kspell2/backgroundthread.h
@@ -23,8 +23,8 @@
#include "broker.h"
-#include <qthread.h>
-#include <qmutex.h>
+#include <tqthread.h>
+#include <tqmutex.h>
class QObject;
@@ -37,28 +37,28 @@ namespace KSpell2
{
public:
BackgroundThread();
- void setReceiver( QObject *parent );
- QObject *receiver() const { return m_recv; }
+ void setReceiver( TQObject *parent );
+ TQObject *receiver() const { return m_recv; }
void setBroker( const Broker::Ptr& broker );
Broker *broker() const { return m_broker; }
- void setText( const QString& );
- QString text() const;
+ void setText( const TQString& );
+ TQString text() const;
- void changeLanguage( const QString& );
- QString language() const;
+ void changeLanguage( const TQString& );
+ TQString language() const;
void setFilter( Filter *filter );
Filter *filter() const { return m_filter; }
- QStringList suggest( const QString& ) const;
+ TQStringList suggest( const TQString& ) const;
virtual void run();
void stop();
private:
- QObject *m_recv;
- QMutex m_mutex;
+ TQObject *m_recv;
+ TQMutex m_mutex;
Filter *m_filter;
Broker::Ptr m_broker;
Dictionary *m_dict;
diff --git a/kspell2/broker.cpp b/kspell2/broker.cpp
index c295197c9..7f572bb01 100644
--- a/kspell2/broker.cpp
+++ b/kspell2/broker.cpp
@@ -34,8 +34,8 @@
#include <kdebug.h>
-#include <qptrdict.h>
-#include <qmap.h>
+#include <tqptrdict.h>
+#include <tqmap.h>
#define DEFAULT_CONFIG_FILE "kspellrc"
@@ -49,12 +49,12 @@ public:
Settings *settings;
// <language, Clients with that language >
- QMap<QString, QPtrList<Client> > languageClients;
- QStringList clients;
+ TQMap<TQString, TQPtrList<Client> > languageClients;
+ TQStringList clients;
DefaultDictionary *defaultDictionary;
};
-QPtrDict<Broker> *Broker::s_brokers = 0;
+TQPtrDict<Broker> *Broker::s_brokers = 0;
Broker *Broker::openBroker( KSharedConfig *config )
{
@@ -80,7 +80,7 @@ Broker::Broker( KSharedConfig *config )
Q_UNUSED( preventDeletion );
if ( !s_brokers )
- s_brokers = new QPtrDict<Broker>;
+ s_brokers = new TQPtrDict<Broker>;
s_brokers->insert( config, this );
d = new Private;
@@ -111,10 +111,10 @@ DefaultDictionary* Broker::defaultDictionary() const
return d->defaultDictionary;
}
-Dictionary* Broker::dictionary( const QString& language, const QString& clientName ) const
+Dictionary* Broker::dictionary( const TQString& language, const TQString& clientName ) const
{
- QString pclient = clientName;
- QString plang = language;
+ TQString pclient = clientName;
+ TQString plang = language;
bool ddefault = false;
if ( plang.isEmpty() ) {
@@ -125,14 +125,14 @@ Dictionary* Broker::dictionary( const QString& language, const QString& clientNa
ddefault = true;
}
- QPtrList<Client> lClients = d->languageClients[ plang ];
+ TQPtrList<Client> lClients = d->languageClients[ plang ];
if ( lClients.isEmpty() ) {
kdError()<<"No language dictionaries for the language : "<< plang <<endl;
return 0;
}
- QPtrListIterator<Client> itr( lClients );
+ TQPtrListIterator<Client> itr( lClients );
while ( itr.current() ) {
if ( !pclient.isEmpty() ) {
if ( pclient == itr.current()->name() ) {
@@ -156,12 +156,12 @@ Dictionary* Broker::dictionary( const QString& language, const QString& clientNa
return 0;
}
-QStringList Broker::clients() const
+TQStringList Broker::clients() const
{
return d->clients;
}
-QStringList Broker::languages() const
+TQStringList Broker::languages() const
{
return d->languageClients.keys();
}
@@ -182,23 +182,23 @@ void Broker::loadPlugins()
}
}
-void Broker::loadPlugin( const QString& pluginId )
+void Broker::loadPlugin( const TQString& pluginId )
{
int error = 0;
kdDebug()<<"Loading plugin " << pluginId << endl;
Client *client = KParts::ComponentFactory::createInstanceFromQuery<Client>(
- QString::fromLatin1( "KSpell/Client" ),
- QString::fromLatin1( "[X-KDE-PluginInfo-Name]=='%1'" ).arg( pluginId ),
- this, 0, QStringList(), &error );
+ TQString::fromLatin1( "KSpell/Client" ),
+ TQString::fromLatin1( "[X-KDE-PluginInfo-Name]=='%1'" ).arg( pluginId ),
+ this, 0, TQStringList(), &error );
if ( client )
{
- QStringList languages = client->languages();
+ TQStringList languages = client->languages();
d->clients.append( client->name() );
- for ( QStringList::Iterator itr = languages.begin();
+ for ( TQStringList::Iterator itr = languages.begin();
itr != languages.end(); ++itr ) {
if ( !d->languageClients[ *itr ].isEmpty() &&
client->reliability() < d->languageClients[ *itr ].first()->reliability() )
diff --git a/kspell2/broker.h b/kspell2/broker.h
index 186c03aef..24f0338f1 100644
--- a/kspell2/broker.h
+++ b/kspell2/broker.h
@@ -24,9 +24,9 @@
#include <ksharedptr.h>
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
class KSharedConfig;
template <typename T>
@@ -45,7 +45,7 @@ namespace KSpell2
* KSpell2 class, you can think of it as the kernel or manager
* of the KSpell2 architecture.
*/
- class KDE_EXPORT Broker : public QObject,
+ class KDE_EXPORT Broker : public TQObject,
public KShared
{
Q_OBJECT
@@ -94,18 +94,18 @@ namespace KSpell2
*
*/
Dictionary *dictionary(
- const QString& language = QString::null,
- const QString& client = QString::null ) const;
+ const TQString& language = TQString::null,
+ const TQString& client = TQString::null ) const;
/**
* Returns names of all supported clients (e.g. ISpell, ASpell)
*/
- QStringList clients() const;
+ TQStringList clients() const;
/**
* Returns a list of supported languages.
*/
- QStringList languages() const;
+ TQStringList languages() const;
/**
* Returns the Settings object used by the broker.
@@ -124,12 +124,12 @@ namespace KSpell2
private:
Broker( KSharedConfig *config );
void loadPlugins();
- void loadPlugin( const QString& );
+ void loadPlugin( const TQString& );
private:
class Private;
Private *d;
private:
- static QPtrDict<Broker> *s_brokers;
+ static TQPtrDict<Broker> *s_brokers;
};
}
diff --git a/kspell2/client.cpp b/kspell2/client.cpp
index 6508992ef..ae470a77e 100644
--- a/kspell2/client.cpp
+++ b/kspell2/client.cpp
@@ -24,8 +24,8 @@
namespace KSpell2
{
-Client::Client( QObject *parent, const char *name )
- : QObject( parent, name )
+Client::Client( TQObject *parent, const char *name )
+ : TQObject( parent, name )
{
}
diff --git a/kspell2/client.h b/kspell2/client.h
index 203a9f0e3..86046e204 100644
--- a/kspell2/client.h
+++ b/kspell2/client.h
@@ -22,9 +22,9 @@
#ifndef KSPELL_CLIENT_H
#define KSPELL_CLIENT_H
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -33,24 +33,24 @@ namespace KSpell2
class Dictionary;
/**
- * The fact that this class inherits from QObject makes me
+ * The fact that this class inherits from TQObject makes me
* hugely unhappy. The reason for as of writting is that
* I don't really feel like writting my own KLibFactory
- * that would load anything else then QObject derivatives.
+ * that would load anything else then TQObject derivatives.
*/
class KDE_EXPORT Client : public QObject
{
Q_OBJECT
public:
- Client( QObject *parent = 0, const char *name=0 );
+ Client( TQObject *parent = 0, const char *name=0 );
virtual int reliability() const = 0;
- virtual Dictionary* dictionary( const QString& language ) =0;
+ virtual Dictionary* dictionary( const TQString& language ) =0;
- virtual QStringList languages() const =0;
+ virtual TQStringList languages() const =0;
- virtual QString name() const =0;
+ virtual TQString name() const =0;
};
}
diff --git a/kspell2/defaultdictionary.cpp b/kspell2/defaultdictionary.cpp
index ffa071279..39b80e7cf 100644
--- a/kspell2/defaultdictionary.cpp
+++ b/kspell2/defaultdictionary.cpp
@@ -33,14 +33,14 @@ public:
//we need it only to switch the dics
};
-DefaultDictionary::DefaultDictionary( const QString& lang, Broker *broker )
- : QObject( broker ), Dictionary( lang, true )
+DefaultDictionary::DefaultDictionary( const TQString& lang, Broker *broker )
+ : TQObject( broker ), Dictionary( lang, true )
{
d = new Private;
d->dict = broker->dictionary();
d->broker = broker;
- connect( broker, SIGNAL(configurationChanged()),
- SLOT(defaultConfigurationChanged()) );
+ connect( broker, TQT_SIGNAL(configurationChanged()),
+ TQT_SLOT(defaultConfigurationChanged()) );
}
DefaultDictionary::~DefaultDictionary()
@@ -54,7 +54,7 @@ bool DefaultDictionary::isValid() const
return d->dict;
}
-bool DefaultDictionary::check( const QString& word )
+bool DefaultDictionary::check( const TQString& word )
{
if ( d->dict )
return d->dict->check( word );
@@ -62,17 +62,17 @@ bool DefaultDictionary::check( const QString& word )
return true;
}
-QStringList DefaultDictionary::suggest( const QString& word )
+TQStringList DefaultDictionary::suggest( const TQString& word )
{
if ( d->dict )
return d->dict->suggest( word );
else
- return QStringList();
+ return TQStringList();
}
-bool DefaultDictionary::checkAndSuggest( const QString& word,
- QStringList& suggestions )
+bool DefaultDictionary::checkAndSuggest( const TQString& word,
+ TQStringList& suggestions )
{
if ( d->dict )
return d->dict->checkAndSuggest( word, suggestions );
@@ -80,8 +80,8 @@ bool DefaultDictionary::checkAndSuggest( const QString& word,
return true;
}
-bool DefaultDictionary::storeReplacement( const QString& bad,
- const QString& good )
+bool DefaultDictionary::storeReplacement( const TQString& bad,
+ const TQString& good )
{
if ( d->dict )
return d->dict->storeReplacement( bad, good );
@@ -89,7 +89,7 @@ bool DefaultDictionary::storeReplacement( const QString& bad,
return false;
}
-bool DefaultDictionary::addToPersonal( const QString& word )
+bool DefaultDictionary::addToPersonal( const TQString& word )
{
if ( d->dict )
return d->dict->addToPersonal( word );
@@ -97,7 +97,7 @@ bool DefaultDictionary::addToPersonal( const QString& word )
return false;
}
-bool DefaultDictionary::addToSession( const QString& word )
+bool DefaultDictionary::addToSession( const TQString& word )
{
if ( d->dict )
return d->dict->addToSession( word );
@@ -112,7 +112,7 @@ void DefaultDictionary::defaultConfigurationChanged()
if ( d->dict )
m_language = d->dict->language();
else
- m_language = QString::null;
+ m_language = TQString::null;
}
#include "defaultdictionary.moc"
diff --git a/kspell2/defaultdictionary.h b/kspell2/defaultdictionary.h
index 9300c9f59..287bb7c21 100644
--- a/kspell2/defaultdictionary.h
+++ b/kspell2/defaultdictionary.h
@@ -23,18 +23,18 @@
#include "dictionary.h"
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
namespace KSpell2
{
class Broker;
- class DefaultDictionary : public QObject,
+ class DefaultDictionary : public TQObject,
public Dictionary
{
Q_OBJECT
public:
- DefaultDictionary( const QString& lang, Broker *broker );
+ DefaultDictionary( const TQString& lang, Broker *broker );
~DefaultDictionary();
public:
/**
@@ -46,14 +46,14 @@ namespace KSpell2
bool isValid() const;
//Dictionary interface
- virtual bool check( const QString& word );
- virtual QStringList suggest( const QString& word );
- virtual bool checkAndSuggest( const QString& word,
- QStringList& suggestions );
- virtual bool storeReplacement( const QString& bad,
- const QString& good );
- virtual bool addToPersonal( const QString& word );
- virtual bool addToSession( const QString& word );
+ virtual bool check( const TQString& word );
+ virtual TQStringList suggest( const TQString& word );
+ virtual bool checkAndSuggest( const TQString& word,
+ TQStringList& suggestions );
+ virtual bool storeReplacement( const TQString& bad,
+ const TQString& good );
+ virtual bool addToPersonal( const TQString& word );
+ virtual bool addToSession( const TQString& word );
//end of Dictionary interfaces
signals:
diff --git a/kspell2/dictionary.h b/kspell2/dictionary.h
index ce52a40d9..31567ece9 100644
--- a/kspell2/dictionary.h
+++ b/kspell2/dictionary.h
@@ -22,8 +22,8 @@
#ifndef KSPELL_DICTIONARY_H
#define KSPELL_DICTIONARY_H
-#include <qstringlist.h>
-#include <qstring.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
namespace KSpell2
{
@@ -43,44 +43,44 @@ namespace KSpell2
* Checks the given word.
* @return false if the word is misspelled. true otherwise
*/
- virtual bool check( const QString& word ) =0;
+ virtual bool check( const TQString& word ) =0;
/**
* Fetches suggestions for the word.
*
* @return list of all suggestions for the word
*/
- virtual QStringList suggest( const QString& word ) =0;
+ virtual TQStringList suggest( const TQString& word ) =0;
/**
* Checks the word and fetches suggestions for it.
*/
- virtual bool checkAndSuggest( const QString& word,
- QStringList& suggestions ) =0;
+ virtual bool checkAndSuggest( const TQString& word,
+ TQStringList& suggestions ) =0;
/**
* Stores user defined good replacement for the bad word.
* @returns true on success
*/
- virtual bool storeReplacement( const QString& bad,
- const QString& good ) =0;
+ virtual bool storeReplacement( const TQString& bad,
+ const TQString& good ) =0;
/**
* Adds word to the list of of personal words.
* @return true on success
*/
- virtual bool addToPersonal( const QString& word ) =0;
+ virtual bool addToPersonal( const TQString& word ) =0;
/**
* Adds word to the words recognizable in the current session.
* @return true on success
*/
- virtual bool addToSession( const QString& word ) =0;
+ virtual bool addToSession( const TQString& word ) =0;
/**
* Returns language supported by this dictionary.
*/
- QString language() const
+ TQString language() const
{
return m_language;
}
@@ -95,11 +95,11 @@ namespace KSpell2
}
protected:
- Dictionary( const QString& lang, bool def = false )
+ Dictionary( const TQString& lang, bool def = false )
: m_language( lang ), m_default( def ) {}
protected:
friend class Broker;
- QString m_language;
+ TQString m_language;
bool m_default;
private:
class Private;
diff --git a/kspell2/filter.cpp b/kspell2/filter.cpp
index 89afb0c4c..1604bcae1 100644
--- a/kspell2/filter.cpp
+++ b/kspell2/filter.cpp
@@ -27,7 +27,7 @@
#include <kstaticdeleter.h>
#include <kdebug.h>
-#include <qstring.h>
+#include <tqstring.h>
namespace KSpell2
{
@@ -84,13 +84,13 @@ void Filter::restart()
m_currentPosition = 0;
}
-void Filter::setBuffer( const QString& buffer )
+void Filter::setBuffer( const TQString& buffer )
{
m_buffer = buffer;
m_currentPosition = 0;
}
-QString Filter::buffer() const
+TQString Filter::buffer() const
{
return m_buffer;
}
@@ -105,25 +105,25 @@ bool Filter::atEnd() const
Word Filter::nextWord() const
{
- QChar currentChar = skipToLetter( m_currentPosition );
+ TQChar currentChar = skipToLetter( m_currentPosition );
if ( m_currentPosition >= m_buffer.length() ) {
return Filter::end();
}
- bool allUppercase = currentChar.category() & QChar::Letter_Uppercase;
+ bool allUppercase = currentChar.category() & TQChar::Letter_Uppercase;
bool runTogether = false;
- QString foundWord;
+ TQString foundWord;
int start = m_currentPosition;
while ( currentChar.isLetter() ) {
- if ( currentChar.category() & QChar::Letter_Lowercase )
+ if ( currentChar.category() & TQChar::Letter_Lowercase )
allUppercase = false;
/* FIXME: this does not work for Hebrew for example
//we consider run-together words as mixed-case words
if ( !allUppercase &&
- currentChar.category() & QChar::Letter_Uppercase )
+ currentChar.category() & TQChar::Letter_Uppercase )
runTogether = true;
*/
@@ -149,7 +149,7 @@ Word Filter::previousWord() const
return Filter::end();
}
- QString foundWord;
+ TQString foundWord;
int start = m_currentPosition;
while ( m_buffer[ start ].isLetter() ) {
foundWord.prepend( m_buffer[ m_currentPosition ] );
@@ -165,7 +165,7 @@ Word Filter::wordAtPosition( unsigned int pos ) const
return Filter::end();
int currentPosition = pos - 1;
- QString foundWord;
+ TQString foundWord;
while ( currentPosition >= 0 &&
m_buffer[ currentPosition ].isLetter() ) {
foundWord.prepend( m_buffer[ currentPosition ] );
@@ -202,7 +202,7 @@ int Filter::currentPosition() const
return m_currentPosition;
}
-void Filter::replace( const Word& w, const QString& newWord)
+void Filter::replace( const Word& w, const TQString& newWord)
{
int oldLen = w.word.length();
int newLen = newWord.length();
@@ -216,7 +216,7 @@ void Filter::replace( const Word& w, const QString& newWord)
m_buffer = m_buffer.replace( w.start, oldLen, newWord );
}
-QString Filter::context() const
+TQString Filter::context() const
{
int len = 60;
//we don't want the expression underneath casted to an unsigned int
@@ -225,17 +225,17 @@ QString Filter::context() const
bool begin = ( (signedPosition - len/2)<=0 ) ? true : false;
- QString buffer = m_buffer;
+ TQString buffer = m_buffer;
Word word = wordAtPosition( m_currentPosition );
buffer = buffer.replace( word.start, word.word.length(),
- QString( "<b>%1</b>" ).arg( word.word ) );
+ TQString( "<b>%1</b>" ).arg( word.word ) );
- QString context;
+ TQString context;
if ( begin )
- context = QString( "%1...")
+ context = TQString( "%1...")
.arg( buffer.mid( 0, len ) );
else
- context = QString( "...%1..." )
+ context = TQString( "...%1..." )
.arg( buffer.mid( m_currentPosition - 20, len ) );
context = context.replace( '\n', ' ' );
@@ -245,7 +245,7 @@ QString Filter::context() const
bool Filter::trySkipLinks() const
{
- QChar currentChar = m_buffer[ m_currentPosition ];
+ TQChar currentChar = m_buffer[ m_currentPosition ];
uint length = m_buffer.length();
//URL - if so skip
@@ -267,7 +267,7 @@ bool Filter::trySkipLinks() const
return false;
}
-bool Filter::ignore( const QString& word ) const
+bool Filter::ignore( const TQString& word ) const
{
if ( d->settings ) {
return d->settings->ignore( word );
@@ -275,10 +275,10 @@ bool Filter::ignore( const QString& word ) const
return false;
}
-QChar Filter::skipToLetter( uint &fromPosition ) const
+TQChar Filter::skipToLetter( uint &fromPosition ) const
{
- QChar currentChar = m_buffer[ fromPosition ];
+ TQChar currentChar = m_buffer[ fromPosition ];
while ( !currentChar.isLetter() &&
++fromPosition < m_buffer.length() ) {
currentChar = m_buffer[ fromPosition ];
@@ -287,7 +287,7 @@ QChar Filter::skipToLetter( uint &fromPosition ) const
}
bool Filter::shouldBeSkipped( bool wordWasUppercase, bool wordWasRunTogether,
- const QString& foundWord ) const
+ const TQString& foundWord ) const
{
bool checkUpper = ( d->settings ) ?
d->settings->checkUppercase () : true;
diff --git a/kspell2/filter.h b/kspell2/filter.h
index 3c66dc869..5e4635493 100644
--- a/kspell2/filter.h
+++ b/kspell2/filter.h
@@ -23,7 +23,7 @@
#ifndef KSPELL_FILTER_H
#define KSPELL_FILTER_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
namespace KSpell2
@@ -42,7 +42,7 @@ namespace KSpell2
Word() : start( 0 ), end( true )
{}
- Word( const QString& w, int st, bool e = false )
+ Word( const TQString& w, int st, bool e = false )
: word( w ), start( st ), end( e )
{}
Word( const Word& other )
@@ -50,7 +50,7 @@ namespace KSpell2
end( other.end )
{}
- QString word;
+ TQString word;
uint start;
bool end;
};
@@ -84,8 +84,8 @@ namespace KSpell2
bool atEnd() const;
- void setBuffer( const QString& buffer );
- QString buffer() const;
+ void setBuffer( const TQString& buffer );
+ TQString buffer() const;
void restart();
@@ -95,21 +95,21 @@ namespace KSpell2
virtual void setCurrentPosition( int );
virtual int currentPosition() const;
- virtual void replace( const Word& w, const QString& newWord );
+ virtual void replace( const Word& w, const TQString& newWord );
/**
* Should return the sentence containing the current word
*/
- virtual QString context() const;
+ virtual TQString context() const;
protected:
bool trySkipLinks() const;
- bool ignore( const QString& word ) const;
- QChar skipToLetter( uint &fromPosition ) const;
+ bool ignore( const TQString& word ) const;
+ TQChar skipToLetter( uint &fromPosition ) const;
bool shouldBeSkipped( bool wordWasUppercase, bool wordWasRunTogether,
- const QString& foundWord ) const;
+ const TQString& foundWord ) const;
protected:
- QString m_buffer;
+ TQString m_buffer;
mutable uint m_currentPosition;
private:
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 <qobject.h>
+#include <tqobject.h>
#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 <kdebug.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
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 <qobject.h>
+#include <tqobject.h>
/* 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 <kdebug.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
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 <<endl;
int preflen;
- QCString wordISO = codec->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 <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;
};
diff --git a/kspell2/settings.cpp b/kspell2/settings.cpp
index 2478b30d6..664ae24e0 100644
--- a/kspell2/settings.cpp
+++ b/kspell2/settings.cpp
@@ -28,8 +28,8 @@
#include <kconfig.h>
#include <kdebug.h>
-#include <qmap.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
namespace KSpell2
{
@@ -40,14 +40,14 @@ public:
KSharedConfig::Ptr config;
bool modified;
- QString defaultLanguage;
- QString defaultClient;
+ TQString defaultLanguage;
+ TQString defaultClient;
bool checkUppercase;
bool skipRunTogether;
bool backgroundCheckerEnabled;
- QMap<QString, bool> ignore;
+ TQMap<TQString, bool> ignore;
};
Settings::Settings( Broker *broker, KSharedConfig *config )
@@ -72,9 +72,9 @@ KSharedConfig *Settings::sharedConfig() const
return d->config;
}
-void Settings::setDefaultLanguage( const QString& lang )
+void Settings::setDefaultLanguage( const TQString& lang )
{
- QStringList cs = d->broker->languages();
+ TQStringList cs = d->broker->languages();
if ( cs.find( lang ) != cs.end() &&
d->defaultLanguage != lang ) {
d->defaultLanguage = lang;
@@ -84,12 +84,12 @@ void Settings::setDefaultLanguage( const QString& lang )
}
}
-QString Settings::defaultLanguage() const
+TQString Settings::defaultLanguage() const
{
return d->defaultLanguage;
}
-void Settings::setDefaultClient( const QString& client )
+void Settings::setDefaultClient( const TQString& client )
{
//Different from setDefaultLanguage because
//the number of clients can't be even close
@@ -101,7 +101,7 @@ void Settings::setDefaultClient( const QString& client )
}
}
-QString Settings::defaultClient() const
+TQString Settings::defaultClient() const
{
return d->defaultClient;
}
@@ -145,27 +145,27 @@ bool Settings::backgroundCheckerEnabled() const
return d->backgroundCheckerEnabled;
}
-void Settings::setCurrentIgnoreList( const QStringList& ignores )
+void Settings::setCurrentIgnoreList( const TQStringList& ignores )
{
setQuietIgnoreList( ignores );
d->modified = true;
}
-void Settings::setQuietIgnoreList( const QStringList& ignores )
+void Settings::setQuietIgnoreList( const TQStringList& ignores )
{
- d->ignore = QMap<QString, bool>();//clear out
- for ( QStringList::const_iterator itr = ignores.begin();
+ d->ignore = TQMap<TQString, bool>();//clear out
+ for ( TQStringList::const_iterator itr = ignores.begin();
itr != ignores.end(); ++itr ) {
d->ignore.insert( *itr, true );
}
}
-QStringList Settings::currentIgnoreList() const
+TQStringList Settings::currentIgnoreList() const
{
return d->ignore.keys();
}
-void Settings::addWordToIgnore( const QString& word )
+void Settings::addWordToIgnore( const TQString& word )
{
if ( !d->ignore.contains( word ) ) {
d->modified = true;
@@ -173,7 +173,7 @@ void Settings::addWordToIgnore( const QString& word )
}
}
-bool Settings::ignore( const QString& word )
+bool Settings::ignore( const TQString& word )
{
return d->ignore.contains( word );
}
@@ -181,8 +181,8 @@ bool Settings::ignore( const QString& word )
void Settings::readIgnoreList()
{
KConfigGroup conf( d->config, "Spelling" );
- QString ignoreEntry = QString( "ignore_%1" ).arg( d->defaultLanguage );
- QStringList ignores = conf.readListEntry( ignoreEntry );
+ TQString ignoreEntry = TQString( "ignore_%1" ).arg( d->defaultLanguage );
+ TQStringList ignores = conf.readListEntry( ignoreEntry );
setQuietIgnoreList( ignores );
}
@@ -195,7 +195,7 @@ void Settings::save()
conf.writeEntry( "checkUppercase", d->checkUppercase );
conf.writeEntry( "skipRunTogether", d->skipRunTogether );
conf.writeEntry( "backgroundCheckerEnabled", d->backgroundCheckerEnabled );
- conf.writeEntry( QString( "ignore_%1" ).arg( d->defaultLanguage ),
+ conf.writeEntry( TQString( "ignore_%1" ).arg( d->defaultLanguage ),
d->ignore.keys() );
conf.sync();
}
@@ -205,7 +205,7 @@ void Settings::loadConfig()
{
KConfigGroup conf( d->config, "Spelling" );
d->defaultClient = conf.readEntry( "defaultClient",
- QString::null );
+ TQString::null );
d->defaultLanguage = conf.readEntry(
"defaultLanguage", KGlobal::locale()->language() );
diff --git a/kspell2/settings.h b/kspell2/settings.h
index 8de938a62..d351f9712 100644
--- a/kspell2/settings.h
+++ b/kspell2/settings.h
@@ -22,8 +22,8 @@
#ifndef KSPELL_SETTINGS_H
#define KSPELL_SETTINGS_H
-#include <qstringlist.h>
-#include <qstring.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
class KSharedConfig;
@@ -37,11 +37,11 @@ namespace KSpell2
public:
~Settings();
- void setDefaultLanguage( const QString& lang );
- QString defaultLanguage() const;
+ void setDefaultLanguage( const TQString& lang );
+ TQString defaultLanguage() const;
- void setDefaultClient( const QString& client );
- QString defaultClient() const;
+ void setDefaultClient( const TQString& client );
+ TQString defaultClient() const;
void setCheckUppercase( bool );
bool checkUppercase() const;
@@ -52,10 +52,10 @@ namespace KSpell2
void setBackgroundCheckerEnabled( bool );
bool backgroundCheckerEnabled() const;
- void setCurrentIgnoreList( const QStringList& ignores );
- void addWordToIgnore( const QString& word );
- QStringList currentIgnoreList() const;
- bool ignore( const QString& word );
+ void setCurrentIgnoreList( const TQStringList& ignores );
+ void addWordToIgnore( const TQString& word );
+ TQStringList currentIgnoreList() const;
+ bool ignore( const TQString& word );
void save();
@@ -64,7 +64,7 @@ namespace KSpell2
private:
void loadConfig();
void readIgnoreList();
- void setQuietIgnoreList( const QStringList& ignores );
+ void setQuietIgnoreList( const TQStringList& ignores );
private:
friend class Broker;
diff --git a/kspell2/tests/backgroundtest.cpp b/kspell2/tests/backgroundtest.cpp
index a0fb7c69b..db9ad9a69 100644
--- a/kspell2/tests/backgroundtest.cpp
+++ b/kspell2/tests/backgroundtest.cpp
@@ -131,13 +131,13 @@ Discussion\
If you want to talk about this code feel free to mail us.";
BackgroundTest::BackgroundTest()
- : QObject( 0 )
+ : TQObject( 0 )
{
m_checker = new BackgroundChecker( Broker::openBroker(), this );
- connect( m_checker, SIGNAL(done()),
- SLOT(slotDone()) );
- connect( m_checker, SIGNAL(misspelling(const QString&, int)),
- SLOT(slotMisspelling(const QString&, int)) );
+ connect( m_checker, TQT_SIGNAL(done()),
+ TQT_SLOT(slotDone()) );
+ connect( m_checker, TQT_SIGNAL(misspelling(const TQString&, int)),
+ TQT_SLOT(slotMisspelling(const TQString&, int)) );
m_len = strlen( text );
m_checker->checkText( text );
m_timer.start();
@@ -147,10 +147,10 @@ void BackgroundTest::slotDone()
{
kdDebug()<<"Text of length "<<m_len<<" checked in "
<< m_timer.elapsed() << " msec."<<endl;
- QApplication::exit();
+ TQApplication::exit();
}
-void BackgroundTest::slotMisspelling( const QString& word, int start )
+void BackgroundTest::slotMisspelling( const TQString& word, int start )
{
kdDebug()<<"Misspelling \""<< word << "\" at " << start << endl;
m_checker->continueChecking();
diff --git a/kspell2/tests/backgroundtest.h b/kspell2/tests/backgroundtest.h
index 6dac80af7..fcdf9db55 100644
--- a/kspell2/tests/backgroundtest.h
+++ b/kspell2/tests/backgroundtest.h
@@ -21,8 +21,8 @@
#ifndef BACKGROUNDTEST_H
#define BACKGROUNDTEST_H
-#include <qobject.h>
-#include <qdatetime.h>
+#include <tqobject.h>
+#include <tqdatetime.h>
#include "backgroundchecker.h"
@@ -34,11 +34,11 @@ public:
protected slots:
void slotDone();
- void slotMisspelling( const QString& word, int start );
+ void slotMisspelling( const TQString& word, int start );
private:
KSpell2::BackgroundChecker *m_checker;
- QTime m_timer;
+ TQTime m_timer;
int m_len;
};
diff --git a/kspell2/tests/test.cpp b/kspell2/tests/test.cpp
index 15425527d..e9b72a794 100644
--- a/kspell2/tests/test.cpp
+++ b/kspell2/tests/test.cpp
@@ -24,7 +24,7 @@
#include <kapplication.h>
#include <kdebug.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
using namespace KSpell2;
@@ -39,7 +39,7 @@ int main( int argc, char** argv )
Dictionary *dict = broker->dictionary( "en_US" );
- QStringList words;
+ TQStringList words;
words << "hello" << "helo" << "enviroment" << "guvernment" << "farted"
<< "hello" << "helo" << "enviroment" << "guvernment" << "farted"
@@ -82,12 +82,12 @@ int main( int argc, char** argv )
<< "hello" << "helo" << "enviroment" << "guvernment" << "farted"
<< "hello" << "helo" << "enviroment" << "guvernment" << "farted";
- QTime mtime;
+ TQTime mtime;
mtime.start();
- for ( QStringList::Iterator itr = words.begin(); itr != words.end(); ++itr ) {
+ for ( TQStringList::Iterator itr = words.begin(); itr != words.end(); ++itr ) {
if ( dict && !dict->check( *itr ) ) {
//kdDebug()<<"Word " << *itr <<" is misspelled"<<endl;
- QStringList sug = dict->suggest( *itr );
+ TQStringList sug = dict->suggest( *itr );
//kdDebug()<<"Suggestions : "<<sug<<endl;
}
}
diff --git a/kspell2/tests/test_dialog.cpp b/kspell2/tests/test_dialog.cpp
index d481de00d..f0ee1ab3b 100644
--- a/kspell2/tests/test_dialog.cpp
+++ b/kspell2/tests/test_dialog.cpp
@@ -30,23 +30,23 @@
using namespace KSpell2;
TestDialog::TestDialog()
- : QObject( 0, "testdialog" )
+ : TQObject( 0, "testdialog" )
{
}
-void TestDialog::check( const QString& buffer )
+void TestDialog::check( const TQString& buffer )
{
KSpell2::Dialog *dlg = new KSpell2::Dialog(
new BackgroundChecker( Broker::openBroker(), this, "checker" ),
0, "my dialog" );
- connect( dlg, SIGNAL(done(const QString&)),
- SLOT(doneChecking(const QString&)) );
+ connect( dlg, TQT_SIGNAL(done(const TQString&)),
+ TQT_SLOT(doneChecking(const TQString&)) );
dlg->setBuffer( buffer );
dlg->show();
}
-void TestDialog::doneChecking( const QString& buf )
+void TestDialog::doneChecking( const TQString& buf )
{
kdDebug()<<"Done with :"<<buf<<endl;
qApp->quit();
diff --git a/kspell2/tests/test_dialog.h b/kspell2/tests/test_dialog.h
index 2ce70aaeb..5ef2dd189 100644
--- a/kspell2/tests/test_dialog.h
+++ b/kspell2/tests/test_dialog.h
@@ -24,7 +24,7 @@
#include "dialog.h"
#include "broker.h"
-#include <qobject.h>
+#include <tqobject.h>
class TestDialog : public QObject
{
@@ -33,8 +33,8 @@ public:
TestDialog();
public slots:
- void check( const QString& buffer );
- void doneChecking( const QString& );
+ void check( const TQString& buffer );
+ void doneChecking( const TQString& );
private:
KSpell2::Broker *m_broker;
};
diff --git a/kspell2/tests/test_filter.cpp b/kspell2/tests/test_filter.cpp
index d55b3801f..eafaf622f 100644
--- a/kspell2/tests/test_filter.cpp
+++ b/kspell2/tests/test_filter.cpp
@@ -30,7 +30,7 @@ int main( int argc, char** argv )
{
KApplication app(argc, argv, "Filter");
- QString buffer = QString( "This is a sample buffer. Please test me." );
+ TQString buffer = TQString( "This is a sample buffer. Please test me." );
Filter filter;
filter.setBuffer( buffer );
diff --git a/kspell2/tests/test_highlighter.cpp b/kspell2/tests/test_highlighter.cpp
index faeab0d27..ce5c64501 100644
--- a/kspell2/tests/test_highlighter.cpp
+++ b/kspell2/tests/test_highlighter.cpp
@@ -25,13 +25,13 @@
#include <kapplication.h>
#include <kdebug.h>
-#include <qtextedit.h>
+#include <tqtextedit.h>
int main( int argc, char** argv )
{
KApplication app(argc, argv, "KSpell2Test");
- QTextEdit *test = new QTextEdit();
+ TQTextEdit *test = new TQTextEdit();
KSpell2::Highlighter *hl = new KSpell2::Highlighter( test );
Q_UNUSED( hl );
app.setMainWidget( test );
diff --git a/kspell2/threadevents.h b/kspell2/threadevents.h
index 50b5938d6..e6b52293e 100644
--- a/kspell2/threadevents.h
+++ b/kspell2/threadevents.h
@@ -21,8 +21,8 @@
#ifndef KSPELL_THREADEVENTS_H
#define KSPELL_THREADEVENTS_H
-#include <qevent.h>
-#include <qstring.h>
+#include <tqevent.h>
+#include <tqstring.h>
namespace KSpell2
{
@@ -33,27 +33,27 @@ namespace KSpell2
class MisspellingEvent : public QCustomEvent
{
public:
- MisspellingEvent( const QString& word,
+ MisspellingEvent( const TQString& word,
int pos )
- : QCustomEvent( FoundMisspelling ), m_word( word ),
+ : TQCustomEvent( FoundMisspelling ), m_word( word ),
m_position( pos )
{}
- QString word() const {
+ TQString word() const {
return m_word;
}
int position() const {
return m_position;
}
private:
- QString m_word;
+ TQString m_word;
int m_position;
};
class FinishedCheckingEvent : public QCustomEvent
{
public:
FinishedCheckingEvent()
- : QCustomEvent( FinishedChecking )
+ : TQCustomEvent( FinishedChecking )
{}
};
diff --git a/kspell2/ui/configdialog.cpp b/kspell2/ui/configdialog.cpp
index 09a0af923..56e39ca2b 100644
--- a/kspell2/ui/configdialog.cpp
+++ b/kspell2/ui/configdialog.cpp
@@ -23,7 +23,7 @@
#include <klocale.h>
-#include <qvbox.h>
+#include <tqvbox.h>
using namespace KSpell2;
@@ -33,7 +33,7 @@ public:
ConfigWidget *ui;
};
-ConfigDialog::ConfigDialog( Broker *broker, QWidget *parent )
+ConfigDialog::ConfigDialog( Broker *broker, TQWidget *parent )
: KDialogBase( parent, "KSpell2ConfigDialog", true,
i18n( "KSpell2 Configuration" ),
KDialogBase::Ok|KDialogBase::Apply|KDialogBase::Cancel,
@@ -50,7 +50,7 @@ ConfigDialog::~ConfigDialog()
void ConfigDialog::init( Broker *broker )
{
d = new Private;
- QVBox *page = makeVBoxMainWidget();
+ TQVBox *page = makeVBoxMainWidget();
d->ui = new ConfigWidget( broker, page );
}
diff --git a/kspell2/ui/configdialog.h b/kspell2/ui/configdialog.h
index 5a2ee53c8..ead508d34 100644
--- a/kspell2/ui/configdialog.h
+++ b/kspell2/ui/configdialog.h
@@ -31,7 +31,7 @@ namespace KSpell2
Q_OBJECT
public:
ConfigDialog( Broker *broker,
- QWidget *parent );
+ TQWidget *parent );
~ConfigDialog();
protected slots:
diff --git a/kspell2/ui/configwidget.cpp b/kspell2/ui/configwidget.cpp
index 09811e56a..6d98955ae 100644
--- a/kspell2/ui/configwidget.cpp
+++ b/kspell2/ui/configwidget.cpp
@@ -28,8 +28,8 @@
#include <kcombobox.h>
#include <klocale.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
using namespace KSpell2;
@@ -40,8 +40,8 @@ public:
KSpell2ConfigUI *ui;
};
-ConfigWidget::ConfigWidget( Broker *broker, QWidget *parent, const char *name )
- : QWidget( parent, name )
+ConfigWidget::ConfigWidget( Broker *broker, TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
init( broker );
}
@@ -56,22 +56,22 @@ void ConfigWidget::init( Broker *broker )
d = new Private;
d->broker = broker;
- QVBoxLayout *layout = new QVBoxLayout( this, 0, 0, "KSpell2ConfigUILayout");
+ TQVBoxLayout *layout = new TQVBoxLayout( this, 0, 0, "KSpell2ConfigUILayout");
d->ui = new KSpell2ConfigUI( this );
- QStringList langs = d->broker->languages();
- //QStringList clients = d->broker->clients();
+ TQStringList langs = d->broker->languages();
+ //TQStringList clients = d->broker->clients();
d->ui->m_langCombo->insertStringList( langs );
setCorrectLanguage( langs );
//d->ui->m_clientCombo->insertStringList( clients );
d->ui->m_skipUpperCB->setChecked( !d->broker->settings()->checkUppercase() );
d->ui->m_skipRunTogetherCB->setChecked( d->broker->settings()->skipRunTogether() );
- QStringList ignoreList = d->broker->settings()->currentIgnoreList();
+ TQStringList ignoreList = d->broker->settings()->currentIgnoreList();
ignoreList.sort();
d->ui->m_ignoreListBox->insertStringList( ignoreList );
d->ui->m_bgSpellCB->setChecked( d->broker->settings()->backgroundCheckerEnabled() );
d->ui->m_bgSpellCB->hide();//hidden by default
- connect( d->ui->m_ignoreListBox, SIGNAL(changed()), SLOT(slotChanged()) );
+ connect( d->ui->m_ignoreListBox, TQT_SIGNAL(changed()), TQT_SLOT(slotChanged()) );
layout->addWidget( d->ui );
}
@@ -100,10 +100,10 @@ void ConfigWidget::slotChanged()
d->ui->m_ignoreListBox->items() );
}
-void ConfigWidget::setCorrectLanguage( const QStringList& langs)
+void ConfigWidget::setCorrectLanguage( const TQStringList& langs)
{
int idx = 0;
- for ( QStringList::const_iterator itr = langs.begin();
+ for ( TQStringList::const_iterator itr = langs.begin();
itr != langs.end(); ++itr, ++idx ) {
if ( *itr == d->broker->settings()->defaultLanguage() )
d->ui->m_langCombo->setCurrentItem( idx );
diff --git a/kspell2/ui/configwidget.h b/kspell2/ui/configwidget.h
index 18eb8e74f..ed49ca20e 100644
--- a/kspell2/ui/configwidget.h
+++ b/kspell2/ui/configwidget.h
@@ -21,7 +21,7 @@
#ifndef KSPELL_CONFIGWIDGET_H
#define KSPELL_CONFIGWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdelibs_export.h>
namespace KSpell2
@@ -31,7 +31,7 @@ namespace KSpell2
{
Q_OBJECT
public:
- ConfigWidget( Broker *broker, QWidget *parent, const char *name =0 );
+ ConfigWidget( Broker *broker, TQWidget *parent, const char *name =0 );
~ConfigWidget();
bool backgroundCheckingButtonShown() const;
@@ -46,7 +46,7 @@ namespace KSpell2
private:
void init( Broker *broker );
void setFromGUI();
- void setCorrectLanguage( const QStringList& langs );
+ void setCorrectLanguage( const TQStringList& langs );
private:
class Private;
diff --git a/kspell2/ui/dialog.cpp b/kspell2/ui/dialog.cpp
index c7f6aa51e..93b81fd94 100644
--- a/kspell2/ui/dialog.cpp
+++ b/kspell2/ui/dialog.cpp
@@ -31,13 +31,13 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qlistview.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qtimer.h>
-#include <qdict.h>
+#include <tqlistview.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqtimer.h>
+#include <tqdict.h>
namespace KSpell2
{
@@ -49,15 +49,15 @@ class Dialog::Private
{
public:
KSpell2UI *ui;
- QString originalBuffer;
+ TQString originalBuffer;
BackgroundChecker *checker;
Word currentWord;
- QMap<QString, QString> replaceAllMap;
+ TQMap<TQString, TQString> replaceAllMap;
};
Dialog::Dialog( BackgroundChecker *checker,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: KDialogBase( parent, name, true,
i18n( "Check Spelling" ),
Help|Cancel|User1, Cancel, true,
@@ -79,35 +79,35 @@ Dialog::~Dialog()
void Dialog::initConnections()
{
- connect( d->ui->m_addBtn, SIGNAL(clicked()),
- SLOT(slotAddWord()) );
- connect( d->ui->m_replaceBtn, SIGNAL(clicked()),
- SLOT(slotReplaceWord()) );
- connect( d->ui->m_replaceAllBtn, SIGNAL(clicked()),
- SLOT(slotReplaceAll()) );
- connect( d->ui->m_skipBtn, SIGNAL(clicked()),
- SLOT(slotSkip()) );
- connect( d->ui->m_skipAllBtn, SIGNAL(clicked()),
- SLOT(slotSkipAll()) );
- connect( d->ui->m_suggestBtn, SIGNAL(clicked()),
- SLOT(slotSuggest()) );
- connect( d->ui->m_language, SIGNAL(activated(const QString&)),
- SLOT(slotChangeLanguage(const QString&)) );
- connect( d->ui->m_suggestions, SIGNAL(selectionChanged(QListViewItem*)),
- SLOT(slotSelectionChanged(QListViewItem*)) );
- connect( d->checker, SIGNAL(misspelling(const QString&, int)),
- SIGNAL(misspelling(const QString&, int)) );
- connect( d->checker, SIGNAL(misspelling(const QString&, int)),
- SLOT(slotMisspelling(const QString&, int)) );
- connect( d->checker, SIGNAL(done()),
- SLOT(slotDone()) );
- connect( d->ui->m_suggestions, SIGNAL(doubleClicked(QListViewItem*, const QPoint&, int)),
- SLOT( slotReplaceWord() ) );
- connect( this, SIGNAL(user1Clicked()), this, SLOT(slotFinished()) );
- connect( this, SIGNAL(cancelClicked()),this, SLOT(slotCancel()) );
- connect( d->ui->m_replacement, SIGNAL(returnPressed()), this, SLOT(slotReplaceWord()) );
- connect( d->ui->m_autoCorrect, SIGNAL(clicked()),
- SLOT(slotAutocorrect()) );
+ connect( d->ui->m_addBtn, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotAddWord()) );
+ connect( d->ui->m_replaceBtn, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotReplaceWord()) );
+ connect( d->ui->m_replaceAllBtn, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotReplaceAll()) );
+ connect( d->ui->m_skipBtn, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotSkip()) );
+ connect( d->ui->m_skipAllBtn, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotSkipAll()) );
+ connect( d->ui->m_suggestBtn, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotSuggest()) );
+ connect( d->ui->m_language, TQT_SIGNAL(activated(const TQString&)),
+ TQT_SLOT(slotChangeLanguage(const TQString&)) );
+ connect( d->ui->m_suggestions, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ TQT_SLOT(slotSelectionChanged(TQListViewItem*)) );
+ connect( d->checker, TQT_SIGNAL(misspelling(const TQString&, int)),
+ TQT_SIGNAL(misspelling(const TQString&, int)) );
+ connect( d->checker, TQT_SIGNAL(misspelling(const TQString&, int)),
+ TQT_SLOT(slotMisspelling(const TQString&, int)) );
+ connect( d->checker, TQT_SIGNAL(done()),
+ TQT_SLOT(slotDone()) );
+ connect( d->ui->m_suggestions, TQT_SIGNAL(doubleClicked(TQListViewItem*, const TQPoint&, int)),
+ TQT_SLOT( slotReplaceWord() ) );
+ connect( this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(slotFinished()) );
+ connect( this, TQT_SIGNAL(cancelClicked()),this, TQT_SLOT(slotCancel()) );
+ connect( d->ui->m_replacement, TQT_SIGNAL(returnPressed()), this, TQT_SLOT(slotReplaceWord()) );
+ connect( d->ui->m_autoCorrect, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotAutocorrect()) );
// button use by kword/kpresenter
// hide by default
d->ui->m_autoCorrect->hide();
@@ -120,7 +120,7 @@ void Dialog::initGui()
d->ui->m_language->clear();
d->ui->m_language->insertStringList( d->checker->broker()->languages() );
for ( int i = 0; !d->ui->m_language->text( i ).isNull(); ++i ) {
- QString ct = d->ui->m_language->text( i );
+ TQString ct = d->ui->m_language->text( i );
if ( ct == d->checker->broker()->settings()->defaultLanguage() ) {
d->ui->m_language->setCurrentItem( i );
break;
@@ -159,17 +159,17 @@ void Dialog::slotCancel()
reject();
}
-QString Dialog::originalBuffer() const
+TQString Dialog::originalBuffer() const
{
return d->originalBuffer;
}
-QString Dialog::buffer() const
+TQString Dialog::buffer() const
{
return d->checker->filter()->buffer();
}
-void Dialog::setBuffer( const QString& buf )
+void Dialog::setBuffer( const TQString& buf )
{
d->originalBuffer = buf;
}
@@ -180,11 +180,11 @@ void Dialog::setFilter( Filter *filter )
d->checker->setFilter( filter );
}
-void Dialog::updateDialog( const QString& word )
+void Dialog::updateDialog( const TQString& word )
{
d->ui->m_unknownWord->setText( word );
d->ui->m_contextLabel->setText( d->checker->filter()->context() );
- QStringList suggs = d->checker->suggest( word );
+ TQStringList suggs = d->checker->suggest( word );
d->ui->m_replacement->setText( suggs.first() );
fillSuggestions( suggs );
}
@@ -233,31 +233,31 @@ void Dialog::slotSkipAll()
void Dialog::slotSuggest()
{
- QStringList suggs = d->checker->suggest( d->ui->m_replacement->text() );
+ TQStringList suggs = d->checker->suggest( d->ui->m_replacement->text() );
fillSuggestions( suggs );
}
-void Dialog::slotChangeLanguage( const QString& lang )
+void Dialog::slotChangeLanguage( const TQString& lang )
{
d->checker->changeLanguage( lang );
slotSuggest();
}
-void Dialog::slotSelectionChanged( QListViewItem *item )
+void Dialog::slotSelectionChanged( TQListViewItem *item )
{
d->ui->m_replacement->setText( item->text( 0 ) );
}
-void Dialog::fillSuggestions( const QStringList& suggs )
+void Dialog::fillSuggestions( const TQStringList& suggs )
{
d->ui->m_suggestions->clear();
- for ( QStringList::ConstIterator it = suggs.begin(); it != suggs.end(); ++it ) {
- new QListViewItem( d->ui->m_suggestions, d->ui->m_suggestions->firstChild(),
+ for ( TQStringList::ConstIterator it = suggs.begin(); it != suggs.end(); ++it ) {
+ new TQListViewItem( d->ui->m_suggestions, d->ui->m_suggestions->firstChild(),
*it );
}
}
-void Dialog::slotMisspelling(const QString& word, int start )
+void Dialog::slotMisspelling(const TQString& word, int start )
{
kdDebug()<<"Dialog misspelling!!"<<endl;
d->currentWord = Word( word, start );
diff --git a/kspell2/ui/dialog.h b/kspell2/ui/dialog.h
index 20d295c96..1da714c7c 100644
--- a/kspell2/ui/dialog.h
+++ b/kspell2/ui/dialog.h
@@ -33,30 +33,30 @@ namespace KSpell2
Q_OBJECT
public:
Dialog( BackgroundChecker *checker,
- QWidget *parent, const char *name=0 );
+ TQWidget *parent, const char *name=0 );
~Dialog();
- QString originalBuffer() const;
- QString buffer() const;
+ TQString originalBuffer() const;
+ TQString buffer() const;
void show();
void activeAutoCorrect( bool _active );
public slots:
- void setBuffer( const QString& );
+ void setBuffer( const TQString& );
void setFilter( Filter* filter );
signals:
- void done( const QString& newBuffer );
- void misspelling( const QString& word, int start );
- void replace( const QString& oldWord, int start,
- const QString& newWord );
+ void done( const TQString& newBuffer );
+ void misspelling( const TQString& word, int start );
+ void replace( const TQString& oldWord, int start,
+ const TQString& newWord );
void stop();
void cancel();
- void autoCorrect( const QString & currentWord, const QString & replaceWord );
+ void autoCorrect( const TQString & currentWord, const TQString & replaceWord );
private slots:
- void slotMisspelling(const QString& word, int start );
+ void slotMisspelling(const TQString& word, int start );
void slotDone();
void slotFinished();
@@ -68,13 +68,13 @@ namespace KSpell2
void slotSkip();
void slotSkipAll();
void slotSuggest();
- void slotChangeLanguage( const QString& );
- void slotSelectionChanged( QListViewItem * );
+ void slotChangeLanguage( const TQString& );
+ void slotSelectionChanged( TQListViewItem * );
void slotAutocorrect();
private:
- void updateDialog( const QString& word );
- void fillSuggestions( const QStringList& suggs );
+ void updateDialog( const TQString& word );
+ void fillSuggestions( const TQStringList& suggs );
void initConnections();
void initGui();
void continueChecking();
diff --git a/kspell2/ui/highlighter.cpp b/kspell2/ui/highlighter.cpp
index 0ecbb9802..2d185462d 100644
--- a/kspell2/ui/highlighter.cpp
+++ b/kspell2/ui/highlighter.cpp
@@ -27,10 +27,10 @@
#include <kconfig.h>
#include <kdebug.h>
-#include <qtextedit.h>
-#include <qtimer.h>
-#include <qcolor.h>
-#include <qdict.h>
+#include <tqtextedit.h>
+#include <tqtimer.h>
+#include <tqcolor.h>
+#include <tqdict.h>
namespace KSpell2 {
@@ -40,13 +40,13 @@ public:
Filter *filter;
Broker::Ptr broker;
Dictionary *dict;
- QDict<Dictionary> dictCache;
+ TQDict<Dictionary> dictCache;
};
-Highlighter::Highlighter( QTextEdit *textEdit,
- const QString& configFile,
+Highlighter::Highlighter( TQTextEdit *textEdit,
+ const TQString& configFile,
Filter *filter)
- : QSyntaxHighlighter( textEdit )
+ : TQSyntaxHighlighter( textEdit )
{
d = new Private;
d->filter = filter;
@@ -67,7 +67,7 @@ Highlighter::~Highlighter()
delete d; d = 0;
}
-int Highlighter::highlightParagraph( const QString& text,
+int Highlighter::highlightParagraph( const TQString& text,
int endStateOfLastPara )
{
Q_UNUSED( endStateOfLastPara );
@@ -87,7 +87,7 @@ int Highlighter::highlightParagraph( const QString& text,
w = d->filter->nextWord();
}
}
- //QTimer::singleShot( 0, this, SLOT(checkWords()) );
+ //TQTimer::singleShot( 0, this, TQT_SLOT(checkWords()) );
return 0;
}
@@ -103,12 +103,12 @@ void Highlighter::setCurrentFilter( Filter *filter )
d->filter->setSettings( d->broker->settings() );
}
-QString Highlighter::currentLanguage() const
+TQString Highlighter::currentLanguage() const
{
return d->dict->language();
}
-void Highlighter::setCurrentLanguage( const QString& lang )
+void Highlighter::setCurrentLanguage( const TQString& lang )
{
if ( !d->dictCache.find( lang ) ) {
Dictionary *dict = d->broker->dictionary( lang );
diff --git a/kspell2/ui/highlighter.h b/kspell2/ui/highlighter.h
index 86140f054..c9a832f3a 100644
--- a/kspell2/ui/highlighter.h
+++ b/kspell2/ui/highlighter.h
@@ -23,7 +23,7 @@
#include "filter.h"
-#include <qsyntaxhighlighter.h>
+#include <tqsyntaxhighlighter.h>
class QTextEdit;
@@ -32,19 +32,19 @@ namespace KSpell2
class Highlighter : public QSyntaxHighlighter
{
public:
- Highlighter( QTextEdit *textEdit,
- const QString& configFile = QString::null,
+ Highlighter( TQTextEdit *textEdit,
+ const TQString& configFile = TQString::null,
Filter *filter = Filter::defaultFilter() );
~Highlighter();
- virtual int highlightParagraph( const QString& text,
+ virtual int highlightParagraph( const TQString& text,
int endStateOfLastPara );
Filter *currentFilter() const;
void setCurrentFilter( Filter *filter );
- QString currentLanguage() const;
- void setCurrentLanguage( const QString& lang );
+ TQString currentLanguage() const;
+ void setCurrentLanguage( const TQString& lang );
protected:
virtual void setMisspelled( int start, int count );