From 99a2774ca6f1cab334de5d43fe36fc44ae889a4c Mon Sep 17 00:00:00 2001 From: tpearson Date: Sun, 12 Jun 2011 01:36:19 +0000 Subject: TQt4 convert kdesdk This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1236185 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- .../kbabeldict/modules/poauxiliary/poauxiliary.cpp | 52 +++++++++++----------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'kbabel/kbabeldict/modules/poauxiliary/poauxiliary.cpp') diff --git a/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.cpp b/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.cpp index eae86d65..cc726ad8 100644 --- a/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.cpp +++ b/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.cpp @@ -20,11 +20,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -50,8 +50,8 @@ using namespace KBabel; -PoAuxiliary::PoAuxiliary(TQObject *parent, const char *name) - : SearchEngine(parent, name) +PoAuxiliary::PoAuxiliary(TQObject *tqparent, const char *name) + : SearchEngine(tqparent, name) { catalog = new Catalog(this, "PoAuxiliary::catalog"); prefWidget=0; @@ -124,9 +124,9 @@ void PoAuxiliary::readSettings(KConfigBase *config) restoreSettings(); } -PrefWidget *PoAuxiliary::preferencesWidget(TQWidget *parent) +PrefWidget *PoAuxiliary::preferencesWidget(TQWidget *tqparent) { - prefWidget = new AuxiliaryPreferencesWidget(parent,"pocompendium_prefwidget"); + prefWidget = new AuxiliaryPreferencesWidget(tqparent,"pocompendium_prefwidget"); connect(prefWidget, TQT_SIGNAL(applySettings()), this, TQT_SLOT(applySettings())); connect(prefWidget, TQT_SIGNAL(restoreSettings()) , this, TQT_SLOT(restoreSettings())); @@ -184,7 +184,7 @@ bool PoAuxiliary::startSearch(const TQString& t, uint pluralForm, const SearchFi kapp->processEvents(100); - text.replace("\n",""); + text.tqreplace("\n",""); Entry *entry = msgidDict[text]; if(entry) @@ -358,27 +358,27 @@ void PoAuxiliary::loadAuxiliary() TQString path=url; - if(path.contains("@LANG@")) + if(path.tqcontains("@LANG@")) { - path.replace("@LANG@",langCode); + path.tqreplace("@LANG@",langCode); } - if(path.contains("@PACKAGE@")) + if(path.tqcontains("@PACKAGE@")) { - int pos=package.findRev("/"); + int pos=package.tqfindRev("/"); if( pos<0 ) pos=0; - path.replace("@PACKAGE@",package.mid(pos)); + path.tqreplace("@PACKAGE@",package.mid(pos)); } - if(path.contains("@PACKAGEDIR@")) + if(path.tqcontains("@PACKAGEDIR@")) { TQString packagedir; - int pos=package.findRev("/"); + int pos=package.tqfindRev("/"); if( pos > 0 ) packagedir=package.left(pos); else packagedir=""; - path.replace("@PACKAGEDIR@",packagedir); + path.tqreplace("@PACKAGEDIR@",packagedir); kdDebug(KBABEL_SEARCH) << "Packagedir found " << packagedir << endl; } TQRegExp reg("@DIR[0-9]+@"); - if(path.contains(reg)) + if(path.tqcontains(reg)) { int pos=reg.search(path); int len = reg.matchedLength(); @@ -393,7 +393,7 @@ void PoAuxiliary::loadAuxiliary() { TQString dir=directory(editedFile,number); TQString s("@DIR%1@"); - path.replace(s.arg(number),dir); + path.tqreplace(s.tqarg(number),dir); pos+=dir.length(); } @@ -427,7 +427,7 @@ void PoAuxiliary::loadAuxiliary() connect(catalog, TQT_SIGNAL(signalProgress(int)) , this, TQT_SIGNAL(progress(int))); - ConversionStatus stat = catalog->openURL(u); + ConversiontqStatus stat = catalog->openURL(u); if( stat != OK && stat != RECOVERED_PARSE_ERROR) { kdDebug(KBABEL_SEARCH) << "error while opening file " << u.prettyURL() << endl; @@ -436,7 +436,7 @@ void PoAuxiliary::loadAuxiliary() { error = true; errorMsg = i18n("Error while trying to open file for PO Auxiliary module:\n%1") - .arg(u.prettyURL()); + .tqarg(u.prettyURL()); emit hasError(errorMsg); } } @@ -461,7 +461,7 @@ void PoAuxiliary::loadAuxiliary() Entry *e = new Entry; // FIXME: should care about plural forms e->orig = catalog->msgid(i).first(); - e->orig.replace("\n",""); + e->orig.tqreplace("\n",""); kdWarning() << "PoAuxialiary does not support plural forms" << endl; e->translation = catalog->msgstr(i).first(); e->comment = catalog->comment(i); @@ -491,7 +491,7 @@ void PoAuxiliary::loadAuxiliary() void PoAuxiliary::setEditedFile(const TQString& file) { - if(initialized && (url.contains("@DIR") || KURL::isRelativeURL(url)) + if(initialized && (url.tqcontains("@DIR") || KURL::isRelativeURL(url)) && file!=editedFile && !loadTimer->isActive() ) { initialized=false; @@ -503,7 +503,7 @@ void PoAuxiliary::setEditedFile(const TQString& file) void PoAuxiliary::setEditedPackage(const TQString& pack) { - if(initialized && url.contains("@PACKAGE@") && pack!=package + if(initialized && url.tqcontains("@PACKAGE@") && pack!=package && !loadTimer->isActive() ) { initialized=false; @@ -515,7 +515,7 @@ void PoAuxiliary::setEditedPackage(const TQString& pack) void PoAuxiliary::setLanguageCode(const TQString& lang) { - if(initialized && url.contains("@LANG@") && lang!=langCode + if(initialized && url.tqcontains("@LANG@") && lang!=langCode && !loadTimer->isActive() ) { initialized=false; @@ -538,7 +538,7 @@ TQString PoAuxiliary::translate(const TQString& text, uint pluralForm) if(error) { - return TQString::null; + return TQString(); } Entry *entry = msgidDict[text]; @@ -547,7 +547,7 @@ TQString PoAuxiliary::translate(const TQString& text, uint pluralForm) return entry->translation; } - return TQString::null; + return TQString(); } -- cgit v1.2.1