From f008adb5a77e094eaf6abf3fc0f36958e66896a5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 25 Jun 2011 05:28:35 +0000 Subject: TQt4 port koffice This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- .../mailmerge/sql/KWQtSqlSerialDataSourceBase.cpp | 54 +++++++++++----------- 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.cpp') diff --git a/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.cpp b/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.cpp index 781c1ab5..ddb32794 100644 --- a/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.cpp +++ b/kword/mailmerge/sql/KWQtSqlSerialDataSourceBase.cpp @@ -17,20 +17,20 @@ * Boston, MA 02110-1301, USA. */ -#include "KWQtSqlSerialDataSourceBase.h" -#include "KWQtSqlSerialDataSourceBase.moc" -#include "KWQtSqlMailMergeOpen.h" -#include -#include +#include "KWTQtSqlSerialDataSourceBase.h" +#include "KWTQtSqlSerialDataSourceBase.moc" +#include "KWTQtSqlMailMergeOpen.h" +#include +#include #include #include #include -#include -#include +#include +#include #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -40,31 +40,31 @@ /****************************************************************** * - * Class: KWQtSqlSerialDataSourceBase + * Class: KWTQtSqlSerialDataSourceBase * ******************************************************************/ -int KWQtSqlSerialDataSourceBase::connectionId=0; +int KWTQtSqlSerialDataSourceBase::connectionId=0; -KWQtSqlSerialDataSourceBase::KWQtSqlSerialDataSourceBase(KInstance *inst,QObject *parent) - : KWMailMergeDataSource(inst,parent) +KWTQtSqlSerialDataSourceBase::KWTQtSqlSerialDataSourceBase(KInstance *inst,TQObject *tqparent) + : KWMailMergeDataSource(inst,tqparent) { - DataBaseConnection=QString("KWQTSQLPOWER")+parent->name()+QString("--%1").arg(connectionId++); + DataBaseConnection=TQString("KWTQTSTQLPOWER")+tqparent->name()+TQString("--%1").tqarg(connectionId++); port=i18n("default"); } -KWQtSqlSerialDataSourceBase::~KWQtSqlSerialDataSourceBase() +KWTQtSqlSerialDataSourceBase::~KWTQtSqlSerialDataSourceBase() { - QSqlDatabase::removeDatabase(DataBaseConnection); + TQSqlDatabase::removeDatabase(DataBaseConnection); } -bool KWQtSqlSerialDataSourceBase::showConfigDialog(QWidget *par,int action) +bool KWTQtSqlSerialDataSourceBase::showConfigDialog(TQWidget *par,int action) { bool ret=false; if (action==KWSLOpen) { - KWQtSqlMailMergeOpen *dia=new KWQtSqlMailMergeOpen(par,this); + KWTQtSqlMailMergeOpen *dia=new KWTQtSqlMailMergeOpen(par,this); ret=dia->exec(); if (ret) openDatabase(); @@ -73,16 +73,16 @@ bool KWQtSqlSerialDataSourceBase::showConfigDialog(QWidget *par,int action) return ret; } -bool KWQtSqlSerialDataSourceBase::openDatabase() +bool KWTQtSqlSerialDataSourceBase::openDatabase() { - QCString pwd; - QSqlDatabase::removeDatabase(DataBaseConnection); - database=QSqlDatabase::addDatabase(driver,DataBaseConnection); + TQCString pwd; + TQSqlDatabase::removeDatabase(DataBaseConnection); + database=TQSqlDatabase::addDatabase(driver,DataBaseConnection); if (database) { - if (database->lastError().type()!=QSqlError::None) + if (database->lastError().type()!=TQSqlError::None) { - QMessageBox::critical(0,i18n("Error"),database->lastError().databaseText(),QMessageBox::Abort,QMessageBox::NoButton,QMessageBox::NoButton); + TQMessageBox::critical(0,i18n("Error"),database->lastError().databaseText(),TQMessageBox::Abort,TQMessageBox::NoButton,TQMessageBox::NoButton); return false; } database->setDatabaseName(databasename); @@ -97,9 +97,9 @@ bool KWQtSqlSerialDataSourceBase::openDatabase() { return true; } - QMessageBox::critical(0,i18n("Error"),database->lastError().databaseText(),QMessageBox::Abort,QMessageBox::NoButton,QMessageBox::NoButton); + TQMessageBox::critical(0,i18n("Error"),database->lastError().databaseText(),TQMessageBox::Abort,TQMessageBox::NoButton,TQMessageBox::NoButton); return false; } - QMessageBox::critical(0,i18n("Error"),i18n("Unable to create database object"),QMessageBox::Abort,QMessageBox::NoButton,QMessageBox::NoButton); + TQMessageBox::critical(0,i18n("Error"),i18n("Unable to create database object"),TQMessageBox::Abort,TQMessageBox::NoButton,TQMessageBox::NoButton); return false; } -- cgit v1.2.1