summaryrefslogtreecommitdiffstats
path: root/kbabel/filters/gettext/gettextimport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kbabel/filters/gettext/gettextimport.cpp')
-rw-r--r--kbabel/filters/gettext/gettextimport.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/kbabel/filters/gettext/gettextimport.cpp b/kbabel/filters/gettext/gettextimport.cpp
index a48e327b..e087490b 100644
--- a/kbabel/filters/gettext/gettextimport.cpp
+++ b/kbabel/filters/gettext/gettextimport.cpp
@@ -42,7 +42,7 @@
#include <tqfile.h>
#include <tqfileinfo.h>
#include <tqregexp.h>
-#include <tqtextcodec.h>
+#include <textcodec.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -57,7 +57,7 @@ GettextImportPlugin::GettextImportPlugin(TQObject* parent, const char* name, con
{
}
-ConversiontqStatus GettextImportPlugin::load(const TQString& filename, const TQString&)
+ConversionStatus GettextImportPlugin::load(const TQString& filename, const TQString&)
{
kdDebug( KBABEL ) << k_funcinfo << endl;
@@ -106,7 +106,7 @@ ConversiontqStatus GettextImportPlugin::load(const TQString& filename, const TQS
//recoveredErrorInHeader = true;
}
- TQIODevice *dev = stream.tqdevice();
+ TQIODevice *dev = stream.device();
int fileSize = dev->size();
// if somethings goes wrong with the parsing, we don't have deleted the old contents
@@ -117,7 +117,7 @@ ConversiontqStatus GettextImportPlugin::load(const TQString& filename, const TQS
kdDebug(KBABEL) << "start parsing..." << endl;
// first read header
- const ConversiontqStatus status = readHeader(stream);
+ const ConversionStatus status = readHeader(stream);
if ( status == RECOVERED_PARSE_ERROR )
@@ -173,13 +173,13 @@ ConversiontqStatus GettextImportPlugin::load(const TQString& filename, const TQS
while( !stream.eof() )
{
- kapp->tqprocessEvents(10);
+ kapp->processEvents(10);
if( isStopped() )
{
return STOPPED;
}
- const ConversiontqStatus success=readEntry(stream);
+ const ConversionStatus success=readEntry(stream);
if(success==OK)
{
@@ -302,7 +302,7 @@ TQTextCodec* GettextImportPlugin::codecForArray(TQByteArray& array, bool* hadCod
stream.setEncoding( TQTextStream::Latin1 );
// first read header
- ConversiontqStatus status = readHeader(stream);
+ ConversionStatus status = readHeader(stream);
if(status!=OK && status != RECOVERED_PARSE_ERROR)
{
kdDebug(KBABEL) << "wasn't able to read header" << endl;
@@ -360,18 +360,18 @@ TQTextCodec* GettextImportPlugin::codecForArray(TQByteArray& array, bool* hadCod
return codec;
}
-ConversiontqStatus GettextImportPlugin::readHeader(TQTextStream& stream)
+ConversionStatus GettextImportPlugin::readHeader(TQTextStream& stream)
{
CatalogItem temp;
- int filePos=stream.tqdevice()->at();
- ConversiontqStatus status=readEntry(stream);
+ int filePos=stream.device()->at();
+ ConversionStatus status=readEntry(stream);
if(status==OK || status==RECOVERED_PARSE_ERROR)
{
// test if this is the header
if(!_msgid.first().isEmpty())
{
- stream.tqdevice()->at(filePos);
+ stream.device()->at(filePos);
}
return status;
@@ -380,7 +380,7 @@ ConversiontqStatus GettextImportPlugin::readHeader(TQTextStream& stream)
return PARSE_ERROR;
}
-ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
+ConversionStatus GettextImportPlugin::readEntry(TQTextStream& stream)
{
//kdDebug( KBABEL ) << k_funcinfo << " START" << endl;
enum {Begin,Comment,Msgctxt,Msgid,Msgstr} part=Begin;
@@ -402,7 +402,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
while( !stream.eof() )
{
- const int pos=stream.tqdevice()->at();
+ const int pos=stream.device()->at();
line=stream.readLine();
@@ -761,7 +761,7 @@ ConversiontqStatus GettextImportPlugin::readEntry(TQTextStream& stream)
else if((line.find(TQRegExp("^\\s*msgid")) != -1) || (line.find(TQRegExp("^\\s*#")) != -1))
{
// We have read successfully one entry, so end loop.
- stream.tqdevice()->at(pos);// reset position in stream to beginning of this line
+ stream.device()->at(pos);// reset position in stream to beginning of this line
break;
}
else if(line.startsWith("msgstr"))