From 98d15d90b6a83e2df32d678013847e18b8a8c7e8 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 28 May 2011 18:03:09 +0000 Subject: TQt4 port Katapult This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/katapult@1233929 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- .../plugins/catalogs/spellcatalog/spelling.cpp | 34 +++++++++++----------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'katapult/plugins/catalogs/spellcatalog/spelling.cpp') diff --git a/katapult/plugins/catalogs/spellcatalog/spelling.cpp b/katapult/plugins/catalogs/spellcatalog/spelling.cpp index fe08355..edadc18 100644 --- a/katapult/plugins/catalogs/spellcatalog/spelling.cpp +++ b/katapult/plugins/catalogs/spellcatalog/spelling.cpp @@ -26,21 +26,21 @@ #include #include -#include +#include #include "spellcatalog.h" #include "spelling.h" -Spelling::Spelling(SpellCatalog* catalog, const QString& text): KatapultItem(), _catalog(catalog), _text(text) +Spelling::Spelling(SpellCatalog* catalog, const TQString& text): KatapultItem(), _catalog(catalog), _text(text) { - spellChecker = new KSpell( 0, "caption", this, SLOT(spellCheckerReady()) ); + spellChecker = new KSpell( 0, "caption", this, TQT_SLOT(spellCheckerReady()) ); - connect( spellChecker, SIGNAL(misspelling(const QString&, const QStringList&, unsigned int)), - this, SLOT(spellCheckerMisspelling(const QString&, const QStringList&, unsigned int)) ); + connect( spellChecker, TQT_SIGNAL(misspelling(const TQString&, const TQStringList&, unsigned int)), + this, TQT_SLOT(spellCheckerMisspelling(const TQString&, const TQStringList&, unsigned int)) ); - connect( spellChecker, SIGNAL(corrected(const QString&, const QString&, unsigned int)), - this, SLOT(spellCheckerCorrected(const QString&, const QString&, unsigned int)) ); + connect( spellChecker, TQT_SIGNAL(corrected(const TQString&, const TQString&, unsigned int)), + this, TQT_SLOT(spellCheckerCorrected(const TQString&, const TQString&, unsigned int)) ); evaluate(); } @@ -52,16 +52,16 @@ Spelling::~Spelling() { void Spelling::spellCheckerReady() { } -void Spelling::spellCheckerCorrected(const QString& /*originalword*/, const QString& /*newword*/, unsigned int /*pos*/) { +void Spelling::spellCheckerCorrected(const TQString& /*originalword*/, const TQString& /*newword*/, unsigned int /*pos*/) { corrected = true; } -void Spelling::spellCheckerMisspelling(const QString& /*originalword*/, const QStringList& suggestions, unsigned int /*pos*/) { +void Spelling::spellCheckerMisspelling(const TQString& /*originalword*/, const TQStringList& suggestions, unsigned int /*pos*/) { misspelt = true; suggestedWords = suggestions.join(","); } -QPixmap Spelling::icon(int size) const +TQPixmap Spelling::icon(int size) const { const char* icon = "checkmark"; if (_parseError || misspelt) { @@ -70,18 +70,18 @@ QPixmap Spelling::icon(int size) const return KGlobal::iconLoader()->loadIcon(icon, KIcon::NoGroup, size); } -QString Spelling::text() const +TQString Spelling::text() const { return _text; } -void Spelling::setText(const QString& text) +void Spelling::setText(const TQString& text) { _text = text; evaluate(); } -QString Spelling::result() const +TQString Spelling::result() const { return _result; } @@ -100,7 +100,7 @@ void Spelling::evaluate() const { int length = catalog()->triggerWordLength(); - QString text = _text.mid(length + 1); // + 1 for space + TQString text = _text.mid(length + 1); // + 1 for space misspelt = false; corrected = false; @@ -125,9 +125,9 @@ void Spelling::evaluate() const } void Spelling::copyToClipboard() const { - QClipboard* clipBoard = QApplication::clipboard(); - clipBoard->setText(suggestedWords, QClipboard::Clipboard); - clipBoard->setText(suggestedWords, QClipboard::Selection); + TQClipboard* clipBoard = TQApplication::tqclipboard(); + clipBoard->setText(suggestedWords, TQClipboard::Clipboard); + clipBoard->setText(suggestedWords, TQClipboard::Selection); } #include "spelling.moc" -- cgit v1.2.1