From c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 16 Dec 2011 09:56:31 -0600 Subject: Revert "Rename a number of old tq methods that are no longer tq specific" This reverts commit 94844816550ad672ccfcdc25659c625546239998. --- kexi/tests/altertable/1.kexi | Bin 49204 -> 49206 bytes kexi/tests/altertable/altertable.cpp | 66 ++++++++++++------------ kexi/tests/gui/finddialog/kexifinddialogbase.ui | 8 +-- kexi/tests/newapi/dr_prop_test.h | 2 +- kexi/tests/newapi/main.cpp | 4 +- kexi/tests/newapi/parser_test.h | 4 +- kexi/tests/widgets/kexidbdrivercombotest.cpp | 2 +- 7 files changed, 43 insertions(+), 43 deletions(-) (limited to 'kexi/tests') diff --git a/kexi/tests/altertable/1.kexi b/kexi/tests/altertable/1.kexi index 5a1b4ebd..8c13ad39 100644 Binary files a/kexi/tests/altertable/1.kexi and b/kexi/tests/altertable/1.kexi differ diff --git a/kexi/tests/altertable/altertable.cpp b/kexi/tests/altertable/altertable.cpp index 765457af..6155eb63 100644 --- a/kexi/tests/altertable/altertable.cpp +++ b/kexi/tests/altertable/altertable.cpp @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include @@ -56,7 +56,7 @@ KexiProject* prj = 0; void showError(const TQString& msg) { TQString msg_(msg); - msg_.prepend(TQString("Error at line %1: ").arg(testLineNumber)); + msg_.prepend(TQString("Error at line %1: ").tqarg(testLineNumber)); kdDebug() << msg_ << endl; } @@ -119,7 +119,7 @@ tristate readLineFromTestFile(const TQString& expectedCommandName = TQString()) } if (!expectedCommandName.isEmpty() && testFileLine[0]!=expectedCommandName) { showError( TQString("Invalid command '%1', expected '%2'") - .arg(testFileLine[0]).arg(expectedCommandName)); + .tqarg(testFileLine[0]).tqarg(expectedCommandName)); return false; } if (quoted) { @@ -136,9 +136,9 @@ bool checkItemsNumber(int expectedNumberOfItems, int optionalNumberOfItems = -1) ok = ok || optionalNumberOfItems==(int)testFileLine.count(); if (!ok) { TQString msg = TQString("Invalid number of args (%1) for command '%2', expected: %3") - .arg(testFileLine.count()).arg(testFileLine[0]).arg(expectedNumberOfItems); + .tqarg(testFileLine.count()).tqarg(testFileLine[0]).tqarg(expectedNumberOfItems); if (optionalNumberOfItems>0) - msg.append( TQString(" or %1").arg(optionalNumberOfItems) ); + msg.append( TQString(" or %1").tqarg(optionalNumberOfItems) ); showError( msg ); return false; } @@ -167,7 +167,7 @@ TQVariant::Type typeNameToTQVariantType(const TQCString& name_) if (name=="longlong") return TQVariant::LongLong; //todo more types - showError(TQString("Invalid type '%1'").arg(name_)); + showError(TQString("Invalid type '%1'").tqarg(name_)); return TQVariant::Invalid; } @@ -202,7 +202,7 @@ static int getNumber(const TQString& argument, bool& ok) else { result = argument.toInt(&ok); if (!ok) { - showError(TQString("Invalid value '%1'").arg(argument)); + showError(TQString("Invalid value '%1'").tqarg(argument)); return -1; } } @@ -248,7 +248,7 @@ bool AlterTableTester::changeFieldProperty(KexiTableDesignerInterface* designerI else { if (!castStringToTQVariant(propertyValueString, propertyType, newValue)) { showError( TQString("Could not set property '%1' value '%2' of type '%3'") - .arg(propertyName).arg(propertyValueString).arg(propertyType) ); + .tqarg(propertyName).tqarg(propertyValueString).tqarg(propertyType) ); return false; } } @@ -283,7 +283,7 @@ bool AlterTableTester::getSchemaDump(KexiDialogBase* dlg, TQString& schemaDebugS schemaDebugString = designerIface->debugStringForCurrentTableSchema(result); if (true!=result) { showError( TQString("Loading modified schema failed. Result: %1") - .arg(~result ? "cancelled" : "false") ); + .tqarg(~result ? "cancelled" : "false") ); return false; } schemaDebugString.remove(TQRegExp(",$")); //no need to have "," at the end of lines @@ -296,9 +296,9 @@ bool AlterTableTester::showSchema(KexiDialogBase* dlg, bool copyToClipboard) if (!getSchemaDump(dlg, schemaDebugString)) return false; if (copyToClipboard) - TQApplication::clipboard()->setText( schemaDebugString ); + TQApplication::tqclipboard()->setText( schemaDebugString ); else - kdDebug() << TQString("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; } @@ -354,8 +354,8 @@ bool AlterTableTester::checkSchema(KexiDialogBase* dlg) if (!getSchemaDump(dlg, schemaDebugString)) return false; bool result = checkInternal(dlg, schemaDebugString, "endSchema", true /*skipColonsAndStripWhiteSpace*/); - kdDebug() << TQString("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; } @@ -367,7 +367,7 @@ bool AlterTableTester::getActionsDump(KexiDialogBase* dlg, TQString& actionsDebu return false; tristate result = designerIface->simulateAlterTableExecution(&actionsDebugString); if (true!=result) { - showError( TQString("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; @@ -379,9 +379,9 @@ bool AlterTableTester::showActions(KexiDialogBase* dlg, bool copyToClipboard) if (!getActionsDump(dlg, actionsDebugString)) return false; if (copyToClipboard) - TQApplication::clipboard()->setText( actionsDebugString ); + TQApplication::tqclipboard()->setText( actionsDebugString ); else - kdDebug() << TQString("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; } @@ -392,8 +392,8 @@ bool AlterTableTester::checkActions(KexiDialogBase* dlg) if (!getActionsDump(dlg, actionsDebugString)) return false; bool result = checkInternal(dlg, actionsDebugString, "endActions", true /*skipColonsAndStripWhiteSpace*/); - kdDebug() << TQString("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,7 +405,7 @@ bool AlterTableTester::saveTableDesign(KexiDialogBase* dlg) return false; tristate result = designerIface->executeRealAlterTable(); if (true!=result) { - showError( TQString("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; @@ -439,9 +439,9 @@ bool AlterTableTester::showTableData(KexiDialogBase* dlg, bool copyToClipboard) if (!getTableDataDump(dlg, dataString)) return false; if (copyToClipboard) - TQApplication::clipboard()->setText( dataString ); + TQApplication::tqclipboard()->setText( dataString ); else - kdDebug() << TQString("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; } @@ -451,8 +451,8 @@ bool AlterTableTester::checkTableData(KexiDialogBase* dlg) if (!getTableDataDump(dlg, dataString)) return false; bool result = checkInternal(dlg, dataString, "endTableData", false /*!skipColonsAndStripWhiteSpace*/); - kdDebug() << TQString("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; } @@ -462,8 +462,8 @@ bool AlterTableTester::closeWindow(KexiDialogBase* dlg) return true; TQString name = dlg->partItem()->name(); tristate result = true == win->closeDialog(dlg, true/*layoutTaskBar*/, true/*doNotSaveChanges*/); - kdDebug() << TQString("Closing window for table '%1': %2").arg(name) - .arg(result==true ? "OK" : (result==false ? "Failed" : "Cancelled")) << endl; + kdDebug() << TQString("Closing window for table '%1': %2").tqarg(name) + .tqarg(result==true ? "OK" : (result==false ? "Failed" : "Cancelled")) << endl; return result == true; } @@ -492,13 +492,13 @@ tristate AlterTableTester::run(bool &closeAppRequested) TQString tableName(testFileLine[1]); KexiPart::Item *item = prj->itemForMimeType("kexi/table", tableName); if (!item) { - showError(TQString("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(TQString("Could not open table '%1'").arg(item->name())); + showError(TQString("Could not open table '%1'").tqarg(item->name())); return false; } KexiTableDesignerInterface* designerIface @@ -570,7 +570,7 @@ tristate AlterTableTester::run(bool &closeAppRequested) bool ok; variableI = command.mid(2).toInt(&ok); if (!ok) { - showError(TQString("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() << TQString("Test STOPPED at line %1.").arg(testLineNumber) << endl; + kdDebug() << TQString("Test STOPPED at line %1.").tqarg(testLineNumber) << endl; break; } else if (command=="closeWindow") { @@ -640,7 +640,7 @@ tristate AlterTableTester::run(bool &closeAppRequested) break; } else { - showError( TQString("No such command '%1'").arg(command) ); + showError( TQString("No such command '%1'").tqarg(command) ); return false; } } @@ -674,7 +674,7 @@ int main(int argc, char *argv[]) testFilename = argv[argc-1]; testFile.setName(testFilename); if (!testFile.open(IO_ReadOnly)) { - kdWarning() << TQString("Opening test file %1 failed.").arg(testFilename) << endl; + kdWarning() << TQString("Opening test file %1 failed.").tqarg(testFilename) << endl; return quit(1); } //load db name @@ -704,10 +704,10 @@ int main(int argc, char *argv[]) res = tester.run(closeAppRequested); if (true != res) { if (false == res) - kdWarning() << TQString("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() << TQString("Tests from file '%1': OK").arg(testFilename) << endl; + 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/gui/finddialog/kexifinddialogbase.ui b/kexi/tests/gui/finddialog/kexifinddialogbase.ui index bf5fcd32..0f2248e6 100644 --- a/kexi/tests/gui/finddialog/kexifinddialogbase.ui +++ b/kexi/tests/gui/finddialog/kexifinddialogbase.ui @@ -180,7 +180,7 @@ Expanding - + 16 20 @@ -222,7 +222,7 @@ Expanding - + 20 16 @@ -231,7 +231,7 @@ - layout2 + tqlayout2 @@ -279,7 +279,7 @@ Expanding - + 20 40 diff --git a/kexi/tests/newapi/dr_prop_test.h b/kexi/tests/newapi/dr_prop_test.h index 2cbee8b2..d7bfd5b3 100644 --- a/kexi/tests/newapi/dr_prop_test.h +++ b/kexi/tests/newapi/dr_prop_test.h @@ -23,7 +23,7 @@ int drPropTest() { TQValueList names = driver->propertyNames(); - kdDebug() << TQString("%1 properties found:").arg(names.count()) << endl; + kdDebug() << TQString("%1 properties found:").tqarg(names.count()) << endl; for (TQValueList::ConstIterator it = names.constBegin(); it!=names.constEnd(); ++it) { kdDebug() << " - " << (*it) << ":" << " caption=\"" << driver->propertyCaption(*it) << "\"" diff --git a/kexi/tests/newapi/main.cpp b/kexi/tests/newapi/main.cpp index 9eaff2ab..d02dbc9b 100644 --- a/kexi/tests/newapi/main.cpp +++ b/kexi/tests/newapi/main.cpp @@ -137,7 +137,7 @@ int main(int argc, char** argv) } test_name = args->getOption("test"); if (!tests.contains(test_name)) { - kdDebug() << TQString("No such test \"%1\". Use --help.").arg(test_name.data()) << endl; + 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() +#include #include #include #include -- cgit v1.2.1