summaryrefslogtreecommitdiffstats
path: root/kexi/migration
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:32:11 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:32:11 -0600
commit94844816550ad672ccfcdc25659c625546239998 (patch)
treee35fc60fd736c645d59f6408af032774ad8023d3 /kexi/migration
parent2a811c38c74c03648ecf857e566c44483cbad706 (diff)
downloadkoffice-94844816550ad672ccfcdc25659c625546239998.tar.gz
koffice-94844816550ad672ccfcdc25659c625546239998.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kexi/migration')
-rw-r--r--kexi/migration/importoptionsdlg.cpp12
-rw-r--r--kexi/migration/importwizard.cpp54
-rw-r--r--kexi/migration/importwizard.h4
-rw-r--r--kexi/migration/keximigrate.cpp80
-rw-r--r--kexi/migration/keximigrate.h8
-rw-r--r--kexi/migration/migratemanager.cpp22
-rw-r--r--kexi/migration/mysql/mysqlmigrate.cpp4
-rw-r--r--kexi/migration/pqxx/pqxxmigrate.cpp18
8 files changed, 101 insertions, 101 deletions
diff --git a/kexi/migration/importoptionsdlg.cpp b/kexi/migration/importoptionsdlg.cpp
index 50d6726d..46479e66 100644
--- a/kexi/migration/importoptionsdlg.cpp
+++ b/kexi/migration/importoptionsdlg.cpp
@@ -22,8 +22,8 @@
#include <tqdir.h>
#include <tqlabel.h>
-#include <tqlayout.h>
-#include <tqtextcodec.h>
+#include <layout.h>
+#include <textcodec.h>
#include <tqcheckbox.h>
#include <kapplication.h>
@@ -53,16 +53,16 @@ OptionsDialog::OptionsDialog( const TQString& databaseFile, const TQString& sele
KDialogBase::spacingHint());
m_encodingComboBox = new KexiCharacterEncodingComboBox(plainPage(), selectedEncoding);
- m_encodingComboBox->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum);
+ m_encodingComboBox->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum);
lyr->addWidget( m_encodingComboBox, 1, 1 );
TQLabel* lbl = new TQLabel(
i18n("<h3>Text encoding for Microsoft Access database</h3>\n"
"<p>Database file \"%1\" appears to be created by a version of Microsoft Access older than 2000.</p>"
"<p>In order to properly import national characters, you may need to choose a proper text encoding "
"if the database was created on a computer with a different character set.</p>")
- .tqarg(TQDir::convertSeparators(databaseFile)), plainPage());
- lbl->tqsetAlignment( TQt::AlignAuto | TQt::WordBreak );
- lbl->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed);
+ .arg(TQDir::convertSeparators(databaseFile)), plainPage());
+ lbl->setAlignment( TQt::AlignAuto | TQt::WordBreak );
+ lbl->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed);
lyr->addMultiCellWidget( lbl, 0, 0, 0, 2 );
TQLabel* lbl2 = new TQLabel( m_encodingComboBox, i18n("Text encoding:"), plainPage());
diff --git a/kexi/migration/importwizard.cpp b/kexi/migration/importwizard.cpp
index 9c1b4559..cd1c94b3 100644
--- a/kexi/migration/importwizard.cpp
+++ b/kexi/migration/importwizard.cpp
@@ -24,7 +24,7 @@
#include "importoptionsdlg.h"
#include <tqlabel.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <tqvbuttongroup.h>
#include <tqradiobutton.h>
#include <tqcheckbox.h>
@@ -110,7 +110,7 @@ ImportWizard::ImportWizard(TQWidget *parent, TQMap<TQString,TQString>* args)
}
}
- m_sourceDBEncoding = TQString::tqfromLatin1(KGlobal::locale()->encoding()); //default
+ m_sourceDBEncoding = TQString::fromLatin1(KGlobal::locale()->encoding()); //default
}
//===========================================================
@@ -148,19 +148,19 @@ void ImportWizard::setupIntro()
TQVBoxLayout *vbox = new TQVBoxLayout(m_introPage, KDialog::marginHint());
TQLabel *lblIntro = new TQLabel(m_introPage);
- lblIntro->tqsetAlignment( TQt::AlignTop | TQt::AlignLeft | TQt::WordBreak );
+ lblIntro->setAlignment( TQt::AlignTop | TQt::AlignLeft | TQt::WordBreak );
TQString msg;
if (m_predefinedConnectionData) { //predefined import: server source
msg = i18n("<qt>Database Importing wizard is about to import \"%1\" database "
"<nobr>(connection %2)</nobr> into a Kexi database.</qt>")
- .tqarg(m_predefinedDatabaseName).tqarg(m_predefinedConnectionData->serverInfoString());
+ .arg(m_predefinedDatabaseName).arg(m_predefinedConnectionData->serverInfoString());
}
else if (!m_predefinedDatabaseName.isEmpty()) { //predefined import: file source
//! @todo this message is currently ok for files only
KMimeType::Ptr mimeTypePtr = KMimeType::mimeType(m_predefinedMimeType);
msg = i18n("<qt>Database Importing wizard is about to import <nobr>\"%1\"</nobr> file "
"of type \"%2\" into a Kexi database.</qt>")
- .tqarg(TQDir::convertSeparators(m_predefinedDatabaseName)).tqarg(mimeTypePtr->comment());
+ .arg(TQDir::convertSeparators(m_predefinedDatabaseName)).arg(mimeTypePtr->comment());
}
else {
msg = i18n("Database Importing wizard allows you to import an existing database "
@@ -247,7 +247,7 @@ void ImportWizard::setupDstType()
TQHBoxLayout *hbox = new TQHBoxLayout(vbox);
TQLabel *lbl = new TQLabel(i18n("Destination database type:")+" ", m_dstTypePage);
- lbl->tqsetAlignment(TQt::AlignAuto|TQt::AlignTop);
+ lbl->setAlignment(TQt::AlignAuto|TQt::AlignTop);
hbox->addWidget(lbl);
m_dstPrjTypeSelector = new KexiPrjTypeSelector(m_dstTypePage);
@@ -274,7 +274,7 @@ void ImportWizard::setupDstTitle()
{
m_dstTitlePage = new KexiDBTitlePage(i18n("Destination project's caption:"),
this, "KexiDBTitlePage");
- m_dstTitlePage->tqlayout()->setMargin( KDialog::marginHint() );
+ m_dstTitlePage->layout()->setMargin( KDialog::marginHint() );
m_dstTitlePage->updateGeometry();
m_dstNewDBNameLineEdit = m_dstTitlePage->le_caption;
addPage(m_dstTitlePage, i18n("Select Destination Database Project's Caption"));
@@ -339,10 +339,10 @@ void ImportWizard::setupImporting()
m_importingPage->hide();
TQVBoxLayout *vbox = new TQVBoxLayout(m_importingPage, KDialog::marginHint());
m_lblImportingTxt = new TQLabel(m_importingPage);
- m_lblImportingTxt->tqsetAlignment( TQt::AlignTop | TQt::AlignLeft | TQt::WordBreak );
+ m_lblImportingTxt->setAlignment( TQt::AlignTop | TQt::AlignLeft | TQt::WordBreak );
m_lblImportingErrTxt = new TQLabel(m_importingPage);
- m_lblImportingErrTxt->tqsetAlignment( TQt::AlignTop | TQt::AlignLeft | TQt::WordBreak );
+ m_lblImportingErrTxt->setAlignment( TQt::AlignTop | TQt::AlignLeft | TQt::WordBreak );
m_progressBar = new KProgress(100, m_importingPage);
m_progressBar->hide();
@@ -374,7 +374,7 @@ void ImportWizard::setupFinish()
m_finishPage->hide();
TQVBoxLayout *vbox = new TQVBoxLayout(m_finishPage, KDialog::marginHint());
m_finishLbl = new TQLabel(m_finishPage);
- m_finishLbl->tqsetAlignment( TQt::AlignTop | TQt::AlignLeft | TQt::WordBreak );
+ m_finishLbl->setAlignment( TQt::AlignTop | TQt::AlignLeft | TQt::WordBreak );
vbox->addWidget( m_finishLbl );
m_openImportedProjectCheckBox = new TQCheckBox(i18n("Open imported project"),
@@ -398,7 +398,7 @@ bool ImportWizard::checkUserInput()
finishtxt = finishtxt + "<br>" + i18n("No new database name was entered.");
}
- Kexi::ObjecttqStatus result;
+ Kexi::ObjectStatus result;
KexiMigrate* sourceDriver = prepareImport(result);
if (sourceDriver && sourceDriver->isSourceAndDestinationDataSourceTheSame())
{
@@ -551,11 +551,11 @@ void ImportWizard::arriveImportingPage() {
//! and KexiMigration::Driver classes
bool showOptions = false;
if (fileBasedSrcSelected()) {
- Kexi::ObjecttqStatus result;
+ Kexi::ObjectStatus result;
KexiMigrate* sourceDriver = prepareImport(result);
if (sourceDriver) {
showOptions = !result.error()
- && sourceDriver->propertyValue( "source_database_has_nontqunicode_encoding" ).toBool();
+ && sourceDriver->propertyValue( "source_database_has_nonunicode_encoding" ).toBool();
KexiMigration::Data *data = sourceDriver->data();
sourceDriver->setData( 0 );
delete data;
@@ -572,7 +572,7 @@ void ImportWizard::arriveImportingPage() {
void ImportWizard::arriveFinishPage() {
// backButton()->hide();
// cancelButton()->setEnabled(false);
-// m_finishLbl->setText( m_successText.tqarg(m_dstNewDBNameLineEdit->text()) );
+// m_finishLbl->setText( m_successText.arg(m_dstNewDBNameLineEdit->text()) );
}
bool ImportWizard::fileBasedSrcSelected() const
@@ -650,7 +650,7 @@ void ImportWizard::accept()
KWizard::accept();
}
-KexiMigrate* ImportWizard::prepareImport(Kexi::ObjecttqStatus& result)
+KexiMigrate* ImportWizard::prepareImport(Kexi::ObjectStatus& result)
{
KexiUtils::WaitCursor wait;
@@ -667,10 +667,10 @@ KexiMigrate* ImportWizard::prepareImport(Kexi::ObjecttqStatus& result)
);
if (!destDriver || manager.error())
{
- result.settqStatus(&manager);
+ result.setStatus(&manager);
kdDebug() << "Manager error..." << endl;
manager.debugError();
-// result.settqStatus(&manager);
+// result.setStatus(&manager);
}
// Set up destination connection data
@@ -702,7 +702,7 @@ KexiMigrate* ImportWizard::prepareImport(Kexi::ObjecttqStatus& result)
{
//TODO This needs a better message
//KMessageBox::error(this,
- result.settqStatus(i18n("No connection data is available. You did not select a destination filename."),"");
+ result.setStatus(i18n("No connection data is available. You did not select a destination filename."),"");
//return false;
} */
}
@@ -713,7 +713,7 @@ KexiMigrate* ImportWizard::prepareImport(Kexi::ObjecttqStatus& result)
{
sourceDriverName = driverNameForSelectedSource();
if (sourceDriverName.isEmpty())
- result.settqStatus(i18n("No appropriate migration driver found."),
+ result.setStatus(i18n("No appropriate migration driver found."),
m_migrateManager.possibleProblemsInfoMsg());
}
@@ -724,7 +724,7 @@ KexiMigrate* ImportWizard::prepareImport(Kexi::ObjecttqStatus& result)
sourceDriver = m_migrateManager.driver( sourceDriverName );
if(!sourceDriver || m_migrateManager.error()) {
kdDebug() << "Import migrate driver error..." << endl;
- result.settqStatus(&m_migrateManager);
+ result.setStatus(&m_migrateManager);
}
}
@@ -793,7 +793,7 @@ tristate ImportWizard::import()
{
m_importExecuted = true;
- Kexi::ObjecttqStatus result;
+ Kexi::ObjectStatus result;
KexiMigrate* sourceDriver = prepareImport(result);
bool acceptingNeeded = false;
@@ -802,7 +802,7 @@ tristate ImportWizard::import()
if (sourceDriver && !result.error())
{
if (!m_sourceDBEncoding.isEmpty()) {
- sourceDriver->setPropertyValue( "source_database_nontqunicode_encoding",
+ sourceDriver->setPropertyValue( "source_database_nonunicode_encoding",
TQVariant(m_sourceDBEncoding.upper().replace(' ',"")) // "CP1250", not "cp 1250"
);
}
@@ -820,7 +820,7 @@ tristate ImportWizard::import()
if (KMessageBox::Yes != KMessageBox::warningYesNo(this,
"<qt>"+i18n("Database %1 already exists."
"<p>Do you want to replace it with a new one?")
- .tqarg(sourceDriver->data()->destination->infoString()),
+ .arg(sourceDriver->data()->destination->infoString()),
0, KGuiItem(i18n("&Replace")), KGuiItem(i18n("No"))))
{
return cancelled;
@@ -861,7 +861,7 @@ tristate ImportWizard::import()
setTitle(m_finishPage, i18n("Failure"));
m_finishLbl->setText(
i18n("<p>Import failed.</p>%1<p>%2</p><p>You can click \"Back\" button and try again.</p>")
- .tqarg(msg).tqarg(details));
+ .arg(msg).arg(details));
return false;
}
// delete kexi_conn;
@@ -899,9 +899,9 @@ void ImportWizard::next()
dbname = m_srcConn->selectedConnectionData()
? m_srcConn->selectedConnectionData()->serverInfoString() : TQString();
if (!dbname.isEmpty())
- dbname = TQString(" \"%1\"").tqarg(dbname);
+ dbname = TQString(" \"%1\"").arg(dbname);
KMessageBox::error(this, i18n("Could not import database%1. This type is not supported.")
- .tqarg(dbname));
+ .arg(dbname));
return;
}
}
@@ -922,7 +922,7 @@ void ImportWizard::next()
if (true == res) {
m_finishLbl->setText(
i18n("Database has been imported into Kexi database project \"%1\".")
- .tqarg(m_dstNewDBNameLineEdit->text()) );
+ .arg(m_dstNewDBNameLineEdit->text()) );
cancelButton()->setEnabled(false);
setBackEnabled(m_finishPage, false);
setFinishEnabled(m_finishPage, true);
diff --git a/kexi/migration/importwizard.h b/kexi/migration/importwizard.h
index 8d3a82b0..19a1b844 100644
--- a/kexi/migration/importwizard.h
+++ b/kexi/migration/importwizard.h
@@ -47,7 +47,7 @@ class KexiPrjTypeSelector;
namespace Kexi
{
- class ObjecttqStatus;
+ class ObjectStatus;
}
namespace KexiDB
@@ -98,7 +98,7 @@ private:
void setupImporting();
bool checkUserInput();
- KexiMigrate* prepareImport(Kexi::ObjecttqStatus& result);
+ KexiMigrate* prepareImport(Kexi::ObjectStatus& result);
/*! Performs import. \return true/false on success/faulure
or cancelled when user cancelled importing (mainly
diff --git a/kexi/migration/keximigrate.cpp b/kexi/migration/keximigrate.cpp
index b225f6ba..1c3295b6 100644
--- a/kexi/migration/keximigrate.cpp
+++ b/kexi/migration/keximigrate.cpp
@@ -61,20 +61,20 @@ KexiMigrate::~KexiMigrate()
delete m_destPrj;
}
-bool KexiMigrate::checkIfDestinationDatabaseOverwritingNeedsAccepting(Kexi::ObjecttqStatus* result,
+bool KexiMigrate::checkIfDestinationDatabaseOverwritingNeedsAccepting(Kexi::ObjectStatus* result,
bool& acceptingNeeded)
{
acceptingNeeded = false;
if (result)
- result->cleartqStatus();
+ result->clearStatus();
KexiDB::DriverManager drvManager;
KexiDB::Driver *destDriver = drvManager.driver(
m_migrateData->destination->connectionData()->driverName);
if (!destDriver) {
- result->settqStatus(&drvManager,
+ result->setStatus(&drvManager,
i18n("Could not create database \"%1\".")
- .tqarg(m_migrateData->destination->databaseName()));
+ .arg(m_migrateData->destination->databaseName()));
return false;
}
@@ -113,18 +113,18 @@ bool KexiMigrate::isSourceAndDestinationDataSourceTheSame() const
//=============================================================================
// Perform Import operation
-bool KexiMigrate::performImport(Kexi::ObjecttqStatus* result)
+bool KexiMigrate::performImport(Kexi::ObjectStatus* result)
{
if (result)
- result->cleartqStatus();
+ result->clearStatus();
KexiDB::DriverManager drvManager;
KexiDB::Driver *destDriver = drvManager.driver(
m_migrateData->destination->connectionData()->driverName);
if (!destDriver) {
- result->settqStatus(&drvManager,
+ result->setStatus(&drvManager,
i18n("Could not create database \"%1\".")
- .tqarg(m_migrateData->destination->databaseName()));
+ .arg(m_migrateData->destination->databaseName()));
return false;
}
@@ -135,8 +135,8 @@ bool KexiMigrate::performImport(Kexi::ObjecttqStatus* result)
if (!drv_connect()) {
kdDebug() << "Couldnt connect to database server" << endl;
if (result)
- result->settqStatus(i18n("Could not connect to data source \"%1\".")
- .tqarg(m_migrateData->source->serverInfoString()), "");
+ result->setStatus(i18n("Could not connect to data source \"%1\".")
+ .arg(m_migrateData->source->serverInfoString()), "");
return false;
}
@@ -145,9 +145,9 @@ bool KexiMigrate::performImport(Kexi::ObjecttqStatus* result)
if (!tableNames(tables)) {
kdDebug() << "Couldnt get list of tables" << endl;
if (result)
- result->settqStatus(
+ result->setStatus(
i18n("Could not get a list of table names for data source \"%1\".")
- .tqarg(m_migrateData->source->serverInfoString()), "");
+ .arg(m_migrateData->source->serverInfoString()), "");
return false;
}
@@ -155,9 +155,9 @@ bool KexiMigrate::performImport(Kexi::ObjecttqStatus* result)
if (tables.isEmpty()) {
kdDebug() << "There were no tables to import" << endl;
if (result)
- result->settqStatus(
+ result->setStatus(
i18n("No tables to import found in data source \"%1\".")
- .tqarg(m_migrateData->source->serverInfoString()), "");
+ .arg(m_migrateData->source->serverInfoString()), "");
return false;
}
@@ -165,15 +165,15 @@ bool KexiMigrate::performImport(Kexi::ObjecttqStatus* result)
tables.sort();
m_tableSchemas.clear();
if (!destDriver) {
- result->settqStatus(&drvManager);
+ result->setStatus(&drvManager);
return false;
}
const bool kexi__objects_exists = tables.find("kexi__objects")!=tables.end();
TQStringList kexiDBTables;
if (kexi__objects_exists) {
tristate res = drv_queryStringListFromSQL(
- TQString::tqfromLatin1("SELECT o_name FROM kexi__objects WHERE o_type=%1")
- .tqarg((int)KexiDB::TableObjectType), 0, kexiDBTables, -1);
+ TQString::fromLatin1("SELECT o_name FROM kexi__objects WHERE o_type=%1")
+ .arg((int)KexiDB::TableObjectType), 0, kexiDBTables, -1);
if (res == true) {
// prepend KexiDB-compatible tables to 'tables' list, so we'll copy KexiDB-compatible tables first,
// to make sure existing IDs will not be in conflict with IDs newly generated for non-KexiDB tables
@@ -199,9 +199,9 @@ bool KexiMigrate::performImport(Kexi::ObjecttqStatus* result)
if (!drv_readTableSchema(*it, *tableSchema)) {
delete tableSchema;
if (result)
- result->settqStatus(
+ result->setStatus(
i18n("Could not import project from data source \"%1\". Error reading table \"%2\".")
- .tqarg(m_migrateData->source->serverInfoString()).tqarg(tableName), "");
+ .arg(m_migrateData->source->serverInfoString()).arg(tableName), "");
return false;
}
//yeah, got a table
@@ -228,9 +228,9 @@ bool KexiMigrate::performImport(Kexi::ObjecttqStatus* result)
if (trans.isNull()) {
ok = false;
if (result)
- result->settqStatus(destConn,
+ result->setStatus(destConn,
i18n("Could not create database \"%1\".")
- .tqarg(m_migrateData->destination->databaseName()));
+ .arg(m_migrateData->destination->databaseName()));
//later destConn->dropDatabase(m_migrateData->destination->databaseName());
//don't delete prj, otherwise eror message will be deleted delete prj;
//later return m_destPrj;
@@ -250,7 +250,7 @@ bool KexiMigrate::performImport(Kexi::ObjecttqStatus* result)
bool firstRecord = true;
if (true == drv_fetchRecordFromSQL(
TQString("SELECT o_id, o_type, o_name, o_caption, o_desc FROM kexi__objects "
- "WHERE o_name='%1' AND o_type=%1").tqarg(*it).tqarg((int)KexiDB::TableObjectType),
+ "WHERE o_name='%1' AND o_type=%1").arg(*it).arg((int)KexiDB::TableObjectType),
data, firstRecord)
&& destConn->setupObjectSchemaData( data, *t ))
{
@@ -258,9 +258,9 @@ bool KexiMigrate::performImport(Kexi::ObjecttqStatus* result)
//load schema for every field and add it
firstRecord = true;
TQString sql(
- TQString::tqfromLatin1("SELECT t_id, f_type, f_name, f_length, f_precision, f_constraints, "
+ TQString::fromLatin1("SELECT t_id, f_type, f_name, f_length, f_precision, f_constraints, "
"f_options, f_default, f_order, f_caption, f_help"
- " FROM kexi__fields WHERE t_id=%1 ORDER BY f_order").tqarg(t->id()) );
+ " FROM kexi__fields WHERE t_id=%1 ORDER BY f_order").arg(t->id()) );
while (ok) {
tristate res = drv_fetchRecordFromSQL(sql, data, firstRecord);
if (res != true) {
@@ -299,9 +299,9 @@ bool KexiMigrate::performImport(Kexi::ObjecttqStatus* result)
kdDebug() << "Failed to create a table " << ts->name() << endl;
destConn->debugError();
if (result)
- result->settqStatus(destConn,
+ result->setStatus(destConn,
i18n("Could not create database \"%1\".")
- .tqarg(m_migrateData->destination->databaseName()));
+ .arg(m_migrateData->destination->databaseName()));
m_tableSchemas.remove(ts);
break;
}
@@ -329,9 +329,9 @@ bool KexiMigrate::performImport(Kexi::ObjecttqStatus* result)
if (m_destPrj->error()) {
ok = false;
if (result)
- result->settqStatus(m_destPrj,
+ result->setStatus(m_destPrj,
i18n("Could not import project from data source \"%1\".")
- .tqarg(m_migrateData->source->serverInfoString()));
+ .arg(m_migrateData->source->serverInfoString()));
}
}
@@ -380,8 +380,8 @@ bool KexiMigrate::performImport(Kexi::ObjecttqStatus* result)
if (!ok) {
kdDebug() << "Failed to copy table " << tname << endl;
if (result)
- result->settqStatus(destConn,
- i18n("Could not copy table \"%1\" to destination database.").tqarg(tname));
+ result->setStatus(destConn,
+ i18n("Could not copy table \"%1\" to destination database.").arg(tname));
break;
}
}//for
@@ -404,9 +404,9 @@ bool KexiMigrate::performImport(Kexi::ObjecttqStatus* result)
// Finally: error handling
if (result && result->error())
- result->settqStatus(destConn,
+ result->setStatus(destConn,
i18n("Could not import data from data source \"%1\".")
- .tqarg(m_migrateData->source->serverInfoString()));
+ .arg(m_migrateData->source->serverInfoString()));
if (destConn) {
destConn->debugError();
destConn->rollbackTransaction(trans);
@@ -420,10 +420,10 @@ bool KexiMigrate::performImport(Kexi::ObjecttqStatus* result)
}
//=============================================================================
-bool KexiMigrate::performExport(Kexi::ObjecttqStatus* result)
+bool KexiMigrate::performExport(Kexi::ObjectStatus* result)
{
if (result)
- result->cleartqStatus();
+ result->clearStatus();
//! @todo performExport
@@ -512,7 +512,7 @@ KexiDB::Field::Type KexiMigrate::userType(const TQString& fname)
res = dlg->getItem( i18n("Field Type"),
i18n("The data type for %1 could not be determined. "
"Please select one of the following data "
- "types").tqarg(fname),
+ "types").arg(fname),
types, 0, false);
//! @todo use TQMap<TQCString, KexiDB::Field::Type> here!
@@ -575,9 +575,9 @@ bool KexiMigrate::isValid()
{
setError(ERR_INCOMPAT_DRIVER_VERSION,
i18n("Incompatible migration driver's \"%1\" version: found version %2, expected version %3.")
- .tqarg(name())
- .tqarg(TQString("%1.%2").tqarg(versionMajor()).tqarg(versionMinor()))
- .tqarg(TQString("%1.%2").tqarg(KexiMigration::versionMajor()).tqarg(KexiMigration::versionMinor())));
+ .arg(name())
+ .arg(TQString("%1.%2").arg(versionMajor()).arg(versionMinor()))
+ .arg(TQString("%1.%2").arg(KexiMigration::versionMajor()).arg(KexiMigration::versionMinor())));
return false;
}
return true;
@@ -588,8 +588,8 @@ bool KexiMigrate::drv_queryMaxNumber(const TQString& tableName,
{
TQString string;
tristate r = drv_querySingleStringFromSQL(
- TQString::tqfromLatin1("SELECT MAX(%1) FROM %2").tqarg(drv_escapeIdentifier(columnName))
- .tqarg(drv_escapeIdentifier(tableName)), 0, string);
+ TQString::fromLatin1("SELECT MAX(%1) FROM %2").arg(drv_escapeIdentifier(columnName))
+ .arg(drv_escapeIdentifier(tableName)), 0, string);
if (r == false)
return false;
if (~r) {
diff --git a/kexi/migration/keximigrate.h b/kexi/migration/keximigrate.h
index ee22ded8..cd2949f9 100644
--- a/kexi/migration/keximigrate.h
+++ b/kexi/migration/keximigrate.h
@@ -34,7 +34,7 @@
class KexiProject;
namespace Kexi
{
- class ObjecttqStatus;
+ class ObjectStatus;
}
/*! KexiMigration implementation version.
@@ -99,7 +99,7 @@ class KEXIMIGR_EXPORT KexiMigrate : public TQObject, public KexiDB::Object
\a acceptingNeeded is set to true if destination database exists.
In this case you should ask about accepting database overwriting.
Used in ImportWizard::import(). */
- bool checkIfDestinationDatabaseOverwritingNeedsAccepting(Kexi::ObjecttqStatus* result,
+ bool checkIfDestinationDatabaseOverwritingNeedsAccepting(Kexi::ObjectStatus* result,
bool& acceptingNeeded);
/*! Checks if the source- and the destination databases are identical.
@@ -107,10 +107,10 @@ class KEXIMIGR_EXPORT KexiMigrate : public TQObject, public KexiDB::Object
bool isSourceAndDestinationDataSourceTheSame() const;
//! Perform an import operation
- bool performImport(Kexi::ObjecttqStatus* result = 0);
+ bool performImport(Kexi::ObjectStatus* result = 0);
//! Perform an export operation
- bool performExport(Kexi::ObjecttqStatus* result = 0);
+ bool performExport(Kexi::ObjectStatus* result = 0);
//! Returns true if the migration driver supports progress updates.
inline bool progressSupported() { return drv_progressSupported(); }
diff --git a/kexi/migration/migratemanager.cpp b/kexi/migration/migratemanager.cpp
index 2c0ce6cd..945f084c 100644
--- a/kexi/migration/migratemanager.cpp
+++ b/kexi/migration/migratemanager.cpp
@@ -131,19 +131,19 @@ bool MigrateManagerInternal::lookupDrivers()
<< srv_name.lower() << "' driver's version -- skipping it!" << endl;
possibleProblems += TQString("\"%1\" migration driver has unrecognized version; "
"required driver version is \"%2.%3\"")
- .tqarg(srv_name.lower())
- .tqarg(KexiMigration::versionMajor()).tqarg(KexiMigration::versionMinor());
+ .arg(srv_name.lower())
+ .arg(KexiMigration::versionMajor()).arg(KexiMigration::versionMinor());
continue;
}
if (major_ver != KexiMigration::versionMajor() || minor_ver != KexiMigration::versionMinor()) {
KexiDBWarn << TQString("MigrateManagerInternal::lookupDrivers(): '%1' driver"
" has version '%2' but required migration driver version is '%3.%4'\n"
- " -- skipping this driver!").tqarg(srv_name.lower()).tqarg(srv_ver_str)
- .tqarg(KexiMigration::versionMajor()).tqarg(KexiMigration::versionMinor()) << endl;
+ " -- skipping this driver!").arg(srv_name.lower()).arg(srv_ver_str)
+ .arg(KexiMigration::versionMajor()).arg(KexiMigration::versionMinor()) << endl;
possibleProblems += TQString("\"%1\" migration driver has version \"%2\" "
"but required driver version is \"%3.%4\"")
- .tqarg(srv_name.lower()).tqarg(srv_ver_str)
- .tqarg(KexiMigration::versionMajor()).tqarg(KexiMigration::versionMinor());
+ .arg(srv_name.lower()).arg(srv_ver_str)
+ .arg(KexiMigration::versionMajor()).arg(KexiMigration::versionMinor());
continue;
}
//</COPIED>
@@ -188,7 +188,7 @@ KexiMigrate* MigrateManagerInternal::driver(const TQString& name)
return drv; //cached
if (!m_services_lcase.contains(name.lower())) {
- setError(ERR_DRIVERMANAGER, i18n("Could not find import/export database driver \"%1\".").tqarg(name) );
+ setError(ERR_DRIVERMANAGER, i18n("Could not find import/export database driver \"%1\".").arg(name) );
return 0;
}
@@ -201,7 +201,7 @@ KexiMigrate* MigrateManagerInternal::driver(const TQString& name)
if (!drv) {
setError(ERR_DRIVERMANAGER, i18n("Could not load import/export database driver \"%1\".")
- .tqarg(name) );
+ .arg(name) );
if (m_componentLoadingErrors.isEmpty()) {//fill errtable on demand
m_componentLoadingErrors[KParts::ComponentFactory::ErrNoServiceFound]="ErrNoServiceFound";
m_componentLoadingErrors[KParts::ComponentFactory::ErrServiceProvidesNoLibrary]="ErrServiceProvidesNoLibrary";
@@ -314,7 +314,7 @@ TQString MigrateManager::driverForMimeType(const TQString &mimeType)
KService::Ptr ptr = d_int->m_services_by_mimetype[mimeType.lower()];
if (!ptr) {
- kdDebug() << TQString("MigrateManager::driverForMimeType(%1) No such mimetype").tqarg(mimeType) << endl;
+ kdDebug() << TQString("MigrateManager::driverForMimeType(%1) No such mimetype").arg(mimeType) << endl;
return TQString();
}
@@ -325,7 +325,7 @@ KexiMigrate* MigrateManager::driver(const TQString& name)
{
KexiMigrate *drv = d_int->driver(name);
if (d_int->error()) {
- kdDebug() << TQString("MigrateManager::driver(%1) Error: %2").tqarg(name).tqarg(d_int->errorMsg()) << endl;
+ kdDebug() << TQString("MigrateManager::driver(%1) Error: %2").arg(name).arg(d_int->errorMsg()) << endl;
setError(d_int);
}
return drv;
@@ -363,7 +363,7 @@ TQString MigrateManager::possibleProblemsInfoMsg() const
for (TQStringList::ConstIterator it = d_int->possibleProblems.constBegin();
it!=d_int->possibleProblems.constEnd(); ++it)
{
- str += (TQString::tqfromLatin1("<li>") + *it + TQString::tqfromLatin1("</li>"));
+ str += (TQString::fromLatin1("<li>") + *it + TQString::fromLatin1("</li>"));
}
str += "</ul>";
return str;
diff --git a/kexi/migration/mysql/mysqlmigrate.cpp b/kexi/migration/mysql/mysqlmigrate.cpp
index 1b125d8d..78671241 100644
--- a/kexi/migration/mysql/mysqlmigrate.cpp
+++ b/kexi/migration/mysql/mysqlmigrate.cpp
@@ -396,7 +396,7 @@ KexiDB::Field::Type MySQLMigrate::examineBlobField(const TQString& table,
TQString mysqlType;
KexiDB::Field::Type kexiType;
TQString query = "SHOW COLUMNS FROM `" + drv_escapeIdentifier(table) +
- "` LIKE '" + TQString::tqfromLatin1(fld->name) + "'";
+ "` LIKE '" + TQString::fromLatin1(fld->name) + "'";
if(d->executeSQL(query)) {
MYSQL_RES *res = mysql_store_result(d->mysql);
@@ -444,7 +444,7 @@ TQStringList MySQLMigrate::examineEnumField(const TQString& table,
const MYSQL_FIELD* fld) {
TQString vals;
TQString query = "SHOW COLUMNS FROM `" + drv_escapeIdentifier(table) +
- "` LIKE '" + TQString::tqfromLatin1(fld->name) + "'";
+ "` LIKE '" + TQString::fromLatin1(fld->name) + "'";
if(d->executeSQL(query)) {
MYSQL_RES *res = mysql_store_result(d->mysql);
diff --git a/kexi/migration/pqxx/pqxxmigrate.cpp b/kexi/migration/pqxx/pqxxmigrate.cpp
index d6c655f9..904e0c92 100644
--- a/kexi/migration/pqxx/pqxxmigrate.cpp
+++ b/kexi/migration/pqxx/pqxxmigrate.cpp
@@ -135,7 +135,7 @@ bool PqxxMigrate::drv_tableNames(TQStringList& tableNames)
for (pqxx::result::const_iterator c = m_res->begin(); c != m_res->end(); ++c)
{
// Copy the result into the return list
- tableNames << TQString::tqfromLatin1 (c[0].c_str());
+ tableNames << TQString::fromLatin1 (c[0].c_str());
}
return true;
}
@@ -217,15 +217,15 @@ bool PqxxMigrate::drv_connect()
if (m_migrateData->source->port == 0)
m_migrateData->source->port = 5432;
- conninfo += TQString::tqfromLatin1(" port='%1'").tqarg(m_migrateData->source->port);
+ conninfo += TQString::fromLatin1(" port='%1'").arg(m_migrateData->source->port);
- conninfo += TQString::tqfromLatin1(" dbname='%1'").tqarg(m_migrateData->sourceName);
+ conninfo += TQString::fromLatin1(" dbname='%1'").arg(m_migrateData->sourceName);
if (!m_migrateData->source->userName.isNull())
- conninfo += TQString::tqfromLatin1(" user='%1'").tqarg(m_migrateData->source->userName);
+ conninfo += TQString::fromLatin1(" user='%1'").arg(m_migrateData->source->userName);
if (!m_migrateData->source->password.isNull())
- conninfo += TQString::tqfromLatin1(" password='%1'").tqarg(m_migrateData->source->password);
+ conninfo += TQString::fromLatin1(" password='%1'").arg(m_migrateData->source->password);
try
{
@@ -377,7 +377,7 @@ bool PqxxMigrate::primaryKey(pqxx::oid table_uid, int col) const
try
{
- statement = TQString("SELECT indkey FROM pg_index WHERE ((indisprimary = true) AND (indrelid = %1))").tqarg(table_uid);
+ statement = TQString("SELECT indkey FROM pg_index WHERE ((indisprimary = true) AND (indrelid = %1))").arg(table_uid);
tran = new pqxx::nontransaction(*m_conn, "find_pkey");
tmpres = new pqxx::result(tran->exec(statement.latin1()));
@@ -480,7 +480,7 @@ tristate PqxxMigrate::drv_queryStringListFromSQL(
mysql_free_result(res);
return false;
}
- string = TQString::tqfromLatin1(row[columnNumber], lengths[columnNumber]);
+ string = TQString::fromLatin1(row[columnNumber], lengths[columnNumber]);
mysql_free_result(res);
} else {
kdDebug() << "PqxxMigrate::drv_querySingleStringFromSQL(): null result" << endl;
@@ -569,7 +569,7 @@ bool PqxxMigrate::uniqueKey(pqxx::oid table_uid, int col) const
try
{
- statement = TQString("SELECT indkey FROM pg_index WHERE ((indisunique = true) AND (indrelid = %1))").tqarg(table_uid);
+ statement = TQString("SELECT indkey FROM pg_index WHERE ((indisunique = true) AND (indrelid = %1))").arg(table_uid);
tran = new pqxx::nontransaction(*m_conn, "find_ukey");
tmpres = new pqxx::result(tran->exec(statement.latin1()));
@@ -647,7 +647,7 @@ bool PqxxMigrate::notEmpty(pqxx::oid /*table_uid*/, int /*col*/) const
// Read value of column 0 into a string N
c[0].to(N);
// Copy the result into the return list
- list << TQString::tqfromLatin1 (N.c_str());
+ list << TQString::fromLatin1 (N.c_str());
KexiDBDrvDbg << N.c_str() << endl;
}
return true;