summaryrefslogtreecommitdiffstats
path: root/kexi/tests/altertable/altertable.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-19 11:38:41 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-19 11:38:41 -0600
commitf0de9e167e289ab7dc33e57f077c1f04ec7c68c8 (patch)
tree1fc538e179833e62caec21956bfe47a252be5a72 /kexi/tests/altertable/altertable.cpp
parent11191ef0b9908604d1d7aaca382b011ef22c454c (diff)
downloadkoffice-f0de9e167e289ab7dc33e57f077c1f04ec7c68c8.tar.gz
koffice-f0de9e167e289ab7dc33e57f077c1f04ec7c68c8.zip
Remove additional unneeded tq method conversions
Diffstat (limited to 'kexi/tests/altertable/altertable.cpp')
-rw-r--r--kexi/tests/altertable/altertable.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/kexi/tests/altertable/altertable.cpp b/kexi/tests/altertable/altertable.cpp
index 6155eb63..0155ed87 100644
--- a/kexi/tests/altertable/altertable.cpp
+++ b/kexi/tests/altertable/altertable.cpp
@@ -56,7 +56,7 @@ KexiProject* prj = 0;
void showError(const TQString& msg)
{
TQString msg_(msg);
- msg_.prepend(TQString("Error at line %1: ").tqarg(testLineNumber));
+ msg_.prepend(TQString("Error at line %1: ").arg(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'")
- .tqarg(testFileLine[0]).tqarg(expectedCommandName));
+ .arg(testFileLine[0]).arg(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")
- .tqarg(testFileLine.count()).tqarg(testFileLine[0]).tqarg(expectedNumberOfItems);
+ .arg(testFileLine.count()).arg(testFileLine[0]).arg(expectedNumberOfItems);
if (optionalNumberOfItems>0)
- msg.append( TQString(" or %1").tqarg(optionalNumberOfItems) );
+ msg.append( TQString(" or %1").arg(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'").tqarg(name_));
+ showError(TQString("Invalid type '%1'").arg(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'").tqarg(argument));
+ showError(TQString("Invalid value '%1'").arg(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'")
- .tqarg(propertyName).tqarg(propertyValueString).tqarg(propertyType) );
+ .arg(propertyName).arg(propertyValueString).arg(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")
- .tqarg(~result ? "cancelled" : "false") );
+ .arg(~result ? "cancelled" : "false") );
return false;
}
schemaDebugString.remove(TQRegExp(",$")); //no need to have "," at the end of lines
@@ -298,7 +298,7 @@ bool AlterTableTester::showSchema(KexiDialogBase* dlg, bool copyToClipboard)
if (copyToClipboard)
TQApplication::tqclipboard()->setText( schemaDebugString );
else
- kdDebug() << TQString("Schema for '%1' table:\n").tqarg(dlg->partItem()->name())
+ kdDebug() << TQString("Schema for '%1' table:\n").arg(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").tqarg(dlg->partItem()->name())
- .tqarg(result ? "OK" : "Failed") << endl;
+ kdDebug() << TQString("Schema check for table '%1': %2").arg(dlg->partItem()->name())
+ .arg(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.").tqarg(dlg->partItem()->name()) );
+ showError( TQString("Computing simplified actions for table '%1' failed.").arg(dlg->partItem()->name()) );
return false;
}
return true;
@@ -381,7 +381,7 @@ bool AlterTableTester::showActions(KexiDialogBase* dlg, bool copyToClipboard)
if (copyToClipboard)
TQApplication::tqclipboard()->setText( actionsDebugString );
else
- kdDebug() << TQString("Simplified actions for altering table '%1':\n").tqarg(dlg->partItem()->name())
+ kdDebug() << TQString("Simplified actions for altering table '%1':\n").arg(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").tqarg(dlg->partItem()->name())
- .tqarg(result ? "OK" : "Failed") << endl;
+ kdDebug() << TQString("Actions check for table '%1': %2").arg(dlg->partItem()->name())
+ .arg(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.").tqarg(dlg->partItem()->name()) );
+ showError( TQString("Saving design of table '%1' failed.").arg(dlg->partItem()->name()) );
return false;
}
return true;
@@ -441,7 +441,7 @@ bool AlterTableTester::showTableData(KexiDialogBase* dlg, bool copyToClipboard)
if (copyToClipboard)
TQApplication::tqclipboard()->setText( dataString );
else
- kdDebug() << TQString("Contents of table '%1':\n").tqarg(dlg->partItem()->name())+dataString+"\n" << endl;
+ kdDebug() << TQString("Contents of table '%1':\n").arg(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").tqarg(dlg->partItem()->name())
- .tqarg(result ? "OK" : "Failed") << endl;
+ kdDebug() << TQString("Table '%1' contents: %2").arg(dlg->partItem()->name())
+ .arg(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").tqarg(name)
- .tqarg(result==true ? "OK" : (result==false ? "Failed" : "Cancelled")) << endl;
+ kdDebug() << TQString("Closing window for table '%1': %2").arg(name)
+ .arg(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'").tqarg(tableName));
+ showError(TQString("No such table '%1'").arg(tableName));
return false;
}
bool openingCancelled;
KexiDialogBase* dlg = win->openObject(item, Kexi::DesignViewMode, openingCancelled);
if (!dlg) {
- showError(TQString("Could not open table '%1'").tqarg(item->name()));
+ showError(TQString("Could not open table '%1'").arg(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'").tqarg(command));
+ showError(TQString("Invalid variable initialization '%1'").arg(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.").tqarg(testLineNumber) << endl;
+ kdDebug() << TQString("Test STOPPED at line %1.").arg(testLineNumber) << endl;
break;
}
else if (command=="closeWindow") {
@@ -640,7 +640,7 @@ tristate AlterTableTester::run(bool &closeAppRequested)
break;
}
else {
- showError( TQString("No such command '%1'").tqarg(command) );
+ showError( TQString("No such command '%1'").arg(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.").tqarg(testFilename) << endl;
+ kdWarning() << TQString("Opening test file %1 failed.").arg(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.").tqarg(testFilename) << endl;
+ kdWarning() << TQString("Running test for file '%1' failed.").arg(testFilename) << endl;
return quit(res==false ? 1 : 0);
}
- kdDebug() << TQString("Tests from file '%1': OK").tqarg(testFilename) << endl;
+ kdDebug() << TQString("Tests from file '%1': OK").arg(testFilename) << endl;
result = (closeOnFinish || closeAppRequested) ? 0 : tqApp->exec();
quit(result);
return result;