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 --- kbabel/datatools/accelerators/main.cc | 22 +++++++++++----------- kbabel/datatools/accelerators/main.h | 9 +++++---- 2 files changed, 16 insertions(+), 15 deletions(-) (limited to 'kbabel/datatools/accelerators') diff --git a/kbabel/datatools/accelerators/main.cc b/kbabel/datatools/accelerators/main.cc index 632eb7b5..b082c635 100644 --- a/kbabel/datatools/accelerators/main.cc +++ b/kbabel/datatools/accelerators/main.cc @@ -19,11 +19,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. @@ -51,8 +51,8 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_accelstool, KGenericFactory using namespace KBabel; -AcceleratorTool::AcceleratorTool( TQObject* parent, const char* name, const TQStringList & ) - : KDataTool( parent, name ), _cache_origin( 0 ) +AcceleratorTool::AcceleratorTool( TQObject* tqparent, const char* name, const TQStringList & ) + : KDataTool( tqparent, name ), _cache_origin( 0 ) { // bogus translation just for allowing the translation i18n("what check found errors","accelerator"); @@ -97,8 +97,8 @@ bool AcceleratorTool::run( const TQString& command, void* data, const TQString& { // FIXME: this should care about plural forms in msgid TQString lineid=item->msgid().first(); - lineid.replace( _context, ""); - lineid.replace(TQRegExp("\\n"),""); + lineid.tqreplace( _context, ""); + lineid.tqreplace(TQRegExp("\\n"),""); lineid.simplifyWhiteSpace(); TQString regStr(_marker); regStr+="[^\\s]"; @@ -110,12 +110,12 @@ bool AcceleratorTool::run( const TQString& command, void* data, const TQString& TQString linestr=(*form); linestr.simplifyWhiteSpace(); - int n = lineid.contains(reg); + int n = lineid.tqcontains(reg); if( _marker == '&' ) - n = n - lineid.contains(TQRegExp("(&[a-z,A-Z,\\-,0-9,#]*;)|(&&(?!&+))")); - int m = linestr.contains(reg); + n = n - lineid.tqcontains(TQRegExp("(&[a-z,A-Z,\\-,0-9,#]*;)|(&&(?!&+))")); + int m = linestr.tqcontains(reg); if( _marker == '&' ) - m = m - linestr.contains(TQRegExp("(&[a-z,A-Z,\\-,0-9,#]*;)|(&&(?!&+))")); + m = m - linestr.tqcontains(TQRegExp("(&[a-z,A-Z,\\-,0-9,#]*;)|(&&(?!&+))")); hasError = hasError || ( n<=1 && m != n); } } diff --git a/kbabel/datatools/accelerators/main.h b/kbabel/datatools/accelerators/main.h index ee9ae3a8..df1617cf 100644 --- a/kbabel/datatools/accelerators/main.h +++ b/kbabel/datatools/accelerators/main.h @@ -19,11 +19,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 AcceleratorTool : public KDataTool { Q_OBJECT + TQ_OBJECT public: - AcceleratorTool( TQObject* parent, const char* name, const TQStringList & ); + AcceleratorTool( TQObject* tqparent, const char* name, const TQStringList & ); virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype); private: -- cgit v1.2.1