summaryrefslogtreecommitdiffstats
path: root/kbabel/kbabeldict/modules/poauxiliary
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-12 01:36:19 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-12 01:36:19 +0000
commit99a2774ca6f1cab334de5d43fe36fc44ae889a4c (patch)
treeeff34cf0762227f6baf2a93e8fef48d4bed2651c /kbabel/kbabeldict/modules/poauxiliary
parent1c104292188541106338d4940b0f04beeb4301a0 (diff)
downloadtdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.tar.gz
tdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.zip
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
Diffstat (limited to 'kbabel/kbabeldict/modules/poauxiliary')
-rw-r--r--kbabel/kbabeldict/modules/poauxiliary/pa_factory.cpp14
-rw-r--r--kbabel/kbabeldict/modules/poauxiliary/pa_factory.h13
-rw-r--r--kbabel/kbabeldict/modules/poauxiliary/poauxiliary.cpp52
-rw-r--r--kbabel/kbabeldict/modules/poauxiliary/poauxiliary.h11
-rw-r--r--kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.cpp14
-rw-r--r--kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.h9
-rw-r--r--kbabel/kbabeldict/modules/poauxiliary/pwidget.ui6
7 files changed, 61 insertions, 58 deletions
diff --git a/kbabel/kbabeldict/modules/poauxiliary/pa_factory.cpp b/kbabel/kbabeldict/modules/poauxiliary/pa_factory.cpp
index c8d8c1db..730424f1 100644
--- a/kbabel/kbabeldict/modules/poauxiliary/pa_factory.cpp
+++ b/kbabel/kbabeldict/modules/poauxiliary/pa_factory.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.
@@ -54,8 +54,8 @@ KInstance *PaFactory::s_instance = 0;
KAboutData *PaFactory::s_about = 0;
-PaFactory::PaFactory( TQObject *parent, const char *name)
- : KLibFactory(parent,name)
+PaFactory::PaFactory( TQObject *tqparent, const char *name)
+ : KLibFactory(tqparent,name)
{
}
@@ -75,7 +75,7 @@ PaFactory::~PaFactory()
}
-TQObject *PaFactory::createObject( TQObject *parent, const char *name
+TQObject *PaFactory::createObject( TQObject *tqparent, const char *name
, const char *classname, const TQStringList &)
{
if(TQCString(classname) != "SearchEngine")
@@ -84,7 +84,7 @@ TQObject *PaFactory::createObject( TQObject *parent, const char *name
return 0;
}
- return new PoAuxiliary(parent,name);
+ return new PoAuxiliary(tqparent,name);
}
diff --git a/kbabel/kbabeldict/modules/poauxiliary/pa_factory.h b/kbabel/kbabeldict/modules/poauxiliary/pa_factory.h
index 901351c7..7c92e008 100644
--- a/kbabel/kbabeldict/modules/poauxiliary/pa_factory.h
+++ b/kbabel/kbabeldict/modules/poauxiliary/pa_factory.h
@@ -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.
@@ -42,12 +42,13 @@ class KAboutData;
class PaFactory : public KLibFactory
{
Q_OBJECT
+ TQ_OBJECT
public:
- PaFactory( TQObject *parent=0, const char *name=0);
+ PaFactory( TQObject *tqparent=0, const char *name=0);
~PaFactory();
- virtual TQObject *createObject( TQObject *parent=0, const char *name=0
- , const char *classname="TQObject"
+ virtual TQObject *createObject( TQObject *tqparent=0, const char *name=0
+ , const char *classname=TQOBJECT_OBJECT_NAME_STRING
, const TQStringList &args = TQStringList());
static KInstance *instance();
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();
}
diff --git a/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.h b/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.h
index 7ada1d52..0ad4c635 100644
--- a/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.h
+++ b/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.h
@@ -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,9 +50,10 @@ class AuxiliaryPreferencesWidget;
class PoAuxiliary : public SearchEngine
{
Q_OBJECT
+ TQ_OBJECT
public:
- PoAuxiliary(TQObject *parent=0, const char *name=0);
+ PoAuxiliary(TQObject *tqparent=0, const char *name=0);
virtual ~PoAuxiliary();
virtual bool isReady() const;
@@ -64,7 +65,7 @@ public:
virtual void saveSettings(KConfigBase *config);
virtual void readSettings(KConfigBase *config);
- virtual PrefWidget *preferencesWidget(TQWidget *parent);
+ virtual PrefWidget *preferencesWidget(TQWidget *tqparent);
virtual const KAboutData *about() const;
diff --git a/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.cpp b/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.cpp
index 5a534ecf..2c984c46 100644
--- a/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.cpp
+++ b/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.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.
@@ -43,14 +43,14 @@
#include "preferenceswidget.h"
#include "pwidget.h"
-AuxiliaryPreferencesWidget::AuxiliaryPreferencesWidget(TQWidget *parent, const char* name)
- : PrefWidget(parent,name)
+AuxiliaryPreferencesWidget::AuxiliaryPreferencesWidget(TQWidget *tqparent, const char* name)
+ : PrefWidget(tqparent,name)
, changed(false)
{
- TQVBoxLayout *layout = new TQVBoxLayout(this);
+ TQVBoxLayout *tqlayout = new TQVBoxLayout(this);
prefWidget = new PWidget(this);
- layout->addWidget(prefWidget);
+ tqlayout->addWidget(prefWidget);
connect(prefWidget->urlInput->lineEdit(),TQT_SIGNAL(textChanged(const TQString&))
diff --git a/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.h b/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.h
index 3f0862b2..e967d958 100644
--- a/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.h
+++ b/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.h
@@ -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.
@@ -42,9 +42,10 @@ class PWidget;
class AuxiliaryPreferencesWidget : public PrefWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- AuxiliaryPreferencesWidget(TQWidget *parent=0, const char* name=0);
+ AuxiliaryPreferencesWidget(TQWidget *tqparent=0, const char* name=0);
virtual ~AuxiliaryPreferencesWidget();
virtual void apply();
diff --git a/kbabel/kbabeldict/modules/poauxiliary/pwidget.ui b/kbabel/kbabeldict/modules/poauxiliary/pwidget.ui
index 8179caed..aa9e6710 100644
--- a/kbabel/kbabeldict/modules/poauxiliary/pwidget.ui
+++ b/kbabel/kbabeldict/modules/poauxiliary/pwidget.ui
@@ -7,7 +7,7 @@
<cstring>PWidget</cstring>
</property>
<property stdset="1">
- <name>geometry</name>
+ <name>tqgeometry</name>
<rect>
<x>0</x>
<y>0</y>
@@ -92,14 +92,14 @@ The following variables will be replaced in the path if available:
<enum>Expanding</enum>
</property>
<property>
- <name>sizeHint</name>
+ <name>tqsizeHint</name>
<size>
<width>20</width>
<height>20</height>
</size>
</property>
<property>
- <name>sizeHint</name>
+ <name>tqsizeHint</name>
<size>
<width>20</width>
<height>20</height>