diff options
Diffstat (limited to 'kexi/migration/importwizard.cpp')
-rw-r--r-- | kexi/migration/importwizard.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
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); |