diff options
Diffstat (limited to 'kexi/tests')
-rw-r--r-- | kexi/tests/altertable/1.kexi | bin | 49150 -> 49212 bytes | |||
-rw-r--r-- | kexi/tests/altertable/altertable.cpp | 238 | ||||
-rw-r--r-- | kexi/tests/altertable/altertable.h | 23 | ||||
-rw-r--r-- | kexi/tests/gui/finddialog/finddialog.pro | 4 | ||||
-rw-r--r-- | kexi/tests/gui/finddialog/kexifinddialog.cpp | 10 | ||||
-rw-r--r-- | kexi/tests/gui/finddialog/kexifinddialog.h | 15 | ||||
-rw-r--r-- | kexi/tests/gui/finddialog/kexifinddialogbase.ui | 32 | ||||
-rw-r--r-- | kexi/tests/newapi/dr_prop_test.h | 10 | ||||
-rw-r--r-- | kexi/tests/newapi/main.cpp | 34 | ||||
-rw-r--r-- | kexi/tests/newapi/mysqlcursor.cpp | 8 | ||||
-rw-r--r-- | kexi/tests/newapi/parser_test.h | 12 | ||||
-rw-r--r-- | kexi/tests/newapi/statements.txt | 2 | ||||
-rw-r--r-- | kexi/tests/newapi/tables_test.h | 22 | ||||
-rw-r--r-- | kexi/tests/newapi/tableview_test.h | 2 | ||||
-rw-r--r-- | kexi/tests/parser/main.cpp | 14 | ||||
-rw-r--r-- | kexi/tests/startup/main.cpp | 16 | ||||
-rw-r--r-- | kexi/tests/widgets/kexidbdrivercombotest.cpp | 12 |
17 files changed, 228 insertions, 226 deletions
diff --git a/kexi/tests/altertable/1.kexi b/kexi/tests/altertable/1.kexi Binary files differindex 1165d90e..057301a3 100644 --- a/kexi/tests/altertable/1.kexi +++ b/kexi/tests/altertable/1.kexi diff --git a/kexi/tests/altertable/altertable.cpp b/kexi/tests/altertable/altertable.cpp index bf14bc00..1c5589c4 100644 --- a/kexi/tests/altertable/altertable.cpp +++ b/kexi/tests/altertable/altertable.cpp @@ -21,11 +21,11 @@ #include <unistd.h> -#include <qapplication.h> -#include <qfile.h> -#include <qdir.h> -#include <qregexp.h> -#include <qclipboard.h> +#include <tqapplication.h> +#include <tqfile.h> +#include <tqdir.h> +#include <tqregexp.h> +#include <tqclipboard.h> #include <kdebug.h> @@ -41,22 +41,22 @@ #include <kexidb/connection.h> #include <kexidb/utils.h> -QString testFilename; -QFile testFile; -QTextStream testFileStream; -QStringList testFileLine; +TQString testFilename; +TQFile testFile; +TQTextStream testFileStream; +TQStringList testFileLine; uint testLineNumber = 0; -QString origDbFilename, dbFilename; +TQString origDbFilename, dbFilename; int variableI = 1; // simple variable 'i' support int newArgc; char** newArgv; KexiMainWindowImpl* win = 0; KexiProject* prj = 0; -void showError(const QString& msg) +void showError(const TQString& msg) { - QString msg_(msg); - msg_.prepend(QString("Error at line %1: ").arg(testLineNumber)); + TQString msg_(msg); + msg_.prepend(TQString("Error at line %1: ").tqarg(testLineNumber)); kdDebug() << msg_ << endl; } @@ -64,9 +64,9 @@ void showError(const QString& msg) text in quotes is extracted, e.g. \"ab c\" is treat as one item "ab c" Returns flas on failure (e.g. end of file). Empty lines and lines or parts of lines with # (comments) are omitted. */ -tristate readLineFromTestFile(const QString& expectedCommandName = QString::null) +tristate readLineFromTestFile(const TQString& expectedCommandName = TQString()) { - QString s; + TQString s; bool blockComment = false; while (true) { if (testFileStream.atEnd()) @@ -88,12 +88,12 @@ tristate readLineFromTestFile(const QString& expectedCommandName = QString::null break; } s.append(" "); //sentinel - QString item; + TQString item; testFileLine.clear(); const int len = s.length(); bool skipWhiteSpace = true, quoted = false; for (int i=0; i<len; i++) { - const QChar ch( s.ref(i) ); + const TQChar ch( s.ref(i) ); if (skipWhiteSpace) { if (ch=='#') break; //eoln @@ -111,15 +111,15 @@ tristate readLineFromTestFile(const QString& expectedCommandName = QString::null skipWhiteSpace = true; quoted = false; testFileLine.append( item ); - item = QString::null; + item = TQString(); continue; } item.append(ch); } } if (!expectedCommandName.isEmpty() && testFileLine[0]!=expectedCommandName) { - showError( QString("Invalid command '%1', expected '%2'") - .arg(testFileLine[0]).arg(expectedCommandName)); + showError( TQString("Invalid command '%1', expected '%2'") + .tqarg(testFileLine[0]).tqarg(expectedCommandName)); return false; } if (quoted) { @@ -135,54 +135,54 @@ bool checkItemsNumber(int expectedNumberOfItems, int optionalNumberOfItems = -1) if (optionalNumberOfItems>0) ok = ok || optionalNumberOfItems==(int)testFileLine.count(); if (!ok) { - QString msg = QString("Invalid number of args (%1) for command '%2', expected: %3") - .arg(testFileLine.count()).arg(testFileLine[0]).arg(expectedNumberOfItems); + TQString msg = TQString("Invalid number of args (%1) for command '%2', expected: %3") + .tqarg(testFileLine.count()).tqarg(testFileLine[0]).tqarg(expectedNumberOfItems); if (optionalNumberOfItems>0) - msg.append( QString(" or %1").arg(optionalNumberOfItems) ); + msg.append( TQString(" or %1").tqarg(optionalNumberOfItems) ); showError( msg ); return false; } return true; } -QVariant::Type typeNameToQVariantType(const QCString& name_) +TQVariant::Type typeNameToTQVariantType(const TQCString& name_) { - QCString name( name_.lower() ); + TQCString name( name_.lower() ); if (name=="string") - return QVariant::String; + return TQVariant::String; if (name=="int") - return QVariant::Int; + return TQVariant::Int; if (name=="bool" || name=="boolean") - return QVariant::Bool; + return TQVariant::Bool; if (name=="double" || name=="float") - return QVariant::Double; + return TQVariant::Double; if (name=="date") - return QVariant::Date; + return TQVariant::Date; if (name=="datetime") - return QVariant::DateTime; + return TQVariant::DateTime; if (name=="time") - return QVariant::Time; + return TQVariant::Time; if (name=="bytearray") - return QVariant::ByteArray; + return TQVariant::ByteArray; if (name=="longlong") - return QVariant::LongLong; + return TQVariant::LongLong; //todo more types - showError(QString("Invalid type '%1'").arg(name_)); - return QVariant::Invalid; + showError(TQString("Invalid type '%1'").tqarg(name_)); + return TQVariant::Invalid; } -// casts string to QVariant -bool castStringToQVariant( const QString& string, const QCString& type, QVariant& result ) +// casts string to TQVariant +bool castStringToTQVariant( const TQString& string, const TQCString& type, TQVariant& result ) { if (string.lower()=="<null>") { - result = QVariant(); + result = TQVariant(); return true; } if (string=="\"\"") { - result = QString(""); + result = TQString(""); return true; } - const QVariant::Type vtype = typeNameToQVariantType( type ); + const TQVariant::Type vtype = typeNameToTQVariantType( type ); bool ok; result = KexiDB::stringToVariant( string, vtype, ok ); return ok; @@ -190,7 +190,7 @@ bool castStringToQVariant( const QString& string, const QCString& type, QVariant // returns a number parsed from argument; if argument is i or i++, variableI is used // 'ok' is set to false on failure -static int getNumber(const QString& argument, bool& ok) +static int getNumber(const TQString& argument, bool& ok) { int result; ok = true; @@ -202,7 +202,7 @@ static int getNumber(const QString& argument, bool& ok) else { result = argument.toInt(&ok); if (!ok) { - showError(QString("Invalid value '%1'").arg(argument)); + showError(TQString("Invalid value '%1'").tqarg(argument)); return -1; } } @@ -212,26 +212,26 @@ static int getNumber(const QString& argument, bool& ok) //--------------------------------------- AlterTableTester::AlterTableTester() - : QObject() + : TQObject() , m_finishedCopying(false) { //copy the db file to a temp file qInitNetworkProtocols(); - QPtrList<QNetworkOperation> list = m_copyOperator.copy( - "file://" + QDir::current().path() + "/" + origDbFilename, - "file://" + QDir::current().path() + "/" + dbFilename, false, false ); - connect(&m_copyOperator, SIGNAL(finished(QNetworkOperation*)), - this, SLOT(slotFinishedCopying(QNetworkOperation*))); + TQPtrList<TQNetworkOperation> list = m_copyOperator.copy( + "file://" + TQDir::current().path() + "/" + origDbFilename, + "file://" + TQDir::current().path() + "/" + dbFilename, false, false ); + connect(&m_copyOperator, TQT_SIGNAL(finished(TQNetworkOperation*)), + this, TQT_SLOT(slotFinishedCopying(TQNetworkOperation*))); } AlterTableTester::~AlterTableTester() { - QFile(dbFilename).remove(); + TQFile(dbFilename).remove(); } -void AlterTableTester::slotFinishedCopying(QNetworkOperation* oper) +void AlterTableTester::slotFinishedCopying(TQNetworkOperation* oper) { - if (oper->operation()==QNetworkProtocol::OpPut) + if (oper->operation()==TQNetworkProtocol::OpPut) m_finishedCopying = true; } @@ -239,16 +239,16 @@ bool AlterTableTester::changeFieldProperty(KexiTableDesignerInterface* designerI { if (!checkItemsNumber(5)) return false; - QVariant newValue; - QCString propertyName( testFileLine[2].latin1() ); - QCString propertyType( testFileLine[3].latin1() ); - QString propertyValueString(testFileLine[4]); + TQVariant newValue; + TQCString propertyName( testFileLine[2].latin1() ); + TQCString propertyType( testFileLine[3].latin1() ); + TQString propertyValueString(testFileLine[4]); if (propertyName=="type") newValue = (int)KexiDB::Field::typeForString(testFileLine[4]); else { - if (!castStringToQVariant(propertyValueString, propertyType, newValue)) { - showError( QString("Could not set property '%1' value '%2' of type '%3'") - .arg(propertyName).arg(propertyValueString).arg(propertyType) ); + if (!castStringToTQVariant(propertyValueString, propertyType, newValue)) { + showError( TQString("Could not set property '%1' value '%2' of type '%3'") + .tqarg(propertyName).tqarg(propertyValueString).tqarg(propertyType) ); return false; } } @@ -259,7 +259,7 @@ bool AlterTableTester::changeFieldProperty(KexiTableDesignerInterface* designerI designerIface->changeFieldPropertyForRow( row, propertyName, newValue, 0, true ); if (propertyName=="type") { //clean subtype name, e.g. from "longText" to "LongText", because dropdown list is case-sensitive - QString realSubTypeName; + TQString realSubTypeName; if (KexiDB::Field::BLOB == KexiDB::Field::typeForString(testFileLine[4])) //! @todo hardcoded! realSubTypeName = "image"; @@ -271,7 +271,7 @@ bool AlterTableTester::changeFieldProperty(KexiTableDesignerInterface* designerI } //helper -bool AlterTableTester::getSchemaDump(KexiDialogBase* dlg, QString& schemaDebugString) +bool AlterTableTester::getSchemaDump(KexiDialogBase* dlg, TQString& schemaDebugString) { KexiTableDesignerInterface* designerIface = dynamic_cast<KexiTableDesignerInterface*>( dlg->selectedView() ); @@ -282,34 +282,34 @@ bool AlterTableTester::getSchemaDump(KexiDialogBase* dlg, QString& schemaDebugSt tristate result; schemaDebugString = designerIface->debugStringForCurrentTableSchema(result); if (true!=result) { - showError( QString("Loading modified schema failed. Result: %1") - .arg(~result ? "cancelled" : "false") ); + showError( TQString("Loading modified schema failed. Result: %1") + .tqarg(~result ? "cancelled" : "false") ); return false; } - schemaDebugString.remove(QRegExp(",$")); //no need to have "," at the end of lines + schemaDebugString.remove(TQRegExp(",$")); //no need to have "," at the end of lines return true; } bool AlterTableTester::showSchema(KexiDialogBase* dlg, bool copyToClipboard) { - QString schemaDebugString; + TQString schemaDebugString; if (!getSchemaDump(dlg, schemaDebugString)) return false; if (copyToClipboard) - QApplication::clipboard()->setText( schemaDebugString ); + TQApplication::tqclipboard()->setText( schemaDebugString ); else - kdDebug() << QString("Schema for '%1' table:\n").arg(dlg->partItem()->name()) + kdDebug() << TQString("Schema for '%1' table:\n").tqarg(dlg->partItem()->name()) + schemaDebugString + "\nendSchema" << endl; return true; } bool AlterTableTester::checkInternal(KexiDialogBase* dlg, - QString& debugString, const QString& endCommand, bool skipColonsAndStripWhiteSpace) + TQString& debugString, const TQString& endCommand, bool skipColonsAndStripWhiteSpace) { Q_UNUSED(dlg); - QTextStream resultStream(&debugString, IO_ReadOnly); + TQTextStream resultStream(&debugString, IO_ReadOnly); // Load expected result, compare - QString expectedLine, resultLine; + TQString expectedLine, resultLine; while (true) { const bool testFileStreamAtEnd = testFileStream.atEnd(); if (!testFileStreamAtEnd) { @@ -317,7 +317,7 @@ bool AlterTableTester::checkInternal(KexiDialogBase* dlg, expectedLine = testFileStream.readLine(); if (skipColonsAndStripWhiteSpace) { expectedLine = expectedLine.stripWhiteSpace(); - expectedLine.remove(QRegExp(",$")); //no need to have "," at the end of lines + expectedLine.remove(TQRegExp(",$")); //no need to have "," at the end of lines } } if (testFileStreamAtEnd || endCommand==expectedLine.stripWhiteSpace()) { @@ -329,18 +329,18 @@ bool AlterTableTester::checkInternal(KexiDialogBase* dlg, } //test line loaded, load result if (resultStream.atEnd()) { - showError( QString("Result ends unexpectedly. There is at least one additinal test line: '") + showError( TQString("Result ends unexpectedly. There is at least one additinal test line: '") + expectedLine +"'" ); return false; } resultLine = resultStream.readLine(); if (skipColonsAndStripWhiteSpace) { resultLine = resultLine.stripWhiteSpace(); - resultLine.remove(QRegExp(",$")); //no need to have "," at the end of lines + resultLine.remove(TQRegExp(",$")); //no need to have "," at the end of lines } if (resultLine!=expectedLine) { showError( - QString("Result differs from the expected:\nExpected: ") + TQString("Result differs from the expected:\nExpected: ") +expectedLine+"\n????????: "+resultLine+"\n"); return false; } @@ -350,16 +350,16 @@ bool AlterTableTester::checkInternal(KexiDialogBase* dlg, bool AlterTableTester::checkSchema(KexiDialogBase* dlg) { - QString schemaDebugString; + TQString schemaDebugString; if (!getSchemaDump(dlg, schemaDebugString)) return false; bool result = checkInternal(dlg, schemaDebugString, "endSchema", true /*skipColonsAndStripWhiteSpace*/); - kdDebug() << QString("Schema check for table '%1': %2").arg(dlg->partItem()->name()) - .arg(result ? "OK" : "Failed") << endl; + kdDebug() << TQString("Schema check for table '%1': %2").tqarg(dlg->partItem()->name()) + .tqarg(result ? "OK" : "Failed") << endl; return result; } -bool AlterTableTester::getActionsDump(KexiDialogBase* dlg, QString& actionsDebugString) +bool AlterTableTester::getActionsDump(KexiDialogBase* dlg, TQString& actionsDebugString) { KexiTableDesignerInterface* designerIface = dynamic_cast<KexiTableDesignerInterface*>( dlg->selectedView() ); @@ -367,7 +367,7 @@ bool AlterTableTester::getActionsDump(KexiDialogBase* dlg, QString& actionsDebug return false; tristate result = designerIface->simulateAlterTableExecution(&actionsDebugString); if (true!=result) { - showError( QString("Computing simplified actions for table '%1' failed.").arg(dlg->partItem()->name()) ); + showError( TQString("Computing simplified actions for table '%1' failed.").tqarg(dlg->partItem()->name()) ); return false; } return true; @@ -375,25 +375,25 @@ bool AlterTableTester::getActionsDump(KexiDialogBase* dlg, QString& actionsDebug bool AlterTableTester::showActions(KexiDialogBase* dlg, bool copyToClipboard) { - QString actionsDebugString; + TQString actionsDebugString; if (!getActionsDump(dlg, actionsDebugString)) return false; if (copyToClipboard) - QApplication::clipboard()->setText( actionsDebugString ); + TQApplication::tqclipboard()->setText( actionsDebugString ); else - kdDebug() << QString("Simplified actions for altering table '%1':\n").arg(dlg->partItem()->name()) + kdDebug() << TQString("Simplified actions for altering table '%1':\n").tqarg(dlg->partItem()->name()) + actionsDebugString+"\n" << endl; return true; } bool AlterTableTester::checkActions(KexiDialogBase* dlg) { - QString actionsDebugString; + TQString actionsDebugString; if (!getActionsDump(dlg, actionsDebugString)) return false; bool result = checkInternal(dlg, actionsDebugString, "endActions", true /*skipColonsAndStripWhiteSpace*/); - kdDebug() << QString("Actions check for table '%1': %2").arg(dlg->partItem()->name()) - .arg(result ? "OK" : "Failed") << endl; + kdDebug() << TQString("Actions check for table '%1': %2").tqarg(dlg->partItem()->name()) + .tqarg(result ? "OK" : "Failed") << endl; return result; } @@ -405,26 +405,26 @@ bool AlterTableTester::saveTableDesign(KexiDialogBase* dlg) return false; tristate result = designerIface->executeRealAlterTable(); if (true!=result) { - showError( QString("Saving design of table '%1' failed.").arg(dlg->partItem()->name()) ); + showError( TQString("Saving design of table '%1' failed.").tqarg(dlg->partItem()->name()) ); return false; } return true; } -bool AlterTableTester::getTableDataDump(KexiDialogBase* dlg, QString& dataString) +bool AlterTableTester::getTableDataDump(KexiDialogBase* dlg, TQString& dataString) { KexiTableDesignerInterface* designerIface = dynamic_cast<KexiTableDesignerInterface*>( dlg->selectedView() ); if (!designerIface) return false; - QMap<QString,QString> args; - QTextStream ts( &dataString, IO_WriteOnly ); - args["textStream"] = KexiUtils::ptrToString<QTextStream>( &ts ); + TQMap<TQString,TQString> args; + TQTextStream ts( &dataString, IO_WriteOnly ); + args["textStream"] = KexiUtils::ptrToString<TQTextStream>( &ts ); args["destinationType"]="file"; args["delimiter"]="\t"; args["textQuote"]="\""; - args["itemId"] = QString::number( + args["itemId"] = TQString::number( prj->dbConnection()->tableSchema( dlg->partItem()->name() )->id() ); if (!KexiInternalPart::executeCommand("csv_importexport", win, "KexiCSVExport", &args)) { showError( "Error exporting table contents." ); @@ -435,24 +435,24 @@ bool AlterTableTester::getTableDataDump(KexiDialogBase* dlg, QString& dataString bool AlterTableTester::showTableData(KexiDialogBase* dlg, bool copyToClipboard) { - QString dataString; + TQString dataString; if (!getTableDataDump(dlg, dataString)) return false; if (copyToClipboard) - QApplication::clipboard()->setText( dataString ); + TQApplication::tqclipboard()->setText( dataString ); else - kdDebug() << QString("Contents of table '%1':\n").arg(dlg->partItem()->name())+dataString+"\n" << endl; + kdDebug() << TQString("Contents of table '%1':\n").tqarg(dlg->partItem()->name())+dataString+"\n" << endl; return true; } bool AlterTableTester::checkTableData(KexiDialogBase* dlg) { - QString dataString; + TQString dataString; if (!getTableDataDump(dlg, dataString)) return false; bool result = checkInternal(dlg, dataString, "endTableData", false /*!skipColonsAndStripWhiteSpace*/); - kdDebug() << QString("Table '%1' contents: %2").arg(dlg->partItem()->name()) - .arg(result ? "OK" : "Failed") << endl; + kdDebug() << TQString("Table '%1' contents: %2").tqarg(dlg->partItem()->name()) + .tqarg(result ? "OK" : "Failed") << endl; return result; } @@ -460,10 +460,10 @@ bool AlterTableTester::closeWindow(KexiDialogBase* dlg) { if (!dlg) return true; - QString name = dlg->partItem()->name(); - tristate result = true == win->closeDialog(dlg, true/*layoutTaskBar*/, true/*doNotSaveChanges*/); - kdDebug() << QString("Closing window for table '%1': %2").arg(name) - .arg(result==true ? "OK" : (result==false ? "Failed" : "Cancelled")) << endl; + TQString name = dlg->partItem()->name(); + tristate result = true == win->closeDialog(dlg, true/*tqlayoutTaskBar*/, true/*doNotSaveChanges*/); + kdDebug() << TQString("Closing window for table '%1': %2").tqarg(name) + .tqarg(result==true ? "OK" : (result==false ? "Failed" : "Cancelled")) << endl; return result == true; } @@ -472,7 +472,7 @@ tristate AlterTableTester::run(bool &closeAppRequested) { closeAppRequested = false; while (!m_finishedCopying) - qApp->processEvents(300); + tqApp->processEvents(300); kdDebug() << "Database copied to temporary: " << dbFilename << endl; @@ -489,16 +489,16 @@ tristate AlterTableTester::run(bool &closeAppRequested) if (true != res) return ~res; - QString tableName(testFileLine[1]); + TQString tableName(testFileLine[1]); KexiPart::Item *item = prj->itemForMimeType("kexi/table", tableName); if (!item) { - showError(QString("No such table '%1'").arg(tableName)); + showError(TQString("No such table '%1'").tqarg(tableName)); return false; } bool openingCancelled; KexiDialogBase* dlg = win->openObject(item, Kexi::DesignViewMode, openingCancelled); if (!dlg) { - showError(QString("Could not open table '%1'").arg(item->name())); + showError(TQString("Could not open table '%1'").tqarg(item->name())); return false; } KexiTableDesignerInterface* designerIface @@ -507,8 +507,8 @@ tristate AlterTableTester::run(bool &closeAppRequested) return false; //dramatic speedup: temporary hide the window and propeditor - QWidget * propeditor - = KexiUtils::findFirstChild<QWidget>(qApp->mainWidget(), "KexiPropertyEditorView"); + TQWidget * propeditor + = KexiUtils::findFirstChild<TQWidget>(tqApp->mainWidget(), "KexiPropertyEditorView"); if (propeditor) propeditor->hide(); dlg->hide(); @@ -518,7 +518,7 @@ tristate AlterTableTester::run(bool &closeAppRequested) res = readLineFromTestFile(); if (true != res) return ~res; - QString command( testFileLine[0] ); + TQString command( testFileLine[0] ); if (designTable) { //subcommands available within "designTable" commands if (command=="endDesign") { @@ -570,7 +570,7 @@ tristate AlterTableTester::run(bool &closeAppRequested) bool ok; variableI = command.mid(2).toInt(&ok); if (!ok) { - showError(QString("Invalid variable initialization '%1'").arg(command)); + showError(TQString("Invalid variable initialization '%1'").tqarg(command)); return false; } continue; @@ -622,7 +622,7 @@ tristate AlterTableTester::run(bool &closeAppRequested) if (command=="stop") { if (!checkItemsNumber(1)) return false; - kdDebug() << QString("Test STOPPED at line %1.").arg(testLineNumber) << endl; + kdDebug() << TQString("Test STOPPED at line %1.").tqarg(testLineNumber) << endl; break; } else if (command=="closeWindow") { @@ -636,11 +636,11 @@ tristate AlterTableTester::run(bool &closeAppRequested) if (!checkItemsNumber(1) || !closeWindow(dlg)) return false; closeAppRequested = true; - kdDebug() << QString("Quitting the application...") << endl; + kdDebug() << TQString("Quitting the application...") << endl; break; } else { - showError( QString("No such command '%1'").arg(command) ); + showError( TQString("No such command '%1'").tqarg(command) ); return false; } } @@ -652,7 +652,7 @@ tristate AlterTableTester::run(bool &closeAppRequested) int quit(int result) { testFile.close(); - delete qApp; + delete tqApp; if (newArgv) delete [] newArgv; return result; @@ -674,7 +674,7 @@ int main(int argc, char *argv[]) testFilename = argv[argc-1]; testFile.setName(testFilename); if (!testFile.open(IO_ReadOnly)) { - kdWarning() << QString("Opening test file %1 failed.").arg(testFilename) << endl; + kdWarning() << TQString("Opening test file %1 failed.").tqarg(testFilename) << endl; return quit(1); } //load db name @@ -693,22 +693,22 @@ int main(int argc, char *argv[]) KAboutData* aboutdata = Kexi::createAboutData(); aboutdata->setProgramName( "Kexi Alter Table Test" ); int result = KexiMainWindowImpl::create(newArgc, newArgv, aboutdata); - if (!qApp) + if (!tqApp) return quit(result); win = KexiMainWindowImpl::self(); AlterTableTester tester; - //QObject::connect(win, SIGNAL(projectOpened()), &tester, SLOT(run())); + //TQObject::connect(win, TQT_SIGNAL(projectOpened()), &tester, TQT_SLOT(run())); bool closeAppRequested; res = tester.run(closeAppRequested); if (true != res) { if (false == res) - kdWarning() << QString("Running test for file '%1' failed.").arg(testFilename) << endl; + kdWarning() << TQString("Running test for file '%1' failed.").tqarg(testFilename) << endl; return quit(res==false ? 1 : 0); } - kdDebug() << QString("Tests from file '%1': OK").arg(testFilename) << endl; - result = (closeOnFinish || closeAppRequested) ? 0 : qApp->exec(); + kdDebug() << TQString("Tests from file '%1': OK").tqarg(testFilename) << endl; + result = (closeOnFinish || closeAppRequested) ? 0 : tqApp->exec(); quit(result); return result; } diff --git a/kexi/tests/altertable/altertable.h b/kexi/tests/altertable/altertable.h index 455c2bf5..9a2cdd14 100644 --- a/kexi/tests/altertable/altertable.h +++ b/kexi/tests/altertable/altertable.h @@ -20,17 +20,18 @@ #ifndef AlterTableTester_H #define AlterTableTester_H -#include <qurloperator.h> -#include <qnetwork.h> -#include <qnetworkprotocol.h> +#include <tqurloperator.h> +#include <tqnetwork.h> +#include <tqnetworkprotocol.h> #include <kexiutils/tristate.h> class KexiTableDesignerInterface; class KexiDialogBase; -class AlterTableTester : public QObject +class AlterTableTester : public TQObject { Q_OBJECT + TQ_OBJECT public: AlterTableTester(); ~AlterTableTester(); @@ -38,25 +39,25 @@ class AlterTableTester : public QObject tristate run(bool &closeAppRequested); protected slots: - void slotFinishedCopying(QNetworkOperation*); + void slotFinishedCopying(TQNetworkOperation*); private: bool changeFieldProperty(KexiTableDesignerInterface* designerIface); - bool getSchemaDump(KexiDialogBase* dlg, QString& schemaDebugString); + bool getSchemaDump(KexiDialogBase* dlg, TQString& schemaDebugString); bool showSchema(KexiDialogBase* dlg, bool copyToClipboard); bool checkSchema(KexiDialogBase* dlg); - bool getActionsDump(KexiDialogBase* dlg, QString& actionsDebugString); + bool getActionsDump(KexiDialogBase* dlg, TQString& actionsDebugString); bool showActions(KexiDialogBase* dlg, bool copyToClipboard); bool checkActions(KexiDialogBase* dlg); - bool checkInternal(KexiDialogBase* dlg, QString& debugString, - const QString& endCommand, bool skipColons); + bool checkInternal(KexiDialogBase* dlg, TQString& debugString, + const TQString& endCommand, bool skipColons); bool saveTableDesign(KexiDialogBase* dlg); - bool getTableDataDump(KexiDialogBase* dlg, QString& dataString); + bool getTableDataDump(KexiDialogBase* dlg, TQString& dataString); bool showTableData(KexiDialogBase* dlg, bool copyToClipboard); bool checkTableData(KexiDialogBase* dlg); bool closeWindow(KexiDialogBase* dlg); - QUrlOperator m_copyOperator; + TQUrlOperator m_copyOperator; bool m_finishedCopying; }; diff --git a/kexi/tests/gui/finddialog/finddialog.pro b/kexi/tests/gui/finddialog/finddialog.pro index f76b5372..dfbdd7eb 100644 --- a/kexi/tests/gui/finddialog/finddialog.pro +++ b/kexi/tests/gui/finddialog/finddialog.pro @@ -5,12 +5,12 @@ include( $(KEXI)/common.pro ) CONFIG += qt warn_on release DEPENDPATH = ../../include -system( bash kmoc ) +system( bash ktqmoc ) TARGET = finddialogtest DESTDIR=. -system( bash kmoc ) +system( bash ktqmoc ) system( bash kdcopidl ) SOURCES = kexifinddialog.cpp main.cpp diff --git a/kexi/tests/gui/finddialog/kexifinddialog.cpp b/kexi/tests/gui/finddialog/kexifinddialog.cpp index 64f54d51..5c3a7e4d 100644 --- a/kexi/tests/gui/finddialog/kexifinddialog.cpp +++ b/kexi/tests/gui/finddialog/kexifinddialog.cpp @@ -24,14 +24,14 @@ #include <kcombobox.h> #include <klocale.h> -#include <qcheckbox.h> -#include <qlabel.h> +#include <tqcheckbox.h> +#include <tqlabel.h> -KexiFindDialog::KexiFindDialog( bool replaceMode, QWidget* parent, const char* name, bool modal ) - : KexiFindDialogBase(parent, name, modal) +KexiFindDialog::KexiFindDialog( bool replaceMode, TQWidget* tqparent, const char* name, bool modal ) + : KexiFindDialogBase(tqparent, name, modal) , m_replaceMode(true) { - m_btnFind->setIconSet(KStdGuiItem::find().iconSet()); + m_btnFind->setIconSet(KStdGuiItem::tqfind().iconSet()); m_btnClose->setIconSet(KStdGuiItem::close().iconSet()); setReplaceMode(replaceMode); m_lookIn->insertItem(i18n("(All columns)")); diff --git a/kexi/tests/gui/finddialog/kexifinddialog.h b/kexi/tests/gui/finddialog/kexifinddialog.h index 9025d152..a6cdc47c 100644 --- a/kexi/tests/gui/finddialog/kexifinddialog.h +++ b/kexi/tests/gui/finddialog/kexifinddialog.h @@ -24,38 +24,39 @@ /*! @brief A Kexi-specific "Find text" dialog. - Also used for replace. + Also used for tqreplace. */ class KexiFindDialog : public KexiFindDialogBase { Q_OBJECT + TQ_OBJECT public: - KexiFindDialog( bool replaceMode, QWidget* parent = 0, const char* name = 0, bool modal = FALSE ); + KexiFindDialog( bool replaceMode, TQWidget* tqparent = 0, const char* name = 0, bool modal = FALSE ); virtual ~KexiFindDialog(); #if 0 TODO TODO TODO TODO TODO TODO /*! Sets \a columnNames list for 'look in column' combo box. "(All columns)" item is also prepended. */ - void setLookInColumnList(const QStringList& columnNames); + void setLookInColumnList(const TQStringList& columnNames); /*! \return a list for 'look in column' combo box. "(All columns)" item is also prepended. */ - QStringList* lookInColumnList() const; + TQStringList* lookInColumnList() const; /*! \return column name selected in 'look in column' combo box. If "(All columns)" item is selected, "*" is returned. */ - QString lookInColumn() const; + TQString lookInColumn() const; /*! Selects \a columnName to be selected 'look in column'. By default "(All columns)" item is selected. To select this item, pass "*". */ - void setLookInColumn(const QString& columnName); + void setLookInColumn(const TQString& columnName); #endif public slots: /*! Sets or clears replace mode. - For replace mode 'prompt or replace' option is visible. + For replace mode 'prompt or tqreplace' option is visible. */ void setReplaceMode(bool set); diff --git a/kexi/tests/gui/finddialog/kexifinddialogbase.ui b/kexi/tests/gui/finddialog/kexifinddialogbase.ui index f4684bff..41e4294b 100644 --- a/kexi/tests/gui/finddialog/kexifinddialogbase.ui +++ b/kexi/tests/gui/finddialog/kexifinddialogbase.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KexiFindDialogBase</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KexiFindDialogBase</cstring> </property> @@ -33,7 +33,7 @@ <bool>false</bool> </property> </widget> - <widget class="QCheckBox" row="4" column="2"> + <widget class="TQCheckBox" row="4" column="2"> <property name="name"> <cstring>m_caseSensitive</cstring> </property> @@ -81,7 +81,7 @@ <enum>NoInsertion</enum> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -92,7 +92,7 @@ <cstring>m_textToFind</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>m_replaceLbl</cstring> </property> @@ -103,7 +103,7 @@ <cstring>m_textToReplace</cstring> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel2_2_2</cstring> </property> @@ -114,7 +114,7 @@ <cstring>m_search</cstring> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>textLabel2_2_3</cstring> </property> @@ -159,7 +159,7 @@ <enum>NoInsertion</enum> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel2_2</cstring> </property> @@ -180,14 +180,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> </size> </property> </spacer> - <widget class="QCheckBox" row="5" column="2"> + <widget class="TQCheckBox" row="5" column="2"> <property name="name"> <cstring>m_wholeWords</cstring> </property> @@ -198,7 +198,7 @@ <string>&Whole words only</string> </property> </widget> - <widget class="QCheckBox" row="6" column="2"> + <widget class="TQCheckBox" row="6" column="2"> <property name="name"> <cstring>m_promptOnReplace</cstring> </property> @@ -206,7 +206,7 @@ <enum>WheelFocus</enum> </property> <property name="text"> - <string>Prompt on replace</string> + <string>Prompt on tqreplace</string> </property> <property name="checked"> <bool>true</bool> @@ -222,16 +222,16 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> </size> </property> </spacer> - <widget class="QLayoutWidget" row="0" column="4" rowspan="8" colspan="1"> + <widget class="TQLayoutWidget" row="0" column="4" rowspan="8" colspan="1"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <vbox> <property name="name"> @@ -279,7 +279,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>40</height> @@ -309,7 +309,7 @@ <tabstop>m_caseSensitive</tabstop> <tabstop>m_wholeWords</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kcombobox.h</includehint> <includehint>klineedit.h</includehint> diff --git a/kexi/tests/newapi/dr_prop_test.h b/kexi/tests/newapi/dr_prop_test.h index 71e882e3..d7bfd5b3 100644 --- a/kexi/tests/newapi/dr_prop_test.h +++ b/kexi/tests/newapi/dr_prop_test.h @@ -22,17 +22,17 @@ int drPropTest() { - QValueList<QCString> names = driver->propertyNames(); - kdDebug() << QString("%1 properties found:").arg(names.count()) << endl; - for (QValueList<QCString>::ConstIterator it = names.constBegin(); it!=names.constEnd(); ++it) { + TQValueList<TQCString> names = driver->propertyNames(); + kdDebug() << TQString("%1 properties found:").tqarg(names.count()) << endl; + for (TQValueList<TQCString>::ConstIterator it = names.constBegin(); it!=names.constEnd(); ++it) { kdDebug() << " - " << (*it) << ":" << " caption=\"" << driver->propertyCaption(*it) << "\"" << " type=" << driver->propertyValue(*it).typeName() << " value=\""<<driver->propertyValue(*it).toString()<<"\"" << endl; } -// QVariant propertyValue( const QCString& propName ) const; +// TQVariant propertyValue( const TQCString& propName ) const; -// QVariant propertyCaption( const QCString& propName ) const; +// TQVariant propertyCaption( const TQCString& propName ) const; return 0; } diff --git a/kexi/tests/newapi/main.cpp b/kexi/tests/newapi/main.cpp index 514538f3..ba232d5f 100644 --- a/kexi/tests/newapi/main.cpp +++ b/kexi/tests/newapi/main.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include <qfileinfo.h> -#include <qguardedptr.h> +#include <tqfileinfo.h> +#include <tqguardedptr.h> #include <kdebug.h> #include <kcmdlineargs.h> @@ -41,16 +41,16 @@ using namespace std; -QCString prgname; -QCString db_name; -QCString drv_name; -QCString test_name; +TQCString prgname; +TQCString db_name; +TQCString drv_name; +TQCString test_name; int cursor_options = 0; bool db_name_required = true; KexiDB::ConnectionData conn_data; -QGuardedPtr<KexiDB::Connection> conn; -QGuardedPtr<KexiDB::Driver> driver; +TQGuardedPtr<KexiDB::Connection> conn; +TQGuardedPtr<KexiDB::Driver> driver; KApplication *app = 0; KInstance *instance = 0; @@ -75,7 +75,7 @@ static KCmdLineOptions options[] = " to be buffered", 0}, { "query-params <params>", "Query parameters separated\n" "by '|' character that will be passed to query\n" - "statement to replace [...] placeholders.", 0 }, + "statement to tqreplace [...] placeholders.", 0 }, { "", " Notes:\n" "1. 'dr_prop' requires <db_name> argument.\n" "2. 'parser' test requires <db_name>,\n" @@ -112,7 +112,7 @@ int main(int argc, char** argv) usage(); RETURN(0); }*/ - QFileInfo info=QFileInfo(argv[0]); + TQFileInfo info=TQFileInfo(argv[0]); prgname = info.baseName().latin1(); KCmdLineArgs::init(argc, argv, @@ -136,8 +136,8 @@ int main(int argc, char** argv) RETURN(1); } test_name = args->getOption("test"); - if (!tests.contains(test_name)) { - kdDebug() << QString("No such test \"%1\". Use --help.").arg(test_name) << endl; + if (!tests.tqcontains(test_name)) { + kdDebug() << TQString("No such test \"%1\". Use --help.").tqarg(test_name.data()) << endl; RETURN(1); } @@ -152,7 +152,7 @@ int main(int argc, char** argv) db_name_required = false; } if ((int)args->count()<minargs) { - kdDebug() << QString("Not enough args (%1 required). Use --help.").arg(minargs) << endl; + kdDebug() << TQString("Not enough args (%1 required). Use --help.").tqarg(minargs) << endl; RETURN(1); } @@ -168,9 +168,9 @@ int main(int argc, char** argv) drv_name = args->arg(0); KexiDB::DriverManager manager; - QStringList names = manager.driverNames(); + TQStringList names = manager.driverNames(); kdDebug() << "DRIVERS: " << endl; - for (QStringList::ConstIterator it = names.constBegin(); it != names.constEnd() ; ++it) + for (TQStringList::ConstIterator it = names.constBegin(); it != names.constEnd() ; ++it) kdDebug() << *it << endl; if (manager.error() || names.isEmpty()) { manager.debugError(); @@ -223,9 +223,9 @@ int main(int argc, char** argv) else if (test_name == "tableview") r=tableViewTest(); else if (test_name == "parser") { - QStringList params; + TQStringList params; if (args->isSet("query-params")) - params = QStringList::split("|", args->getOption("query-params")); + params = TQStringList::split("|", args->getOption("query-params")); r=parserTest(args->arg(2), params); } else if (test_name == "dr_prop") diff --git a/kexi/tests/newapi/mysqlcursor.cpp b/kexi/tests/newapi/mysqlcursor.cpp index 7f0e9223..091cc8a1 100644 --- a/kexi/tests/newapi/mysqlcursor.cpp +++ b/kexi/tests/newapi/mysqlcursor.cpp @@ -11,9 +11,9 @@ int main(int argc, char * argv[]) { KInstance instance("newapi"); KexiDB::DriverManager manager; - QStringList names = manager.driverNames(); + TQStringList names = manager.driverNames(); kdDebug() << "DRIVERS: " << endl; - for (QStringList::ConstIterator it = names.constBegin(); it != names.constEnd() ; ++it) + for (TQStringList::ConstIterator it = names.constBegin(); it != names.constEnd() ; ++it) kdDebug() << *it << endl; if (manager.error()) { kdDebug() << manager.errorMsg() << endl; @@ -58,10 +58,10 @@ int main(int argc, char * argv[]) KexiDB::Cursor *c2=conn->executeQuery("select * from Applications"); if (!c2) kdDebug()<<conn->errorMsg()<<endl; - QStringList l=conn->databaseNames(); + TQStringList l=conn->databaseNames(); if (l.isEmpty()) kdDebug()<<conn->errorMsg()<<endl; kdDebug()<<"Databases:"<<endl; - for (QStringList::ConstIterator it = l.constBegin(); it != l.constEnd() ; ++it) + for (TQStringList::ConstIterator it = l.constBegin(); it != l.constEnd() ; ++it) kdDebug() << *it << endl; if (c) { diff --git a/kexi/tests/newapi/parser_test.h b/kexi/tests/newapi/parser_test.h index 14409961..90c25d7c 100644 --- a/kexi/tests/newapi/parser_test.h +++ b/kexi/tests/newapi/parser_test.h @@ -20,7 +20,7 @@ #ifndef PARSER_TEST_H #define PARSER_TEST_H -int parserTest(const char *st, const QStringList& params) +int parserTest(const char *st, const TQStringList& params) { int r = 0; @@ -31,10 +31,10 @@ int parserTest(const char *st, const QStringList& params) KexiDB::Parser parser(conn); - const bool ok = parser.parse(QString::fromLocal8Bit( st )); + const bool ok = parser.parse(TQString::fromLocal8Bit( st )); KexiDB::QuerySchema *q = parser.query(); - QValueList<QVariant> variantParams; - foreach( QStringList::ConstIterator, it, params ) + TQValueList<TQVariant> variantParams; + foreach( TQStringList::ConstIterator, it, params ) variantParams.append(*it); if (ok && q) { cout << q->debugString().latin1() << '\n'; @@ -42,8 +42,8 @@ int parserTest(const char *st, const QStringList& params) } else { KexiDB::ParserError err = parser.error(); - kdDebug() << QString("Error = %1\ntype = %2\nat = %3").arg(err.error()) - .arg(err.type()).arg(err.at()) << endl; + kdDebug() << TQString("Error = %1\ntype = %2\nat = %3").tqarg(err.error()) + .tqarg(err.type()).tqarg(err.at()) << endl; r = 1; } delete q; diff --git a/kexi/tests/newapi/statements.txt b/kexi/tests/newapi/statements.txt index 3d108ce7..c0cc8e7c 100644 --- a/kexi/tests/newapi/statements.txt +++ b/kexi/tests/newapi/statements.txt @@ -47,7 +47,7 @@ select 2+3*4 from cars; select (2+3)*4 from cars; -- OK202: support for aliases for complex-expression columns select (2+3)*4 from cars; --- ER203: column names are invalidated inside a complex expressions +-- ER203: column names are tqinvalidated inside a complex expressions select one*two from persons; -- ER204: like ER106, but ambiguous column is inside a complex expression select id*2 from persons p, cars p; diff --git a/kexi/tests/newapi/tables_test.h b/kexi/tests/newapi/tables_test.h index 67516db0..9ad0f4ee 100644 --- a/kexi/tests/newapi/tables_test.h +++ b/kexi/tests/newapi/tables_test.h @@ -56,10 +56,10 @@ int tablesTest() kdDebug() << "-- PERSONS created --" << endl; t_persons->debug(); - if (!conn->insertRecord(*t_persons, QVariant(1), QVariant(27), QVariant("Jaroslaw"), QVariant("Staniek")) - ||!conn->insertRecord(*t_persons, QVariant(2), QVariant(60), QVariant("Lech"), QVariant("Walesa")) - ||!conn->insertRecord(*t_persons, QVariant(3), QVariant(45), QVariant("Bill"), QVariant("Gates")) - ||!conn->insertRecord(*t_persons, QVariant(4), QVariant(35), QVariant("John"), QVariant("Smith")) + if (!conn->insertRecord(*t_persons, TQVariant(1), TQVariant(27), TQVariant("Jaroslaw"), TQVariant("Staniek")) + ||!conn->insertRecord(*t_persons, TQVariant(2), TQVariant(60), TQVariant("Lech"), TQVariant("Walesa")) + ||!conn->insertRecord(*t_persons, TQVariant(3), TQVariant(45), TQVariant("Bill"), TQVariant("Gates")) + ||!conn->insertRecord(*t_persons, TQVariant(4), TQVariant(35), TQVariant("John"), TQVariant("Smith")) ) { kdDebug() << "-- PERSONS data err. --" << endl; @@ -81,11 +81,11 @@ int tablesTest() return 1; } kdDebug() << "-- CARS created --" << endl; - if (!conn->insertRecord(*t_cars, QVariant(1), QVariant(1), QVariant("Fiat")) - ||!conn->insertRecord(*t_cars, QVariant(2), QVariant(2), QVariant("Syrena")) - ||!conn->insertRecord(*t_cars, QVariant(3), QVariant(3), QVariant("Chrysler")) - ||!conn->insertRecord(*t_cars, QVariant(4), QVariant(3), QVariant("BMW")) - ||!conn->insertRecord(*t_cars, QVariant(5), QVariant(4), QVariant("Volvo")) + if (!conn->insertRecord(*t_cars, TQVariant(1), TQVariant(1), TQVariant("Fiat")) + ||!conn->insertRecord(*t_cars, TQVariant(2), TQVariant(2), TQVariant("Syrena")) + ||!conn->insertRecord(*t_cars, TQVariant(3), TQVariant(3), TQVariant("Chrysler")) + ||!conn->insertRecord(*t_cars, TQVariant(4), TQVariant(3), TQVariant("BMW")) + ||!conn->insertRecord(*t_cars, TQVariant(5), TQVariant(4), TQVariant("Volvo")) ) { kdDebug() << "-- CARS data err. --" << endl; @@ -99,8 +99,8 @@ int tablesTest() } kdDebug() << "NOW, TABLE LIST: " << endl; - QStringList tnames = conn->tableNames(); - for (QStringList::iterator it = tnames.begin(); it!=tnames.end(); ++it) { + TQStringList tnames = conn->tableNames(); + for (TQStringList::iterator it = tnames.begin(); it!=tnames.end(); ++it) { kdDebug() << " - " << (*it) << endl; } diff --git a/kexi/tests/newapi/tableview_test.h b/kexi/tests/newapi/tableview_test.h index 2b5ef6c8..aad6314d 100644 --- a/kexi/tests/newapi/tableview_test.h +++ b/kexi/tests/newapi/tableview_test.h @@ -49,7 +49,7 @@ int tableViewTest() KexiDataTableView *tv = new KexiDataTableView(0, "tv", cursor); app->setMainWidget(tv); - tv->move((qApp->desktop()->width() - tv->width())/2, (qApp->desktop()->height() - tv->height())/2); + tv->move((tqApp->desktop()->width() - tv->width())/2, (tqApp->desktop()->height() - tv->height())/2); tv->show(); tv->setFocus(); diff --git a/kexi/tests/parser/main.cpp b/kexi/tests/parser/main.cpp index f6ee5742..803e0193 100644 --- a/kexi/tests/parser/main.cpp +++ b/kexi/tests/parser/main.cpp @@ -1,7 +1,7 @@ #include <iostream> #include <string> -#include <qfileinfo.h> +#include <tqfileinfo.h> #include <kdebug.h> #include <kinstance.h> @@ -13,24 +13,24 @@ #include <kexidb/parser/parser.h> using namespace std; -QCString prgname; +TQCString prgname; int main(int argc, char **argv) { kdDebug() << "main()" << endl; - QFileInfo info=QFileInfo(argv[0]); + TQFileInfo info=TQFileInfo(argv[0]); prgname = info.baseName().latin1(); KInstance instance( prgname ); if (argc<2) { return 1; } - QCString drv_name(argv[1]); - QCString db_name = QString(argv[2]).lower().latin1(); + TQCString drv_name(argv[1]); + TQCString db_name = TQString(argv[2]).lower().latin1(); KexiDB::DriverManager manager; // = KexiDB::DriverManager::self(); - QStringList names = manager.driverNames(); + TQStringList names = manager.driverNames(); kdDebug() << "DRIVERS: " << endl; - for (QStringList::ConstIterator it = names.constBegin(); it != names.constEnd() ; ++it) + for (TQStringList::ConstIterator it = names.constBegin(); it != names.constEnd() ; ++it) kdDebug() << *it << endl; if (manager.error()) { kdDebug() << manager.errorMsg() << endl; diff --git a/kexi/tests/startup/main.cpp b/kexi/tests/startup/main.cpp index dd2e86ce..3d97ac32 100644 --- a/kexi/tests/startup/main.cpp +++ b/kexi/tests/startup/main.cpp @@ -43,9 +43,9 @@ int main(int argc, char* argv[]) KexiTableViewData data; KexiTableViewColumn col; - col.type = QVariant::Int; col.caption = "Id"; data.addColumn( col ); - col.type = QVariant::String; col.caption = "Name"; data.addColumn( col ); - col.type = QVariant::Int; col.caption = "Age"; data.addColumn( col ); + col.type = TQVariant::Int; col.caption = "Id"; data.addColumn( col ); + col.type = TQVariant::String; col.caption = "Name"; data.addColumn( col ); + col.type = TQVariant::Int; col.caption = "Age"; data.addColumn( col ); tv.setData(&data, false); tv.show();*/ @@ -76,9 +76,9 @@ int main(int argc, char* argv[]) KexiStartupDialog startup(KexiStartupDialog::Everything, 0, connset, prj_set, 0, "dlg"); int e=startup.exec(); - kdDebug() << (e==QDialog::Accepted ? "Accepted" : "Rejected") << endl; + kdDebug() << (e==TQDialog::Accepted ? "Accepted" : "Rejected") << endl; - if (e==QDialog::Accepted) { + if (e==TQDialog::Accepted) { int r = startup.result(); if (r==KexiStartupDialog::TemplateResult) { kdDebug() << "Template key == " << startup.selectedTemplateKey() << endl; @@ -86,8 +86,8 @@ int main(int argc, char* argv[]) #if 0 KexiConnSelectorDialog sel(connset, 0,"sel"); e = sel.exec(); - kdDebug() << (e==QDialog::Accepted ? "Accepted" : "Rejected") << endl; - if (e==QDialog::Accepted) { + kdDebug() << (e==TQDialog::Accepted ? "Accepted" : "Rejected") << endl; + if (e==TQDialog::Accepted) { kdDebug() << "Selected conn. type: " << (sel.selectedConnectionType()==KexiConnSelectorWidget::FileBased ? "File based" : "Server based") << endl; if (sel.selectedConnectionType()==KexiConnSelectorWidget::ServerBased) { kdDebug() << "SERVER: " << sel.selectedConnectionData()->serverInfoString() << endl; @@ -98,7 +98,7 @@ int main(int argc, char* argv[]) } else if (r==KexiStartupDialog::OpenExistingResult) { kdDebug() << "Existing project --------" << endl; - QString selFile = startup.selectedExistingFile(); + TQString selFile = startup.selectedExistingFile(); if (!selFile.isEmpty()) kdDebug() << "Project File: " << selFile << endl; else if (startup.selectedExistingConnection()) { diff --git a/kexi/tests/widgets/kexidbdrivercombotest.cpp b/kexi/tests/widgets/kexidbdrivercombotest.cpp index 8feb56fa..1ada79b1 100644 --- a/kexi/tests/widgets/kexidbdrivercombotest.cpp +++ b/kexi/tests/widgets/kexidbdrivercombotest.cpp @@ -22,8 +22,8 @@ * OTHER DEALINGS IN THE SOFTWARE. * ***************************************************************************/ -#include <qlayout.h> -#include <qpushbutton.h> +#include <tqlayout.h> +#include <tqpushbutton.h> #include <kdebug.h> #include <kcmdlineargs.h> #include <kapplication.h> @@ -53,21 +53,21 @@ int main(int argc, char** argv) KexiDB::Driver::InfoMap drvs = manager.driversInfo(); // Set up a combo box and a quit widget in a new container - QWidget* vbox = new QWidget(); - QVBoxLayout* vbLayout = new QVBoxLayout(vbox); + TQWidget* vbox = new TQWidget(); + TQVBoxLayout* vbLayout = new TQVBoxLayout(vbox); KexiDBDriverComboBox* all = new KexiDBDriverComboBox(vbox, drvs); KexiDBDriverComboBox* srvOnly = new KexiDBDriverComboBox(vbox, drvs, KexiDBDriverComboBox::ShowServerDrivers); - QPushButton* quit = new QPushButton("Quit", vbox); + TQPushButton* quit = new TQPushButton("Quit", vbox); vbLayout->addWidget(all); // Combobox listing all drivers vbLayout->addWidget(srvOnly); // Combobox only drivers for DB servers vbLayout->addWidget(quit); // Show the whole lot - QObject::connect(quit, SIGNAL(clicked()), app, SLOT(quit())); + TQObject::connect(quit, TQT_SIGNAL(clicked()), app, TQT_SLOT(quit())); vbox->show(); app->exec(); |