diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-19 11:38:41 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-19 11:38:41 -0600 |
commit | f0de9e167e289ab7dc33e57f077c1f04ec7c68c8 (patch) | |
tree | 1fc538e179833e62caec21956bfe47a252be5a72 /kexi/migration | |
parent | 11191ef0b9908604d1d7aaca382b011ef22c454c (diff) | |
download | koffice-f0de9e167e289ab7dc33e57f077c1f04ec7c68c8.tar.gz koffice-f0de9e167e289ab7dc33e57f077c1f04ec7c68c8.zip |
Remove additional unneeded tq method conversions
Diffstat (limited to 'kexi/migration')
-rw-r--r-- | kexi/migration/importoptionsdlg.cpp | 2 | ||||
-rw-r--r-- | kexi/migration/importwizard.cpp | 16 | ||||
-rw-r--r-- | kexi/migration/keximigrate.cpp | 40 | ||||
-rw-r--r-- | kexi/migration/migratemanager.cpp | 20 | ||||
-rw-r--r-- | kexi/migration/pqxx/pqxxmigrate.cpp | 12 |
5 files changed, 45 insertions, 45 deletions
diff --git a/kexi/migration/importoptionsdlg.cpp b/kexi/migration/importoptionsdlg.cpp index e89d0932..24e9707e 100644 --- a/kexi/migration/importoptionsdlg.cpp +++ b/kexi/migration/importoptionsdlg.cpp @@ -60,7 +60,7 @@ OptionsDialog::OptionsDialog( const TQString& databaseFile, const TQString& sele "<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()); + .arg(TQDir::convertSeparators(databaseFile)), plainPage()); lbl->setAlignment( TQt::AlignAuto | TQt::WordBreak ); lbl->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed); lyr->addMultiCellWidget( lbl, 0, 0, 0, 2 ); diff --git a/kexi/migration/importwizard.cpp b/kexi/migration/importwizard.cpp index 91de5f7f..6d42da24 100644 --- a/kexi/migration/importwizard.cpp +++ b/kexi/migration/importwizard.cpp @@ -153,14 +153,14 @@ void ImportWizard::setupIntro() 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 " @@ -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 @@ -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/keximigrate.cpp b/kexi/migration/keximigrate.cpp index 7b4944f2..1c3295b6 100644 --- a/kexi/migration/keximigrate.cpp +++ b/kexi/migration/keximigrate.cpp @@ -74,7 +74,7 @@ bool KexiMigrate::checkIfDestinationDatabaseOverwritingNeedsAccepting(Kexi::Obje if (!destDriver) { result->setStatus(&drvManager, i18n("Could not create database \"%1\".") - .tqarg(m_migrateData->destination->databaseName())); + .arg(m_migrateData->destination->databaseName())); return false; } @@ -124,7 +124,7 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result) if (!destDriver) { result->setStatus(&drvManager, i18n("Could not create database \"%1\".") - .tqarg(m_migrateData->destination->databaseName())); + .arg(m_migrateData->destination->databaseName())); return false; } @@ -136,7 +136,7 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result) kdDebug() << "Couldnt connect to database server" << endl; if (result) result->setStatus(i18n("Could not connect to data source \"%1\".") - .tqarg(m_migrateData->source->serverInfoString()), ""); + .arg(m_migrateData->source->serverInfoString()), ""); return false; } @@ -147,7 +147,7 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result) if (result) 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; } @@ -157,7 +157,7 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result) if (result) result->setStatus( i18n("No tables to import found in data source \"%1\".") - .tqarg(m_migrateData->source->serverInfoString()), ""); + .arg(m_migrateData->source->serverInfoString()), ""); return false; } @@ -173,7 +173,7 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result) if (kexi__objects_exists) { tristate res = drv_queryStringListFromSQL( TQString::fromLatin1("SELECT o_name FROM kexi__objects WHERE o_type=%1") - .tqarg((int)KexiDB::TableObjectType), 0, kexiDBTables, -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 @@ -201,7 +201,7 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result) if (result) 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 @@ -230,7 +230,7 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result) if (result) 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::ObjectStatus* 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 )) { @@ -260,7 +260,7 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result) TQString sql( 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) { @@ -301,7 +301,7 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result) if (result) result->setStatus(destConn, i18n("Could not create database \"%1\".") - .tqarg(m_migrateData->destination->databaseName())); + .arg(m_migrateData->destination->databaseName())); m_tableSchemas.remove(ts); break; } @@ -331,7 +331,7 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result) if (result) result->setStatus(m_destPrj, i18n("Could not import project from data source \"%1\".") - .tqarg(m_migrateData->source->serverInfoString())); + .arg(m_migrateData->source->serverInfoString())); } } @@ -381,7 +381,7 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result) kdDebug() << "Failed to copy table " << tname << endl; if (result) result->setStatus(destConn, - i18n("Could not copy table \"%1\" to destination database.").tqarg(tname)); + i18n("Could not copy table \"%1\" to destination database.").arg(tname)); break; } }//for @@ -406,7 +406,7 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result) if (result && result->error()) 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); @@ -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::fromLatin1("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/migratemanager.cpp b/kexi/migration/migratemanager.cpp index d46b9e4d..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; diff --git a/kexi/migration/pqxx/pqxxmigrate.cpp b/kexi/migration/pqxx/pqxxmigrate.cpp index b7f04351..904e0c92 100644 --- a/kexi/migration/pqxx/pqxxmigrate.cpp +++ b/kexi/migration/pqxx/pqxxmigrate.cpp @@ -217,15 +217,15 @@ bool PqxxMigrate::drv_connect() if (m_migrateData->source->port == 0) m_migrateData->source->port = 5432; - conninfo += TQString::fromLatin1(" port='%1'").tqarg(m_migrateData->source->port); + conninfo += TQString::fromLatin1(" port='%1'").arg(m_migrateData->source->port); - conninfo += TQString::fromLatin1(" dbname='%1'").tqarg(m_migrateData->sourceName); + conninfo += TQString::fromLatin1(" dbname='%1'").arg(m_migrateData->sourceName); if (!m_migrateData->source->userName.isNull()) - conninfo += TQString::fromLatin1(" 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::fromLatin1(" 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())); @@ -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())); |