diff options
Diffstat (limited to 'kexi')
-rw-r--r-- | kexi/3rdparty/kexisql/src/btree.c | 28 | ||||
-rw-r--r-- | kexi/3rdparty/kexisql3/src/btree.c | 38 | ||||
-rw-r--r-- | kexi/core/kexipartmanager.cpp | 20 | ||||
-rw-r--r-- | kexi/examples/Simple_Database.kexi | bin | 0 -> 76800 bytes | |||
-rw-r--r-- | kexi/main/keximainwindowimpl.cpp | 10 | ||||
-rw-r--r-- | kexi/migration/importwizard.cpp | 56 | ||||
-rw-r--r-- | kexi/plugins/macros/tests/komacrotestgui.cpp | 2 |
7 files changed, 81 insertions, 73 deletions
diff --git a/kexi/3rdparty/kexisql/src/btree.c b/kexi/3rdparty/kexisql/src/btree.c index 02e01249f..862f2742a 100644 --- a/kexi/3rdparty/kexisql/src/btree.c +++ b/kexi/3rdparty/kexisql/src/btree.c @@ -3169,7 +3169,7 @@ struct IntegrityCk { /* ** Append a message to the error message string. */ -static void checkAppendMsg(IntegrityCk *pCheck, char *zMsg1, char *zMsg2){ +static void chectdeAppendMsg(IntegrityCk *pCheck, char *zMsg1, char *zMsg2){ if( pCheck->zErrMsg ){ char *zOld = pCheck->zErrMsg; pCheck->zErrMsg = 0; @@ -3193,13 +3193,13 @@ static int checkRef(IntegrityCk *pCheck, int iPage, char *zContext){ if( iPage>pCheck->nPage || iPage<0 ){ char zBuf[100]; sprintf(zBuf, "invalid page number %d", iPage); - checkAppendMsg(pCheck, zContext, zBuf); + chectdeAppendMsg(pCheck, zContext, zBuf); return 1; } if( pCheck->anRef[iPage]==1 ){ char zBuf[100]; sprintf(zBuf, "2nd reference to page %d", iPage); - checkAppendMsg(pCheck, zContext, zBuf); + chectdeAppendMsg(pCheck, zContext, zBuf); return 1; } return (pCheck->anRef[iPage]++)>1; @@ -3222,13 +3222,13 @@ static void checkList( OverflowPage *pOvfl; if( iPage<1 ){ sprintf(zMsg, "%d pages missing from overflow list", N+1); - checkAppendMsg(pCheck, zContext, zMsg); + chectdeAppendMsg(pCheck, zContext, zMsg); break; } if( checkRef(pCheck, iPage, zContext) ) break; if( sqlitepager_get(pCheck->pPager, (Pgno)iPage, (void**)&pOvfl) ){ sprintf(zMsg, "failed to get page %d", iPage); - checkAppendMsg(pCheck, zContext, zMsg); + chectdeAppendMsg(pCheck, zContext, zMsg); break; } if( isFreeList ){ @@ -3307,12 +3307,12 @@ static int checkTreePage( sprintf(zContext, "On tree page %d: ", iPage); if( (rc = sqlitepager_get(pCheck->pPager, (Pgno)iPage, (void**)&pPage))!=0 ){ sprintf(zMsg, "unable to get the page. error code=%d", rc); - checkAppendMsg(pCheck, zContext, zMsg); + chectdeAppendMsg(pCheck, zContext, zMsg); return 0; } if( (rc = initPage(pBt, pPage, (Pgno)iPage, pParent))!=0 ){ sprintf(zMsg, "initPage() returns error code %d", rc); - checkAppendMsg(pCheck, zContext, zMsg); + chectdeAppendMsg(pCheck, zContext, zMsg); sqlitepager_unref(pPage); return 0; } @@ -3349,7 +3349,7 @@ static int checkTreePage( zKey2 = sqliteMallocRaw( nKey2+1 ); getPayload(&cur, 0, nKey2, zKey2); if( zKey1 && keyCompare(zKey1, nKey1, zKey2, nKey2)>=0 ){ - checkAppendMsg(pCheck, zContext, "Key is out of order"); + chectdeAppendMsg(pCheck, zContext, "Key is out of order"); } /* Check sanity of left child page. @@ -3357,7 +3357,7 @@ static int checkTreePage( pgno = SWAB32(pBt, pCell->h.leftChild); d2 = checkTreePage(pCheck, pgno, pPage, zContext, zKey1,nKey1,zKey2,nKey2); if( i>0 && d2!=depth ){ - checkAppendMsg(pCheck, zContext, "Child page depth differs"); + chectdeAppendMsg(pCheck, zContext, "Child page depth differs"); } depth = d2; sqliteFree(zKey1); @@ -3388,11 +3388,11 @@ static int checkTreePage( for(i=0; i<SQLITE_USABLE_SIZE; i++){ if( hit[i]==0 ){ sprintf(zMsg, "Unused space at byte %d of page %d", i, iPage); - checkAppendMsg(pCheck, zMsg, 0); + chectdeAppendMsg(pCheck, zMsg, 0); break; }else if( hit[i]>1 ){ sprintf(zMsg, "Multiple uses for byte %d of page %d", i, iPage); - checkAppendMsg(pCheck, zMsg, 0); + chectdeAppendMsg(pCheck, zMsg, 0); break; } } @@ -3403,7 +3403,7 @@ static int checkTreePage( if( pParent && pParent->nCell>2 && pPage->nFree>3*SQLITE_USABLE_SIZE/4 ){ sprintf(zMsg, "free space (%d) greater than max (%d)", pPage->nFree, SQLITE_USABLE_SIZE/3); - checkAppendMsg(pCheck, zContext, zMsg); + chectdeAppendMsg(pCheck, zContext, zMsg); } #endif @@ -3460,7 +3460,7 @@ char *fileBtreeIntegrityCheck(Btree *pBt, int *aRoot, int nRoot){ if( sCheck.anRef[i]==0 ){ char zBuf[100]; sprintf(zBuf, "Page %d is never used", i); - checkAppendMsg(&sCheck, zBuf, 0); + chectdeAppendMsg(&sCheck, zBuf, 0); } } @@ -3473,7 +3473,7 @@ char *fileBtreeIntegrityCheck(Btree *pBt, int *aRoot, int nRoot){ "Outstanding page count goes from %d to %d during this analysis", nRef, *sqlitepager_stats(pBt->pPager) ); - checkAppendMsg(&sCheck, zBuf, 0); + chectdeAppendMsg(&sCheck, zBuf, 0); } /* Clean up and report errors. diff --git a/kexi/3rdparty/kexisql3/src/btree.c b/kexi/3rdparty/kexisql3/src/btree.c index 472d63a60..5b82e4287 100644 --- a/kexi/3rdparty/kexisql3/src/btree.c +++ b/kexi/3rdparty/kexisql3/src/btree.c @@ -5297,7 +5297,7 @@ struct IntegrityCk { /* ** Append a message to the error message string. */ -static void checkAppendMsg( +static void chectdeAppendMsg( IntegrityCk *pCheck, char *zMsg1, const char *zFormat, @@ -5333,11 +5333,11 @@ static void checkAppendMsg( static int checkRef(IntegrityCk *pCheck, int iPage, char *zContext){ if( iPage==0 ) return 1; if( iPage>pCheck->nPage || iPage<0 ){ - checkAppendMsg(pCheck, zContext, "invalid page number %d", iPage); + chectdeAppendMsg(pCheck, zContext, "invalid page number %d", iPage); return 1; } if( pCheck->anRef[iPage]==1 ){ - checkAppendMsg(pCheck, zContext, "2nd reference to page %d", iPage); + chectdeAppendMsg(pCheck, zContext, "2nd reference to page %d", iPage); return 1; } return (pCheck->anRef[iPage]++)>1; @@ -5362,12 +5362,12 @@ static void checkPtrmap( rc = ptrmapGet(pCheck->pBt, iChild, &ePtrmapType, &iPtrmapParent); if( rc!=SQLITE_OK ){ - checkAppendMsg(pCheck, zContext, "Failed to read ptrmap key=%d", iChild); + chectdeAppendMsg(pCheck, zContext, "Failed to read ptrmap key=%d", iChild); return; } if( ePtrmapType!=eType || iPtrmapParent!=iParent ){ - checkAppendMsg(pCheck, zContext, + chectdeAppendMsg(pCheck, zContext, "Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)", iChild, eType, iParent, ePtrmapType, iPtrmapParent); } @@ -5391,14 +5391,14 @@ static void checkList( while( N-- > 0 ){ unsigned char *pOvfl; if( iPage<1 ){ - checkAppendMsg(pCheck, zContext, + chectdeAppendMsg(pCheck, zContext, "%d of %d pages missing from overflow list starting at %d", N+1, expected, iFirst); break; } if( checkRef(pCheck, iPage, zContext) ) break; if( sqlite3pager_get(pCheck->pPager, (Pgno)iPage, (void**)&pOvfl) ){ - checkAppendMsg(pCheck, zContext, "failed to get page %d", iPage); + chectdeAppendMsg(pCheck, zContext, "failed to get page %d", iPage); break; } if( isFreeList ){ @@ -5409,7 +5409,7 @@ static void checkList( } #endif if( n>pCheck->pBt->usableSize/4-8 ){ - checkAppendMsg(pCheck, zContext, + chectdeAppendMsg(pCheck, zContext, "freelist leaf count too big on page %d", iPage); N--; }else{ @@ -5492,12 +5492,12 @@ static int checkTreePage( if( iPage==0 ) return 0; if( checkRef(pCheck, iPage, zParentContext) ) return 0; if( (rc = getPage(pBt, (Pgno)iPage, &pPage))!=0 ){ - checkAppendMsg(pCheck, zContext, + chectdeAppendMsg(pCheck, zContext, "unable to get the page. error code=%d", rc); return 0; } if( (rc = initPage(pPage, pParent))!=0 ){ - checkAppendMsg(pCheck, zContext, "initPage() returns error code %d", rc); + chectdeAppendMsg(pCheck, zContext, "initPage() returns error code %d", rc); releasePage(pPage); return 0; } @@ -5540,7 +5540,7 @@ static int checkTreePage( #endif d2 = checkTreePage(pCheck,pgno,pPage,zContext,0,0,0,0); if( i>0 && d2!=depth ){ - checkAppendMsg(pCheck, zContext, "Child page depth differs"); + chectdeAppendMsg(pCheck, zContext, "Child page depth differs"); } depth = d2; } @@ -5570,7 +5570,7 @@ static int checkTreePage( int size = cellSizePtr(pPage, &data[pc]); int j; if( (pc+size-1)>=usableSize || pc<0 ){ - checkAppendMsg(pCheck, 0, + chectdeAppendMsg(pCheck, 0, "Corruption detected in cell %d on page %d",i,iPage,0); }else{ for(j=pc+size-1; j>=pc; j--) hit[j]++; @@ -5581,7 +5581,7 @@ static int checkTreePage( int size = get2byte(&data[i+2]); int j; if( (i+size-1)>=usableSize || i<0 ){ - checkAppendMsg(pCheck, 0, + chectdeAppendMsg(pCheck, 0, "Corruption detected in cell %d on page %d",i,iPage,0); }else{ for(j=i+size-1; j>=i; j--) hit[j]++; @@ -5592,13 +5592,13 @@ static int checkTreePage( if( hit[i]==0 ){ cnt++; }else if( hit[i]>1 ){ - checkAppendMsg(pCheck, 0, + chectdeAppendMsg(pCheck, 0, "Multiple uses for byte %d of page %d", i, iPage); break; } } if( cnt!=data[hdr+7] ){ - checkAppendMsg(pCheck, 0, + chectdeAppendMsg(pCheck, 0, "Fragmented space is %d byte reported as %d on page %d", cnt, data[hdr+7], iPage); } @@ -5672,7 +5672,7 @@ char *sqlite3BtreeIntegrityCheck(Btree *pBt, int *aRoot, int nRoot){ for(i=1; i<=sCheck.nPage; i++){ #ifdef SQLITE_OMIT_AUTOVACUUM if( sCheck.anRef[i]==0 ){ - checkAppendMsg(&sCheck, 0, "Page %d is never used", i); + chectdeAppendMsg(&sCheck, 0, "Page %d is never used", i); } #else /* If the database supports auto-vacuum, make sure no tables contain @@ -5680,11 +5680,11 @@ char *sqlite3BtreeIntegrityCheck(Btree *pBt, int *aRoot, int nRoot){ */ if( sCheck.anRef[i]==0 && (PTRMAP_PAGENO(pBt->usableSize, i)!=i || !pBt->autoVacuum) ){ - checkAppendMsg(&sCheck, 0, "Page %d is never used", i); + chectdeAppendMsg(&sCheck, 0, "Page %d is never used", i); } if( sCheck.anRef[i]!=0 && (PTRMAP_PAGENO(pBt->usableSize, i)==i && pBt->autoVacuum) ){ - checkAppendMsg(&sCheck, 0, "Pointer map page %d is referenced", i); + chectdeAppendMsg(&sCheck, 0, "Pointer map page %d is referenced", i); } #endif } @@ -5693,7 +5693,7 @@ char *sqlite3BtreeIntegrityCheck(Btree *pBt, int *aRoot, int nRoot){ */ unlockBtreeIfUnused(pBt); if( nRef != *sqlite3pager_stats(pBt->pPager) ){ - checkAppendMsg(&sCheck, 0, + chectdeAppendMsg(&sCheck, 0, "Outstanding page count goes from %d to %d during this analysis", nRef, *sqlite3pager_stats(pBt->pPager) ); diff --git a/kexi/core/kexipartmanager.cpp b/kexi/core/kexipartmanager.cpp index 31e335ac4..c593f883f 100644 --- a/kexi/core/kexipartmanager.cpp +++ b/kexi/core/kexipartmanager.cpp @@ -55,16 +55,16 @@ Manager::lookup() m_partlist.clear(); m_partsByMime.clear(); m_parts.clear(); - TDETrader::OfferList tlist = TDETrader::self()->query("Kexi/Handler", + TDETrader::OfferList tlist = TDETrader::self()->query("Kexi/Handler", "[X-Kexi-PartVersion] == " + TQString::number(KEXI_PART_VERSION)); - + TDEConfig conf("kexirc", true); conf.setGroup("Parts"); TQStringList sl_order = TQStringList::split( ",", conf.readEntry("Order") );//we'll set parts in defined order const int size = TQMAX( tlist.count(), sl_order.count() ); TQPtrVector<KService> ordered( size*2 ); int offset = size; //we will insert not described parts from #offset - + //compute order for(TDETrader::OfferList::ConstIterator it(tlist.constBegin()); it != tlist.constEnd(); ++it) { @@ -85,14 +85,14 @@ Manager::lookup() if (idx!=-1) ordered.insert(idx, ptr); else //add to end - ordered.insert(offset++, ptr); + ordered.insert(offset++, ptr); } //fill final list using computed order for (int i = 0; i< (int)ordered.size(); i++) { KService::Ptr ptr = ordered[i]; if (ptr) { Info *info = new Info(ptr); - info->setProjectPartID(m_nextTempProjectPartID--); // temp. part id are -1, -2, and so on, + info->setProjectPartID(m_nextTempProjectPartID--); // temp. part id are -1, -2, and so on, // to avoid duplicates if (!info->mimeType().isEmpty()) { m_partsByMime.insert(info->mimeType(), info); @@ -122,11 +122,11 @@ Manager::part(Info *i) } Part *p = m_parts[i->projectPartID()]; - + if(!p) { // kdDebug() << "Manager::part().." << endl; int error=0; - p = KParts::ComponentFactory::createInstanceFromService<Part>(i->ptr(), this, + p = KParts::ComponentFactory::createInstanceFromService<Part>(i->ptr(), this, TQString(i->objectName()+"_part").latin1(), TQStringList(), &error); if(!p) { kdDebug() << "Manager::part(): failed :( (ERROR #" << error << ")" << endl; @@ -164,7 +164,7 @@ Manager::unloadPart(Info *i) m_partlist.removeRef(p);*/ } -void +void Manager::unloadAllParts() { // m_partsByMime.clear(); @@ -175,7 +175,7 @@ Manager::unloadAllParts() } #endif -/*void +/*void Manager::removeClients( KexiMainWindow *win ) { if (!win) @@ -270,7 +270,7 @@ void Manager::insertStaticPart(StaticPart* part) { if (!part) return; - part->info()->setProjectPartID(m_nextTempProjectPartID--); // temp. part id are -1, -2, and so on, + part->info()->setProjectPartID(m_nextTempProjectPartID--); // temp. part id are -1, -2, and so on, m_partlist.append(part->info()); if (!part->info()->mimeType().isEmpty()) m_partsByMime.insert(part->info()->mimeType(), part->info()); diff --git a/kexi/examples/Simple_Database.kexi b/kexi/examples/Simple_Database.kexi Binary files differnew file mode 100644 index 000000000..95ff4cb6d --- /dev/null +++ b/kexi/examples/Simple_Database.kexi diff --git a/kexi/main/keximainwindowimpl.cpp b/kexi/main/keximainwindowimpl.cpp index 4a7363741..0b4a5ff76 100644 --- a/kexi/main/keximainwindowimpl.cpp +++ b/kexi/main/keximainwindowimpl.cpp @@ -1926,7 +1926,7 @@ void KexiMainWindowImpl::updateAppCaption() view = 0; } - kApp->setCaption( d->appCaption ); + tdeApp->setCaption( d->appCaption ); if (view && view->mdiParent()->state()==KMdiChildFrm::Maximized) { setCaption( view->caption() ); } @@ -3957,13 +3957,21 @@ void KexiMainWindowImpl::slotStartFeedbackAgent() { #ifndef KEXI_NO_FEEDBACK_AGENT #ifdef FEEDBACK_CLASS +<<<<<<< Updated upstream const TDEAboutData* about = tdeApp->aboutData(); +======= + const TDEAboutData* about = TDEApplication::tdeApplication()->aboutData(); +>>>>>>> Stashed changes FEEDBACK_CLASS* wizard = new FEEDBACK_CLASS( about->programName(), about->version(), 0, 0, 0, FEEDBACK_CLASS::AllPages ); if ( wizard->exec() ) { +<<<<<<< Updated upstream tdeApp->invokeMailer( "kexi-reports-dummy@kexi.org", +======= + TDEApplication::tdeApplication()->invokeMailer( "kexi-reports-dummy@kexi.org", +>>>>>>> Stashed changes TQString(), TQString(), about->appName() + TQCString( " [feedback]" ), wizard->feedbackDocument().toString( 2 ).local8Bit() ); diff --git a/kexi/migration/importwizard.cpp b/kexi/migration/importwizard.cpp index 757d1fc87..957efc0a6 100644 --- a/kexi/migration/importwizard.cpp +++ b/kexi/migration/importwizard.cpp @@ -132,8 +132,8 @@ void ImportWizard::parseArguments() m_predefinedMimeType = (*m_args)["mimeType"]; if (m_args->contains("connectionData")) { m_predefinedConnectionData = new KexiDB::ConnectionData(); - KexiDB::fromMap( - KexiUtils::deserializeMap((*m_args)["connectionData"]), *m_predefinedConnectionData + KexiDB::fromMap( + KexiUtils::deserializeMap((*m_args)["connectionData"]), *m_predefinedConnectionData ); } } @@ -146,7 +146,7 @@ void ImportWizard::setupIntro() { m_introPage = new TQWidget(this); TQVBoxLayout *vbox = new TQVBoxLayout(m_introPage, KDialog::marginHint()); - + TQLabel *lblIntro = new TQLabel(m_introPage); lblIntro->setAlignment( TQt::AlignTop | TQt::AlignLeft | TQt::WordBreak ); TQString msg; @@ -179,7 +179,7 @@ void ImportWizard::setupSrcType() { m_srcTypePage = new TQWidget(this); -//! @todo Would be good if KexiDBDriverComboBox worked for migration drivers +//! @todo Would be good if KexiDBDriverComboBox worked for migration drivers TQVBoxLayout *vbox = new TQVBoxLayout(m_srcTypePage, KDialog::marginHint()); TQHBoxLayout *hbox = new TQHBoxLayout(vbox); @@ -206,7 +206,7 @@ void ImportWizard::setupSrcConn() m_srcConnPage = new TQWidget(this); TQVBoxLayout *vbox = new TQVBoxLayout(m_srcConnPage, KDialog::marginHint()); - m_srcConn = new KexiConnSelectorWidget(Kexi::connset(), + m_srcConn = new KexiConnSelectorWidget(Kexi::connset(), ":ProjectMigrationSourceDir", m_srcConnPage, "m_srcConnSelector"); m_srcConn->hideConnectonIcon(); @@ -256,7 +256,7 @@ void ImportWizard::setupDstType() m_dstPrjTypeSelector->option_server->setText(i18n("Database project stored on a server")); TQVBoxLayout *frame_server_vbox = new TQVBoxLayout(m_dstPrjTypeSelector->frame_server, KDialog::spacingHint()); - m_dstServerTypeCombo = new KexiDBDriverComboBox(m_dstPrjTypeSelector->frame_server, drvs, + m_dstServerTypeCombo = new KexiDBDriverComboBox(m_dstPrjTypeSelector->frame_server, drvs, KexiDBDriverComboBox::ShowServerDrivers); frame_server_vbox->addWidget(m_dstServerTypeCombo); hbox->addStretch(1); @@ -272,7 +272,7 @@ void ImportWizard::setupDstType() // void ImportWizard::setupDstTitle() { - m_dstTitlePage = new KexiDBTitlePage(i18n("Destination project's caption:"), + m_dstTitlePage = new KexiDBTitlePage(i18n("Destination project's caption:"), this, "KexiDBTitlePage"); m_dstTitlePage->layout()->setMargin( KDialog::marginHint() ); m_dstTitlePage->updateGeometry(); @@ -287,7 +287,7 @@ void ImportWizard::setupDst() m_dstPage = new TQWidget(this); TQVBoxLayout *vbox = new TQVBoxLayout(m_dstPage, KDialog::marginHint()); - m_dstConn = new KexiConnSelectorWidget(Kexi::connset(), + 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 @@ -377,7 +377,7 @@ void ImportWizard::setupFinish() m_finishLbl->setAlignment( TQt::AlignTop | TQt::AlignLeft | TQt::WordBreak ); vbox->addWidget( m_finishLbl ); - m_openImportedProjectCheckBox = new TQCheckBox(i18n("Open imported project"), + m_openImportedProjectCheckBox = new TQCheckBox(i18n("Open imported project"), m_finishPage, "openImportedProjectCheckBox"); m_openImportedProjectCheckBox->setChecked(true); vbox->addSpacing( KDialog::spacingHint() ); @@ -482,7 +482,7 @@ void ImportWizard::arriveDstTitlePage() if(fileBasedSrcSelected()) { TQString suggestedDBName( TQFileInfo(m_srcConn->selectedFileName()).fileName() ); const TQFileInfo fi( suggestedDBName ); - suggestedDBName = suggestedDBName.left(suggestedDBName.length() + suggestedDBName = suggestedDBName.left(suggestedDBName.length() - (fi.extension().length() ? (fi.extension().length()+1) : 0)); m_dstNewDBNameLineEdit->setText( suggestedDBName ); } else { @@ -547,14 +547,14 @@ void ImportWizard::arriveImportingPage() { //todo //temp. hack for MS Access driver only -//! @todo for other databases we will need KexiMigration::Conenction +//! @todo for other databases we will need KexiMigration::Conenction //! and KexiMigration::Driver classes bool showOptions = false; if (fileBasedSrcSelected()) { Kexi::ObjectStatus result; KexiMigrate* sourceDriver = prepareImport(result); if (sourceDriver) { - showOptions = !result.error() + showOptions = !result.error() && sourceDriver->propertyValue( "source_database_has_nonunicode_encoding" ).toBool(); KexiMigration::Data *data = sourceDriver->data(); sourceDriver->setData( 0 ); @@ -621,7 +621,7 @@ TQString ImportWizard::driverNameForSelectedSource() return m_predefinedConnectionData->driverName; } - return m_srcConn->selectedConnectionData() + return m_srcConn->selectedConnectionData() ? m_srcConn->selectedConnectionData()->driverName : TQString(); } @@ -653,7 +653,7 @@ void ImportWizard::accept() KexiMigrate* ImportWizard::prepareImport(Kexi::ObjectStatus& result) { KexiUtils::WaitCursor wait; - + // Start with a driver manager KexiDB::DriverManager manager; @@ -686,7 +686,7 @@ KexiMigrate* ImportWizard::prepareImport(Kexi::ObjectStatus& result) cdata = m_dstConn->selectedConnectionData(); dbname = m_dstNewDBNameLineEdit->text(); } - else // if (m_dstTypeCombo->currentText().lower() == KexiDB::Driver::defaultFileBasedDriverName()) + else // if (m_dstTypeCombo->currentText().lower() == KexiDB::Driver::defaultFileBasedDriverName()) { //file-based project kdDebug() << "File Destination..." << endl; @@ -701,7 +701,7 @@ KexiMigrate* ImportWizard::prepareImport(Kexi::ObjectStatus& result) /* else { //TODO This needs a better message - //KMessageBox::error(this, + //KMessageBox::error(this, 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::ObjectStatus& result) { sourceDriverName = driverNameForSelectedSource(); if (sourceDriverName.isEmpty()) - result.setStatus(i18n("No appropriate migration driver found."), + result.setStatus(i18n("No appropriate migration driver found."), m_migrateManager.possibleProblemsInfoMsg()); } @@ -736,7 +736,7 @@ KexiMigrate* ImportWizard::prepareImport(Kexi::ObjectStatus& result) // Setup progress feedback for the GUI if(sourceDriver->progressSupported()) { m_progressBar->updateGeometry(); - disconnect(sourceDriver, TQ_SIGNAL(progressPercent(int)), + disconnect(sourceDriver, TQ_SIGNAL(progressPercent(int)), this, TQ_SLOT(progressUpdated(int))); connect(sourceDriver, TQ_SIGNAL(progressPercent(int)), this, TQ_SLOT(progressUpdated(int))); @@ -759,7 +759,7 @@ KexiMigrate* ImportWizard::prepareImport(Kexi::ObjectStatus& result) kdDebug() << "Neither radio button is selected (not possible?) presume keep data" << endl; keepData = true; } - + KexiMigration::Data* md = new KexiMigration::Data(); // delete md->destination; md->destination = new KexiProjectData(*cdata, dbname); @@ -769,7 +769,7 @@ KexiMigrate* ImportWizard::prepareImport(Kexi::ObjectStatus& result) md->source = conn_data; md->sourceName = ""; } - else + else { if (m_predefinedConnectionData) md->source = m_predefinedConnectionData; @@ -802,8 +802,8 @@ tristate ImportWizard::import() if (sourceDriver && !result.error()) { if (!m_sourceDBEncoding.isEmpty()) { - sourceDriver->setPropertyValue( "source_database_nonunicode_encoding", - TQVariant(m_sourceDBEncoding.upper().replace(' ',"")) // "CP1250", not "cp 1250" + sourceDriver->setPropertyValue( "source_database_nonunicode_encoding", + TQVariant(m_sourceDBEncoding.upper().replace(' ',"")) // "CP1250", not "cp 1250" ); } @@ -835,10 +835,10 @@ tristate ImportWizard::import() { if (m_args) { // if (fileBasedDstSelected()) { - m_args->insert("destinationDatabaseName", + m_args->insert("destinationDatabaseName", sourceDriver->data()->destination->databaseName()); // } - TQString destinationConnectionShortcut( + TQString destinationConnectionShortcut( Kexi::connset().fileNameForConnectionData( m_dstConn->selectedConnectionData() ) ); if (!destinationConnectionShortcut.isEmpty()) { m_args->insert("destinationConnectionShortcut", destinationConnectionShortcut); @@ -859,14 +859,14 @@ tristate ImportWizard::import() kdDebug() << msg << "\n" << details << endl; setTitle(m_finishPage, i18n("Failure")); - m_finishLbl->setText( + 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)); return false; } // delete kexi_conn; return true; -} +} void ImportWizard::reject() { @@ -896,7 +896,7 @@ void ImportWizard::next() if (fileBasedSrcSelected()) dbname = m_srcConn->selectedFileName(); else - dbname = m_srcConn->selectedConnectionData() + dbname = m_srcConn->selectedConnectionData() ? m_srcConn->selectedConnectionData()->serverInfoString() : TQString(); if (!dbname.isEmpty()) dbname = TQString(" \"%1\"").arg(dbname); @@ -920,7 +920,7 @@ void ImportWizard::next() m_lblImportingTxt->setText(i18n("Importing in progress...")); tristate res = import(); if (true == res) { - m_finishLbl->setText( + m_finishLbl->setText( i18n("Database has been imported into Kexi database project \"%1\".") .arg(m_dstNewDBNameLineEdit->text()) ); cancelButton()->setEnabled(false); diff --git a/kexi/plugins/macros/tests/komacrotestgui.cpp b/kexi/plugins/macros/tests/komacrotestgui.cpp index ea4bbb9c7..de0345c1f 100644 --- a/kexi/plugins/macros/tests/komacrotestgui.cpp +++ b/kexi/plugins/macros/tests/komacrotestgui.cpp @@ -42,7 +42,7 @@ int main( int argc, char** argv ) TDECmdLineArgs::init(argc, argv, &about); TDECmdLineArgs::addCmdLineOptions( options ); - //create new kapplication + //create new tdeApplication TDEApplication app; //create new kunitrunnergui KUnitTest::RunnerGUI runner(0); |