summaryrefslogtreecommitdiffstats
path: root/krecipes/src/convert_sqlite3.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'krecipes/src/convert_sqlite3.cpp')
-rw-r--r--krecipes/src/convert_sqlite3.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/krecipes/src/convert_sqlite3.cpp b/krecipes/src/convert_sqlite3.cpp
index 19de813..1322091 100644
--- a/krecipes/src/convert_sqlite3.cpp
+++ b/krecipes/src/convert_sqlite3.cpp
@@ -10,8 +10,8 @@
#include "convert_sqlite3.h"
-#include <qapplication.h>
-#include <qfile.h>
+#include <ntqapplication.h>
+#include <ntqfile.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -21,9 +21,9 @@
//FIXME: Some messages should be given to the user about success/failure, but that can't be done in the 0.8.x branch due to i18n.
-ConvertSQLite3::ConvertSQLite3( const QString &db_file ) : QObject(), error(false)
+ConvertSQLite3::ConvertSQLite3( const TQString &db_file ) : TQObject(), error(false)
{
- QString file = db_file;
+ TQString file = db_file;
if ( file.isEmpty() ) {
KConfig *config = KGlobal::config();
config->setGroup("Server");
@@ -37,7 +37,7 @@ ConvertSQLite3::ConvertSQLite3( const QString &db_file ) : QObject(), error(fals
*p << "sqlite" << file << ".dump" <<
"|" << "sqlite3" << file+".new";
- QApplication::connect( p, SIGNAL(readReady(KProcIO*)), this, SLOT(processOutput(KProcIO*)) );
+ TQApplication::connect( p, SIGNAL(readReady(KProcIO*)), this, SLOT(processOutput(KProcIO*)) );
bool success = p->start( KProcess::Block, true );
if ( !success ) {
@@ -49,10 +49,10 @@ ConvertSQLite3::ConvertSQLite3( const QString &db_file ) : QObject(), error(fals
return;
- QString backup_file = file+".sqlite2";
+ TQString backup_file = file+".sqlite2";
int i = 1;
- while ( QFile::exists(backup_file) ) {
- backup_file = backup_file.left(file.length()+8)+"."+QString::number(i);
+ while ( TQFile::exists(backup_file) ) {
+ backup_file = backup_file.left(file.length()+8)+"."+TQString::number(i);
++i;
}
@@ -68,7 +68,7 @@ ConvertSQLite3::ConvertSQLite3( const QString &db_file ) : QObject(), error(fals
}
else {
kdDebug()<<"Conversion successful!"<<endl;
- QFile::remove(file+".new");
+ TQFile::remove(file+".new");
}
}
}
@@ -79,7 +79,7 @@ ConvertSQLite3::~ConvertSQLite3()
void ConvertSQLite3::processOutput( KProcIO* p )
{
- QString error_str, buffer;
+ TQString error_str, buffer;
while ( p->readln(buffer) != -1 ) {
error_str += buffer;
}
@@ -91,11 +91,11 @@ void ConvertSQLite3::processOutput( KProcIO* p )
p->ackRead();
}
-bool ConvertSQLite3::copyFile( const QString &oldFilePath, const QString &newFilePath )
+bool ConvertSQLite3::copyFile( const TQString &oldFilePath, const TQString &newFilePath )
{
//load both files
- QFile oldFile(oldFilePath);
- QFile newFile(newFilePath);
+ TQFile oldFile(oldFilePath);
+ TQFile newFile(newFilePath);
bool openOld = oldFile.open( IO_ReadOnly );
bool openNew = newFile.open( IO_WriteOnly );
@@ -107,7 +107,7 @@ bool ConvertSQLite3::copyFile( const QString &oldFilePath, const QString &newFil
char* buffer = new char[BUFFER_SIZE];
while(!oldFile.atEnd())
{
- Q_ULONG len = oldFile.readBlock( buffer, BUFFER_SIZE );
+ TQ_ULONG len = oldFile.readBlock( buffer, BUFFER_SIZE );
newFile.writeBlock( buffer, len );
}