diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kexi/migration/importwizard.cpp | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
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
Diffstat (limited to 'kexi/migration/importwizard.cpp')
-rw-r--r-- | kexi/migration/importwizard.cpp | 204 |
1 files changed, 102 insertions, 102 deletions
diff --git a/kexi/migration/importwizard.cpp b/kexi/migration/importwizard.cpp index dda3d200..4fd7497b 100644 --- a/kexi/migration/importwizard.cpp +++ b/kexi/migration/importwizard.cpp @@ -23,11 +23,11 @@ #include "keximigrate.h" #include "importoptionsdlg.h" -#include <qlabel.h> -#include <qlayout.h> -#include <qvbuttongroup.h> -#include <qradiobutton.h> -#include <qcheckbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqvbuttongroup.h> +#include <tqradiobutton.h> +#include <tqcheckbox.h> #include <kcombobox.h> #include <kmessagebox.h> @@ -58,8 +58,8 @@ using namespace KexiMigration; //=========================================================== // -ImportWizard::ImportWizard(QWidget *parent, QMap<QString,QString>* args) - : KWizard(parent) +ImportWizard::ImportWizard(TQWidget *tqparent, TQMap<TQString,TQString>* args) + : KWizard(tqparent) , m_args(args) { setCaption(i18n("Import Database")); @@ -83,8 +83,8 @@ ImportWizard::ImportWizard(QWidget *parent, QMap<QString,QString>* args) setupImporting(); setupFinish(); - connect(this, SIGNAL(selected(const QString &)), this, SLOT(pageSelected(const QString &))); - connect(this, SIGNAL(helpClicked()), this, SLOT(helpClicked())); + connect(this, TQT_SIGNAL(selected(const TQString &)), this, TQT_SLOT(pageSelected(const TQString &))); + connect(this, TQT_SIGNAL(helpClicked()), this, TQT_SLOT(helpClicked())); if (m_predefinedConnectionData) { // setup wizard for predefined server source @@ -96,7 +96,7 @@ ImportWizard::ImportWizard(QWidget *parent, QMap<QString,QString>* args) // setup wizard for predefined source // (used when external project type was opened in Kexi, e.g. mdb file) // MigrateManager manager; -// QString driverName = manager.driverForMimeType( m_predefinedMimeType ); +// TQString driverName = manager.driverForMimeType( m_predefinedMimeType ); // m_srcTypeCombo->setCurrentText( driverName ); // showPage( m_srcConnPage ); @@ -110,7 +110,7 @@ ImportWizard::ImportWizard(QWidget *parent, QMap<QString,QString>* args) } } - m_sourceDBEncoding = QString::fromLatin1(KGlobal::locale()->encoding()); //default + m_sourceDBEncoding = TQString::tqfromLatin1(KGlobal::locale()->encoding()); //default } //=========================================================== @@ -130,7 +130,7 @@ void ImportWizard::parseArguments() if (!(*m_args)["databaseName"].isEmpty() && !(*m_args)["mimeType"].isEmpty()) { m_predefinedDatabaseName = (*m_args)["databaseName"]; m_predefinedMimeType = (*m_args)["mimeType"]; - if (m_args->contains("connectionData")) { + if (m_args->tqcontains("connectionData")) { m_predefinedConnectionData = new KexiDB::ConnectionData(); KexiDB::fromMap( KexiUtils::deserializeMap((*m_args)["connectionData"]), *m_predefinedConnectionData @@ -144,23 +144,23 @@ void ImportWizard::parseArguments() // void ImportWizard::setupIntro() { - m_introPage = new QWidget(this); - QVBoxLayout *vbox = new QVBoxLayout(m_introPage, KDialog::marginHint()); + m_introPage = new TQWidget(this); + TQVBoxLayout *vbox = new TQVBoxLayout(m_introPage, KDialog::marginHint()); - QLabel *lblIntro = new QLabel(m_introPage); - lblIntro->setAlignment( Qt::AlignTop | Qt::AlignLeft | Qt::WordBreak ); - QString msg; + TQLabel *lblIntro = new TQLabel(m_introPage); + lblIntro->tqsetAlignment( 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>") - .arg(m_predefinedDatabaseName).arg(m_predefinedConnectionData->serverInfoString()); + .tqarg(m_predefinedDatabaseName).tqarg(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>") - .arg(QDir::convertSeparators(m_predefinedDatabaseName)).arg(mimeTypePtr->comment()); + .tqarg(TQDir::convertSeparators(m_predefinedDatabaseName)).tqarg(mimeTypePtr->comment()); } else { msg = i18n("Database Importing wizard allows you to import an existing database " @@ -177,13 +177,13 @@ void ImportWizard::setupIntro() /* void ImportWizard::setupSrcType() { - m_srcTypePage = new QWidget(this); + m_srcTypePage = new TQWidget(this); //! @todo Would be good if KexiDBDriverComboBox worked for migration drivers - QVBoxLayout *vbox = new QVBoxLayout(m_srcTypePage, KDialog::marginHint()); + TQVBoxLayout *vbox = new TQVBoxLayout(m_srcTypePage, KDialog::marginHint()); - QHBoxLayout *hbox = new QHBoxLayout(vbox); - QLabel *lbl = new QLabel(i18n("Source database type:")+" ", m_srcTypePage); + TQHBoxLayout *hbox = new TQHBoxLayout(vbox); + TQLabel *lbl = new TQLabel(i18n("Source database type:")+" ", m_srcTypePage); hbox->addWidget(lbl); m_srcTypeCombo = new KComboBox(m_srcTypePage); @@ -193,7 +193,7 @@ void ImportWizard::setupSrcType() lbl->setBuddy(m_srcTypeCombo); MigrateManager manager; - QStringList names = manager.driverNames(); + TQStringList names = manager.driverNames(); m_srcTypeCombo->insertStringList(names); addPage(m_srcTypePage, i18n("Select Source Database Type")); @@ -203,8 +203,8 @@ void ImportWizard::setupSrcType() // void ImportWizard::setupSrcConn() { - m_srcConnPage = new QWidget(this); - QVBoxLayout *vbox = new QVBoxLayout(m_srcConnPage, KDialog::marginHint()); + m_srcConnPage = new TQWidget(this); + TQVBoxLayout *vbox = new TQVBoxLayout(m_srcConnPage, KDialog::marginHint()); m_srcConn = new KexiConnSelectorWidget(Kexi::connset(), ":ProjectMigrationSourceDir", m_srcConnPage, "m_srcConnSelector"); @@ -212,7 +212,7 @@ void ImportWizard::setupSrcConn() m_srcConn->hideConnectonIcon(); m_srcConn->showSimpleConn(); - QStringList excludedFilters; + TQStringList excludedFilters; //! @todo remove when support for kexi files as source prj is added in migration excludedFilters += KexiDB::Driver::defaultFileBasedDriverMimeType(); excludedFilters += "application/x-kexiproject-shortcut"; @@ -229,7 +229,7 @@ void ImportWizard::setupSrcConn() void ImportWizard::setupSrcDB() { // arrivesrcdbPage creates widgets on that page - m_srcDBPage = new QWidget(this); + m_srcDBPage = new TQWidget(this); m_srcDBName = NULL; addPage(m_srcDBPage, i18n("Select Source Database")); } @@ -238,16 +238,16 @@ void ImportWizard::setupSrcDB() // void ImportWizard::setupDstType() { - m_dstTypePage = new QWidget(this); + m_dstTypePage = new TQWidget(this); KexiDB::DriverManager manager; KexiDB::Driver::InfoMap drvs = manager.driversInfo(); - QVBoxLayout *vbox = new QVBoxLayout(m_dstTypePage, KDialog::marginHint()); + TQVBoxLayout *vbox = new TQVBoxLayout(m_dstTypePage, KDialog::marginHint()); - QHBoxLayout *hbox = new QHBoxLayout(vbox); - QLabel *lbl = new QLabel(i18n("Destination database type:")+" ", m_dstTypePage); - lbl->setAlignment(Qt::AlignAuto|Qt::AlignTop); + TQHBoxLayout *hbox = new TQHBoxLayout(vbox); + TQLabel *lbl = new TQLabel(i18n("Destination database type:")+" ", m_dstTypePage); + lbl->tqsetAlignment(TQt::AlignAuto|TQt::AlignTop); hbox->addWidget(lbl); m_dstPrjTypeSelector = new KexiPrjTypeSelector(m_dstTypePage); @@ -255,7 +255,7 @@ void ImportWizard::setupDstType() m_dstPrjTypeSelector->option_file->setText(i18n("Database project stored in a file")); m_dstPrjTypeSelector->option_server->setText(i18n("Database project stored on a server")); - QVBoxLayout *frame_server_vbox = new QVBoxLayout(m_dstPrjTypeSelector->frame_server, KDialog::spacingHint()); + TQVBoxLayout *frame_server_vbox = new TQVBoxLayout(m_dstPrjTypeSelector->frame_server, KDialog::spacingHint()); m_dstServerTypeCombo = new KexiDBDriverComboBox(m_dstPrjTypeSelector->frame_server, drvs, KexiDBDriverComboBox::ShowServerDrivers); frame_server_vbox->addWidget(m_dstServerTypeCombo); @@ -274,7 +274,7 @@ void ImportWizard::setupDstTitle() { m_dstTitlePage = new KexiDBTitlePage(i18n("Destination project's caption:"), this, "KexiDBTitlePage"); - m_dstTitlePage->layout()->setMargin( KDialog::marginHint() ); + m_dstTitlePage->tqlayout()->setMargin( KDialog::marginHint() ); m_dstTitlePage->updateGeometry(); m_dstNewDBNameLineEdit = m_dstTitlePage->le_caption; addPage(m_dstTitlePage, i18n("Select Destination Database Project's Caption")); @@ -284,18 +284,18 @@ void ImportWizard::setupDstTitle() // void ImportWizard::setupDst() { - m_dstPage = new QWidget(this); - QVBoxLayout *vbox = new QVBoxLayout(m_dstPage, KDialog::marginHint()); + m_dstPage = new TQWidget(this); + TQVBoxLayout *vbox = new TQVBoxLayout(m_dstPage, KDialog::marginHint()); m_dstConn = new KexiConnSelectorWidget(Kexi::connset(), ":ProjectMigrationDestinationDir", m_dstPage, "m_dstConnSelector"); m_dstConn->hideHelpers(); //me: Can't connect m_dstConn->m_fileDlg here, it doesn't exist yet - //connect(this, SLOT(next()), m_dstConn->m_fileDlg, SIGNAL(accepted())); + //connect(this, TQT_SLOT(next()), m_dstConn->m_fileDlg, TQT_SIGNAL(accepted())); vbox->addWidget( m_dstConn ); - connect(m_dstConn,SIGNAL(connectionItemExecuted(ConnectionDataLVItem*)), - this,SLOT(next())); + connect(m_dstConn,TQT_SIGNAL(connectionItemExecuted(ConnectionDataLVItem*)), + this,TQT_SLOT(next())); // m_dstConn->hideHelpers(); m_dstConn->showSimpleConn(); @@ -317,14 +317,14 @@ void ImportWizard::setupDst() // void ImportWizard::setupImportType() { - m_importTypePage = new QWidget(this); - QVBoxLayout *vbox = new QVBoxLayout(m_importTypePage, KDialog::marginHint()); - m_importTypeButtonGroup = new QVButtonGroup(m_importTypePage); + m_importTypePage = new TQWidget(this); + TQVBoxLayout *vbox = new TQVBoxLayout(m_importTypePage, KDialog::marginHint()); + m_importTypeButtonGroup = new TQVButtonGroup(m_importTypePage); m_importTypeButtonGroup->setLineWidth(0); vbox->addWidget( m_importTypeButtonGroup ); - (void)new QRadioButton(i18n("Structure and data"), m_importTypeButtonGroup); - (void)new QRadioButton(i18n("Structure only"), m_importTypeButtonGroup); + (void)new TQRadioButton(i18n("Structure and data"), m_importTypeButtonGroup); + (void)new TQRadioButton(i18n("Structure only"), m_importTypeButtonGroup); m_importTypeButtonGroup->setExclusive( true ); m_importTypeButtonGroup->setButton( 0 ); @@ -335,14 +335,14 @@ void ImportWizard::setupImportType() // void ImportWizard::setupImporting() { - m_importingPage = new QWidget(this); + m_importingPage = new TQWidget(this); m_importingPage->hide(); - QVBoxLayout *vbox = new QVBoxLayout(m_importingPage, KDialog::marginHint()); - m_lblImportingTxt = new QLabel(m_importingPage); - m_lblImportingTxt->setAlignment( Qt::AlignTop | Qt::AlignLeft | Qt::WordBreak ); + TQVBoxLayout *vbox = new TQVBoxLayout(m_importingPage, KDialog::marginHint()); + m_lblImportingTxt = new TQLabel(m_importingPage); + m_lblImportingTxt->tqsetAlignment( TQt::AlignTop | TQt::AlignLeft | TQt::WordBreak ); - m_lblImportingErrTxt = new QLabel(m_importingPage); - m_lblImportingErrTxt->setAlignment( Qt::AlignTop | Qt::AlignLeft | Qt::WordBreak ); + m_lblImportingErrTxt = new TQLabel(m_importingPage); + m_lblImportingErrTxt->tqsetAlignment( TQt::AlignTop | TQt::AlignLeft | TQt::WordBreak ); m_progressBar = new KProgress(100, m_importingPage); m_progressBar->hide(); @@ -353,7 +353,7 @@ void ImportWizard::setupImporting() KButtonBox *optionsBox = new KButtonBox(m_importingPage); vbox->addWidget( optionsBox ); - m_importOptionsButton = optionsBox->addButton(i18n("Advanced Options"), this, SLOT(slotOptionsButtonClicked())); + m_importOptionsButton = optionsBox->addButton(i18n("Advanced Options"), TQT_TQOBJECT(this), TQT_SLOT(slotOptionsButtonClicked())); m_importOptionsButton->setIconSet(SmallIconSet("configure")); optionsBox->addStretch(1); @@ -370,14 +370,14 @@ void ImportWizard::setupImporting() // void ImportWizard::setupFinish() { - m_finishPage = new QWidget(this); + m_finishPage = new TQWidget(this); m_finishPage->hide(); - QVBoxLayout *vbox = new QVBoxLayout(m_finishPage, KDialog::marginHint()); - m_finishLbl = new QLabel(m_finishPage); - m_finishLbl->setAlignment( Qt::AlignTop | Qt::AlignLeft | Qt::WordBreak ); + TQVBoxLayout *vbox = new TQVBoxLayout(m_finishPage, KDialog::marginHint()); + m_finishLbl = new TQLabel(m_finishPage); + m_finishLbl->tqsetAlignment( TQt::AlignTop | TQt::AlignLeft | TQt::WordBreak ); vbox->addWidget( m_finishLbl ); - m_openImportedProjectCheckBox = new QCheckBox(i18n("Open imported project"), + m_openImportedProjectCheckBox = new TQCheckBox(i18n("Open imported project"), m_finishPage, "openImportedProjectCheckBox"); m_openImportedProjectCheckBox->setChecked(true); vbox->addSpacing( KDialog::spacingHint() ); @@ -391,14 +391,14 @@ void ImportWizard::setupFinish() // bool ImportWizard::checkUserInput() { - QString finishtxt; + TQString finishtxt; if (m_dstNewDBNameLineEdit->text().isEmpty()) { finishtxt = finishtxt + "<br>" + i18n("No new database name was entered."); } - Kexi::ObjectStatus result; + Kexi::ObjecttqStatus result; KexiMigrate* sourceDriver = prepareImport(result); if (sourceDriver && sourceDriver->isSourceAndDestinationDataSourceTheSame()) { @@ -427,17 +427,17 @@ void ImportWizard::arriveSrcConnPage() in addition to just "open" */ if (m_setupFileBasedSrcNeeded) { m_setupFileBasedSrcNeeded = false; - QStringList additionalMimeTypes; + TQStringList additionalMimeTypes; /* moved - if (m_srcTypeCombo->currentText().contains("Access")) { + if (m_srcTypeCombo->currentText().tqcontains("Access")) { //! @todo tmp: hardcoded! additionalMimeTypes << "application/x-msaccess"; }*/ m_srcConn->m_fileDlg->setMode(KexiStartupFileDialog::Opening); m_srcConn->m_fileDlg->setAdditionalFilters(additionalMimeTypes); -/*moved if (m_srcTypeCombo->currentText().contains("Access")) { +/*moved if (m_srcTypeCombo->currentText().tqcontains("Access")) { //! @todo tmp: hardcoded! - #ifdef Q_WS_WIN + #ifdef TQ_WS_WIN m_srcConn->m_fileDlg->setSelectedFilter("*.mdb"); #else m_srcConn->m_fileDlg->setFilter("*.mdb"); @@ -445,7 +445,7 @@ void ImportWizard::arriveSrcConnPage() }*/ //m_srcConn->m_file->label->hide(); //m_srcConn->m_file->btn_advanced->hide(); - //m_srcConn->m_file->label->parentWidget()->hide(); + //m_srcConn->m_file->label->tqparentWidget()->hide(); } // } else { // m_srcConn->showAdvancedConn(); @@ -467,7 +467,7 @@ void ImportWizard::arriveSrcDBPage() KexiDB::ConnectionData* condata = m_srcConn->selectedConnectionData(); if(condata) { m_prjSet = new KexiProjectSet(*condata); - QVBoxLayout *vbox = new QVBoxLayout(m_srcDBPage, KDialog::marginHint()); + TQVBoxLayout *vbox = new TQVBoxLayout(m_srcDBPage, KDialog::marginHint()); m_srcDBName = new KexiProjectSelectorWidget(m_srcDBPage, "KexiMigrationProjectSelector", m_prjSet); vbox->addWidget( m_srcDBName ); @@ -480,8 +480,8 @@ void ImportWizard::arriveSrcDBPage() void ImportWizard::arriveDstTitlePage() { if(fileBasedSrcSelected()) { - QString suggestedDBName( QFileInfo(m_srcConn->selectedFileName()).fileName() ); - const QFileInfo fi( suggestedDBName ); + TQString suggestedDBName( TQFileInfo(m_srcConn->selectedFileName()).fileName() ); + const TQFileInfo fi( suggestedDBName ); suggestedDBName = suggestedDBName.left(suggestedDBName.length() - (fi.extension().length() ? (fi.extension().length()+1) : 0)); m_dstNewDBNameLineEdit->setText( suggestedDBName ); @@ -551,11 +551,11 @@ void ImportWizard::arriveImportingPage() { //! and KexiMigration::Driver classes bool showOptions = false; if (fileBasedSrcSelected()) { - Kexi::ObjectStatus result; + Kexi::ObjecttqStatus result; KexiMigrate* sourceDriver = prepareImport(result); if (sourceDriver) { showOptions = !result.error() - && sourceDriver->propertyValue( "source_database_has_nonunicode_encoding" ).toBool(); + && sourceDriver->propertyValue( "source_database_has_nontqunicode_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.arg(m_dstNewDBNameLineEdit->text()) ); +// m_finishLbl->setText( m_successText.tqarg(m_dstNewDBNameLineEdit->text()) ); } bool ImportWizard::fileBasedSrcSelected() const @@ -586,7 +586,7 @@ bool ImportWizard::fileBasedSrcSelected() const bool ImportWizard::fileBasedDstSelected() const { -// QString dstType(m_dstServerTypeCombo->currentText()); +// TQString dstType(m_dstServerTypeCombo->currentText()); return m_dstPrjTypeSelector->buttonGroup->selectedId() == 1; @@ -605,7 +605,7 @@ void ImportWizard::progressUpdated(int percent) { //=========================================================== // -QString ImportWizard::driverNameForSelectedSource() +TQString ImportWizard::driverNameForSelectedSource() { if (fileBasedSrcSelected()) { KMimeType::Ptr ptr = KMimeType::findByFileContent( m_srcConn->selectedFileName() ); @@ -613,7 +613,7 @@ QString ImportWizard::driverNameForSelectedSource() //try by URL: ptr = KMimeType::findByURL( m_srcConn->selectedFileName() ); } - return ptr ? m_migrateManager.driverForMimeType( ptr.data()->name() ) : QString::null; + return ptr ? m_migrateManager.driverForMimeType( ptr.data()->name() ) : TQString(); } //server-based @@ -622,7 +622,7 @@ QString ImportWizard::driverNameForSelectedSource() } return m_srcConn->selectedConnectionData() - ? m_srcConn->selectedConnectionData()->driverName : QString::null; + ? m_srcConn->selectedConnectionData()->driverName : TQString(); } //=========================================================== @@ -639,7 +639,7 @@ void ImportWizard::accept() // cancelButton()->setEnabled(true); */ if (m_args) { - if ((!fileBasedDstSelected() && !m_args->contains("destinationConnectionShortcut")) + if ((!fileBasedDstSelected() && !m_args->tqcontains("destinationConnectionShortcut")) || !m_openImportedProjectCheckBox->isChecked()) { //do not open dest db if used didn't want it @@ -650,7 +650,7 @@ void ImportWizard::accept() KWizard::accept(); } -KexiMigrate* ImportWizard::prepareImport(Kexi::ObjectStatus& result) +KexiMigrate* ImportWizard::prepareImport(Kexi::ObjecttqStatus& result) { KexiUtils::WaitCursor wait; @@ -667,16 +667,16 @@ KexiMigrate* ImportWizard::prepareImport(Kexi::ObjectStatus& result) ); if (!destDriver || manager.error()) { - result.setStatus(&manager); + result.settqStatus(&manager); kdDebug() << "Manager error..." << endl; manager.debugError(); -// result.setStatus(&manager); +// result.settqStatus(&manager); } // Set up destination connection data KexiDB::ConnectionData *cdata; bool cdataOwned = false; - QString dbname; + TQString dbname; if (!result.error()) { if (m_dstConn->selectedConnectionData()) @@ -702,18 +702,18 @@ KexiMigrate* ImportWizard::prepareImport(Kexi::ObjectStatus& result) { //TODO This needs a better message //KMessageBox::error(this, - result.setStatus(i18n("No connection data is available. You did not select a destination filename."),""); + result.settqStatus(i18n("No connection data is available. You did not select a destination filename."),""); //return false; } */ } // Find a source (migration) driver name - QString sourceDriverName; + TQString sourceDriverName; if (!result.error()) { sourceDriverName = driverNameForSelectedSource(); if (sourceDriverName.isEmpty()) - result.setStatus(i18n("No appropriate migration driver found."), + result.settqStatus(i18n("No appropriate migration driver found."), m_migrateManager.possibleProblemsInfoMsg()); } @@ -724,7 +724,7 @@ KexiMigrate* ImportWizard::prepareImport(Kexi::ObjectStatus& result) sourceDriver = m_migrateManager.driver( sourceDriverName ); if(!sourceDriver || m_migrateManager.error()) { kdDebug() << "Import migrate driver error..." << endl; - result.setStatus(&m_migrateManager); + result.settqStatus(&m_migrateManager); } } @@ -736,10 +736,10 @@ KexiMigrate* ImportWizard::prepareImport(Kexi::ObjectStatus& result) // Setup progress feedback for the GUI if(sourceDriver->progressSupported()) { m_progressBar->updateGeometry(); - disconnect(sourceDriver, SIGNAL(progressPercent(int)), - this, SLOT(progressUpdated(int))); - connect(sourceDriver, SIGNAL(progressPercent(int)), - this, SLOT(progressUpdated(int))); + disconnect(sourceDriver, TQT_SIGNAL(progressPercent(int)), + this, TQT_SLOT(progressUpdated(int))); + connect(sourceDriver, TQT_SIGNAL(progressPercent(int)), + this, TQT_SLOT(progressUpdated(int))); progressUpdated(0); } @@ -793,7 +793,7 @@ tristate ImportWizard::import() { m_importExecuted = true; - Kexi::ObjectStatus result; + Kexi::ObjecttqStatus result; KexiMigrate* sourceDriver = prepareImport(result); bool acceptingNeeded = false; @@ -802,8 +802,8 @@ tristate ImportWizard::import() if (sourceDriver && !result.error()) { if (!m_sourceDBEncoding.isEmpty()) { - sourceDriver->setPropertyValue( "source_database_nonunicode_encoding", - QVariant(m_sourceDBEncoding.upper().replace(' ',"")) // "CP1250", not "cp 1250" + sourceDriver->setPropertyValue( "source_database_nontqunicode_encoding", + TQVariant(m_sourceDBEncoding.upper().tqreplace(' ',"")) // "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?") - .arg(sourceDriver->data()->destination->infoString()), + .tqarg(sourceDriver->data()->destination->infoString()), 0, KGuiItem(i18n("&Replace")), KGuiItem(i18n("No")))) { return cancelled; @@ -838,7 +838,7 @@ tristate ImportWizard::import() m_args->insert("destinationDatabaseName", sourceDriver->data()->destination->databaseName()); // } - QString destinationConnectionShortcut( + TQString destinationConnectionShortcut( Kexi::connset().fileNameForConnectionData( m_dstConn->selectedConnectionData() ) ); if (!destinationConnectionShortcut.isEmpty()) { m_args->insert("destinationConnectionShortcut", destinationConnectionShortcut); @@ -853,7 +853,7 @@ tristate ImportWizard::import() m_progressBar->setProgress(0); m_progressBar->hide(); - QString msg, details; + TQString msg, details; KexiTextMessageHandler handler(msg, details); handler.showErrorMessage(&result); @@ -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>") - .arg(msg).arg(details)); + .tqarg(msg).tqarg(details)); return false; } // delete kexi_conn; @@ -879,7 +879,7 @@ void ImportWizard::next() { if (currentPage() == m_srcConnPage) { if (fileBasedSrcSelected() - && /*! @todo use KURL? */!QFileInfo(m_srcConn->selectedFileName()).isFile()) { + && /*! @todo use KURL? */!TQFileInfo(m_srcConn->selectedFileName()).isFile()) { KMessageBox::sorry(this,i18n("Select source database filename.")); return; @@ -892,16 +892,16 @@ void ImportWizard::next() KexiMigrate* import = m_migrateManager.driver( driverNameForSelectedSource() ); if(!import || m_migrateManager.error()) { - QString dbname; + TQString dbname; if (fileBasedSrcSelected()) dbname = m_srcConn->selectedFileName(); else dbname = m_srcConn->selectedConnectionData() - ? m_srcConn->selectedConnectionData()->serverInfoString() : QString::null; + ? m_srcConn->selectedConnectionData()->serverInfoString() : TQString(); if (!dbname.isEmpty()) - dbname = QString(" \"%1\"").arg(dbname); + dbname = TQString(" \"%1\"").tqarg(dbname); KMessageBox::error(this, i18n("Could not import database%1. This type is not supported.") - .arg(dbname)); + .tqarg(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\".") - .arg(m_dstNewDBNameLineEdit->text()) ); + .tqarg(m_dstNewDBNameLineEdit->text()) ); cancelButton()->setEnabled(false); setBackEnabled(m_finishPage, false); setFinishEnabled(m_finishPage, true); @@ -957,7 +957,7 @@ void ImportWizard::back() KWizard::back(); } -void ImportWizard::pageSelected(const QString &) +void ImportWizard::pageSelected(const TQString &) { if (currentPage() == m_introPage) { } @@ -1020,7 +1020,7 @@ void ImportWizard::helpClicked() void ImportWizard::slotOptionsButtonClicked() { OptionsDialog dlg(m_srcConn->selectedFileName(), m_sourceDBEncoding, this); - if (QDialog::Accepted != dlg.exec()) + if (TQDialog::Accepted != dlg.exec()) return; if (m_sourceDBEncoding != dlg.encodingComboBox()->selectedEncoding()) { |