summaryrefslogtreecommitdiffstats
path: root/kunittest/runnergui.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-12 01:36:19 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-12 01:36:19 +0000
commit99a2774ca6f1cab334de5d43fe36fc44ae889a4c (patch)
treeeff34cf0762227f6baf2a93e8fef48d4bed2651c /kunittest/runnergui.cpp
parent1c104292188541106338d4940b0f04beeb4301a0 (diff)
downloadtdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.tar.gz
tdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.zip
TQt4 convert kdesdk
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1236185 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kunittest/runnergui.cpp')
-rw-r--r--kunittest/runnergui.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/kunittest/runnergui.cpp b/kunittest/runnergui.cpp
index ded28e57..8b4969a8 100644
--- a/kunittest/runnergui.cpp
+++ b/kunittest/runnergui.cpp
@@ -70,7 +70,7 @@ namespace KUnitTest
*/
bool addDebugInfo(const TQString &name, const TQString &info)
{
- Tester *tester = Runner::self()->registry().find(name.local8Bit());
+ Tester *tester = Runner::self()->registry().tqfind(name.local8Bit());
if ( tester == 0L ) return false;
tester->results()->addDebugInfo(info);
@@ -80,7 +80,7 @@ namespace KUnitTest
bool addSlotDebugInfo(const TQString &name, const TQString &slt, const TQString &info)
{
- Tester *tester = Runner::self()->registry().find(name.local8Bit());
+ Tester *tester = Runner::self()->registry().tqfind(name.local8Bit());
if ( tester == 0L ) return false;
if ( ! tester->inherits("KUnitTest::SlotTester") ) return false;
@@ -95,7 +95,7 @@ namespace KUnitTest
RunnerGUI *m_rg;
};
- RunnerGUI::RunnerGUI(TQWidget *parent) : TQHBox(parent)
+ RunnerGUI::RunnerGUI(TQWidget *tqparent) : TQHBox(tqparent)
{
m_dcop = new RunnerGUIDCOPImpl(this);
@@ -113,10 +113,10 @@ namespace KUnitTest
addTester(it.currentKey(), it.current());
TQString test = it.currentKey();
- int index = test.find("::");
+ int index = test.tqfind("::");
if ( index != -1 ) test = test.left(index);
- if ( suites.contains(test) == 0 )
+ if ( suites.tqcontains(test) == 0 )
suites.append(test);
}
@@ -127,12 +127,12 @@ namespace KUnitTest
m_testerWidget->resultList()->setAllColumnsShowFocus(true);
m_testerWidget->resultList()->setSelectionMode(TQListView::Extended);
m_testerWidget->resultList()->setRootIsDecorated(true);
- m_testerWidget->resultList()->setColumnAlignment(g_finishedColumn, Qt::AlignHCenter);
- m_testerWidget->resultList()->setColumnAlignment(g_skippedColumn, Qt::AlignHCenter);
- m_testerWidget->resultList()->setColumnAlignment(g_failedColumn, Qt::AlignHCenter);
- m_testerWidget->resultList()->setColumnAlignment(g_xfailedColumn, Qt::AlignHCenter);
- m_testerWidget->resultList()->setColumnAlignment(g_passedColumn, Qt::AlignHCenter);
- m_testerWidget->resultList()->setColumnAlignment(g_xpassedColumn, Qt::AlignHCenter);
+ m_testerWidget->resultList()->setColumnAlignment(g_finishedColumn, TQt::AlignHCenter);
+ m_testerWidget->resultList()->setColumnAlignment(g_skippedColumn, TQt::AlignHCenter);
+ m_testerWidget->resultList()->setColumnAlignment(g_failedColumn, TQt::AlignHCenter);
+ m_testerWidget->resultList()->setColumnAlignment(g_xfailedColumn, TQt::AlignHCenter);
+ m_testerWidget->resultList()->setColumnAlignment(g_passedColumn, TQt::AlignHCenter);
+ m_testerWidget->resultList()->setColumnAlignment(g_xpassedColumn, TQt::AlignHCenter);
// set the text in the results label
fillResultsLabel();
@@ -162,13 +162,13 @@ namespace KUnitTest
if ( Runner::self()->numberOfTests() > 0 )
m_testerWidget->resultsLabel()->setText(
TQString("Test cases: %1 | Tests performed: %5, Skipped: <font color=\"#f7a300\">%4</font> | Passed: <font color=\"#009900\">%2</font>, Failed: <font color=\"#990000\">%3</font>")
- .arg(Runner::self()->numberOfTestCases())
- .arg(Runner::self()->numberOfPassedTests())
- .arg(Runner::self()->numberOfFailedTests())
- .arg(Runner::self()->numberOfSkippedTests())
- .arg(Runner::self()->numberOfTests()) );
+ .tqarg(Runner::self()->numberOfTestCases())
+ .tqarg(Runner::self()->numberOfPassedTests())
+ .tqarg(Runner::self()->numberOfFailedTests())
+ .tqarg(Runner::self()->numberOfSkippedTests())
+ .tqarg(Runner::self()->numberOfTests()) );
else
- m_testerWidget->resultsLabel()->setText(TQString("Test cases: %1").arg(Runner::self()->numberOfTestCases()));
+ m_testerWidget->resultsLabel()->setText(TQString("Test cases: %1").tqarg(Runner::self()->numberOfTestCases()));
}
void RunnerGUI::addTestResult(const char *name, Tester *test)
@@ -211,7 +211,7 @@ namespace KUnitTest
if ( test->inherits("KUnitTest::SlotTester") )
{
- TQStrList allSlots = test->metaObject()->slotNames();
+ TQStrList allSlots = test->tqmetaObject()->slotNames();
for ( char *sl = allSlots.first(); sl; sl = allSlots.next() )
{
if ( TQString(sl).startsWith("test") )
@@ -222,7 +222,7 @@ namespace KUnitTest
TQListViewItem *RunnerGUI::getItem(const TQString &name, TQListViewItem *item /*= 0L*/)
{
- TQListViewItem *parent = item;
+ TQListViewItem *tqparent = item;
if ( item == 0L ) item = m_testerWidget->resultList()->firstChild();
else item = item->firstChild();
@@ -233,10 +233,10 @@ namespace KUnitTest
// item not found, create it
if ( item == 0L )
{
- if ( parent == 0L )
+ if ( tqparent == 0L )
item = new TQListViewItem(m_testerWidget->resultList());
else
- item = new TQListViewItem(parent);
+ item = new TQListViewItem(tqparent);
item->setText(g_nameColumn, name);
}
@@ -288,13 +288,13 @@ namespace KUnitTest
bool passed = (item->text(g_failedColumn).toInt(&ok) + item->text(g_xfailedColumn).toInt(&ok)) == 0;
item->setPixmap(g_nameColumn, passed ? SmallIcon("button_ok") : SmallIcon("button_cancel") );
- setSummary(item->parent(), res);
+ setSummary(item->tqparent(), res);
}
TQString RunnerGUI::fullName(TQListViewItem *item)
{
TQString name = item->text(g_nameColumn);
- while ( (item = item->parent()) != 0L )
+ while ( (item = item->tqparent()) != 0L )
name = item->text(g_nameColumn) + "::" + name;
return name;
@@ -322,7 +322,7 @@ namespace KUnitTest
TQString prefix = fullName(item);
if ( prefix.endsWith("()") )
{
- int index = prefix.findRev("::");
+ int index = prefix.tqfindRev("::");
prefix = prefix.left(index);
}
prefixes << prefix;
@@ -358,9 +358,9 @@ namespace KUnitTest
if ( item == 0L ) return;
TQString name = fullName(item);
- if ( name.endsWith("()") ) name = fullName(item->parent());
+ if ( name.endsWith("()") ) name = fullName(item->tqparent());
- Tester *tester = Runner::self()->registry().find(name.local8Bit());
+ Tester *tester = Runner::self()->registry().tqfind(name.local8Bit());
if ( tester == 0L ) return;
@@ -423,7 +423,7 @@ namespace KUnitTest
bool ok;
arg << TQString(reFileAndLine.cap(1)) << (reFileAndLine.cap(2).toInt(&ok) - 1);
client.send("kdevelop-*", "KDevPartController", "editDocument(TQString,int)", data);
- client.send("kdevelop-*", "MainWindow", "raise()", "");
+ client.send("kdevelop-*", "MainWindow", "raise()", TQString(""));
client.detach();
}